WO2023168909A1 - Pre-training method and model fine-tuning method for geographical pre-training model - Google Patents

Pre-training method and model fine-tuning method for geographical pre-training model Download PDF

Info

Publication number
WO2023168909A1
WO2023168909A1 PCT/CN2022/113287 CN2022113287W WO2023168909A1 WO 2023168909 A1 WO2023168909 A1 WO 2023168909A1 CN 2022113287 W CN2022113287 W CN 2022113287W WO 2023168909 A1 WO2023168909 A1 WO 2023168909A1
Authority
WO
WIPO (PCT)
Prior art keywords
training
geographical
model
interest
node
Prior art date
Application number
PCT/CN2022/113287
Other languages
French (fr)
Chinese (zh)
Inventor
黄际洲
王海峰
孙一博
施云生
黄正杰
卓安
冯仕堃
Original Assignee
北京百度网讯科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京百度网讯科技有限公司 filed Critical 北京百度网讯科技有限公司
Publication of WO2023168909A1 publication Critical patent/WO2023168909A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Definitions

  • the present disclosure relates to the field of data processing technology, specifically to the field of artificial intelligence technology such as deep learning and graph structure, and in particular to a pre-training method for a geographical pre-training model and a model fine-tuning method for a geographical pre-training model, as well as corresponding devices and electronic equipment. , computer-readable storage media and computer program products.
  • map field is special.
  • the information processing process in the map field often needs to be related to the real world. For example, in a map search engine, when a user enters a search term (or query term), the location of the candidate point of interest (full English name: Point of Interest, English abbreviation: POI) and its relationship with the user's current location Distance is a very important ranking feature.
  • Embodiments of the present disclosure propose a pre-training method for a geographical pre-training model, a model fine-tuning method for a geographical pre-training model, and corresponding devices, electronic equipment, computer-readable storage media and computer program products.
  • an embodiment of the present disclosure proposes a pre-training method for a geographical pre-training model, which includes: obtaining a sample node sequence; wherein the sample node sequence is generated based on a preset interest point heterogeneous graph and a random walk algorithm.
  • the point heterogeneous graph includes each node acted by each interest point and the edges connecting each node.
  • the node name is the place name of the corresponding interest point, and the edges represent the correlation between the corresponding nodes in the real world;
  • the sample node sequence is used as a training sample
  • the preset location code corresponds to the geographical block where the corresponding interest point is located in the real world.
  • an embodiment of the present disclosure proposes a pre-training device for a geographical pre-training model, including: a sample node sequence acquisition unit configured to obtain a sample node sequence; wherein the sample node sequence is based on preset heterogeneous points of interest Graph and random walk algorithm are generated.
  • the heterogeneous graph of interest points includes each node acted by each interest point and the edges connecting each node.
  • the node names are the place names of the corresponding interest points, and the edges represent the relationships between the corresponding nodes in the real world.
  • the training sample input unit is configured to input the sample node sequence as a training sample to the initial geographic pre-training model
  • the geographic pre-training model training unit is configured to control the initial geographic pre-training model to train according to the preset training goals, and The current geographic pre-training model that reaches the training goal is output as the target geographic pre-training model; among which, the training goal includes sub-goals that guide the model to learn the mapping relationship between the place names of points of interest and preset location codes from the training samples. Assume that the location code corresponds to the geographical block where the corresponding point of interest is located in the real world.
  • an embodiment of the present disclosure proposes a model fine-tuning method for a geographical pre-training model, which includes: obtaining a target geographical pre-training model; wherein the target geographical pre-training model is based on the geographical pre-training of any one of the first aspects.
  • the model training method is obtained; the new functional requirements of the map application are obtained, and new training samples corresponding to the new functional requirements are determined; based on the target geographical pre-training model, through model fine-tuning technology and new training samples, the new functional requirements are generated corresponding to new geographic model.
  • an embodiment of the present disclosure proposes a model fine-tuning device for a geographical pre-training model, including: a target geographical pre-training model acquisition unit configured to obtain the target geographical pre-training model; wherein the target geographical pre-training model is based on the following: The geographical pre-training model training device of any one of the second aspects is obtained; a new training sample determination unit configured to obtain new functional requirements of the map application and determine new training samples corresponding to the new functional requirements; a new geographical model generation unit , is configured to generate a new geographical model corresponding to new functional requirements based on the target geographical pre-training model through model fine-tuning technology and new training samples.
  • inventions of the present disclosure provide an electronic device.
  • the electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor. , the instructions are executed by at least one processor, so that when executed by at least one processor, the pre-training method of the geographical pre-training model can be implemented as described in any implementation manner of the first aspect or as described in any implementation manner of the third aspect. Model fine-tuning method for geographic pre-trained models.
  • embodiments of the present disclosure provide a non-transitory computer-readable storage medium storing computer instructions.
  • the computer instructions are used to enable the computer to implement geographic pre-training as described in any implementation manner in the first aspect when executed.
  • the pre-training method of the model or the model fine-tuning method of the geographical pre-trained model as described in any implementation of the third aspect.
  • embodiments of the present disclosure provide a computer program product including a computer program.
  • the computer program When executed by a processor, the computer program can implement the pre-training method of a geographical pre-training model as described in any implementation manner in the first aspect. Or the model fine-tuning method of the geographical pre-training model as described in any implementation of the third aspect.
  • Figure 1 is an exemplary system architecture in which the present disclosure may be applied
  • Figure 2 is a flow chart of a pre-training method for a geographical pre-training model provided by an embodiment of the present disclosure
  • Figure 3 is a schematic diagram of spatial knowledge of points of interest provided by an embodiment of the present disclosure
  • Figure 4 is a flow chart of a method for generating a sample node sequence provided by an embodiment of the present disclosure
  • Figure 5 is a schematic diagram of a process of generating a heterogeneous graph of points of interest provided by an embodiment of the present disclosure
  • Figure 6 is a schematic diagram of the process of processing sample node sequences at different functional layers in a geographical pre-training model provided by an embodiment of the present disclosure
  • Figure 7 is a schematic diagram of a training target for learning the mapping relationship between text and preset position coding provided by an embodiment of the present disclosure
  • Figure 8 is a flow chart of a model fine-tuning method for a geographical pre-training model provided by an embodiment of the present disclosure
  • Figure 9 is a structural block diagram of a pre-training device for a geographical pre-training model provided by an embodiment of the present disclosure.
  • Figure 10 is a structural block diagram of a model fine-tuning device for a geographical pre-training model provided by an embodiment of the present disclosure
  • FIG. 11 is a schematic structural diagram of an electronic device suitable for executing a pre-training method for a geographical pre-training model and/or a model fine-tuning method for a geographical pre-training model provided by an embodiment of the present disclosure.
  • the collection, storage, use, processing, transmission, provision and disclosure of user personal information are in compliance with relevant laws and regulations and do not violate public order and good customs.
  • FIG. 1 shows an exemplary system architecture 100 in which the pre-training and fine-tuning method of the geographical pre-training model of the present disclosure can be applied, as well as the corresponding apparatus, electronic device and computer-readable storage medium.
  • the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105.
  • the network 104 is a medium used to provide communication links between the terminal devices 101, 102, 103 and the server 105.
  • Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
  • terminal devices 101, 102, 103 Users can use terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc.
  • Various applications for information communication between the terminal devices 101, 102, 103 and the server 105 may be installed, such as model training applications, model fine-tuning applications, map-related data processing applications, etc.
  • the terminal devices 101, 102, 103 and the server 105 may be hardware or software.
  • the terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with display screens, including but not limited to smartphones, tablet computers, laptop computers, desktop computers, etc.; when the terminal devices 101, 102 When 103 is software, it can be installed in the electronic equipment listed above. It can be implemented as multiple software or software modules, or as a single software or software module, and is not specifically limited here.
  • the server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or it can be implemented as a single server; when the server 105 is software, it can be implemented as multiple software or software modules, or it can be implemented as a single piece of software or software. Modules are not specifically limited here.
  • the server 105 can provide various services through various built-in applications. Taking a model training application that can provide pre-training services for geographical pre-training models as an example, the server 105 can achieve the following effects when running the model training application: First, Obtain the sample node sequence, which is pre-generated based on the preset interest point heterogeneous graph and the random walk algorithm.
  • the interest point heterogeneous graph includes each node served by each interest point and the edges connecting each node.
  • the node name is the place name of the corresponding point of interest, and the edges represent the correlation between corresponding nodes in the real world; then, the sample node sequence is input as a training sample to the initial geographical pre-training model; finally, the initial geographical pre-training model is controlled to follow the preset
  • the training target is trained, and the current geographical pre-training model that reaches the training target is output as the target geographical pre-training model.
  • the training target includes guiding the model to learn from the training samples the relationship between the place name of the point of interest and the preset location code. A sub-goal of the mapping relationship, the preset location code corresponds to the geographical block where the corresponding point of interest is located in the real world.
  • the target geographical pre-training model obtained through the above model training process can be applied in practical technical fields related to geographical location (such as the map field), thereby better meeting the growing new geographical knowledge-related needs in these technical fields.
  • This process can be implemented through a model fine-tuning application.
  • the server 105 can achieve the following effects when running the model fine-tuning application: first, obtain the target geographical pre-training model; then, obtain the new functional requirements of the map application, and determine the requirements related to the new New training samples corresponding to functional requirements; finally, based on the target geographical pre-training model, a new geographical model corresponding to the new functional requirements is generated through model fine-tuning technology and new training samples.
  • a pre-training method for a geographical pre-training model or a model fine-tuning method for a geographical pre-training model It is generally executed by a server 105 with stronger computing power and more computing resources.
  • the pre-training device of the geographical pre-training model or the model fine-tuning device of the geographical pre-training model is also generally provided in the server 105 . But at the same time, it should be pointed out that when the terminal devices 101, 102, and 103 also have computing capabilities and computing resources that meet the requirements, the terminal devices 101, 102, and 103 can also use the model training application or the model fine-tuning class installed on them.
  • the application completes the above-mentioned various operations performed by the server 105, and then outputs the same results as the server 105.
  • the pre-training device of the geographical pre-training model or the model fine-tuning device of the geographical pre-training model can also be provided in the terminal equipment 101, 102, 103.
  • the exemplary system architecture 100 may not include the server 105 and the network 104.
  • the server (or terminal device) used to train the target geographical pre-training model may be different from the server (or terminal device) used to perform model fine-tuning operations based on the target geographical pre-training model, so as to separate different model operations.
  • the target geographic pre-training model or new geographic model trained by the server 105 can also be obtained through model distillation to obtain a lightweight model suitable for placement in the terminal devices 101, 102, 103, that is, it can be identified according to actual needs. The accuracy allows flexible selection of whether to use lightweight models in the terminal devices 101, 102, and 103 or to use a more complex model in the server 105.
  • Step 201 Obtain the sample node sequence
  • This step is intended for the execution subject of the pre-training method of the geographical pre-training model (such as the server 105 shown in Figure 1) to obtain the sample node sequence generated based on the preset interest point heterogeneous graph and the random walk algorithm.
  • the interest point heterogeneous graph includes each node served by each interest point and the edges connecting each node.
  • the node names are the place names of the corresponding interest points, and the edges represent the relationships between the corresponding nodes in the real world.
  • place names of points of interest are usually expressed in text form, and in order to reflect the location association between different nodes, it is necessary to combine spatial knowledge, which is usually expressed in numerical form.
  • toponym mainly refers to the name of geographical location entities (such as POI, streets and regions).
  • Spatial knowledge mainly includes the specific location of a geographical entity (usually expressed in the form of geographical coordinates), the spatial relationship between different geographical entities (usually expressed in the form of triples) and human movement trajectories (usually in the form of ID sequences). ), please refer to the schematic diagram shown in Figure 3.
  • Heterogeneous data integration that is, how to integrate text (including place name knowledge) with different modalities, and numbers and triples , sequence (including spatial knowledge) and other inputs are organically combined as a unified input for the pre-training model
  • Modal difference that is, how to represent data of different modalities in the same implicit space so that the model can fully learn different modalities.
  • the knowledge contained in the state can be fully applied in downstream tasks.
  • This embodiment organically combines two different modalities of knowledge (i.e. heterogeneous), namely place name knowledge represented by text and spatial knowledge represented by numbers, in a graph manner, thereby obtaining a unified input for the pre-training model, that is to say
  • the node names reflect place name knowledge, and the edges between nodes reflect spatial knowledge, thus making the heterogeneous graph itself contain knowledge of two modalities.
  • Random walk algorithm is also called random walk algorithm.
  • the original meaning of random walk is that it is impossible to predict future development steps and directions based on past performance. In this embodiment, it is used to predict the future development steps and directions based on past trajectories. , generate other possible node sequences to obtain a large number of training samples.
  • the sample node sequence generated by the random walk algorithm is a node sequence arranged in time sequence.
  • an exemplary sample node sequence can be expressed as: 01- 03-08-04, that is, this is a sample node sequence with a walking length of 4. In chronological order, it first passed the interest point numbered 01, then passed the interest point numbered 03, and then passed the interest point numbered 08. points of interest, and finally passed the point of interest numbered 04.
  • algorithm parameters such as walking length, walking direction, and walking weight of each edge can be set based on the actual situation and actual needs, and there are no specific restrictions here.
  • Step 202 Input the sample node sequence as a training sample into the initial geographical pre-training model
  • this step aims to have the above execution subject input each sample node sequence as a training sample into the initial geographical pre-training model. Specifically, according to the model characteristics of the initial geographical pre-training model, when inputting training samples into the initial geographical pre-training model, you can check whether batch input or parallel input is supported to improve the input efficiency and training efficiency of training samples.
  • Step 203 Control the initial geographical pre-training model to train according to the preset training target, and output the current geographical pre-training model that reaches the training target as the target geographical pre-training model.
  • this step aims to have the above-mentioned execution subject perform knowledge learning from the input training samples according to the preset training goals, and then finally output the current geographic pre-training model that meets the training goals as the target geographic pre-training model.
  • the training goal is a goal used to guide the model on how to learn knowledge from training samples and what kind of knowledge it should learn, so that it can learn the required knowledge more accurately and better.
  • the training objectives can be divided into two corresponding ones, for example, into the first one used to guide the learning of place name knowledge expressed in text form.
  • the sub-training goal, and the second sub-training goal used to guide the model to learn the mapping relationship between text and the entity it represents in the real world coordinates, so as to effectively learn spatial knowledge.
  • it can also be converted into a mapping relationship that seeks to learn the mapping relationship between the text and the real-world geographical block to which the corresponding interest point belongs, and the geographical block can be based on real-world
  • the preset position coding determined by world coordinates can reduce the difficulty of finding mapping relationships through position coding.
  • the training objectives include sub-goals that guide the model to learn from the training samples the mapping relationship between the place name of the interest point and the preset location code.
  • the preset location code corresponds to the geographical block where the corresponding interest point is located in the real world.
  • the geographical pre-training model training method can overcome multi-modal geographical knowledge by organically integrating place name knowledge expressed in text form and spatial knowledge expressed in digital form with a heterogeneous graph structure. Due to the existing modal differences, with the help of the initial geographical pre-training model that can process graph data, the geographical knowledge of different modes can be better learned in the same implicit space, thereby providing a better geographical knowledge for downstream tasks related to geographical location. Pre-train the model to improve the task implementation effect of downstream tasks.
  • a front-end search node attached to each node can also be added to the interest point heterogeneous graph, where the front-end search node records the search words received before the corresponding interest point is selected.
  • the generated sample node sequence contains search terms for points of interest, and then the geographical pre-training model also combines search terms during training to improve the search for different points of interest. accuracy and comprehensiveness of the correlation.
  • the edges in the interest point heterogeneous graph are used to represent the real-world associations between corresponding nodes.
  • the edges can also be divided into solid edges and dotted edges according to different types of associations, where , the solid edge is determined based on the time series of points of interest recorded in the user's historical travel trajectory.
  • the solid edge represents the travel logical association between different nodes; the dotted edge represents the same block between different nodes in the same geographical block. association.
  • by adding the same-block association represented by the dotted edge when the sample node sequence is subsequently generated based on the random walk algorithm, more possible node sequences can be obtained due to the node replacement method or the walk length improvement method provided by the same-block association. , and ultimately improve the model training effect by increasing the order of magnitude of training samples.
  • Figure 4 is a flow chart of a method for generating a sample node sequence provided by an embodiment of the present disclosure, which provides a specific implementation method for how to obtain the sample node sequence required in step 201.
  • the process 400 includes the following steps:
  • Step 401 Obtain user search logs and points of interest database from the map application;
  • This step is intended for the execution subject (which may still be the server 105 shown in Figure 1, or may be another server different from the service 105 or other device with computing capabilities) to obtain the user search log and interest point database from the map application.
  • the execution subject which may still be the server 105 shown in Figure 1, or may be another server different from the service 105 or other device with computing capabilities
  • the point of interest database records place name knowledge and spatial knowledge of each point of interest.
  • Geographical name knowledge mainly refers to place names
  • geographical names mainly refer to the names of geographical location entities (such as POIs, streets, and regions);
  • spatial knowledge mainly includes the specific location of a geographical location entity (usually expressed in the form of geographical coordinates), and the relationship between different geographical entities. Spatial relationships (usually expressed in the form of triples) and human movement trajectories (usually expressed in the form of ID sequences) can be seen in the schematic diagram shown in Figure 3.
  • Step 402 Extract the search terms corresponding to each user search and the points of interest actually selected from the user search log, as well as the time series of points of interest corresponding to the user's travel trajectory;
  • the point of interest time series is obtained by arranging multiple points of interest involved in the user's travel trajectory in order of arrival time.
  • Step 403 Use each point of interest as a node, and establish a pre-search node attached to the corresponding node according to the corresponding search term;
  • Step 404 Establish solid edge connections between corresponding nodes with travel logical associations based on the time series of points of interest;
  • Step 405 Based on the boundaries of each geographical block in the spatial knowledge and the real-world coordinates of each interest point, establish dotted edge connections between corresponding nodes associated with the same block to obtain a heterogeneous graph of interest points;
  • the actual constructed interest point heterogeneous graph can be seen in the schematic diagram shown in Figure 5.
  • the points of interest shown in Figure 5 include two types of nodes: POI nodes and pre-search nodes (search words entered when the user selects POI); three types of edges: click edges (search-click-POI in the figure, that is, the user uses this search word search POI), plot co-occurrence edges (POI-co-occurrence-POI in the figure, that is, two POIs appear in the same block, the block is pre-divided through the division method provided by the S2 geometry library), and movement trajectories Edge (the starting point-to-end point in the figure, that is, the two POIs that the user has reached one after another).
  • Step 406 Perform a random walk operation on the heterogeneous graph of interest points through a random walk algorithm to obtain a sample node sequence.
  • the technical solution provided by this embodiment starts with user search logs and interest point databases, and then not only introduces search terms into the sample node sequence by setting pre-search nodes, but also sets solid edges and reflections that reflect the logical association of travel.
  • the dotted edges associated with the block expand the possible trajectories that are not recorded in the user's travel trajectory, which not only makes the subsequent sample stage sequence contain more valuable knowledge, but also increases the order of magnitude of the sample node sequence, and ultimately Together, they can improve the comprehensiveness and accuracy of the geographical pre-training model in learning relevant geographical knowledge.
  • the initial geographical pre-training model can also be set to include the first transformation (Tranformer) layer, the aggregation (TranSAGE) layer, the second For the Transformer layer, please refer to the schematic diagram shown in Figure 6.
  • the first transformation layer i.e., Transformer (L12) shown in Figure 6
  • the node classification code i.e., Figure shown in 6
  • node context encoding i.e.
  • the aggregation layer i.e., the TranSAGE layer shown in Figure 6
  • the second transformation layer i.e. Transformer (L1) shown in Figure 6
  • L1 the second transformation layer
  • a transformer-based aggregation layer is used to model the graph structure in the input sequence. For efficient operation, only the sequence aggregation representation of each node is used. Make the following calculation:
  • the aggregated representation its original context Indicates that they are connected end to end and modeled with another transform layer. Will be used for pre-training tasks.
  • the mapping relationship between the text and the real-world coordinates considering that it is difficult to find the mapping relationship between the text and the real-world coordinates, it can also be converted into seeking the mapping relationship between the learning text and the real-world geographical block to which the corresponding interest point belongs, and
  • the geographical block can use a preset location code determined based on real-world coordinates to reduce the difficulty of finding mapping relationships through location coding.
  • An encoding rule for preset position encoding can be:
  • Each geographical block is controlled to correspond to a coding token (which can be called a Token); among them, the length of the coding token corresponds to the granularity level of the block division it represents. Every time the granularity level of the block division increases by two levels, the length of the coding token Add one, and the encoding tokens of adjacent geographical block granularity levels (for example, levels 2n-1 and 2n) only differ in the last bit of encoding.
  • a coding token which can be called a Token
  • the length of the coding token corresponds to the granularity level of the block division it represents. Every time the granularity level of the block division increases by two levels, the length of the coding token Add one, and the encoding tokens of adjacent geographical block granularity levels (for example, levels 2n-1 and 2n) only differ in the last bit of encoding.
  • the prediction task can be converted into position prediction for each bit of coding that constitutes the coding token. For example, predict the corresponding labels for the following three contents: 1) Coding order The character of the card at level 2n-1; 2) the character of the encoding token at level 2n; 3) the penultimate character shared by the encoding token at levels 2n-1 and 2n.
  • the training goal is for the geographical pre-training model to learn the mapping relationship between the text-represented point of interest place names and their geographical blocks in the real world.
  • the input is Road A, District C, City B
  • this embodiment only provides an exemplary coding rule for preset position coding.
  • the rules and specific details of the number of digits for preset position coding can be adjusted based on the actual situation, as long as the preset position coding can be achieved.
  • Just set the location code to reduce the difficulty of finding the mapping relationship between text and geographical block code.
  • the above embodiments explain how to obtain a geographical pre-training model through pre-training from various aspects.
  • the following will describe how to use the geographical pre-training model as an available "middleware" or " “Semi-finished products” to provide assistance for other downstream tasks in geography-related technical fields (such as the map field), so that downstream tasks can obtain a higher accuracy and better effect based on the "semi-finished products" through a small amount of training with a small number of samples. new geographic model.
  • Figure 8 provides a model fine-tuning method for a geographical pre-training model through process 800, which includes the following steps:
  • Step 801 Obtain the target geographical pre-training model
  • Step 802 Obtain the new functional requirements of the map application and determine new training samples corresponding to the new functional requirements
  • Step 803 Based on the target geographical pre-training model, generate a new geographical model corresponding to the new functional requirements through model fine-tuning technology and new training samples.
  • model fine-tuning technology is equivalent to using the model parameters of the previously trained target geographical pre-training model as the initial model parameters of the new geographical model, so as to directly have a better model structure through parameter inheritance, while using model fine-tuning
  • the premise of the technology should be that the new functional requirements are strongly related to the capabilities of the target geographical pre-training model. Therefore, a new geographical model with better effect and used to realize the new functional requirements can be quickly obtained through only a small number of new training samples. .
  • the target geographical pre-training model integrates place name knowledge and spatial knowledge of points of interest, various associations between different points of interest are found through learning, so as long as the new functional requirements are related to the learned knowledge, that is The effect can be improved this way.
  • the new functional requirement is to recommend similar points of interest
  • determine the user questionnaire corresponding to the recommendation of similar points of interest and then generate a new training sample based on the content recorded in the user questionnaire
  • a new geographical model for recommending similar points of interest based on the current points of interest can be generated. That is, the new geographical model at this time can be used for users based on The current point of interest recommends similar points of interest.
  • This new functional requirement can use the target geographical pre-training model to learn the logical association of the same block from the dotted edges that constitute the heterogeneous graph of points of interest (from the fact that points of interest of the same type usually appear "clustered" , has the characteristics of "aggregation”), and then recommends other points of interest of the same type as the current point of interest to the user based on the same block association.
  • a small number of new training samples can also be obtained through questionnaires or other forms.
  • a new geographical model for recommending other points of interest based on the current point of interest can be generated. That is, the new geographical model at this time can recommend some other points of interest to the user based on the current point of interest.
  • This new functional requirement can use the travel logical association learned by the target geographical pre-training model from the solid edges that constitute the heterogeneous graph of interest points. , and then recommend to the user other points of interest that have a travel logical relationship with the current point of interest based on the travel logical association, so as to satisfy the user's need for casual shopping through this association.
  • the present disclosure respectively provides embodiments of a pre-training device for a geographical pre-training model and a model fine-tuning device for a geographical pre-training model.
  • the embodiment of the pre-training device for the pre-training model corresponds to the embodiment of the pre-training method for the geographical pre-training model shown in Figure 2
  • the embodiment of the model fine-tuning device for the geographical pre-training model corresponds to the embodiment of the geographical pre-training method shown in Figure 8
  • the model corresponds to the embodiment of the model fine-tuning method.
  • the above device can be applied in various electronic devices.
  • the pre-training device 900 of the geographical pre-training model in this embodiment may include: a sample node sequence acquisition unit 901, a training sample input unit 902, and a pre-training unit 903.
  • the sample node sequence acquisition unit 901 is configured to obtain a sample node sequence; wherein the sample node sequence is generated based on a preset interest point heterogeneous graph and a random walk algorithm, and the interest point heterogeneous graph includes the interest points acting as Each node and the edge connecting each node, the node name is the place name of the corresponding point of interest, and the edge represents the association between the corresponding nodes in the real world;
  • the training sample input unit 902 is configured to input the sample node sequence as the initial training sample Geographic pre-training model;
  • the pre-training unit 903 is configured to control the initial geographic pre-training model to be trained according to the preset training goal, and output the current geographic pre-training model that reaches the training goal as the target geographic pre-training model; wherein, training The goal includes sub-go
  • the pre-training device 900 of the geographical pre-training model the specific processing of the sample node sequence acquisition unit 901, the training sample input unit 902, the pre-training unit 903 and the technical effects thereof can be referred to Figure 2 respectively.
  • the relevant descriptions of steps 201-203 in the corresponding embodiment will not be described again here.
  • the interest point heterogeneous graph may also include: a front-end search node attached to each node, and the front-end search node records the search received before the corresponding interest point is selected. word.
  • the edges include solid edges and dotted edges.
  • the solid edges are determined based on the time series of points of interest recorded in the user's historical travel trajectory.
  • the solid edges represent the travel between different nodes.
  • Logical association, dotted edges represent the same-block association between different nodes in the same geographical block.
  • the pre-training device 900 of the geographical pre-training model may also include: a sample node sequence generation unit configured to generate a sample node sequence based on the interest point heterogeneous graph and a random walk algorithm.
  • the sample node sequence generation unit can be further configured as:
  • the point-of-interest database records place name knowledge and spatial knowledge of each point of interest;
  • a random walk operation is performed on the heterogeneous graph of interest points through a random walk algorithm to obtain a sample node sequence.
  • the initial geographic pre-training model includes a first conversion layer, an aggregation layer, and a second conversion layer.
  • the first conversion layer is used to convert the node information of each node that constitutes the sample node sequence.
  • the first feature coding is performed separately to obtain node classification coding and node context coding.
  • the aggregation layer is used to combine the node classification coding of each node with the node classification coding of other nodes for feature aggregation to obtain the aggregated node classification coding.
  • the second conversion layer Used to separately perform second feature encoding on the aggregated node classification encoding and node context encoding of each node.
  • the encoding rules of the preset location encoding include: dividing the real world into multiple geographical blocks according to the preset block division method; controlling each geographical block to correspond to a Encoding token; among them, the length of the encoding token corresponds to the block division granularity level it represents. For every two levels of block division granularity level, the length of the encoding token increases by one, and the encoding token of the adjacent geographical block division granularity level increases by one. The cards only differ in the last digit of the code.
  • the geographical pre-training model training device uses place name knowledge expressed in text form and spatial knowledge expressed in digital form to
  • the graph structures of heterogeneous graphs are organically integrated to overcome the modal differences in multi-modal geographical knowledge.
  • geographical knowledge With the help of the initial geographical pre-training model that can process graph data, different modalities can be better learned in the same implicit space. geographical knowledge, thereby providing a better geographical pre-training model for downstream tasks related to geographical location, and improving the task implementation effect of downstream tasks.
  • the model fine-tuning device 1000 of the geographic pre-training model in this embodiment may include: a target geographic pre-training model acquisition unit 1001, a new training sample determination unit 1002, and a new geographic model generation unit 1003.
  • the target geographical pre-training model acquisition unit 1001 is configured to acquire the target geographical pre-training model; wherein the target geographical pre-training model is obtained according to the geographical pre-training model training device as shown in Figure 9;
  • the new training sample determination unit 1002 is configured To obtain new functional requirements for map applications and determine new training samples corresponding to the new functional requirements;
  • the new geographical model generation unit 1003 is configured to use model fine-tuning technology and new training samples based on the target geographical pre-training model. Generate new geographic models corresponding to new functional requirements.
  • the model fine-tuning device 1000 of the geographical pre-training model the specific processing of the target geographical pre-training model acquisition unit 1001, the new training sample determination unit 1002, the new geographical model generation unit 1003 and the technical effects thereof
  • the relevant descriptions recorded in the embodiment of the model fine-tuning method of the geographical pre-training model as shown in Figure 8 will not be repeated here.
  • the new training sample determination unit 1002 may include a new training sample determination subunit configured to determine new training samples corresponding to new functional requirements.
  • the new training sample determination subunit may be further configured to;
  • the new geographical model generating unit 1003 can be further configured to:
  • a new geographical model for recommending similar points of interest based on current points of interest is generated.
  • the new geographic model generating unit 1003 may be further configured to:
  • a new geographical model is generated for recommending other points of interest in the same block based on the current point of interest.
  • the model fine-tuning device for the geographical pre-training model provided in this embodiment is based on the target geographical pre-training model and combines new functional requirements and Model fine-tuning technology can quickly obtain a new geographic model that is actually used to meet new functional requirements based on a target geographic pre-trained model that contains more geographic knowledge.
  • the present disclosure also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores information that can be executed by the at least one processor.
  • the instructions are executed by at least one processor, so that when executed by at least one processor, the pre-training method of the geographical pre-training model and/or the model fine-tuning method of the geographical pre-training model described in any of the above embodiments can be implemented.
  • the present disclosure also provides a readable storage medium that stores computer instructions.
  • the computer instructions are used to enable the computer to implement the geographical pre-training described in any of the above embodiments when executed. Pre-training methods for models and/or model fine-tuning methods for geographic pre-trained models.
  • Embodiments of the present disclosure provide a computer program product that, when executed by a processor, can implement the pre-training method of a geographical pre-training model and/or the model fine-tuning method of a geographical pre-training model described in any of the above embodiments.
  • FIG. 11 illustrates a schematic block diagram of an example electronic device 1100 that may be used to implement embodiments of the present disclosure.
  • Electronic devices are intended to refer to various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
  • Electronic devices may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions are examples only and are not intended to limit implementations of the disclosure described and/or claimed herein.
  • the device 1100 includes a computing unit 1101 that can execute according to a computer program stored in a read-only memory (ROM) 1102 or loaded from a storage unit 1108 into a random access memory (RAM) 1103 Various appropriate actions and treatments.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data required for the operation of the device 1100 can also be stored.
  • Computing unit 1101, ROM 1102 and RAM 1103 are connected to each other via bus 1104.
  • An input/output (I/O) interface 1105 is also connected to bus 1104.
  • I/O interface 1105 Multiple components in the device 1100 are connected to the I/O interface 1105, including: input unit 1106, such as a keyboard, mouse, etc.; output unit 1107, such as various types of displays, speakers, etc.; storage unit 1108, such as a magnetic disk, optical disk, etc. ; and communication unit 1109, such as a network card, modem, wireless communication transceiver, etc.
  • the communication unit 1109 allows the device 1100 to exchange information/data with other devices through computer networks such as the Internet and/or various telecommunications networks.
  • Computing unit 1101 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing units 1101 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any appropriate processor, controller, microcontroller, etc.
  • the computing unit 1101 performs various methods and processes described above, such as a pre-training method for a geographical pre-training model and/or a model fine-tuning method for a geographical pre-training model.
  • the pre-training method of the geographical pre-training model and/or the model fine-tuning method of the geographical pre-training model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as the storage unit 1108 .
  • part or all of the computer program may be loaded and/or installed onto device 1100 via ROM 1102 and/or communication unit 1109 .
  • the computing unit 1101 may be configured to perform the pre-training method of the geographical pre-training model and/or the model fine-tuning of the geographical pre-training model in any other suitable manner (eg, by means of firmware). method.
  • Various implementations of the systems and techniques described above may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip implemented in a system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or a combination thereof.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOC system
  • CPLD load programmable logic device
  • computer hardware firmware, software, and/or a combination thereof.
  • These various embodiments may include implementation in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor
  • the processor which may be a special purpose or general purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
  • An output device may be a special purpose or general purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
  • An output device may be a special purpose or general purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
  • Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions specified in the flowcharts and/or block diagrams/ The operation is implemented.
  • the program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM portable compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.
  • the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer.
  • a display device eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
  • a keyboard and pointing device eg, a mouse or a trackball
  • Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and may be provided in any form, including Acoustic input, voice input or tactile input) to receive input from the user.
  • the systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., A user's computer having a graphical user interface or web browser through which the user can interact with implementations of the systems and technologies described herein), or including such backend components, middleware components, or any combination of front-end components in a computing system.
  • the components of the system may be interconnected by any form or medium of digital data communication (eg, a communications network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
  • Computer systems may include clients and servers.
  • Clients and servers are generally remote from each other and typically interact over a communications network.
  • the relationship of client and server is created by computer programs running on corresponding computers and having a client-server relationship with each other.
  • the server can be a cloud server, also known as cloud computing server or cloud host. It is a host product in the cloud computing service system to solve the management difficulties existing in traditional physical host and virtual private server (VPS, Virtual Private Server) services. Large, weak business scalability.
  • VPN Virtual Private Server

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Remote Sensing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present application provides a pre-training method and model fine-tuning method for a geographical pre-training model, and relates to technical fields of artificial intelligence such as deep learning and graph structures. The pre-training method comprises: obtaining a sample node sequence, wherein the sample node sequence is generated on the basis of a preset point of interest heterogeneous graph and a random walk algorithm, the point of interest heterogeneous graph comprises nodes serving as points of interest and an edge connecting the nodes, names of the nodes are place names of corresponding points of interest, and the edge represents an association relationship that exists between corresponding nodes in the real world; inputting the sample node sequence which acts as a training sample into an initial geographical pre-training model; and controlling the initial geographical pre-training model to be trained according to a preset training target, and outputting a current geographical pre-training model that reaches the training target as a target geographical pre-training model. By means of integrating heterogeneous and multi-modal geographical knowledge into a model pre-training process, the effect of downstream tasks related to a geographical location is improved.

Description

地理预训练模型的预训练方法及模型微调方法Pre-training method of geographical pre-training model and model fine-tuning method
相关申请的交叉引用Cross-references to related applications
本专利申请要求于2022年3月10日提交的、申请号为202210230756.X、发明名称为“地理预训练模型的预训练方法及模型微调方法”的中国专利申请的优先权,该申请的全文以引用的方式并入本公开中。This patent application claims priority to the Chinese patent application submitted on March 10, 2022, with the application number 202210230756. incorporated by reference into this disclosure.
技术领域Technical field
本公开涉及数据处理技术领域,具体涉及深度学习、图结构等人工智能技术领域,尤其涉及一种地理预训练模型的预训练方法和地理预训练模型的模型微调方法,以及对应的装置、电子设备、计算机可读存储介质及计算机程序产品。The present disclosure relates to the field of data processing technology, specifically to the field of artificial intelligence technology such as deep learning and graph structure, and in particular to a pre-training method for a geographical pre-training model and a model fine-tuning method for a geographical pre-training model, as well as corresponding devices and electronic equipment. , computer-readable storage media and computer program products.
背景技术Background technique
区别于其它领域,地图领域比较特殊,地图领域的信息处理过程往往需要与现实世界产生关联。例如,在地图检索引擎中,当用户输入一个搜索词(或称查询词)时,候选兴趣点(英文全称:Point of Interest,英文缩写为:POI)本身的位置和它与用户当前所在位置的距离都是非常重要的排序特征。Different from other fields, the map field is special. The information processing process in the map field often needs to be related to the real world. For example, in a map search engine, when a user enters a search term (or query term), the location of the candidate point of interest (full English name: Point of Interest, English abbreviation: POI) and its relationship with the user's current location Distance is a very important ranking feature.
发明内容Contents of the invention
本公开实施例提出了一种地理预训练模型的预训练方法、地理预训练模型的模型微调方法,以及对应的装置、电子设备、计算机可读存储介质及计算机程序产品。Embodiments of the present disclosure propose a pre-training method for a geographical pre-training model, a model fine-tuning method for a geographical pre-training model, and corresponding devices, electronic equipment, computer-readable storage media and computer program products.
第一方面,本公开实施例提出了一种地理预训练模型的预训练方法,包括:获取样本节点序列;其中,样本节点序列基于预设的兴趣点异构图和随机游走算法生成,兴趣点异构图包括由各兴趣点充当的各节点和连接各节点的边,节点名为相应兴趣点的地名,边表征相应节点之间在真实世界存在的关联关系;将样本节点序列作为训练样本输 入初始地理预训练模型;控制初始地理预训练模型按照预设的训练目标进行训练,并将达到训练目标的当前地理预训练模型输出为目标地理预训练模型;其中,训练目标包括指导模型从训练样本中学习到兴趣点的地名与预设位置编码之间的映射关系的子目标,预设位置编码对应于相应兴趣点在真实世界所处的地理区块。In the first aspect, an embodiment of the present disclosure proposes a pre-training method for a geographical pre-training model, which includes: obtaining a sample node sequence; wherein the sample node sequence is generated based on a preset interest point heterogeneous graph and a random walk algorithm. The point heterogeneous graph includes each node acted by each interest point and the edges connecting each node. The node name is the place name of the corresponding interest point, and the edges represent the correlation between the corresponding nodes in the real world; the sample node sequence is used as a training sample Input the initial geographic pre-training model; control the initial geographic pre-training model to train according to the preset training goals, and output the current geographic pre-training model that reaches the training goal as the target geographic pre-training model; among which, the training goals include guiding the model from training The sub-goal of learning the mapping relationship between the place name of the interest point and the preset location code in the sample. The preset location code corresponds to the geographical block where the corresponding interest point is located in the real world.
第二方面,本公开实施例提出了一种地理预训练模型的预训练装置,包括:样本节点序列获取单元,被配置成获取样本节点序列;其中,样本节点序列基于预设的兴趣点异构图和随机游走算法生成,兴趣点异构图包括由各兴趣点充当的各节点和连接各节点的边,节点名为相应兴趣点的地名,边表征相应节点之间在真实世界存在的关联关系;训练样本输入单元,被配置成将样本节点序列作为训练样本输入初始地理预训练模型;地理预训练模型训练单元,被配置成控制初始地理预训练模型按照预设的训练目标进行训练,并将达到训练目标的当前地理预训练模型输出为目标地理预训练模型;其中,训练目标包括指导模型从训练样本中学习到兴趣点的地名与预设位置编码之间的映射关系的子目标,预设位置编码对应于相应兴趣点在真实世界所处的地理区块。In the second aspect, an embodiment of the present disclosure proposes a pre-training device for a geographical pre-training model, including: a sample node sequence acquisition unit configured to obtain a sample node sequence; wherein the sample node sequence is based on preset heterogeneous points of interest Graph and random walk algorithm are generated. The heterogeneous graph of interest points includes each node acted by each interest point and the edges connecting each node. The node names are the place names of the corresponding interest points, and the edges represent the relationships between the corresponding nodes in the real world. relationship; the training sample input unit is configured to input the sample node sequence as a training sample to the initial geographic pre-training model; the geographic pre-training model training unit is configured to control the initial geographic pre-training model to train according to the preset training goals, and The current geographic pre-training model that reaches the training goal is output as the target geographic pre-training model; among which, the training goal includes sub-goals that guide the model to learn the mapping relationship between the place names of points of interest and preset location codes from the training samples. Assume that the location code corresponds to the geographical block where the corresponding point of interest is located in the real world.
第三方面,本公开实施例提出了一种地理预训练模型的模型微调方法,包括:获取目标地理预训练模型;其中,目标地理预训练模型根据如第一方面中任一项的地理预训练模型训练方法得到;获取地图应用的新功能需求,并确定与新功能需求对应的新训练样本;在目标地理预训练模型的基础上,通过模型微调技术和新训练样本,生成与新功能需求对应的新地理模型。In a third aspect, an embodiment of the present disclosure proposes a model fine-tuning method for a geographical pre-training model, which includes: obtaining a target geographical pre-training model; wherein the target geographical pre-training model is based on the geographical pre-training of any one of the first aspects. The model training method is obtained; the new functional requirements of the map application are obtained, and new training samples corresponding to the new functional requirements are determined; based on the target geographical pre-training model, through model fine-tuning technology and new training samples, the new functional requirements are generated corresponding to new geographic model.
第四方面,本公开实施例提出了一种地理预训练模型的模型微调装置,包括:目标地理预训练模型获取单元,被配置成获取目标地理预训练模型;其中,目标地理预训练模型根据如第二方面中任一项的地理预训练模型训练装置得到;新训练样本确定单元,被配置成获取地图应用的新功能需求,并确定与新功能需求对应的新训练样本;新地理模型生成单元,被配置成在目标地理预训练模型的基础上,通过模型微调技术和新训练样本,生成与新功能需求对应的新地理模型。In the fourth aspect, an embodiment of the present disclosure proposes a model fine-tuning device for a geographical pre-training model, including: a target geographical pre-training model acquisition unit configured to obtain the target geographical pre-training model; wherein the target geographical pre-training model is based on the following: The geographical pre-training model training device of any one of the second aspects is obtained; a new training sample determination unit configured to obtain new functional requirements of the map application and determine new training samples corresponding to the new functional requirements; a new geographical model generation unit , is configured to generate a new geographical model corresponding to new functional requirements based on the target geographical pre-training model through model fine-tuning technology and new training samples.
第五方面,本公开实施例提供了一种电子设备,该电子设备包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,该指令被至少一个处理器执行,以使至少一个处理器执行时能够实现如第一方面中任一实现方式描述的地理预训练模型的预训练方法或如第三方面中任一实现方式描述的地理预训练模型的模型微调方法。In a fifth aspect, embodiments of the present disclosure provide an electronic device. The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor. , the instructions are executed by at least one processor, so that when executed by at least one processor, the pre-training method of the geographical pre-training model can be implemented as described in any implementation manner of the first aspect or as described in any implementation manner of the third aspect. Model fine-tuning method for geographic pre-trained models.
第六方面,本公开实施例提供了一种存储有计算机指令的非瞬时计算机可读存储介质,该计算机指令用于使计算机执行时能够实现如第一方面中任一实现方式描述的地理预训练模型的预训练方法或如第三方面中任一实现方式描述的地理预训练模型的模型微调方法。In a sixth aspect, embodiments of the present disclosure provide a non-transitory computer-readable storage medium storing computer instructions. The computer instructions are used to enable the computer to implement geographic pre-training as described in any implementation manner in the first aspect when executed. The pre-training method of the model or the model fine-tuning method of the geographical pre-trained model as described in any implementation of the third aspect.
第七方面,本公开实施例提供了一种包括计算机程序的计算机程序产品,该计算机程序在被处理器执行时能够实现如第一方面中任一实现方式描述的地理预训练模型的预训练方法或如第三方面中任一实现方式描述的地理预训练模型的模型微调方法。In a seventh aspect, embodiments of the present disclosure provide a computer program product including a computer program. When executed by a processor, the computer program can implement the pre-training method of a geographical pre-training model as described in any implementation manner in the first aspect. Or the model fine-tuning method of the geographical pre-training model as described in any implementation of the third aspect.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or important features of the embodiments of the disclosure, nor is it intended to limit the scope of the disclosure. Other features of the present disclosure will become readily understood from the following description.
附图说明Description of the drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本公开的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present disclosure will become more apparent upon reading the detailed description of the non-limiting embodiments with reference to the following drawings:
图1是本公开可以应用于其中的示例性系统架构;Figure 1 is an exemplary system architecture in which the present disclosure may be applied;
图2为本公开实施例提供的一种地理预训练模型的预训练方法的流程图;Figure 2 is a flow chart of a pre-training method for a geographical pre-training model provided by an embodiment of the present disclosure;
图3为本公开实施例提供的一种兴趣点的空间知识的示意图;Figure 3 is a schematic diagram of spatial knowledge of points of interest provided by an embodiment of the present disclosure;
图4为本公开实施例提供的一种样本节点序列生成方法的流程图;Figure 4 is a flow chart of a method for generating a sample node sequence provided by an embodiment of the present disclosure;
图5为本公开实施例提供的一种兴趣点异构图生成过程的示意图;Figure 5 is a schematic diagram of a process of generating a heterogeneous graph of points of interest provided by an embodiment of the present disclosure;
图6为本公开实施例提供的一种地理预训练模型中不同功能层处理样本节点序列的过程示意图;Figure 6 is a schematic diagram of the process of processing sample node sequences at different functional layers in a geographical pre-training model provided by an embodiment of the present disclosure;
图7为本公开实施例提供的一种用于学习文本与预设位置编码之 间映射关系的训练目标的示意图;Figure 7 is a schematic diagram of a training target for learning the mapping relationship between text and preset position coding provided by an embodiment of the present disclosure;
图8为本公开实施例提供的一种地理预训练模型的模型微调方法的流程图;Figure 8 is a flow chart of a model fine-tuning method for a geographical pre-training model provided by an embodiment of the present disclosure;
图9为本公开实施例提供的一种地理预训练模型的预训练装置的结构框图;Figure 9 is a structural block diagram of a pre-training device for a geographical pre-training model provided by an embodiment of the present disclosure;
图10为本公开实施例提供的一种地理预训练模型的模型微调装置的结构框图;Figure 10 is a structural block diagram of a model fine-tuning device for a geographical pre-training model provided by an embodiment of the present disclosure;
图11为本公开实施例提供的一种适用于执行地理预训练模型的预训练方法和/或地理预训练模型的模型微调方法的电子设备的结构示意图。FIG. 11 is a schematic structural diagram of an electronic device suitable for executing a pre-training method for a geographical pre-training model and/or a model fine-tuning method for a geographical pre-training model provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the present disclosure are included to facilitate understanding and should be considered to be exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the disclosure. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness. It should be noted that, as long as there is no conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
本公开的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供和公开等处理,均符合相关法律法规的规定,且不违背公序良俗。In the technical solution of this disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are in compliance with relevant laws and regulations and do not violate public order and good customs.
图1示出了可以应用本公开的地理预训练模型的预训练及微调方法,以及对应的装置、电子设备及计算机可读存储介质的实施例的示例性系统架构100。FIG. 1 shows an exemplary system architecture 100 in which the pre-training and fine-tuning method of the geographical pre-training model of the present disclosure can be applied, as well as the corresponding apparatus, electronic device and computer-readable storage medium.
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in Figure 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is a medium used to provide communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
用户可以使用终端设备101、102、103通过网络104与服务器105 交互,以接收或发送消息等。终端设备101、102、103和服务器105上可以安装有各种用于实现两者之间进行信息通讯的应用,例如模型训练类应用、模型微调类应用、地图相关数据处理类应用等。Users can use terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various applications for information communication between the terminal devices 101, 102, 103 and the server 105 may be installed, such as model training applications, model fine-tuning applications, map-related data processing applications, etc.
终端设备101、102、103和服务器105可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等;当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中,其可以实现成多个软件或软件模块,也可以实现成单个软件或软件模块,在此不做具体限定。当服务器105为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器;服务器为软件时,可以实现成多个软件或软件模块,也可以实现成单个软件或软件模块,在此不做具体限定。The terminal devices 101, 102, 103 and the server 105 may be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with display screens, including but not limited to smartphones, tablet computers, laptop computers, desktop computers, etc.; when the terminal devices 101, 102 When 103 is software, it can be installed in the electronic equipment listed above. It can be implemented as multiple software or software modules, or as a single software or software module, and is not specifically limited here. When the server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or it can be implemented as a single server; when the server 105 is software, it can be implemented as multiple software or software modules, or it can be implemented as a single piece of software or software. Modules are not specifically limited here.
服务器105通过内置的各种应用可以提供各种服务,以可以提供地理预训练模型的预训练服务的模型训练类应用为例,服务器105在运行该模型训练类应用时可实现如下效果:首先,获取样本节点序列,该样本节点序列基于预设的兴趣点异构图和随机游走算法预先生成,该兴趣点异构图包括由各兴趣点充当的各节点和连接各节点的边,节点名为相应兴趣点的地名,边表征相应节点之间在真实世界存在的关联关系;然后,将该样本节点序列作为训练样本输入初始地理预训练模型;最后,控制该初始地理预训练模型按照预设的训练目标进行训练,并将达到该训练目标的当前地理预训练模型输出为目标地理预训练模型,该训练目标包括指导模型从训练样本中学习到兴趣点的地名与预设位置编码之间的映射关系的子目标,该预设位置编码对应于相应兴趣点在真实世界所处的地理区块。The server 105 can provide various services through various built-in applications. Taking a model training application that can provide pre-training services for geographical pre-training models as an example, the server 105 can achieve the following effects when running the model training application: First, Obtain the sample node sequence, which is pre-generated based on the preset interest point heterogeneous graph and the random walk algorithm. The interest point heterogeneous graph includes each node served by each interest point and the edges connecting each node. The node name is the place name of the corresponding point of interest, and the edges represent the correlation between corresponding nodes in the real world; then, the sample node sequence is input as a training sample to the initial geographical pre-training model; finally, the initial geographical pre-training model is controlled to follow the preset The training target is trained, and the current geographical pre-training model that reaches the training target is output as the target geographical pre-training model. The training target includes guiding the model to learn from the training samples the relationship between the place name of the point of interest and the preset location code. A sub-goal of the mapping relationship, the preset location code corresponds to the geographical block where the corresponding point of interest is located in the real world.
经过上述模型训练过程所得到的目标地理预训练模型,可以在实际中应用于与地理位置相关的技术领域(例如地图领域),从而更好的满足这些技术领域日益增长的与地理知识相关的新功能需求,通过模型微调技术在地理预训练模型的基础上,快速得到与新功能需求对应的新地理模型。The target geographical pre-training model obtained through the above model training process can be applied in practical technical fields related to geographical location (such as the map field), thereby better meeting the growing new geographical knowledge-related needs in these technical fields. Functional requirements, through model fine-tuning technology, based on the geographical pre-training model, quickly obtain a new geographical model corresponding to the new functional requirements.
这一过程可以通过模型微调类应用来实现,服务器105在运行该 模型微调类应用时可实现如下效果:首先,获取目标地理预训练模型;然后,获取地图应用的新功能需求,并确定与新功能需求对应的新训练样本;最后,在目标地理预训练模型的基础上,通过模型微调技术和新训练样本,生成与新功能需求对应的新地理模型。This process can be implemented through a model fine-tuning application. The server 105 can achieve the following effects when running the model fine-tuning application: first, obtain the target geographical pre-training model; then, obtain the new functional requirements of the map application, and determine the requirements related to the new New training samples corresponding to functional requirements; finally, based on the target geographical pre-training model, a new geographical model corresponding to the new functional requirements is generated through model fine-tuning technology and new training samples.
无论是模型训练还是模型微调,都需要占用较多的运算资源和较强的运算能力,因此本公开后续各实施例所提供的地理预训练模型的预训练方法或地理预训练模型的模型微调方法一般由拥有较强运算能力、较多运算资源的服务器105来执行,相应地,地理预训练模型的预训练装置或地理预训练模型的模型微调装置一般也设置于服务器105中。但同时也需要指出的是,在终端设备101、102、103也具有满足要求的运算能力和运算资源时,终端设备101、102、103也可以通过其上安装的模型训练类应用或模型微调类应用完成上述本交由服务器105做的各项运算,进而输出与服务器105同样的结果。相应的,地理预训练模型的预训练装置或地理预训练模型的模型微调装置也可以设置于终端设备101、102、103中。在此种情况下,示例性系统架构100也可以不包括服务器105和网络104。Both model training and model fine-tuning require more computing resources and stronger computing capabilities. Therefore, subsequent embodiments of the present disclosure provide a pre-training method for a geographical pre-training model or a model fine-tuning method for a geographical pre-training model. It is generally executed by a server 105 with stronger computing power and more computing resources. Correspondingly, the pre-training device of the geographical pre-training model or the model fine-tuning device of the geographical pre-training model is also generally provided in the server 105 . But at the same time, it should be pointed out that when the terminal devices 101, 102, and 103 also have computing capabilities and computing resources that meet the requirements, the terminal devices 101, 102, and 103 can also use the model training application or the model fine-tuning class installed on them. The application completes the above-mentioned various operations performed by the server 105, and then outputs the same results as the server 105. Correspondingly, the pre-training device of the geographical pre-training model or the model fine-tuning device of the geographical pre-training model can also be provided in the terminal equipment 101, 102, 103. In this case, the exemplary system architecture 100 may not include the server 105 and the network 104.
另外,用于训练得到目标地理预训练模型的服务器(或终端设备)可以不同于在目标地理预训练模型基础上进行模型微调操作的服务器(或终端设备),以分割不同的模型操作。特殊的,经由服务器105训练得到的目标地理预训练模型或新地理模型也可以通过模型蒸馏的方式得到适合置入终端设备101、102、103的轻量级的模型,即可以根据实际需求的识别准确度灵活选择使用终端设备101、102、103中的轻量级模型,还是选择使用服务器105中的较复杂模型。In addition, the server (or terminal device) used to train the target geographical pre-training model may be different from the server (or terminal device) used to perform model fine-tuning operations based on the target geographical pre-training model, so as to separate different model operations. Specially, the target geographic pre-training model or new geographic model trained by the server 105 can also be obtained through model distillation to obtain a lightweight model suitable for placement in the terminal devices 101, 102, 103, that is, it can be identified according to actual needs. The accuracy allows flexible selection of whether to use lightweight models in the terminal devices 101, 102, and 103 or to use a more complex model in the server 105.
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the number of terminal devices, networks and servers in Figure 1 is only illustrative. Depending on implementation needs, there can be any number of end devices, networks, and servers.
为便于理解本公开所提供的技术方案,首先请参考图2提供的一种地理预训练模型的预训练方法的流程图,其中流程200包括以下步骤:In order to facilitate understanding of the technical solution provided by the present disclosure, please first refer to the flow chart of a pre-training method for a geographical pre-training model provided in Figure 2, in which the process 200 includes the following steps:
步骤201:获取样本节点序列;Step 201: Obtain the sample node sequence;
本步骤旨在由地理预训练模型的预训练方法的执行主体(例如图1 所示的服务器105)获取基于预设的兴趣点异构图和随机游走算法生成的样本节点序列。其中,该兴趣点异构图包括由各兴趣点充当的各节点和连接各节点的边,节点名为相应兴趣点的地名,边表征相应节点之间在真实世界存在的关联关系。This step is intended for the execution subject of the pre-training method of the geographical pre-training model (such as the server 105 shown in Figure 1) to obtain the sample node sequence generated based on the preset interest point heterogeneous graph and the random walk algorithm. Among them, the interest point heterogeneous graph includes each node served by each interest point and the edges connecting each node. The node names are the place names of the corresponding interest points, and the edges represent the relationships between the corresponding nodes in the real world.
可知,兴趣点的地名通常表现为文本形式,而为了体现不同节点之间的位置关联,又需要结合通常表现为数字形式的空间知识。其中,地名(toponym)主要指地理位置实体(如POI、街道和地区)的名称。而空间知识主要包含一个地理位置实体的具体位置(通常以地理坐标形式表示)、不同地理实体之间的空间关系(通常以三元组的形式表示)和人类移动轨迹(通常以ID序列的形式表示),可参见图3所示的示意图。It can be seen that place names of points of interest are usually expressed in text form, and in order to reflect the location association between different nodes, it is necessary to combine spatial knowledge, which is usually expressed in numerical form. Among them, toponym mainly refers to the name of geographical location entities (such as POI, streets and regions). Spatial knowledge mainly includes the specific location of a geographical entity (usually expressed in the form of geographical coordinates), the spatial relationship between different geographical entities (usually expressed in the form of triples) and human movement trajectories (usually in the form of ID sequences). ), please refer to the schematic diagram shown in Figure 3.
据上述对地名知识和空间知识的描述可知,要将其利用起来需要克服两个问题:1)异构数据集成,即如何将模态不同的文本(包含地名知识),和数字,三元组,序列(包含空间知识)等输入有机结合起来作为预训练模型的统一输入;2)模态差异,即如何将不同模态的数据在同一个隐式空间表示,使得模型可以充分学习到不同模态所蕴含的知识并可以在下游任务中得到充分应用。According to the above description of place name knowledge and spatial knowledge, we need to overcome two problems to utilize them: 1) Heterogeneous data integration, that is, how to integrate text (including place name knowledge) with different modalities, and numbers and triples , sequence (including spatial knowledge) and other inputs are organically combined as a unified input for the pre-training model; 2) Modal difference, that is, how to represent data of different modalities in the same implicit space so that the model can fully learn different modalities. The knowledge contained in the state can be fully applied in downstream tasks.
本实施例将通过文本表示的地名知识和通过数字表示的空间知识这两种不同模态的知识(即异构)以图的方式有机结合起来,从而得到预训练模型的统一输入,也就是说节点名体现了地名知识、各节点之间存在的边体现了空间知识,进而使得异构图本身包含了两种模态的知识。This embodiment organically combines two different modalities of knowledge (i.e. heterogeneous), namely place name knowledge represented by text and spatial knowledge represented by numbers, in a graph manner, thereby obtaining a unified input for the pre-training model, that is to say The node names reflect place name knowledge, and the edges between nodes reflect spatial knowledge, thus making the heterogeneous graph itself contain knowledge of two modalities.
随机游走算法(random walk)也称随机漫步算法,随机行走本意等是指基于过去的表现,无法预测将来的发展步骤和方向,在本实施例中,用于在过去的行进轨迹的基础上,生成其它可能的节点序列,以大量获取训练样本。Random walk algorithm is also called random walk algorithm. The original meaning of random walk is that it is impossible to predict future development steps and directions based on past performance. In this embodiment, it is used to predict the future development steps and directions based on past trajectories. , generate other possible node sequences to obtain a large number of training samples.
顾名思义,通过随机游走算法生成的样本节点序列是一个按照时序排列的节点序列,在使用编号01-10命名的10个不同兴趣点的情况下,一个示例性样本节点序列可以表现为:01-03-08-04,即这是一个游走长度为4的样本节点序列,按照时间顺序先经过了编号为01的兴趣点、接着经过了编号为03的兴趣点,之后又经过了编号为08的兴趣点,最后经过了编号为04的兴趣点。需要说明的是,游走长度、游走方向、每条边 的游走权重等算法参数均可以基于实际情况和实际需求自行设定,此处不做具体限定。As the name suggests, the sample node sequence generated by the random walk algorithm is a node sequence arranged in time sequence. In the case of 10 different points of interest named using numbers 01-10, an exemplary sample node sequence can be expressed as: 01- 03-08-04, that is, this is a sample node sequence with a walking length of 4. In chronological order, it first passed the interest point numbered 01, then passed the interest point numbered 03, and then passed the interest point numbered 08. points of interest, and finally passed the point of interest numbered 04. It should be noted that algorithm parameters such as walking length, walking direction, and walking weight of each edge can be set based on the actual situation and actual needs, and there are no specific restrictions here.
步骤202:将样本节点序列作为训练样本输入初始地理预训练模型;Step 202: Input the sample node sequence as a training sample into the initial geographical pre-training model;
在步骤201的基础上,本步骤旨在由上述执行主体将每条样本节点序列均作为训练样本输入初始地理预训练模型。具体的,根据初始地理预训练模型的模型特性,在将训练样本输入初始地理预训练模型时,可查看是否支持批量输入或并行输入,以提升训练样本的输入效率和训练效率On the basis of step 201, this step aims to have the above execution subject input each sample node sequence as a training sample into the initial geographical pre-training model. Specifically, according to the model characteristics of the initial geographical pre-training model, when inputting training samples into the initial geographical pre-training model, you can check whether batch input or parallel input is supported to improve the input efficiency and training efficiency of training samples.
步骤203:控制初始地理预训练模型按照预设的训练目标进行训练,并将达到训练目标的当前地理预训练模型输出为目标地理预训练模型。Step 203: Control the initial geographical pre-training model to train according to the preset training target, and output the current geographical pre-training model that reaches the training target as the target geographical pre-training model.
在步骤202的基础上,本步骤旨在由上述执行主体按照预设的训练目标来从输入的训练样本进行知识学习,进而最终将达到训练目标的当前地理预训练模型输出为目标地理预训练模型。其中,训练目标是用于指导模型如何从训练样本中学习知识、学习怎样的知识的目标,使得更准确、更好的学习到所需的知识。On the basis of step 202, this step aims to have the above-mentioned execution subject perform knowledge learning from the input training samples according to the preset training goals, and then finally output the current geographic pre-training model that meets the training goals as the target geographic pre-training model. . Among them, the training goal is a goal used to guide the model on how to learn knowledge from training samples and what kind of knowledge it should learn, so that it can learn the required knowledge more accurately and better.
由于样本节点序列中同时包含以文本表示的地名知识和以数字表示的空间知识,训练目标可以针对性的分成对应的两个,例如分为用于指导学习以文本形式展现的地名知识的第一子训练目标,和用于指导模型学习文本与其表示的实体在真实世界坐标的映射关系的第二子训练目标,从而有效学习到空间知识。考虑到文本与真实世界坐标之间的映射关系寻找难度大,还可以将其转换为寻求学习文本与其对应兴趣点所属真实世界的地理区块的映射关系,而该地理区块则可以采用基于真实世界坐标确定出的预设位置编码,以通过位置编码来降低映射关系的寻找难度。Since the sample node sequence contains both place name knowledge expressed in text and spatial knowledge expressed in numbers, the training objectives can be divided into two corresponding ones, for example, into the first one used to guide the learning of place name knowledge expressed in text form. The sub-training goal, and the second sub-training goal used to guide the model to learn the mapping relationship between text and the entity it represents in the real world coordinates, so as to effectively learn spatial knowledge. Considering that it is difficult to find the mapping relationship between text and real-world coordinates, it can also be converted into a mapping relationship that seeks to learn the mapping relationship between the text and the real-world geographical block to which the corresponding interest point belongs, and the geographical block can be based on real-world The preset position coding determined by world coordinates can reduce the difficulty of finding mapping relationships through position coding.
训练目标包括指导模型从训练样本中学习到兴趣点的地名与预设位置编码之间的映射关系的子目标,预设位置编码对应于相应兴趣点在真实世界所处的地理区块。The training objectives include sub-goals that guide the model to learn from the training samples the mapping relationship between the place name of the interest point and the preset location code. The preset location code corresponds to the geographical block where the corresponding interest point is located in the real world.
本公开实施例提供的地理预训练模型训练方法,通过将以文本形式表示的地名知识和以数字形式表示的空间知识,以异构图的图结构有机融合在一起,得以克服多模态地理知识存在的模态差异,借助能够处理图数据的初始地理预训练模型就可以在同一个隐式空间更好的学习不同模态的地理知识,进而为地理位置相关的下游任务提供一个 较好的地理预训练模型,提升下游任务的任务实现效果。The geographical pre-training model training method provided by the embodiment of the present disclosure can overcome multi-modal geographical knowledge by organically integrating place name knowledge expressed in text form and spatial knowledge expressed in digital form with a heterogeneous graph structure. Due to the existing modal differences, with the help of the initial geographical pre-training model that can process graph data, the geographical knowledge of different modes can be better learned in the same implicit space, thereby providing a better geographical knowledge for downstream tasks related to geographical location. Pre-train the model to improve the task implementation effect of downstream tasks.
在上述实施例的基础上,还可以在兴趣点异构图中增加依附于各节点的前置搜索节点,其中,该前置搜索节点记录有相应的兴趣点被选择之前的接收到的搜索词,以通过前置搜索节点与节点之间的前置关系,使得生成的样本节点序列中包含兴趣点的搜索词,进而使得地理预训练模型在训练中也结合搜索词,提升寻找不同兴趣点之间关联的准确性和全面性。On the basis of the above embodiment, a front-end search node attached to each node can also be added to the interest point heterogeneous graph, where the front-end search node records the search words received before the corresponding interest point is selected. , by pre-searching the pre-relationship between nodes, the generated sample node sequence contains search terms for points of interest, and then the geographical pre-training model also combines search terms during training to improve the search for different points of interest. accuracy and comprehensiveness of the correlation.
在上述实施例中,兴趣点异构图中的边用于表征相应节点之间在真实世界存在的关联关系,还可以根据不同类型的关联关系,将边划分为实线边和虚线边,其中,实线边基于用户历史出行轨迹中记录的兴趣点时间序列确定得到,实线边表征不同节点之间的出行逻辑关联;虚线边表征处于相同地理区块内的不同节点之间的同区块关联。进而通过增加虚线边表示的同区块关联,可以在后续基于随机游走算法生成样本节点序列时,因同区块关联提供的节点替换方式或游走长度提升方式,得到更多可能的节点序列,最终通过提升训练样本的数量级来提升模型训练效果。In the above embodiment, the edges in the interest point heterogeneous graph are used to represent the real-world associations between corresponding nodes. The edges can also be divided into solid edges and dotted edges according to different types of associations, where , the solid edge is determined based on the time series of points of interest recorded in the user's historical travel trajectory. The solid edge represents the travel logical association between different nodes; the dotted edge represents the same block between different nodes in the same geographical block. association. Furthermore, by adding the same-block association represented by the dotted edge, when the sample node sequence is subsequently generated based on the random walk algorithm, more possible node sequences can be obtained due to the node replacement method or the walk length improvement method provided by the same-block association. , and ultimately improve the model training effect by increasing the order of magnitude of training samples.
请参考图4,图4为本公开实施例提供的一种样本节点序列生成方法的流程图,即针对如何获取步骤201所需的样本节点序列提供了一种具体的实现方式。其中流程400包括以下步骤:Please refer to Figure 4. Figure 4 is a flow chart of a method for generating a sample node sequence provided by an embodiment of the present disclosure, which provides a specific implementation method for how to obtain the sample node sequence required in step 201. The process 400 includes the following steps:
步骤401:从地图应用获取用户搜索日志和兴趣点数据库;Step 401: Obtain user search logs and points of interest database from the map application;
本步骤旨在由执行主体(可以仍为图1所示服务器105,也可以是区别于服务105的其它服务器或其它具有运算能力的设备)从地图应用获取用户搜索日志和兴趣点数据库。This step is intended for the execution subject (which may still be the server 105 shown in Figure 1, or may be another server different from the service 105 or other device with computing capabilities) to obtain the user search log and interest point database from the map application.
该兴趣点数据库记录有各兴趣点的地名知识和空间知识。地名知识主要指地名,而地名主要指地理位置实体(如POI、街道和地区)的名称;空间知识主要包含一个地理位置实体的具体位置(通常以地理坐标形式表示)、不同地理实体之间的空间关系(通常以三元组的形式表示)和人类移动轨迹(通常以ID序列的形式表示),可参见图3所示的示意图。The point of interest database records place name knowledge and spatial knowledge of each point of interest. Geographical name knowledge mainly refers to place names, and geographical names mainly refer to the names of geographical location entities (such as POIs, streets, and regions); spatial knowledge mainly includes the specific location of a geographical location entity (usually expressed in the form of geographical coordinates), and the relationship between different geographical entities. Spatial relationships (usually expressed in the form of triples) and human movement trajectories (usually expressed in the form of ID sequences) can be seen in the schematic diagram shown in Figure 3.
步骤402:从用户搜索日志提取与用户每次搜索对应的搜索词和所实际选择的兴趣点,以及与用户出行轨迹对应的兴趣点时间序列;Step 402: Extract the search terms corresponding to each user search and the points of interest actually selected from the user search log, as well as the time series of points of interest corresponding to the user's travel trajectory;
其中,兴趣点时间序列则是将用户出行轨迹中涉及的多个兴趣点按照到达的时间先后顺序进行排列得到。Among them, the point of interest time series is obtained by arranging multiple points of interest involved in the user's travel trajectory in order of arrival time.
步骤403:将每个兴趣点作为节点,并根据对应的搜索词建立依附于相应节点的前置搜索节点;Step 403: Use each point of interest as a node, and establish a pre-search node attached to the corresponding node according to the corresponding search term;
步骤404:根据兴趣点时间序列建立存在出行逻辑关联的相应节点之间的实线边连接;Step 404: Establish solid edge connections between corresponding nodes with travel logical associations based on the time series of points of interest;
步骤405:根据空间知识中的各地理区块边界和各兴趣点的真实世界坐标,建立存在同区块关联的相应节点之间的虚线边连接,得到兴趣点异构图;Step 405: Based on the boundaries of each geographical block in the spatial knowledge and the real-world coordinates of each interest point, establish dotted edge connections between corresponding nodes associated with the same block to obtain a heterogeneous graph of interest points;
实际所构建出的兴趣点异构图可参见图5所示的示意图。图5所示的兴趣点包含两种节点:POI节点和前置搜索节点(用户选择POI时输入的搜索词);三种边:点击边(图中搜索-点击-POI,即用户用该搜索词搜索了POI),地块共现边(图中POI-共同出现-POI,即两个POI出现在了同一区块,区块预先通过S2 geometry库提供的划分方式划分得到),和移动轨迹边(图中起点-到-终点,即用户先后放达的两个POI)。The actual constructed interest point heterogeneous graph can be seen in the schematic diagram shown in Figure 5. The points of interest shown in Figure 5 include two types of nodes: POI nodes and pre-search nodes (search words entered when the user selects POI); three types of edges: click edges (search-click-POI in the figure, that is, the user uses this search word search POI), plot co-occurrence edges (POI-co-occurrence-POI in the figure, that is, two POIs appear in the same block, the block is pre-divided through the division method provided by the S2 geometry library), and movement trajectories Edge (the starting point-to-end point in the figure, that is, the two POIs that the user has reached one after another).
步骤406:在兴趣点异构图上通过随机游走算法进行随机游走操作,得到样本节点序列。Step 406: Perform a random walk operation on the heterogeneous graph of interest points through a random walk algorithm to obtain a sample node sequence.
具体的,通过按照实际情况设定的随机游走算法参数,即可快速、高效率的得到大量样本节点序列。Specifically, by setting the parameters of the random walk algorithm according to the actual situation, a large number of sample node sequences can be obtained quickly and efficiently.
即本实施例所提供的技术方案,从用户搜索日志和兴趣点数据库入手,后续既通过设置前置搜索节点来将搜索词引入样本节点序列,又通过设置体现出行逻辑关联的实线边和体现同区块关联的虚线边,来对用户出行轨迹未记录的可能轨迹进行拓展,进而不仅使得后续得到的样本阶段序列包含有更多更有价值的知识、又增加了样本节点序列的数量级,最终共同起到提升地理预训练模型对相关地理知识学习的全面性和准确性的效果。That is, the technical solution provided by this embodiment starts with user search logs and interest point databases, and then not only introduces search terms into the sample node sequence by setting pre-search nodes, but also sets solid edges and reflections that reflect the logical association of travel. The dotted edges associated with the block expand the possible trajectories that are not recorded in the user's travel trajectory, which not only makes the subsequent sample stage sequence contain more valuable knowledge, but also increases the order of magnitude of the sample node sequence, and ultimately Together, they can improve the comprehensiveness and accuracy of the geographical pre-training model in learning relevant geographical knowledge.
为了尽可能的提升目标地理预训练模型的训练效果,以及考虑到训练样本是一个节点序列,因此还可以设置初始地理预训练模型包括第一转换(Tranformer)层、聚合(TranSAGE)层、第二转换(Tranformer) 层,请对应参见图6所示的示意图。如图6所示,第一转换层(即图6所示的Transformer(L12))用于将构成样本节点序列的每个节点的节点信息分别进行第一特征编码,得到节点分类编码(即图6所示的
Figure PCTCN2022113287-appb-000001
)和节点上下文编码(即图6所示的
Figure PCTCN2022113287-appb-000002
),聚合层(即图6所示的TranSAGE层)用于将每个节点的节点分类编码结合其它节点的节点分类编码进行特征聚合,得到聚合后节点分类编码(即图6所示的
Figure PCTCN2022113287-appb-000003
),第二转换层(即图6所示的Transformer(L1))用于将每个节点的聚合后节点分类编码和节点上下文编码分别进行第二特征编码,每个第二特征编码的结果将根据节点信息包含的知识表现形式进行对应的预训练目标的训练。
In order to improve the training effect of the target geographical pre-training model as much as possible, and considering that the training sample is a node sequence, the initial geographical pre-training model can also be set to include the first transformation (Tranformer) layer, the aggregation (TranSAGE) layer, the second For the Transformer layer, please refer to the schematic diagram shown in Figure 6. As shown in Figure 6, the first transformation layer (i.e., Transformer (L12) shown in Figure 6) is used to perform first feature coding on the node information of each node that constitutes the sample node sequence, and obtain the node classification code (i.e., Figure shown in 6
Figure PCTCN2022113287-appb-000001
) and node context encoding (i.e. as shown in Figure 6
Figure PCTCN2022113287-appb-000002
), the aggregation layer (i.e., the TranSAGE layer shown in Figure 6) is used to combine the node classification code of each node with the node classification codes of other nodes to perform feature aggregation, and obtain the aggregated node classification code (i.e., the node classification code shown in Figure 6
Figure PCTCN2022113287-appb-000003
), the second transformation layer (i.e. Transformer (L1) shown in Figure 6) is used to perform second feature coding on the aggregated node classification coding and node context coding of each node, and the result of each second feature coding will be The corresponding pre-training target is trained according to the knowledge representation contained in the node information.
为便于理解上述技术方案,此处还通过一种具体的运算方式来进一步详细的解释上述的数据处理过程:In order to facilitate the understanding of the above technical solution, the above data processing process is further explained in detail through a specific calculation method:
在兴趣点异构图上随机游走得到输入文档D={v 1,v 2,...,v n}后,首先用sentence-piece算法将其中的每个节点v i的文本表示转化为子词(subword)序列
Figure PCTCN2022113287-appb-000004
随后我们用transformer层对S i进行编码:
Figure PCTCN2022113287-appb-000005
After randomly walking on the heterogeneous graph of interest points to obtain the input document D = {v 1 , v 2 ,..., v n }, first use the sentence-piece algorithm to convert the text representation of each node vi into subword sequence
Figure PCTCN2022113287-appb-000004
Then we use the transformer layer to encode Si :
Figure PCTCN2022113287-appb-000005
随后,用一个基于transformer的聚合层建模输入序列中的图结构,为了高效运算,只用每个节点的序列聚合表示
Figure PCTCN2022113287-appb-000006
进行如下计算:
Subsequently, a transformer-based aggregation layer is used to model the graph structure in the input sequence. For efficient operation, only the sequence aggregation representation of each node is used.
Figure PCTCN2022113287-appb-000006
Make the following calculation:
Figure PCTCN2022113287-appb-000007
Figure PCTCN2022113287-appb-000007
Figure PCTCN2022113287-appb-000008
Figure PCTCN2022113287-appb-000008
Figure PCTCN2022113287-appb-000009
Figure PCTCN2022113287-appb-000009
Figure PCTCN2022113287-appb-000010
Figure PCTCN2022113287-appb-000010
其中,
Figure PCTCN2022113287-appb-000011
Figure PCTCN2022113287-appb-000012
是根据不同节点种类和适配不同参数的两个线性层。
in,
Figure PCTCN2022113287-appb-000011
and
Figure PCTCN2022113287-appb-000012
It is two linear layers based on different node types and adapting different parameters.
随后,将聚合后的表示
Figure PCTCN2022113287-appb-000013
与其原上下文
Figure PCTCN2022113287-appb-000014
表示首尾相连并用另外一个transform层进行建模,
Figure PCTCN2022113287-appb-000015
Figure PCTCN2022113287-appb-000016
将用于进行预训练任务。
Subsequently, the aggregated representation
Figure PCTCN2022113287-appb-000013
its original context
Figure PCTCN2022113287-appb-000014
Indicates that they are connected end to end and modeled with another transform layer.
Figure PCTCN2022113287-appb-000015
Figure PCTCN2022113287-appb-000016
Will be used for pre-training tasks.
上例仅作为结合上述思想在某个应用场景下的具体实现,本领域技术人员可基于上述第一转换层、聚合层、第二转换层所反映出的数据处理思想,结合不同的实际情况,得到多种变种和适应性调整,此处不再一一列举。The above example is only a specific implementation of the above ideas in a certain application scenario. Those skilled in the art can combine different actual situations based on the data processing ideas reflected in the above first conversion layer, aggregation layer, and second conversion layer. There are many variations and adaptations available, too many to list here.
在上述任意实施例的基础上,考虑到文本与真实世界坐标之间的映射关系寻找难度大,还可以将其转换为寻求学习文本与其对应兴趣点所属真实世界的地理区块的映射关系,而该地理区块则可以采用基于真实世界坐标确定出的预设位置编码,以通过位置编码来降低映射关系的寻找难度。Based on any of the above embodiments, considering that it is difficult to find the mapping relationship between the text and the real-world coordinates, it can also be converted into seeking the mapping relationship between the learning text and the real-world geographical block to which the corresponding interest point belongs, and The geographical block can use a preset location code determined based on real-world coordinates to reduce the difficulty of finding mapping relationships through location coding.
一种预设位置编码的编码规则可以为:An encoding rule for preset position encoding can be:
将真实世界用按预设的区块划分方式(例如可以使用S2geometry库提供的划分标准)分成多个地理区块;Divide the real world into multiple geographical blocks according to the preset block division method (for example, you can use the division standard provided by the S2geometry library);
控制每个地理区块各自对应一个编码令牌(可以称Token);其中,编码令牌的长度对应所代表的区块划分粒度等级,区块划分粒度等级每增加两级,编码令牌的长度增加一,相邻地理区块划分粒度等级(例如级别为2n-1和2n)的编码令牌仅有最后一位编码不同。Each geographical block is controlled to correspond to a coding token (which can be called a Token); among them, the length of the coding token corresponds to the granularity level of the block division it represents. Every time the granularity level of the block division increases by two levels, the length of the coding token Add one, and the encoding tokens of adjacent geographical block granularity levels (for example, levels 2n-1 and 2n) only differ in the last bit of encoding.
而为了尽可能高效地预测多个层级的编码令牌,可以将预测任务转化为构成编码令牌的每位编码进行位置预测,例如分别对如下三个内容预测其对应的标签:1)编码令牌在2n-1级别的字符;2)编码令牌在2n级别的字符;3)编码令牌在2n-1和2n级别所共享的倒数第二个字符。In order to predict multiple levels of coding tokens as efficiently as possible, the prediction task can be converted into position prediction for each bit of coding that constitutes the coding token. For example, predict the corresponding labels for the following three contents: 1) Coding order The character of the card at level 2n-1; 2) the character of the encoding token at level 2n; 3) the penultimate character shared by the encoding token at levels 2n-1 and 2n.
如图7所示,训练目标是为了地理预训练模型学习到文本表示的兴趣点地名与其在真实世界的所处地理区块之间的映射关系,例如输入的是A国B市C区D路X号Y园区,其输出是该地址所关联坐标的多层级的字符化表达(例如图7所示中所示的35f1c、35f1b、35f1ac、35f1a9)。As shown in Figure 7, the training goal is for the geographical pre-training model to learn the mapping relationship between the text-represented point of interest place names and their geographical blocks in the real world. For example, the input is Road A, District C, City B The output of Park No.
需要说明的是,本实施例仅是提供了一种示例性的预设位置编码的编码规则,预设位置编码的位数的规则和具体细节均可以结合实际情况自行调整,只要能够实现通过预设位置编码来降低文本与地理区块编码之间映射关系的寻找、难度即可。It should be noted that this embodiment only provides an exemplary coding rule for preset position coding. The rules and specific details of the number of digits for preset position coding can be adjusted based on the actual situation, as long as the preset position coding can be achieved. Just set the location code to reduce the difficulty of finding the mapping relationship between text and geographical block code.
上述各实施例从各个方面阐述了如何通过预训练得到地理预训练模型,下述将通过图8所示的实施例,描述如果将该地理预训练模型作为一个可利用的“中间件”或“半成品”来为地理相关技术领域(例如地图领域)的其它下游任务提供帮助,以使下游任务可以在该“半成 品”的基础上通过少量样本的少量训练,得到一个较高准确性、效果较好的新地理模型。The above embodiments explain how to obtain a geographical pre-training model through pre-training from various aspects. The following will describe how to use the geographical pre-training model as an available "middleware" or " "Semi-finished products" to provide assistance for other downstream tasks in geography-related technical fields (such as the map field), so that downstream tasks can obtain a higher accuracy and better effect based on the "semi-finished products" through a small amount of training with a small number of samples. new geographic model.
图8通过流程800提供了一种地理预训练模型的模型微调方法,包括如下步骤:Figure 8 provides a model fine-tuning method for a geographical pre-training model through process 800, which includes the following steps:
步骤801:获取目标地理预训练模型;Step 801: Obtain the target geographical pre-training model;
步骤802:获取地图应用的新功能需求,并确定与新功能需求对应的新训练样本;Step 802: Obtain the new functional requirements of the map application and determine new training samples corresponding to the new functional requirements;
步骤803:在目标地理预训练模型的基础上,通过模型微调技术和新训练样本,生成与新功能需求对应的新地理模型。Step 803: Based on the target geographical pre-training model, generate a new geographical model corresponding to the new functional requirements through model fine-tuning technology and new training samples.
模型微调技术的原理,相当于将之前已经训练好的目标地理预训练模型的模型参数,作为新地理模型的初始化模型参数,从而通过参数继承的方式直接拥有较好的模型结构,而使用模型微调技术的前提则应该是新功能需求与目标地理预训练模型所具有的能力强相关,因此可以后续仅通过少量的新训练样本快速得到一个效果较好的、用于实现新功能需求的新地理模型。The principle of model fine-tuning technology is equivalent to using the model parameters of the previously trained target geographical pre-training model as the initial model parameters of the new geographical model, so as to directly have a better model structure through parameter inheritance, while using model fine-tuning The premise of the technology should be that the new functional requirements are strongly related to the capabilities of the target geographical pre-training model. Therefore, a new geographical model with better effect and used to realize the new functional requirements can be quickly obtained through only a small number of new training samples. .
具体的,由于目标地理预训练模型是融合了兴趣点的地名知识和空间知识,通过学习找到了不同兴趣点之间存在的各种关联,因此只要新功能需求与所学习到的知识相关,即可通过这种方式提升效果。Specifically, since the target geographical pre-training model integrates place name knowledge and spatial knowledge of points of interest, various associations between different points of interest are found through learning, so as long as the new functional requirements are related to the learned knowledge, that is The effect can be improved this way.
以下分别介绍两种新功能需求:The following two new functional requirements are introduced respectively:
其一,在新功能需求为同类兴趣点推荐时,确定与同类兴趣点推荐对应的用户调查问卷,然后根据用户调查问卷中记录的内容生成新训练样本;First, when the new functional requirement is to recommend similar points of interest, determine the user questionnaire corresponding to the recommendation of similar points of interest, and then generate a new training sample based on the content recorded in the user questionnaire;
后续即可在目标地理预训练模型的基础上,通过模型微调技术和新训练样本,生成用于根据当前兴趣点推荐同类兴趣点的新地理模型,即此时的新地理模型就可以为用户根据当前兴趣点推荐同类兴趣点,这个新功能需求可以利用目标地理预训练模型从构成兴趣点异构图的虚线边学习到的同区块逻辑关联(来源于同类型兴趣点通常会“扎堆”出现、存在“聚集性”的特点),进而基于同区块关联向用户推荐与当前兴趣点具有同类型的其它兴趣点。Subsequently, based on the target geographical pre-training model, through model fine-tuning technology and new training samples, a new geographical model for recommending similar points of interest based on the current points of interest can be generated. That is, the new geographical model at this time can be used for users based on The current point of interest recommends similar points of interest. This new functional requirement can use the target geographical pre-training model to learn the logical association of the same block from the dotted edges that constitute the heterogeneous graph of points of interest (from the fact that points of interest of the same type usually appear "clustered" , has the characteristics of "aggregation"), and then recommends other points of interest of the same type as the current point of interest to the user based on the same block association.
其二,在新功能需求为随意逛逛时,也可以通过问卷或其它形式 得到少量的新训练样本。后续即可在目标地理预训练模型的基础上,通过模型微调技术和新训练样本,生成用于根据当前兴趣点推荐其它兴趣点的新地理模型。即此时的新地理模型就可以为用户根据当前兴趣点推荐一些其它的兴趣点,这个新功能需求可以利用目标地理预训练模型从构成兴趣点异构图的实线边学习到的出行逻辑关联,进而基于出行逻辑关联向用户推荐与当前兴趣点具有出行逻辑关系的其它兴趣点,以通过这种关联来满足用户的随意逛逛的需求。Secondly, when new functional requirements require casual browsing, a small number of new training samples can also be obtained through questionnaires or other forms. Subsequently, based on the target geographical pre-training model, through model fine-tuning technology and new training samples, a new geographical model for recommending other points of interest based on the current point of interest can be generated. That is, the new geographical model at this time can recommend some other points of interest to the user based on the current point of interest. This new functional requirement can use the travel logical association learned by the target geographical pre-training model from the solid edges that constitute the heterogeneous graph of interest points. , and then recommend to the user other points of interest that have a travel logical relationship with the current point of interest based on the travel logical association, so as to satisfy the user's need for casual shopping through this association.
进一步参考图9和图10,作为对上述各图所示方法的实现,本公开分别提供了一种地理预训练模型的预训练装置和一种地理预训练模型的模型微调装置的实施例,地理预训练模型的预训练装置的实施例与图2所示的地理预训练模型的预训练方法的实施例相对应,地理预训练模型的模型微调装置的实施例与图8所示的地理预训练模型的模型微调方法的实施例相对应。上述装置具体可以应用于各种电子设备中。With further reference to Figures 9 and 10, as an implementation of the methods shown in the above figures, the present disclosure respectively provides embodiments of a pre-training device for a geographical pre-training model and a model fine-tuning device for a geographical pre-training model. The embodiment of the pre-training device for the pre-training model corresponds to the embodiment of the pre-training method for the geographical pre-training model shown in Figure 2, and the embodiment of the model fine-tuning device for the geographical pre-training model corresponds to the embodiment of the geographical pre-training method shown in Figure 8 The model corresponds to the embodiment of the model fine-tuning method. The above device can be applied in various electronic devices.
如图9所示,本实施例的地理预训练模型的预训练装置900可以包括:样本节点序列获取单元901、训练样本输入单元902、预训练单元903。其中,样本节点序列获取单元901,被配置成获取样本节点序列;其中,样本节点序列基于预设的兴趣点异构图和随机游走算法生成,兴趣点异构图包括由各兴趣点充当的各节点和连接各节点的边,节点名为相应兴趣点的地名,边表征相应节点之间在真实世界存在的关联关系;训练样本输入单元902,被配置成将样本节点序列作为训练样本输入初始地理预训练模型;预训练单元903,被配置成控制初始地理预训练模型按照预设的训练目标进行训练,并将达到训练目标的当前地理预训练模型输出为目标地理预训练模型;其中,训练目标包括指导模型从训练样本中学习到兴趣点的地名与预设位置编码之间的映射关系的子目标,预设位置编码对应于相应兴趣点在真实世界所处的地理区块。As shown in Figure 9, the pre-training device 900 of the geographical pre-training model in this embodiment may include: a sample node sequence acquisition unit 901, a training sample input unit 902, and a pre-training unit 903. Among them, the sample node sequence acquisition unit 901 is configured to obtain a sample node sequence; wherein the sample node sequence is generated based on a preset interest point heterogeneous graph and a random walk algorithm, and the interest point heterogeneous graph includes the interest points acting as Each node and the edge connecting each node, the node name is the place name of the corresponding point of interest, and the edge represents the association between the corresponding nodes in the real world; the training sample input unit 902 is configured to input the sample node sequence as the initial training sample Geographic pre-training model; the pre-training unit 903 is configured to control the initial geographic pre-training model to be trained according to the preset training goal, and output the current geographic pre-training model that reaches the training goal as the target geographic pre-training model; wherein, training The goal includes sub-goals that guide the model to learn from the training samples the mapping relationship between the place name of the interest point and the preset location code. The preset location code corresponds to the geographical block where the corresponding interest point is located in the real world.
在本实施例中,地理预训练模型的预训练装置900中:样本节点序列获取单元901、训练样本输入单元902、预训练单元903的具体处理及其所带来的技术效果可分别参考图2对应实施例中的步骤201-203的相关说明,在此不再赘述。In this embodiment, in the pre-training device 900 of the geographical pre-training model: the specific processing of the sample node sequence acquisition unit 901, the training sample input unit 902, the pre-training unit 903 and the technical effects thereof can be referred to Figure 2 respectively. The relevant descriptions of steps 201-203 in the corresponding embodiment will not be described again here.
在本实施例的一些可选的实现方式中,兴趣点异构图还可以包括:依附于各节点的前置搜索节点,前置搜索节点记录有相应的兴趣点被选择之前的接收到的搜索词。In some optional implementations of this embodiment, the interest point heterogeneous graph may also include: a front-end search node attached to each node, and the front-end search node records the search received before the corresponding interest point is selected. word.
在本实施例的一些可选的实现方式中,边包括实线边和虚线边,实线边基于用户历史出行轨迹中记录的兴趣点时间序列确定得到,实线边表征不同节点之间的出行逻辑关联,虚线边表征处于相同地理区块内的不同节点之间的同区块关联。In some optional implementations of this embodiment, the edges include solid edges and dotted edges. The solid edges are determined based on the time series of points of interest recorded in the user's historical travel trajectory. The solid edges represent the travel between different nodes. Logical association, dotted edges represent the same-block association between different nodes in the same geographical block.
在本实施例的一些可选的实现方式中,地理预训练模型的预训练装置900还可以包括:被配置成基于兴趣点异构图和随机游走算法生成样本节点序列的样本节点序列生成单元,样本节点序列生成单元可以被进一步配置成:In some optional implementations of this embodiment, the pre-training device 900 of the geographical pre-training model may also include: a sample node sequence generation unit configured to generate a sample node sequence based on the interest point heterogeneous graph and a random walk algorithm. , the sample node sequence generation unit can be further configured as:
从地图应用获取用户搜索日志和兴趣点数据库;其中,兴趣点数据库记录有各兴趣点的地名知识和空间知识;Obtain user search logs and point-of-interest database from the map application; among them, the point-of-interest database records place name knowledge and spatial knowledge of each point of interest;
从用户搜索日志提取与用户每次搜索对应的搜索词和所实际选择的兴趣点,以及与用户出行轨迹对应的兴趣点时间序列;Extract the search terms corresponding to each user search and the points of interest actually selected from the user search log, as well as the time series of points of interest corresponding to the user's travel trajectory;
将每个兴趣点作为节点,并根据对应的搜索词建立依附于相应节点的前置搜索节点;Treat each point of interest as a node, and establish a pre-search node attached to the corresponding node based on the corresponding search term;
根据兴趣点时间序列建立存在出行逻辑关联的相应节点之间的实线边连接;Establish solid edge connections between corresponding nodes with travel logical associations based on the time series of points of interest;
根据空间知识中的各地理区块边界和各兴趣点的真实世界坐标,建立存在同区块关联的相应节点之间的虚线边连接,得到兴趣点异构图;According to the boundaries of each geographical block in the spatial knowledge and the real-world coordinates of each interest point, a dotted edge connection between corresponding nodes associated with the same block is established to obtain a heterogeneous graph of interest points;
在兴趣点异构图上通过随机游走算法进行随机游走操作,得到样本节点序列。A random walk operation is performed on the heterogeneous graph of interest points through a random walk algorithm to obtain a sample node sequence.
在本实施例的一些可选的实现方式中,初始地理预训练模型包括第一转换层、聚合层、第二转换层,第一转换层用于将构成样本节点序列的每个节点的节点信息分别进行第一特征编码,得到节点分类编码和节点上下文编码,聚合层用于将每个节点的节点分类编码结合其它节点的节点分类编码进行特征聚合,得到聚合后节点分类编码,第二转换层用于将每个节点的聚合后节点分类编码和节点上下文编码分 别进行第二特征编码。In some optional implementations of this embodiment, the initial geographic pre-training model includes a first conversion layer, an aggregation layer, and a second conversion layer. The first conversion layer is used to convert the node information of each node that constitutes the sample node sequence. The first feature coding is performed separately to obtain node classification coding and node context coding. The aggregation layer is used to combine the node classification coding of each node with the node classification coding of other nodes for feature aggregation to obtain the aggregated node classification coding. The second conversion layer Used to separately perform second feature encoding on the aggregated node classification encoding and node context encoding of each node.
在本实施例的一些可选的实现方式中,预设位置编码的编码规则包括:将真实世界用按预设的区块划分方式分成多个地理区块;控制每个地理区块各自对应一个编码令牌;其中,编码令牌的长度对应所代表的区块划分粒度等级,区块划分粒度等级每增加两级,编码令牌的长度增加一,相邻地理区块划分粒度等级的编码令牌仅有最后一位编码不同。In some optional implementations of this embodiment, the encoding rules of the preset location encoding include: dividing the real world into multiple geographical blocks according to the preset block division method; controlling each geographical block to correspond to a Encoding token; among them, the length of the encoding token corresponds to the block division granularity level it represents. For every two levels of block division granularity level, the length of the encoding token increases by one, and the encoding token of the adjacent geographical block division granularity level increases by one. The cards only differ in the last digit of the code.
作为与地理预训练模型训练方法的方法实施例对应存在的装置实施例,本实施例提供的地理预训练模型训练装置,通过将以文本形式表示的地名知识和以数字形式表示的空间知识,以异构图的图结构有机融合在一起,得以克服多模态地理知识存在的模态差异,借助能够处理图数据的初始地理预训练模型就可以在同一个隐式空间更好的学习不同模态的地理知识,进而为地理位置相关的下游任务提供一个较好的地理预训练模型,提升对下游任务的任务实现效果。As a device embodiment corresponding to the method embodiment of the geographical pre-training model training method, the geographical pre-training model training device provided in this embodiment uses place name knowledge expressed in text form and spatial knowledge expressed in digital form to The graph structures of heterogeneous graphs are organically integrated to overcome the modal differences in multi-modal geographical knowledge. With the help of the initial geographical pre-training model that can process graph data, different modalities can be better learned in the same implicit space. geographical knowledge, thereby providing a better geographical pre-training model for downstream tasks related to geographical location, and improving the task implementation effect of downstream tasks.
如图10所示,本实施例的地理预训练模型的模型微调装置1000可以包括:目标地理预训练模型获取单元1001、新训练样本确定单元1002、新地理模型生成单元1003。其中,目标地理预训练模型获取单元1001,被配置成获取目标地理预训练模型;其中,目标地理预训练模型根据如图9的地理预训练模型训练装置得到;新训练样本确定单元1002,被配置成获取地图应用的新功能需求,并确定与新功能需求对应的新训练样本;新地理模型生成单元1003,被配置成在目标地理预训练模型的基础上,通过模型微调技术和新训练样本,生成与新功能需求对应的新地理模型。As shown in Figure 10, the model fine-tuning device 1000 of the geographic pre-training model in this embodiment may include: a target geographic pre-training model acquisition unit 1001, a new training sample determination unit 1002, and a new geographic model generation unit 1003. Among them, the target geographical pre-training model acquisition unit 1001 is configured to acquire the target geographical pre-training model; wherein the target geographical pre-training model is obtained according to the geographical pre-training model training device as shown in Figure 9; the new training sample determination unit 1002 is configured To obtain new functional requirements for map applications and determine new training samples corresponding to the new functional requirements; the new geographical model generation unit 1003 is configured to use model fine-tuning technology and new training samples based on the target geographical pre-training model. Generate new geographic models corresponding to new functional requirements.
在本实施例中,地理预训练模型的模型微调装置1000中:目标地理预训练模型获取单元1001、新训练样本确定单元1002、新地理模型生成单元1003的具体处理及其所带来的技术效果可分别如图8所示的地理预训练模型的模型微调方法的实施例中记载的相关说明,在此不再赘述。In this embodiment, in the model fine-tuning device 1000 of the geographical pre-training model: the specific processing of the target geographical pre-training model acquisition unit 1001, the new training sample determination unit 1002, the new geographical model generation unit 1003 and the technical effects thereof The relevant descriptions recorded in the embodiment of the model fine-tuning method of the geographical pre-training model as shown in Figure 8 will not be repeated here.
在本实施例的一些可选的实现方式中,新训练样本确定单元1002可以包括被配置成确定与新功能需求对应的新训练样本的新训练样本 确定子单元,新训练样本确定子单元可以被进一步配置成;In some optional implementations of this embodiment, the new training sample determination unit 1002 may include a new training sample determination subunit configured to determine new training samples corresponding to new functional requirements. The new training sample determination subunit may be further configured to;
响应于新功能需求为同类兴趣点推荐,确定与同类兴趣点推荐对应的用户调查问卷;Recommend similar points of interest in response to new functional requirements, and determine user questionnaires corresponding to the recommendations of similar points of interest;
根据用户调查问卷生成新训练样本;Generate new training samples based on user questionnaires;
对应的,新地理模型生成单元1003可以被进一步配置成:Correspondingly, the new geographical model generating unit 1003 can be further configured to:
在目标地理预训练模型的基础上,通过模型微调技术和新训练样本,生成用于根据当前兴趣点推荐同类兴趣点的新地理模型。Based on the target geographical pre-training model, through model fine-tuning technology and new training samples, a new geographical model for recommending similar points of interest based on current points of interest is generated.
在本实施例的一些可选的实现方式中,新地理模型生成单元1003可以被进一步配置成:In some optional implementations of this embodiment, the new geographic model generating unit 1003 may be further configured to:
响应于新功能需求为随意逛逛,在目标地理预训练模型的基础上,通过模型微调技术和新训练样本,生成用于根据当前兴趣点推荐同区块其它兴趣点的新地理模型。In response to new functional requirements for casual shopping, based on the target geographical pre-training model, through model fine-tuning technology and new training samples, a new geographical model is generated for recommending other points of interest in the same block based on the current point of interest.
作为与地理预训练模型的模型微调方法的方法实施例对应存在的装置实施例,本实施例提供的地理预训练模型的模型微调装置,在目标地理预训练模型的基础上,结合新功能需求和模型微调技术,可以快速基于包含更多地理知识的目标地理预训练模型来得到实际用于满足新功能需求的新地理模型。As a device embodiment corresponding to the method embodiment of the model fine-tuning method for the geographical pre-training model, the model fine-tuning device for the geographical pre-training model provided in this embodiment is based on the target geographical pre-training model and combines new functional requirements and Model fine-tuning technology can quickly obtain a new geographic model that is actually used to meet new functional requirements based on a target geographic pre-trained model that contains more geographic knowledge.
根据本公开的实施例,本公开还提供了一种电子设备,该电子设备包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,该指令被至少一个处理器执行,以使至少一个处理器执行时能够实现上述任一实施例描述的地理预训练模型的预训练方法和/或地理预训练模型的模型微调方法。According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores information that can be executed by the at least one processor. The instructions are executed by at least one processor, so that when executed by at least one processor, the pre-training method of the geographical pre-training model and/or the model fine-tuning method of the geographical pre-training model described in any of the above embodiments can be implemented.
根据本公开的实施例,本公开还提供了一种可读存储介质,该可读存储介质存储有计算机指令,该计算机指令用于使计算机执行时能够实现上述任一实施例描述的地理预训练模型的预训练方法和/或地理预训练模型的模型微调方法。According to an embodiment of the present disclosure, the present disclosure also provides a readable storage medium that stores computer instructions. The computer instructions are used to enable the computer to implement the geographical pre-training described in any of the above embodiments when executed. Pre-training methods for models and/or model fine-tuning methods for geographic pre-trained models.
本公开实施例提供了一种计算机程序产品,该计算机程序在被处理器执行时能够实现上述任一实施例描述的地理预训练模型的预训练方法和/或地理预训练模型的模型微调方法。Embodiments of the present disclosure provide a computer program product that, when executed by a processor, can implement the pre-training method of a geographical pre-training model and/or the model fine-tuning method of a geographical pre-training model described in any of the above embodiments.
图11示出了可以用来实施本公开的实施例的示例电子设备1100的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。11 illustrates a schematic block diagram of an example electronic device 1100 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to refer to various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are examples only and are not intended to limit implementations of the disclosure described and/or claimed herein.
如图11所示,设备1100包括计算单元1101,其可以根据存储在只读存储器(ROM)1102中的计算机程序或者从存储单元1108加载到随机访问存储器(RAM)1103中的计算机程序,来执行各种适当的动作和处理。在RAM 1103中,还可存储设备1100操作所需的各种程序和数据。计算单元1101、ROM 1102以及RAM 1103通过总线1104彼此相连。输入/输出(I/O)接口1105也连接至总线1104。As shown in FIG. 11 , the device 1100 includes a computing unit 1101 that can execute according to a computer program stored in a read-only memory (ROM) 1102 or loaded from a storage unit 1108 into a random access memory (RAM) 1103 Various appropriate actions and treatments. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. Computing unit 1101, ROM 1102 and RAM 1103 are connected to each other via bus 1104. An input/output (I/O) interface 1105 is also connected to bus 1104.
设备1100中的多个部件连接至I/O接口1105,包括:输入单元1106,例如键盘、鼠标等;输出单元1107,例如各种类型的显示器、扬声器等;存储单元1108,例如磁盘、光盘等;以及通信单元1109,例如网卡、调制解调器、无线通信收发机等。通信单元1109允许设备1100通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the device 1100 are connected to the I/O interface 1105, including: input unit 1106, such as a keyboard, mouse, etc.; output unit 1107, such as various types of displays, speakers, etc.; storage unit 1108, such as a magnetic disk, optical disk, etc. ; and communication unit 1109, such as a network card, modem, wireless communication transceiver, etc. The communication unit 1109 allows the device 1100 to exchange information/data with other devices through computer networks such as the Internet and/or various telecommunications networks.
计算单元1101可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元1101的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元1101执行上文所描述的各个方法和处理,例如地理预训练模型的预训练方法和/或地理预训练模型的模型微调方法。例如,在一些实施例中,地理预训练模型的预训练方法和/或地理预训练模型的模型微调方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元1108。在一些实施例中,计算机程序的部分或者全部可以经由ROM 1102和/或通信单元1109而被载入和/或安装到设备1100上。当计算机程序加载到RAM 1103并由计算单元1101执行时,可以执行上文描述的地理预训练模型的预训练方法和/或地理预训练模型的模型微调方法的一个或多个步骤。备选地,在其他实施例中,计算单元1101可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行地理预训练模型的预训练方法和/或地理预训练模型的模型微调方法。 Computing unit 1101 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing units 1101 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1101 performs various methods and processes described above, such as a pre-training method for a geographical pre-training model and/or a model fine-tuning method for a geographical pre-training model. For example, in some embodiments, the pre-training method of the geographical pre-training model and/or the model fine-tuning method of the geographical pre-training model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as the storage unit 1108 . In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1100 via ROM 1102 and/or communication unit 1109 . When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of the above-described pre-training method for the geographical pre-training model and/or the model fine-tuning method for the geographical pre-training model may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to perform the pre-training method of the geographical pre-training model and/or the model fine-tuning of the geographical pre-training model in any other suitable manner (eg, by means of firmware). method.
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip implemented in a system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or a combination thereof. These various embodiments may include implementation in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor The processor, which may be a special purpose or general purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device. An output device.
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions specified in the flowcharts and/or block diagrams/ The operation is implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储 器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of this disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer. Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and may be provided in any form, including Acoustic input, voice input or tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., A user's computer having a graphical user interface or web browser through which the user can interact with implementations of the systems and technologies described herein), or including such backend components, middleware components, or any combination of front-end components in a computing system. The components of the system may be interconnected by any form or medium of digital data communication (eg, a communications network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决传统物理主机与虚拟专用服务器(VPS,Virtual Private Server)服务中存在的管理难度大,业务扩展性弱的缺陷。Computer systems may include clients and servers. Clients and servers are generally remote from each other and typically interact over a communications network. The relationship of client and server is created by computer programs running on corresponding computers and having a client-server relationship with each other. The server can be a cloud server, also known as cloud computing server or cloud host. It is a host product in the cloud computing service system to solve the management difficulties existing in traditional physical host and virtual private server (VPS, Virtual Private Server) services. Large, weak business scalability.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技 术方案所期望的结果,本文在此不进行限制。It should be understood that various forms of the process shown above may be used, with steps reordered, added or deleted. For example, each step described in the present disclosure may be executed in parallel, sequentially, or in a different order. As long as the desired results of the technical solution disclosed in the present disclosure can be achieved, there is no limitation here.
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the scope of the present disclosure. It will be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions are possible depending on design requirements and other factors. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this disclosure shall be included in the protection scope of this disclosure.

