CN117172884A - Method, device, electronic equipment and storage medium for recommending places of interest - Google Patents

Method, device, electronic equipment and storage medium for recommending places of interest Download PDF

Info

Publication number
CN117172884A
CN117172884A CN202311421776.6A CN202311421776A CN117172884A CN 117172884 A CN117172884 A CN 117172884A CN 202311421776 A CN202311421776 A CN 202311421776A CN 117172884 A CN117172884 A CN 117172884A
Authority
CN
China
Prior art keywords
representation
place
location
dimensional
matrix
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202311421776.6A
Other languages
Chinese (zh)
Inventor
李珂
侯睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Weijing Technology Co ltd
Original Assignee
Shanghai Weijing Technology Co ltd
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 Shanghai Weijing Technology Co ltd filed Critical Shanghai Weijing Technology Co ltd
Priority to CN202311421776.6A priority Critical patent/CN117172884A/en
Publication of CN117172884A publication Critical patent/CN117172884A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to the field of click recommendation, and provides an interest place recommendation method, which comprises the following steps: initializing high-dimensional semantic representation and high-dimensional position representation of a place dictionary in a click sequence, and splicing to obtain high-dimensional representation of places and a place representation matrix of the place click sequence; inputting the location representation matrix into a self-attention mechanism network and a time sequence network respectively, and generating a first location representation matrix containing long-term dependence context information and a second location representation matrix containing short-term dependence respectively; inputting a first place representation matrix and a second place representation matrix to a preset cross attention network model to obtain an interest place representation at the next moment; and predicting all places in the place dictionary based on the interest place representation of the next moment, and outputting a preset number of interest places of the next moment for recommendation. The method has the advantages that the cross-dependence attention network is enhanced, short-term dependence and long-term dependence of a place are effectively combined, the click representation is modeled better, and the prediction accuracy of the next click is improved.

Description