Claims (21)

  1. 一种地理预训练模型的预训练方法,包括:A pre-training method for geographical pre-training models, including:
    获取样本节点序列;其中,所述样本节点序列基于预设的兴趣点异构图和随机游走算法生成,所述兴趣点异构图包括由各兴趣点充当的各节点和连接各所述节点的边,所述节点名为相应兴趣点的地名,所述边表征相应节点之间在真实世界存在的关联关系;Obtain a sample node sequence; wherein the sample node sequence is generated based on a preset interest point heterogeneous graph and a random walk algorithm. The interest point heterogeneous graph includes each node acted by each interest point and connecting each of the nodes. The edge of the node is named the place name of the corresponding point of interest, and the edge represents the association between the corresponding nodes in the real world;
    将所述样本节点序列作为训练样本输入初始地理预训练模型;Enter the sample node sequence as a training sample into the initial geographical pre-training model;
    控制所述初始地理预训练模型按照预设的训练目标进行训练,并将达到所述训练目标的当前地理预训练模型输出为目标地理预训练模型;其中,所述训练目标包括指导模型从所述训练样本中学习到兴趣点的地名与预设位置编码之间的映射关系的子目标,所述预设位置编码对应于相应兴趣点在真实世界所处的地理区块。Control the initial geographic pre-training model to train according to a preset training goal, and output the current geographic pre-training model that reaches the training goal as a target geographic pre-training model; wherein the training goal includes guiding the model from the The sub-goal of learning the mapping relationship between the place name of the point of interest and the preset location code in the training sample, where the preset location code corresponds to the geographical block where the corresponding point of interest is located in the real world.
  2. 根据权利要求1所述的方法,其中,所述兴趣点异构图还包括:依附于各所述节点的前置搜索节点,所述前置搜索节点记录有相应的兴趣点被选择之前的接收到的搜索词。The method according to claim 1, wherein the interest point heterogeneous graph further includes: a front-end search node attached to each of the nodes, and the front-end search node records the reception before the corresponding interest point is selected. search terms.
  3. 根据权利要求1所述的方法,其中,所述边包括实线边和虚线边,所述实线边基于用户历史出行轨迹中记录的兴趣点时间序列确定得到,所述实线边表征不同节点之间的出行逻辑关联,所述虚线边表征处于相同地理区块内的不同节点之间的同区块关联。The method according to claim 1, wherein the edge includes a solid edge and a dotted edge, the solid edge is determined based on the time series of points of interest recorded in the user's historical travel trajectory, and the solid edge represents different nodes. The dotted edges represent the same-block association between different nodes in the same geographical block.
  4. 根据权利要求1所述的方法,还包括:基于所述兴趣点异构图和所述随机游走算法生成所述样本节点序列,所述基于所述兴趣点异构图和所述随机游走算法生成所述样本节点序列,包括:The method according to claim 1, further comprising: generating the sample node sequence based on the heterogeneous graph of interest points and the random walk algorithm, which is based on the heterogeneous graph of interest points and the random walk. The algorithm generates the sample node sequence, including:
    从地图应用获取用户搜索日志和兴趣点数据库;其中,所述兴趣点数据库记录有各兴趣点的地名知识和空间知识;Obtain user search logs and point-of-interest database from the map application; wherein, the point-of-interest database records place name knowledge and spatial knowledge of each point of interest;
    从所述用户搜索日志提取与用户每次搜索对应的搜索词和所实际选择的兴趣点,以及与用户出行轨迹对应的兴趣点时间序列;Extract from the user search log the search terms corresponding to each user search and the points of interest actually selected, as well as the time series of points of interest corresponding to the user's travel trajectory;
    将每个兴趣点作为节点,并根据对应的搜索词建立依附于相应节点的前置搜索节点;Treat each point of interest as a node, and establish a pre-search node attached to the corresponding node based on the corresponding search term;
    根据所述兴趣点时间序列建立存在出行逻辑关联的相应节点之间的实线边连接;Establish solid edge connections between corresponding nodes with travel logical associations based on the interest point time series;
    根据所述空间知识中的各地理区块边界和各兴趣点的真实世界坐标,建立存在同区块关联的相应节点之间的虚线边连接,得到所述兴趣点异构图;According to the boundaries of each geographical block and the real-world coordinates of each point of interest in the spatial knowledge, establish a dotted edge connection between corresponding nodes associated with the same block to obtain the heterogeneous graph of the point of interest;
    在所述兴趣点异构图上通过所述随机游走算法进行随机游走操作,得到所述样本节点序列。The sample node sequence is obtained by performing a random walk operation on the interest point heterogeneous graph through the random walk algorithm.
  5. 根据权利要求1所述的方法,其中,所述初始地理预训练模型包括第一转换层、聚合层、第二转换层,所述第一转换层用于将构成所述样本节点序列的每个节点的节点信息分别进行第一特征编码,得到节点分类编码和节点上下文编码,所述聚合层用于将每个节点的节点分类编码结合其它节点的节点分类编码进行特征聚合,得到聚合后节点分类编码,所述第二转换层用于将每个节点的聚合后节点分类编码和节点上下文编码分别进行第二特征编码。The method according to claim 1, wherein the initial geographical pre-training model includes a first conversion layer, an aggregation layer, and a second conversion layer, and the first conversion layer is used to convert each of the sample node sequences that constitute the sample node sequence. The node information of the node is separately encoded with the first feature to obtain the node classification code and the node context code. The aggregation layer is used to combine the node classification code of each node with the node classification codes of other nodes to perform feature aggregation to obtain the aggregated node classification. Encoding, the second conversion layer is used to perform second feature encoding on the aggregated node classification encoding and node context encoding of each node.
  6. 根据权利要求1-5任一项所述的方法,其中,所述预设位置编码的编码规则包括:将真实世界用按预设的区块划分方式分成多个地理区块;控制每个地理区块各自对应一个编码令牌;其中,所述编码令牌的长度对应所代表的区块划分粒度等级,区块划分粒度等级每增加两级,所述编码令牌的长度增加一,相邻地理区块划分粒度等级的编码令牌仅有最后一位编码不同。The method according to any one of claims 1 to 5, wherein the encoding rules of the preset location encoding include: dividing the real world into multiple geographical blocks in a preset block division manner; controlling each geographical area Each block corresponds to a coding token; wherein, the length of the coding token corresponds to the block division granularity level it represents. Every time the block division granularity level increases by two levels, the length of the coding token increases by one, and the length of the coding token increases by one. The coded tokens at the geographic block granularity level differ only in the last digit of the code.
  7. 一种地理预训练模型的模型微调方法,包括:A model fine-tuning method for geographical pre-training models, including:
    获取目标地理预训练模型;其中,所述目标地理预训练模型根据权利要求1-6任一项所述的地理预训练模型训练方法得到;Obtain a target geographical pre-training model; wherein the target geographical pre-training model is obtained according to the geographical pre-training model training method according to any one of claims 1-6;
    获取地图应用的新功能需求,并确定与新功能需求对应的新训练样本;Obtain new functional requirements for map applications and determine new training samples corresponding to the new functional requirements;
    在所述目标地理预训练模型的基础上,通过模型微调技术和所述新训练样本,生成与所述新功能需求对应的新地理模型。Based on the target geographical pre-training model, a new geographical model corresponding to the new functional requirements is generated through model fine-tuning technology and the new training samples.
  8. 根据权利要求7所述的方法,其中,所述确定与新功能需求对应的新训练样本,包括;The method according to claim 7, wherein determining new training samples corresponding to new functional requirements includes;
    响应于所述新功能需求为同类兴趣点推荐,确定与同类兴趣点推荐对应的用户调查问卷;Recommending similar points of interest in response to the new functional requirements, and determining a user questionnaire corresponding to the recommendation of similar points of interest;
    根据所述用户调查问卷生成所述新训练样本;Generate the new training sample according to the user questionnaire;
    对应的,所述在所述目标地理预训练模型的基础上,通过模型微调技术和所述新训练样本,生成与所述新功能需求对应的新地理模型,包括:Correspondingly, on the basis of the target geographical pre-training model, through model fine-tuning technology and the new training samples, a new geographical model corresponding to the new functional requirements is generated, including:
    在所述目标地理预训练模型的基础上,通过模型微调技术和所述新训练样本,生成用于根据当前兴趣点推荐同类兴趣点的新地理模型。Based on the target geographical pre-training model, a new geographical model for recommending similar points of interest based on the current points of interest is generated through model fine-tuning technology and the new training samples.
  9. 根据权利要求7所述的方法,其中,所述在所述目标地理预训练模型的基础上,通过模型微调技术和所述新训练样本,生成与所述新功能需求对应的新地理模型,包括:The method according to claim 7, wherein the new geographical model corresponding to the new functional requirements is generated based on the target geographical pre-training model through model fine-tuning technology and the new training samples, including :
    响应于所述新功能需求为随意逛逛,在所述目标地理预训练模型的基础上,通过模型微调技术和所述新训练样本,生成用于根据当前兴趣点推荐其它兴趣点的新地理模型。In response to the new functional requirement for casual shopping, based on the target geographical pre-training model, through model fine-tuning technology and the new training samples, a new geographical model for recommending other points of interest based on the current point of interest is generated .
  10. 一种地理预训练模型的预训练装置,包括:A pre-training device for a geographical pre-training model, including:
    样本节点序列获取单元,被配置成获取样本节点序列;其中,所述样本节点序列基于预设的兴趣点异构图和随机游走算法生成,所述兴趣点异构图包括由各兴趣点充当的各节点和连接各所述节点的边,所述节点名为相应兴趣点的地名,所述边表征相应节点之间在真实世界存在的关联关系;A sample node sequence acquisition unit is configured to obtain a sample node sequence; wherein the sample node sequence is generated based on a preset interest point heterogeneous graph and a random walk algorithm, and the interest point heterogeneous graph includes each interest point acting as a Each node and the edge connecting each of the nodes, the node name is the place name of the corresponding point of interest, and the edge represents the association relationship between the corresponding nodes that exists in the real world;
    训练样本输入单元,被配置成将所述样本节点序列作为训练样本输入初始地理预训练模型;a training sample input unit configured to input the sample node sequence as a training sample into the initial geographic pre-training model;
    预训练单元,被配置成控制所述初始地理预训练模型按照预设的训练目标进行训练,并将达到所述训练目标的当前地理预训练模型输出为 目标地理预训练模型;其中,所述训练目标包括指导模型从所述训练样本中学习到兴趣点的地名与预设位置编码之间的映射关系的子目标,所述预设位置编码对应于相应兴趣点在真实世界所处的地理区块。A pre-training unit configured to control the initial geographic pre-training model to train according to a preset training goal, and output the current geographic pre-training model that reaches the training goal as a target geographic pre-training model; wherein, the training The goal includes a sub-goal that guides the model to learn from the training samples a mapping relationship between the place name of the point of interest and a preset location code. The preset location code corresponds to the geographical block where the corresponding point of interest is located in the real world. .
  11. 根据权利要求10所述的装置,其中,所述兴趣点异构图还包括:依附于各所述节点的前置搜索节点,所述前置搜索节点记录有相应的兴趣点被选择之前的接收到的搜索词。The device according to claim 10, wherein the interest point heterogeneous graph further includes: a front-end search node attached to each of the nodes, and the front-end search node records the reception before the corresponding interest point is selected. search terms.
  12. 根据权利要求10所述的装置,其中,所述边包括实线边和虚线边,所述实线边基于用户历史出行轨迹中记录的兴趣点时间序列确定得到,所述实线边表征不同节点之间的出行逻辑关联,所述虚线边表征处于相同地理区块内的不同节点之间的同区块关联。The device according to claim 10, wherein the edge includes a solid edge and a dotted edge, the solid edge is determined based on the time series of points of interest recorded in the user's historical travel trajectory, and the solid edge represents different nodes. The dotted edges represent the same-block association between different nodes in the same geographical block.
  13. 根据权利要求10所述的装置,还包括:被配置成基于所述兴趣点异构图和所述随机游走算法生成所述样本节点序列的样本节点序列生成单元,所述样本节点序列生成单元被进一步配置成:The apparatus according to claim 10, further comprising: a sample node sequence generating unit configured to generate the sample node sequence based on the interest point heterogeneous graph and the random walk algorithm, the sample node sequence generating unit is further configured to:
    从地图应用获取用户搜索日志和兴趣点数据库;其中,所述兴趣点数据库记录有各兴趣点的地名知识和空间知识;Obtain user search logs and point-of-interest database from the map application; wherein, the point-of-interest database records place name knowledge and spatial knowledge of each point of interest;
    从所述用户搜索日志提取与用户每次搜索对应的搜索词和所实际选择的兴趣点,以及与用户出行轨迹对应的兴趣点时间序列;Extract from the user search log the search terms corresponding to each user search and the points of interest actually selected, as well as the time series of points of interest corresponding to the user's travel trajectory;
    将每个兴趣点作为节点,并根据对应的搜索词建立依附于相应节点的前置搜索节点;Treat each point of interest as a node, and establish a pre-search node attached to the corresponding node based on the corresponding search term;
    根据所述兴趣点时间序列建立存在出行逻辑关联的相应节点之间的实线边连接;Establish solid edge connections between corresponding nodes with travel logical associations based on the interest point time series;
    根据所述空间知识中的各地理区块边界和各兴趣点的真实世界坐标,建立存在同区块关联的相应节点之间的虚线边连接,得到所述兴趣点异构图;According to the boundaries of each geographical block and the real-world coordinates of each point of interest in the spatial knowledge, establish a dotted edge connection between corresponding nodes associated with the same block to obtain the heterogeneous graph of the point of interest;
    在所述兴趣点异构图上通过所述随机游走算法进行随机游走操作,得到所述样本节点序列。The sample node sequence is obtained by performing a random walk operation on the interest point heterogeneous graph through the random walk algorithm.
  14. 根据权利要求10所述的装置,其中,所述初始地理预训练模型包括第一转换层、聚合层、第二转换层,所述第一转换层用于将构成所述样本节点序列的每个节点的节点信息分别进行第一特征编码,得到节点分类编码和节点上下文编码,所述聚合层用于将每个节点的节点分类编码结合其它节点的节点分类编码进行特征聚合,得到聚合后节点分类编码,所述第二转换层用于将每个节点的聚合后节点分类编码和节点上下文编码分别进行第二特征编码。The device according to claim 10, wherein the initial geographic pre-training model includes a first conversion layer, an aggregation layer, and a second conversion layer, and the first conversion layer is used to convert each of the sample node sequences that constitute the sample node sequence. The node information of the node is separately encoded with the first feature to obtain the node classification code and the node context code. The aggregation layer is used to combine the node classification code of each node with the node classification codes of other nodes to perform feature aggregation to obtain the aggregated node classification. Encoding, the second conversion layer is used to perform second feature encoding on the aggregated node classification encoding and node context encoding of each node.
  15. 根据权利要求10-14任一项所述的装置,其中,所述预设位置编码的编码规则包括:将真实世界用按预设的区块划分方式分成多个地理区块;控制每个地理区块各自对应一个编码令牌;其中,所述编码令牌的长度对应所代表的区块划分粒度等级,区块划分粒度等级每增加两级,所述编码令牌的长度增加一,相邻地理区块划分粒度等级的编码令牌仅有最后一位编码不同。The device according to any one of claims 10 to 14, wherein the encoding rules of the preset location encoding include: dividing the real world into multiple geographical blocks according to a preset block division method; controlling each geographical area Each block corresponds to a coding token; wherein, the length of the coding token corresponds to the block division granularity level it represents. Every time the block division granularity level increases by two levels, the length of the coding token increases by one, and the length of the coding token increases by one. The coded tokens at the geographic block granularity level differ only in the last digit of the code.
  16. 一种地理预训练模型的模型微调装置,包括:A model fine-tuning device for geographical pre-training models, including:
    目标地理预训练模型获取单元,被配置成获取目标地理预训练模型;其中,所述目标地理预训练模型根据权利要求10-15任一项所述的地理预训练模型训练装置得到;The target geographical pre-training model acquisition unit is configured to acquire the target geographical pre-training model; wherein the target geographical pre-training model is obtained according to the geographical pre-training model training device according to any one of claims 10 to 15;
    新训练样本确定单元,被配置成获取地图应用的新功能需求,并确定与新功能需求对应的新训练样本;The new training sample determination unit is configured to obtain new functional requirements of the map application and determine new training samples corresponding to the new functional requirements;
    新地理模型生成单元,被配置成在所述目标地理预训练模型的基础上,通过模型微调技术和所述新训练样本,生成与所述新功能需求对应的新地理模型。The new geographic model generation unit is configured to generate a new geographic model corresponding to the new functional requirements based on the target geographic pre-training model through model fine-tuning technology and the new training samples.
  17. 根据权利要求16所述的装置,其中,新训练样本确定单元包括被配置成确定与新功能需求对应的新训练样本的新训练样本确定子单元,所述新训练样本确定子单元被进一步配置成;The apparatus according to claim 16, wherein the new training sample determining unit includes a new training sample determining subunit configured to determine new training samples corresponding to new functional requirements, the new training sample determining subunit is further configured to ;
    响应于所述新功能需求为同类兴趣点推荐,确定与同类兴趣点推荐对应的用户调查问卷;Recommending similar points of interest in response to the new functional requirements, and determining a user questionnaire corresponding to the recommendation of similar points of interest;
    根据所述用户调查问卷生成所述新训练样本;Generate the new training sample according to the user questionnaire;
    对应的,所述新地理模型生成单元被进一步配置成:Correspondingly, the new geographical model generation unit is further configured to:
    在所述目标地理预训练模型的基础上,通过模型微调技术和所述新训练样本,生成用于根据当前兴趣点推荐同类兴趣点的新地理模型。Based on the target geographical pre-training model, a new geographical model for recommending similar points of interest based on the current points of interest is generated through model fine-tuning technology and the new training samples.
  18. 根据权利要求16所述的装置,其中,所述新地理模型生成单元被进一步配置成:The device according to claim 16, wherein the new geographical model generating unit is further configured to:
    响应于所述新功能需求为随意逛逛,在所述目标地理预训练模型的基础上,通过模型微调技术和所述新训练样本,生成用于根据当前兴趣点推荐其它兴趣点的新地理模型。In response to the new functional requirement for casual shopping, based on the target geographical pre-training model, through model fine-tuning technology and the new training samples, a new geographical model for recommending other points of interest based on the current point of interest is generated .
  19. 一种电子设备,包括:An electronic device including:
    至少一个处理器;以及at least one processor; and
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-6中任一项所述的地理预训练模型的预训练方法和/或权利要求7-9任一项所述的地理预训练模型的模型微调方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can perform any one of claims 1-6. The pre-training method of the geographical pre-training model and/or the model fine-tuning method of the geographical pre-training model according to any one of claims 7-9.
  20. 一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行权利要求1-6中任一项所述的地理预训练模型的预训练方法和/或权利要求7-9任一项所述的地理预训练模型的模型微调方法。A non-transient computer-readable storage medium storing computer instructions, the computer instructions being used to cause the computer to execute the pre-training method and/or rights of the geographical pre-training model according to any one of claims 1-6 The model fine-tuning method of the geographical pre-training model described in any one of requirements 7-9.
  21. 一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现根据权利要求1-6中任一项所述的地理预训练模型的预训练方法和/或权利要求7-9任一项所述的地理预训练模型的模型微调方法。A computer program product, including a computer program, which when executed by a processor implements the pre-training method of the geographical pre-training model according to any one of claims 1-6 and/or any of claims 7-9. A model fine-tuning method for a geographical pre-training model.
PCT/CN2022/113287 2022-03-10 2022-08-18 Pre-training method and model fine-tuning method for geographical pre-training model WO2023168909A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210230756.X 2022-03-10
CN202210230756.XA CN114357105B (en) 2022-03-10 2022-03-10 Pre-training method and model fine-tuning method of geographic pre-training model

Publications (1)

Publication Number Publication Date
WO2023168909A1 true WO2023168909A1 (en) 2023-09-14

Family

ID=81094841

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/113287 WO2023168909A1 (en) 2022-03-10 2022-08-18 Pre-training method and model fine-tuning method for geographical pre-training model

Country Status (2)

Country Link
CN (1) CN114357105B (en)
WO (1) WO2023168909A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114357105B (en) * 2022-03-10 2022-06-10 北京百度网讯科技有限公司 Pre-training method and model fine-tuning method of geographic pre-training model
CN114998684B (en) * 2022-05-20 2023-06-23 北京百度网讯科技有限公司 Training method and positioning adjustment method for geographic and visual cross-mode pre-training model
CN115186738B (en) * 2022-06-20 2023-04-07 北京百度网讯科技有限公司 Model training method, device and storage medium
CN115620157A (en) * 2022-09-21 2023-01-17 清华大学 Representation learning method and device for satellite images

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110093458A1 (en) * 2009-09-25 2011-04-21 Microsoft Corporation Recommending points of interests in a region
CN110929162A (en) * 2019-12-04 2020-03-27 腾讯科技(深圳)有限公司 Recommendation method and device based on interest points, computer equipment and storage medium
CN111522888A (en) * 2020-04-22 2020-08-11 北京百度网讯科技有限公司 Method and device for mining competitive relationship between interest points
CN112559885A (en) * 2020-12-25 2021-03-26 北京百度网讯科技有限公司 Method and device for determining training model of map interest point and electronic equipment
CN114357105A (en) * 2022-03-10 2022-04-15 北京百度网讯科技有限公司 Pre-training method and model fine-tuning method of geographic pre-training model

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9767565B2 (en) * 2015-08-26 2017-09-19 Digitalglobe, Inc. Synthesizing training data for broad area geospatial object detection
CN112069415B (en) * 2020-08-13 2023-11-24 中国海洋大学 Interest point recommendation method based on heterogeneous attribute network characterization learning
CN113505306B (en) * 2021-06-21 2022-04-22 广东交通职业技术学院 Interest point recommendation method, system and medium based on heterogeneous graph neural network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110093458A1 (en) * 2009-09-25 2011-04-21 Microsoft Corporation Recommending points of interests in a region
CN110929162A (en) * 2019-12-04 2020-03-27 腾讯科技(深圳)有限公司 Recommendation method and device based on interest points, computer equipment and storage medium
CN111522888A (en) * 2020-04-22 2020-08-11 北京百度网讯科技有限公司 Method and device for mining competitive relationship between interest points
CN112559885A (en) * 2020-12-25 2021-03-26 北京百度网讯科技有限公司 Method and device for determining training model of map interest point and electronic equipment
CN114357105A (en) * 2022-03-10 2022-04-15 北京百度网讯科技有限公司 Pre-training method and model fine-tuning method of geographic pre-training model