Method, device, electronic equipment and storage medium for recommending places of interest
Technical Field
The application relates to the technical field of click recommendation, in particular to an interest place recommendation method, an interest place recommendation device, electronic equipment and a storage medium.
Background
Recommender technology is one of the fastest growing artificial intelligence applications in recent years. The system has become an important tool for various user management or electronic commerce systems, and can greatly improve the use experience of users on the systems. However, in many cases, sequence-based recommendation algorithms face challenges in order to protect the privacy of the user and to handle analysis of limited past interactions. To address these challenges, click sequence based recommendation systems have been developed that utilize implicit input such as a user's click to predict the next click of an anonymous user.
In recent years, models based on Recurrent Neural Networks (RNNs) and self-attention mechanisms have achieved significant results in the click recommendation field, exploring the transition between short-term and long-term terms, respectively. However, purchasing behavior of the user may be classified into purposeful and non-purposeful, and there may be a phenomenon of repeated browsing or repeated purchasing. When a user has an explicit target to purchase a certain place, modeling the place in a short-term dependent mode (such as RNN), so that the next place clicking action of the user can be well predicted; when the purchase behavior of the user does not have a specific goal or has an idea of repeated purchases, the next place click behavior may be most relevant to the click behavior at a previous time, in which case the behavior of the user cannot be well mined by short-term or long-term dependency modeling alone.
In recent years, advances based on RNN models and on self-attention models have achieved good results by exploring transitions between short-term and long-term terms, respectively. In click recommendation systems, existing approaches typically tend to use RNNs with attention mechanisms and variants thereof to model sequential dependencies between interactive items. RNN-related methods can successfully capture short-term dependencies, but it is well known that RNNs are prone to degradation when faced with long sequences, even though LSTM and GRU techniques have been proposed to alleviate this problem. Furthermore, due to the self-attentive nature, they are insensitive to the order of the input sequences, so they must rely on assisted location embedding to learn order information. However, while self-attention has proven to have excellent ability to capture global dependencies in the entire sequence, it fails to effectively capture local dependencies between neighboring items.
Disclosure of Invention
In order to solve the defects in the prior art, the application provides an interest place recommending method, an interest place recommending device, electronic equipment and a storage medium.
In some embodiments, the present application provides a method for recommending places of interest, comprising:
initializing high-dimensional semantic representation of a place dictionary and high-dimensional position representation of a place click sequence, and splicing to obtain high-dimensional representation of the place dictionary and a place representation matrix of the place click sequence;
inputting the high-dimensional representation of the location dictionary and the location representation matrix to a self-attention mechanism network and a time sequence network respectively to generate a first location representation matrix containing long-term dependence context information and a second location representation matrix containing short-term dependence respectively;
inputting the first place representation matrix and the second place representation matrix to a preset cross attention network model to obtain an interest place representation at the next moment;
and predicting all places in the place dictionary based on the interest place representation of the next moment, and outputting a preset number of interest places of the next moment for recommendation.
In some embodiments, initializing the high-dimensional semantic representation of the location dictionary and the high-dimensional location representation of the location click sequence and concatenating the high-dimensional representation of the location dictionary and the location representation matrix of the location click sequence comprises:
the location dictionary is expressed asWherein->Representing the +.>Personal place(s)>,/>The size of the location dictionary;
the high-dimensional semantic representation of the location dictionary is as followsWherein->Representing the->High-dimensional semantic representation of individual places, +.>,/>Representation->Vector of dimension,/->Representing the dimensions of the hidden layer;
the high-dimensional position of the place click sequence is expressed as,/>Represents the maximum length of the click sequence, +.>Representing in the sequence of place clicksFirst->A high-dimensional position representation of the click sites at the individual moments;
the place click sequenceWherein->Indicate->The user clicks the sequence number of the place in the place dictionary V at each moment,/->,/>
Clicking the place in the sequenceThe corresponding high-dimensional semantic representation and high-dimensional position representation are respectively denoted +.>,The method comprises the steps of carrying out a first treatment on the surface of the -representing said high-dimensional semantic representation +.>And said high-dimensional position representation +.>Performing splicing operation to obtain the place click sequence +.>Corresponding high-dimensional representation ++>And place representation matrix->Adopts->Splicing operation:
in some embodiments, the inputting the high-dimensional representation of the location dictionary and the location representation matrix into the self-attention mechanism network, the time-series network, respectively, generates a first location representation matrix containing long-term dependent context information and a second location representation matrix containing short-term dependence, respectively, comprising:
inputting the locality representation matrix into the self-attention mechanism network to obtain a first locality representation matrix containing long-term dependent context information:
wherein,are all weight parameters that can be learned and are,to activate the function +.>Then it is a scale factor.
In some embodiments, after inputting the locality representation matrix into the self-attention mechanism network, obtaining a first locality representation matrix comprising long-term dependent context information, further comprising:
the nonlinear capability of the self-attention mechanism network is enhanced by applying two linear transformations and a ReLU activation function adjustment, and residual connection is introduced after a feedforward network, so that the following results:
wherein,representing a matrix for a first place comprising long-term dependencies; />Is the first linear layer weight parameter to be used,is a second linear layer weight parameter, < ->Is a weight parameter which can be learned; />Is the first linear layer bias, +.>Is a second linear layer bias, +.>Is a learnable bias vector;
maintaining dimension consistent with hidden layer state in GRU by linear change, whereinAs a learnable variable, we find:
wherein,a matrix is represented for a first place learned after passing through the self-attention network that contains long-term dependencies.
In some embodiments, the inputting the high-dimensional representation of the location dictionary and the location representation matrix into the self-attention mechanism network, the time-series network, respectively, generates a first location representation matrix containing long-term dependent context information and a second location representation matrix containing short-term dependence, respectively, comprising:
the place representation matrix is combined with the current and past time sequence information through a time sequence network to obtain a high-dimensional representation of places in time stepsSite representation of->Is the activation of the previous moment +.>And candidate activation->Is a linear combination of (a) and (b).
Wherein the second place representation matrix containing short-term dependencies is
Wz is an updated gate linear weight parameter, W is a candidate activation linear weight parameter, wr is a forgetting gate linear weight parameter; uz is the activation of the update door immediately before>U is the weight parameter of the product of the current forgetting gate output and the candidate activation point at the previous moment, and Ur is the activation of the update gate at the previous moment>Weight parameters of (2);
,/>are all learnable weight parameters, +.>And->Representing an update gate and a forget gate, respectively.
In some embodiments, the inputting the first location representation matrix and the second location representation matrix into a preset cross-attention network model to obtain a location of interest representation at a next moment includes:
an initial cross-attention network model was designed as follows:
wherein M is an initial cross-attention network model, and is an output matrix of the cross-attention networkThe result of the activation again through the two linear layers; />An output matrix for the initial cross-attention network; />Representing the current as an attention input->Weight parameter of->Representing the current as an attention input->Weight parameter of->Representing the current as an attention input->Weight parameter of->Represents the third linear layer weight parameter, +.>Representing a fourth linear layer weight parameter; b3 and b4 respectively represent the bias of the third linear layer and the fourth linear layer;
based on the first place representation matrix and the second place representation matrix, the preset cross-attention network model is obtained as follows:
wherein,for the preset cross-attention network model, < >>Weight number for the fifth linear layer, +.>A sixth linear layer weight number; />For an enhanced cross-attention model based on long-term dependence, < ->Is an enhanced cross-attention model based on short-term dependencies.
In some embodiments, predicting all places in the place dictionary based on the place of interest representation of the next time, outputting a preset number of places of interest of the next time for recommendation, including:
representation based on next click locationPredicting all places in the place dictionary to obtain probability values of all places in the place dictionary:
wherein,representing the->Probability values for individual sites; />;/>For normalizing weight, ++>Is->Normalizing the function;
and taking the place with the highest probability value as the recommended place at the next moment when the current user point is hit.
In some embodiments, the present application further provides an interest location recommendation device, including:
the splicing module is used for initializing high-dimensional semantic representation of the place dictionary and high-dimensional position representation of the place click sequence, and splicing to obtain the high-dimensional representation of the place dictionary and a place representation matrix of the place click sequence;
a generation module for inputting the high-dimensional representation of the location dictionary and the location representation matrix to a self-attention mechanism network and a time sequence network respectively, and generating a first location representation matrix containing long-term dependence context information and a second location representation matrix containing short-term dependence respectively;
the crossing module is used for inputting the first place representation matrix and the second place representation matrix to a preset crossing attention network model to obtain an interest place representation at the next moment;
and the recommending module is used for predicting all places in the place dictionary based on the interest place representation of the next moment and outputting a preset number of interest places of the next moment for recommending.
In some embodiments, the present application provides an electronic device comprising:
a processor; and a memory storing computer executable instructions that, when executed, cause the processor to perform the place of interest recommendation method.
In some embodiments, the present application provides a storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the operations performed by the place of interest recommendation method.
Compared with the prior art, the application has the following beneficial effects:
the application adopts the enhanced cross-dependence attention network, effectively combines short-term dependence and long-term dependence of places, better models the click representation and improves the prediction precision of the next click.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, given with reference to the accompanying drawings in which:
FIG. 1 is a flowchart of a method for recommending places of interest according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a method for recommending places of interest according to an embodiment of the present application;
fig. 3 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the present application, but are not intended to limit the application in any way. It should be noted that variations and modifications could be made by those skilled in the art without departing from the inventive concept. These are all within the scope of the present application.
In one embodiment, as shown in fig. 1, the present application provides a method for recommending places of interest, including:
s101, initializing high-dimensional semantic representation of a place dictionary and high-dimensional position representation of the click sequence, and splicing to obtain high-dimensional representation of the place and a place representation matrix of the place click sequence.
Specifically, the location dictionary refers to a location dictionary composed of all the locations clicked by the user for navigation.
The high-dimensional semantic representation refers to using high-dimensional semantic features to replace low-dimensional features of a sample, so that the trained model has mobility. For example, a semantic vector is a high-dimensional semantic feature.
The high-dimensional position representation means that the position representation of each place is performed in a high-dimensional space.
S102, inputting the high-dimensional representation of the place and the place representation matrix into a self-attention mechanism network and a time sequence network respectively, and generating a first place representation matrix containing long-term dependency context information and a second place representation matrix containing short-term dependency respectively.
S103, inputting the first place representation matrix and the second place representation matrix to a preset cross attention network model to obtain an interest place representation at the next moment.
S104, predicting all places in the place dictionary based on the interest place representation of the next moment, and outputting a preset number of interest places of the next moment for recommendation.
Firstly, initializing high-dimensional semantic representation and high-dimensional position representation of each place in a user click sequence, and obtaining a high-dimensional representation matrix of the place after splicing. Second, it is presented in a high-dimensional representation of the site over a self-attention network and a GRU, based on long-term dependence and on short term, respectively. The two site representations are then passed through a long-short term dependency-combined cross-attention network and fused to yield a bi-directionally enhanced cross-dependent site high-dimensional representation. Finally, the vector of the last moment is intercepted to be used as the user interest representation of the next moment, and the probability that all places in the place dictionary are clicked at the next moment is predicted. The method adopts the enhanced cross-dependence attention network, effectively combines short-term dependence and long-term dependence of the site, better models the click representation and improves the prediction precision of the next click.
In some embodiments, initializing the high-dimensional semantic representation of the place dictionary and the high-dimensional location representation of the click sequence and concatenating the high-dimensional representation of the place and the place representation matrix of the place click sequence comprises:
the location dictionary is expressed asWherein->Representing the +.>The location of the individual site is selected,,/>the size of the location dictionary;
the high-dimensional semantic representation of the location dictionary is as followsWherein->Representing the->High-dimensional semantic representation of individual places, +.>,/>Representation->Vector of dimension,/->Representing the dimensions of the hidden layer;
the high-dimensional position of the click sequence is expressed as,/>Represents the maximum length of the click sequence, +.>Representing the +.o in the click sequence>A high-dimensional position representation of the click sites at the individual moments;
the click sequenceWherein->Indicate->The user clicks the sequence number of the place in the place dictionary V at each moment,/->,/>
In the click sequenceThe corresponding high-dimensional semantic representation and high-dimensional position representation are respectively denoted +.>,The method comprises the steps of carrying out a first treatment on the surface of the -representing said high-dimensional semantic representation +.>And said high-dimensional position representation +.>Performing splicing operation to obtain the click sequence +.>Corresponding high-dimensional representation ++>And a user click sequence place representation matrix +.>Adopts->Splicing operation:
in some embodiments, the inputting the high-dimensional representation of the locality and the locality representation matrix into a self-attention mechanism network, a time-series network, respectively, generates a first locality representation matrix containing long-term-dependent context information and a second locality representation matrix containing short-term-dependence, respectively, comprising:
inputting the locality representation matrix into the self-attention mechanism network to obtain a first locality representation matrix containing long-term dependent context information:
wherein,are all weight parameters that can be learned and are,to activate the function +.>Then it is a scale factor.
In some embodiments, after inputting the locality representation matrix into the self-attention mechanism network, obtaining a first locality representation matrix comprising long-term dependent context information, further comprising:
the nonlinear capability of the self-attention mechanism network is enhanced by applying two linear transformations and a ReLU activation function adjustment, and residual connection is introduced after a feedforward network, so that the following results:
wherein,representing a matrix for a first place comprising long-term dependencies; />Is the first linear layer weight parameter to be used,is a second linear layer weight parameter, < ->Is a weight parameter which can be learned; />Is the first linear layer bias, +.>Is a second linear layer bias, +.>Is a learnable bias vector;
maintaining dimension consistent with hidden layer state in GRU by linear change, whereinAs a learnable variable, we find:
wherein,a matrix is represented for a first place learned after passing through the self-attention network that contains long-term dependencies.
In some embodiments, the inputting the high-dimensional representation of the locality and the locality representation matrix into a self-attention mechanism network, a time-series network, respectively, generates a first locality representation matrix containing long-term-dependent context information and a second locality representation matrix containing short-term-dependence, respectively, comprising:
the place representation matrix is combined with the current and past time sequence information through a time sequence network to obtain a high-dimensional representation of places in time stepsSite representation of->Is the activation of the previous moment +.>And candidatesActivation->Is a linear combination of (a) and (b).
Wherein the second place representation matrix containing short-term dependencies is
Wz is an updated gate linear weight parameter, W is a candidate activation linear weight parameter, wr is a forgetting gate linear weight parameter; uz is the activation of the update door immediately before>U is the weight parameter of the product of the current forgetting gate output and the candidate activation point at the previous moment, and Ur is the activation of the update gate at the previous moment>Weight parameters of (2);,/>are all learnable weight parameters, +.>And->Representing an update gate and a forget gate, respectively.
In some embodiments, the inputting the first location representation matrix and the second location representation matrix into a preset cross-attention network model to obtain a location of interest representation at a next moment includes:
an initial cross-attention network model was designed as follows:
wherein M is an initial cross-attention network model, and is an output matrix of the cross-attention networkThe result of the activation again through the two linear layers; />An output matrix for the initial cross-attention network; />Representing the current as an attention input->Weight parameter of->Representing the current as an attention input->Weight parameter of->Representing the current as an attention input->Weight parameter of->Represents the third linear layer weight parameter, +.>Representing a fourth linear layer weight parameter; b3 and b4 respectively represent third and fourthBias of the individual linear layers;
based on the first place representation matrix and the second place representation matrix, the preset cross-attention network model is obtained as follows:
wherein,for the preset cross-attention network model, < >>Weight number for the fifth linear layer, +.>A sixth linear layer weight number; />For an enhanced cross-attention model based on long-term dependence, < ->Is an enhanced cross-attention model based on short-term dependencies.
In some embodiments, predicting all places in the place dictionary based on the place of interest representation of the next time, outputting a preset number of places of interest of the next time for recommendation, including:
representation based on next click locationPredicting all places in the place dictionary to obtain probability values of all places in the place dictionary:
wherein,representation of the groundPoint dictionary>Probability values for individual sites; />;/>For normalizing weight, ++>Is->Normalizing the function;
and taking the place with the highest probability value as the recommended place at the next moment when the current user point is hit.
In some embodiments, the present application further provides an interest location recommendation device, including:
the splicing module is used for initializing the high-dimensional semantic representation of the place dictionary and the high-dimensional position representation of the click sequence, and splicing to obtain the high-dimensional representation of the place and the place representation matrix of the place click sequence;
a generation module for inputting the high-dimensional representation of the location and the location representation matrix to a self-attention mechanism network and a time sequence network respectively, and generating a first location representation matrix containing long-term dependence context information and a second location representation matrix containing short-term dependence respectively;
the crossing module is used for inputting the first place representation matrix and the second place representation matrix to a preset crossing attention network model to obtain an interest place representation at the next moment;
and the recommending module is used for predicting all places in the place dictionary based on the interest place representation of the next moment and outputting a preset number of interest places of the next moment for recommending.
In another aspect, as shown in fig. 3, the present application provides an electronic device 100, including a processor 110, a memory 120, where the memory 120 is used to store a computer program 121; the processor 110 is configured to execute the computer program 121 stored in the memory 120 to implement the method in the corresponding method embodiment.
The electronic device 100 may be a desktop computer, a notebook computer, a palm computer, a tablet computer, a mobile phone, a man-machine interaction screen, or the like. The electronic device 100 may include, but is not limited to, a processor 110, a memory 120. It will be appreciated by those skilled in the art that fig. 3 is merely an example of the electronic device 100 and is not limiting of the electronic device 100, and may include more or fewer components than shown, or may combine certain components, or different components, illustrative: the electronic device 100 may also include input/output interfaces, display devices, network access devices, communication buses, communication interfaces, and the like. The communication interface and communication bus may further include an input/output interface, wherein the processor 110, the memory 120, the input/output interface, and the communication interface perform communication with each other through the communication bus. The memory 120 stores a computer program 121, and the processor 110 is configured to execute the computer program 121 stored in the memory 120 to implement the method in the corresponding method embodiment.
The processor 110 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 120 may be an internal storage unit of the electronic device 100, as an example: a hard disk or a memory of an electronic device. The memory may also be an external storage device of the electronic device, exemplary: a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) and the like, which are provided on the electronic device. Further, the memory 120 may also include both internal storage units and external storage devices of the electronic device 100. The memory 120 is used to store the computer program 121 and other programs and data required by the electronic device 100. The memory may also be used to temporarily store data that has been output or is to be output.
A communication bus is a circuit that connects the elements described and enables transmission between these elements. Illustratively, the processor 110 receives commands from other elements via the communication bus, decrypts the received commands, and performs calculations or data processing based on the decrypted commands. Memory 120 may include program modules, illustratively, kernel (kernel), middleware (middleware), application programming interfaces (Application Programming Interface, APIs), and applications. The program modules may be comprised of software, firmware, or hardware, or at least two of them. The input/output interface forwards commands or data entered by a user through the input/output interface (e.g., sensor, keyboard, touch screen). The communication interface connects the electronic device 100 with other network devices, user devices, networks. The communication interface may be connected to the network by wire or wirelessly to connect to external other network devices or user devices, for example. The wireless communication may include at least one of: wireless fidelity (WiFi), bluetooth (BT), near field wireless communication technology (NFC), global Positioning System (GPS) and cellular communications, among others. The wired communication may include at least one of: universal Serial Bus (USB), high Definition Multimedia Interface (HDMI), asynchronous transfer standard interface (RS-232), and the like. The network may be a telecommunications network or a communication network. The communication network may be a computer network, the internet of things, a telephone network. The electronic device 100 may connect to a network through a communication interface, and protocols used by the electronic device 100 to communicate with other network devices may be supported by at least one of applications, application Programming Interfaces (APIs), middleware, kernels, and communication interfaces.
In another aspect, the present application provides a storage medium having at least one instruction stored therein, the instruction being loaded and executed by a processor to implement the operations performed by the corresponding embodiments of the method described above. By way of example, the storage medium may be read-only memory (ROM), random-access memory (RAM), compact disc read-only (CD-ROM), magnetic tape, floppy disk, optical data storage device, etc.
They may be implemented in program code that is executable by a computing device such that they may be stored in a memory device for execution by the computing device, or they may be separately fabricated into individual integrated circuit modules, or a plurality of modules or steps in them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the parts of a certain embodiment that are not described or depicted in detail may be referred to in the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. The apparatus/electronic device embodiments described above are exemplary only, and the modules or elements are exemplary only, as there may be additional divisions of logic functions, actual implementations, exemplary, multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units may be stored in a storage medium if implemented in the form of software functional units and sold or used as stand-alone products. With this understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by sending an instruction to related hardware by the computer program 121, where the computer program 121 may be stored in a storage medium, and the computer program 121 may implement the steps of each of the method embodiments described above when executed by a processor. Wherein the computer program 121 may be in the form of source code, object code, executable file, some intermediate form, or the like. The storage medium may include: any entity or device capable of carrying the computer program 121, a recording medium, a USB flash disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the content of the storage medium can be appropriately scaled according to the requirements of jurisdictions in which the computer-readable storage medium does not include electrical carrier signals and telecommunications signals, as is exemplified by jurisdictions in which the computer-readable storage medium does not include electrical carrier signals or telecommunications signals, in accordance with jurisdictions and patent practices.
It should be noted that the above embodiments can be freely combined as needed. The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (10)