Also Published As

Publication number Publication date
CN114357105B (en) 2022-06-10
CN114357105A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
WO2023168909A1 (en) Pre-training method and model fine-tuning method for geographical pre-training model
EP3724785B1 (en) Fast indexing with graphs and compact regression codes on online social networks
CN110837550B (en) Knowledge graph-based question answering method and device, electronic equipment and storage medium
JP2022058915A (en) Method and device for training image recognition model, method and device for recognizing image, electronic device, storage medium, and computer program
JP7331975B2 (en) Cross-modal search model training methods, apparatus, equipment, and storage media
KR20220003085A (en) Methods, devices, devices and computer recording media for determining search results
US11768892B2 (en) Method and apparatus for extracting name of POI, device and computer storage medium
CN111737954B (en) Text similarity determination method, device, equipment and medium
US20210406295A1 (en) Method, electronic device, and storage medium for generating relationship of events
US11630560B2 (en) Map information display method and apparatus, electronic device, and computer storage medium
US20210356290A1 (en) Method and apparatus for recommending point of interest, device, and medium
WO2021232724A1 (en) Method for extracting geographic location point spatial relationship, method for training extraction model, and devices
WO2023124005A1 (en) Map point of interest query method and apparatus, device, storage medium, and program product
CN111553279B (en) Method, device, equipment and storage medium for learning and identifying characterization of interest points
US11829447B2 (en) Resident area prediction method, apparatus, device, and storage medium
WO2023065731A1 (en) Method for training target map model, positioning method, and related apparatuses
KR20210119338A (en) Method and apparatus for creating dialogue, electronic equipment, and medium
CN112541362B (en) Generalization processing method, device, equipment and computer storage medium
CN115455171B (en) Text video mutual inspection rope and model training method, device, equipment and medium
CN113254716B (en) Video clip retrieval method and device, electronic equipment and readable storage medium
WO2023155678A1 (en) Method and apparatus for determining information
US20230215203A1 (en) Character recognition model training method and apparatus, character recognition method and apparatus, device and storage medium
CN114036322A (en) Training method for search system, electronic device, and storage medium
US20220284807A1 (en) Method of predicting traffic volume, electronic device, and medium
CN112463973A (en) Construction method, device and medium of medical knowledge graph and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22930535

Country of ref document: EP

Kind code of ref document: A1