1. A method of recommending places of interest, comprising:
initializing high-dimensional semantic representation of a place dictionary and high-dimensional position representation of a place click sequence, and splicing to obtain the high-dimensional representation of the place dictionary and a place representation matrix of the place click sequence;
inputting the high-dimensional representation of the location dictionary and the location representation matrix to a self-attention mechanism network and a time sequence network respectively to generate a first location representation matrix containing long-term dependence context information and a second location representation matrix containing short-term dependence respectively;
inputting the first place representation matrix and the second place representation matrix to a preset cross attention network model to obtain an interest place representation at the next moment;
and predicting all places in the place dictionary based on the interest place representation of the next moment, and outputting a preset number of interest places of the next moment for recommendation.
2. The method of claim 1, wherein initializing the high-dimensional semantic representation of the location dictionary and the high-dimensional location representation of the sequence of location clicks and concatenating the high-dimensional representation of the location dictionary and the location representation matrix of the sequence of location clicks comprises:
the location dictionary is expressed asWherein (1)>Representing the +.>The location of the individual site is selected,,/>the size of the location dictionary;
the high-dimensional semantic representation of the location dictionary is as followsWherein->Representing the->High-dimensional semantic representation of individual places, +.>Representation->Vector of dimension,/->Representing the dimensions of the hidden layer;
the high-dimensional position of the place click sequence is expressed as,/>Represents the maximum length of the click sequence, +.>Representing the +.o in the click sequence>A high-dimensional position representation of the click sites at the individual moments;
the click sequenceWherein->Indicate->The user clicks the sequence number of the place in the place dictionary V at each moment,/->,/>
Clicking the place in the sequenceThe corresponding high-dimensional semantic representation and high-dimensional position representation are respectively denoted +.>,The method comprises the steps of carrying out a first treatment on the surface of the -representing said high-dimensional semantic representation +.>And said high-dimensional position representation +.>Performing splicing operation to obtain the place click sequence +.>Corresponding high-dimensional representation ++>And place representation matrix->Adopts->Splicing operation:
3. the method of claim 1, wherein said inputting the high-dimensional representation of the location and the location representation matrix into the self-attention mechanism network, the time-series network, respectively, generates a first location representation matrix containing long-term-dependent context information and a second location representation matrix containing short-term-dependence, respectively, comprises:
inputting the locality representation matrix into the self-attention mechanism network to obtain a first locality representation matrix containing long-term dependent context information:
wherein,are all weight parameters that can be learned and are,to activate the function +.>Then it is a scale factor.
4. The method of claim 3, further comprising, after inputting the location representation matrix into the self-attention mechanism network to obtain a first location representation matrix comprising long-term dependent context information:
the nonlinear capability of the self-attention mechanism network is enhanced by applying two linear transformations and a ReLU activation function adjustment, and residual connection is introduced after a feedforward network, so that the following results:
wherein,representing a matrix for a first place comprising long-term dependencies; />Is the first linear layer weight parameter, +.>Is a second linear layer weight parameter, < ->Is a weight parameter which can be learned; />Is the first linear layer bias, +.>Is a second linear layer bias, +.>Is a learnable bias vector;
by linear variationKeeping dimensions consistent with hidden layer states in a GRU, whereAs a learnable variable, we find:
wherein,a matrix is represented for a first place learned after passing through the self-attention network that contains long-term dependencies.
5. The method of claim 1, wherein said inputting the high-dimensional representation of the location dictionary and the location representation matrix into the self-attention mechanism network, the time-series network, respectively, generates a first location representation matrix containing long-term-dependent context information and a second location representation matrix containing short-term-dependence, respectively, comprises:
the place representation matrix is combined with the current and past time sequence information through a time sequence network to obtain a high-dimensional representation of places in time stepsSite representation of->Is the activation of the previous moment +.>And candidate activation->Is a linear combination of (a);
wherein the second place representation matrix containing short-term dependencies isWz is an updated gate linear weight parameter, W is a candidate activation linear weight parameter, wr is a forgetting gate linear weight parameter; uz is the activation of the update door immediately before>U is the weight parameter of the product of the current forgetting gate output and the candidate activation point at the previous moment, and Ur is the activation of the update gate at the previous moment>Weight parameters of (2); />,/>Are all learnable weight parameters, +.>And->Representing an update gate and a forget gate, respectively.
6. The method for recommending a place of interest according to any one of claims 1 to 5, wherein the inputting the first place representation matrix and the second place representation matrix into a preset cross-attention network model to obtain a place of interest representation at a next moment includes:
an initial cross-attention network model was designed as follows:
wherein M is an initial cross-attention network model, and is an output matrix of the cross-attention networkThe result of the activation again through the two linear layers; />An output matrix for the initial cross-attention network; />Representing current as an attention inputWeight parameter of->Representing the current as an attention input->Weight parameter of->Representing the current as an attention input->Weight parameter of->Represents the third linear layer weight parameter, +.>Representing a fourth linear layer weight parameter; b3 and b4 respectively represent the bias of the third linear layer and the fourth linear layer;
based on the first place representation matrix and the second place representation matrix, the preset cross-attention network model is obtained as follows:
wherein,for the preset cross-attention network model, < >>Weight number for the fifth linear layer, +.>A sixth linear layer weight number; />For an enhanced cross-attention model based on long-term dependence, < ->Is an enhanced cross-attention model based on short-term dependencies.
7. The method of claim 6, wherein predicting all places in a place dictionary based on the next-time-of-interest place representation, outputting a preset number of next-time-of-interest places for recommendation, comprises:
representation based on next click locationPredicting all places in the place dictionary to obtain probability values of all places in the place dictionary:
wherein,representing the->Probability values for individual sites; />;/>For normalizing weight, ++>Is->Normalizing the function;
and taking the place with the highest probability value as the recommended place at the next moment when the current user point is hit.
8. An interest place recommending apparatus, comprising:
the splicing module is used for initializing high-dimensional semantic representation of the place dictionary and high-dimensional position representation of the place click sequence, and splicing to obtain the high-dimensional representation of the place dictionary and a place representation matrix of the place click sequence;
a generation module for inputting the high-dimensional representation of the location dictionary and the location representation matrix to a self-attention mechanism network and a time sequence network respectively, and generating a first location representation matrix containing long-term dependence context information and a second location representation matrix containing short-term dependence respectively;
the crossing module is used for inputting the first place representation matrix and the second place representation matrix to a preset crossing attention network model to obtain an interest place representation at the next moment;
and the recommending module is used for predicting all places in the place dictionary based on the interest place representation of the next moment and outputting a preset number of interest places of the next moment for recommending.
9. An electronic device, the electronic device comprising:
a processor; and a memory storing computer executable instructions that, when executed, cause the processor to perform the place of interest recommendation method according to any one of claims 1 to 7.
10. A storage medium having stored therein at least one instruction loaded and executed by a processor to implement operations performed by the place of interest recommendation method of any one of claims 1 to 7.
CN202311421776.6A 2023-10-31 2023-10-31 Method, device, electronic equipment and storage medium for recommending places of interest Pending CN117172884A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311421776.6A CN117172884A (en) 2023-10-31 2023-10-31 Method, device, electronic equipment and storage medium for recommending places of interest

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311421776.6A CN117172884A (en) 2023-10-31 2023-10-31 Method, device, electronic equipment and storage medium for recommending places of interest

Publications (1)

Publication Number Publication Date
CN117172884A true CN117172884A (en) 2023-12-05

Family

ID=88937763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311421776.6A Pending CN117172884A (en) 2023-10-31 2023-10-31 Method, device, electronic equipment and storage medium for recommending places of interest

Country Status (1)

Country Link
CN (1) CN117172884A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115481323A (en) * 2022-09-30 2022-12-16 电子科技大学 Self-adaptive user interest double-correction-based session recommendation method
CN115658864A (en) * 2022-10-24 2023-01-31 重庆师范大学 Conversation recommendation method based on graph neural network and interest attention network
CN115687772A (en) * 2022-11-09 2023-02-03 安徽大学 Sequence recommendation method based on sequence dependence enhanced self-attention network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115481323A (en) * 2022-09-30 2022-12-16 电子科技大学 Self-adaptive user interest double-correction-based session recommendation method
CN115658864A (en) * 2022-10-24 2023-01-31 重庆师范大学 Conversation recommendation method based on graph neural network and interest attention network
CN115687772A (en) * 2022-11-09 2023-02-03 安徽大学 Sequence recommendation method based on sequence dependence enhanced self-attention network

Similar Documents

Publication Publication Date Title
US10943068B2 (en) N-ary relation prediction over text spans
CN106776673A (en) Multimedia document is summarized
CN110838020A (en) Recommendation method and device based on vector migration, computer equipment and storage medium
CN107437111B (en) Data processing method, medium, device and computing equipment based on neural network
CN111783810B (en) Method and device for determining attribute information of user
CN108780521A (en) It is associated with shot and long term Memory Neural Networks layer
KR102632763B1 (en) Integrated management method for global e-commerce that selectively applies licenses according to the competitive sales rate among sellers and integrated management system for the same
CN111275205A (en) Virtual sample generation method, terminal device and storage medium
CN108320740B (en) Voice recognition method and device, electronic equipment and storage medium
CN117217284A (en) Data processing method and device
CN113192639A (en) Training method, device and equipment of information prediction model and storage medium
CN111767457B (en) Recommendation method and device
CN117172884A (en) Method, device, electronic equipment and storage medium for recommending places of interest
CN111428508A (en) Style customizable text generation
CN115630219A (en) Training method and device of recommendation model and computer equipment
CN110580648A (en) financial information processing method and device based on artificial intelligence
CN115292583A (en) Project recommendation method and related equipment thereof
CN110837596B (en) Intelligent recommendation method and device, computer equipment and storage medium
CN111159558B (en) Recommendation list generation method and device and electronic equipment
CN111598599B (en) User characterization method, device, electronic equipment and computer readable medium
CN113609397A (en) Method and device for pushing information
CN111507471A (en) Model training method, device, equipment and storage medium
CN110442767A (en) A kind of method, apparatus and readable storage medium storing program for executing of determining content interaction platform label
CN114625876B (en) Method for generating author characteristic model, method and device for processing author information
US20240112032A1 (en) Transfer-learning for structured data with regard to journeys defined by sets of actions

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination