Heterogeneous graph and neural network-based post recommendation method and device
By constructing a job recommendation method based on heterogeneous graphs and neural networks and optimizing job recommendation using time consistency constraints, the problem of slow response speed and manpower consumption caused by the surge in telecommunications business volume was solved, and efficient and accurate job matching was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN NORMAL UNIVERSITY
- Filing Date
- 2026-04-02
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies suffer from delayed real-time user problem response speeds and redundant consumption of human and material resources due to the surge in telecommunications traffic. Furthermore, manual job assignment may lead to cyclical errors, impacting user experience.
A job recommendation method based on heterogeneous graphs and neural networks is constructed. By acquiring historical user questions, times, and recommended jobs, a job heterogeneous graph is built, and feature propagation and comparative learning are performed using graph neural networks. A time consistency constraint is introduced to optimize job recommendations.
It improves the accuracy and stability of matching problems with job positions, reduces manpower consumption and human error, and improves the efficiency and accuracy of job assignment.
Smart Images

Figure CN121959068A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of neural networks and data processing, specifically relating to a job recommendation method and apparatus based on heterogeneous graphs and neural networks. Background Technology
[0002] The current surge in telecommunications traffic is overwhelming, resulting in a large volume of real-time user inquiries on the system backend. These inquiries require manual assignment to the appropriate personnel based on their type, often necessitating multiple assignments. While some technologies allow for automatic assignment based on system history, the majority still require manual assignment. This not only slows response times but also wastes resources, and manual assignment can lead to cyclical errors, causing users' problems to remain unresolved for extended periods, negatively impacting user experience. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention provides a job recommendation method and apparatus based on heterogeneous graphs and neural networks.
[0004] This invention includes a job recommendation method based on heterogeneous graphs and neural networks, comprising: acquiring historical user questions, historical recommended jobs, and recommendation times; and constructing a job heterogeneous graph based on the historical user questions, recommendation times, and historical recommended jobs; wherein the job heterogeneous graph includes question nodes, time nodes, and job nodes; inputting the job heterogeneous graph into a graph neural network to obtain a job embedding representation of each job output by the graph neural network; wherein, when the job heterogeneous graph is updated in the graph neural network, for any question node, only nodes whose recommendation time is no later than that question node are allowed to participate in the propagation of that question node; the job heterogeneous graph is updated in the graph neural network... During network updates, for any of the aforementioned problem nodes, positive and negative samples of that problem node are compared and learned. The positive samples include job nodes whose recommended time is less than or equal to a time threshold, and the negative samples include job nodes whose recommended time is greater than the time threshold. The user problem to be solved and the time when the problem was obtained are obtained. The obtained user problem to be solved and the obtained time are input into the graph neural network to obtain the problem embedding representation of the user problem to be solved output by the graph neural network. Based on the job embedding representation and the problem embedding representation of each job, suitable problem-solving jobs are recommended for the user.
[0005] Optionally, when the aforementioned job heterogeneity graph is updated in the graph neural network, any of the aforementioned problem nodes... In graph neural networks Layer Embedded Representation for:
[0006] in, This is a time consistency indicator function used to allow only nodes no later than the problem node to be included. Recommended time The nodes participate in the problem nodes The spread of For the problem node The neighboring nodes, For the problem node The set of neighboring nodes, Neighboring nodes Recommended time, For the edge types in the aforementioned heterogeneous job graph, This is the set of edge types in the aforementioned heterogeneous job graph; Neighboring nodes In the graph neural network Layer embedding representation, For the first graph neural network Edge types in layers The corresponding learnable linear transformation matrix, It is a time decay function. It is a non-linear activation function.
[0007] Optionally, when updating the above heterogeneous job graph in the graph neural network, the problem nodes... The set of positive samples include:
[0008] in, For the above-mentioned job nodes, Let be the set of edges in the aforementioned heterogeneous graph of job positions. For job nodes Recommended time, For the problem node Recommended time, The above time threshold; when the above job heterogeneity graph is updated in the graph neural network, the problem node The set of negative samples include:
[0009] in, For the problem node Job Nodes The semantic or structural similarity between them.
[0010] Optionally, for any of the aforementioned problem nodes, the comparative learning using the positive and negative samples of that problem node includes: for any of the aforementioned problem nodes, constructing a comparative loss function using the positive and negative samples of that problem node, and performing comparative learning based on the aforementioned comparative loss function; wherein, using the problem node The above contrast loss function is constructed from positive and negative samples. include:
[0011] in, For the problem node The set of positive samples, For the problem node The set of negative samples, This is a function for calculating semantic similarity or structural similarity. For the problem node Embedded representation, To the problem node The embedding representation of job nodes in positive samples. For job nodes Embedded representation, For temperature coefficient, The structural weights are calculated based on the distance between nodes. Time weighting.
[0012] Optionally, the above-mentioned inputting the user problem to be solved and the problem acquisition time into the graph neural network to obtain the problem embedding representation of the user problem to be solved output by the graph neural network includes: inputting the user problem to be solved and the problem acquisition time into the graph neural network to obtain a first embedding representation based on the user problem to be solved and a second embedding representation based on the problem acquisition time; and determining the problem embedding representation based on the first embedding representation and the second embedding representation.
[0013] Optionally, the above-mentioned method of recommending suitable problem-solving positions to users based on the job embedding representation and the question embedding representation of each position includes: inputting the job embedding representation and the question embedding representation of each position into a recommendation model to obtain the matching score between the user's unsolved problem and each position output by the recommendation model; wherein the recommendation model utilizes the historical user problems and the historical recommended positions, and is trained and updated based on a single-step loss function; and recommends suitable problem-solving positions to users based on the matching score.
[0014] Optionally, the above single-step loss function include:
[0015] in, For the first The matching score between a historical user's question and its corresponding historical recommended job position. For the first The first historical user issue and the first The matching score of each historical recommended job posting. This represents the total number of job postings recommended in the past.
[0016] Based on the same inventive concept, this invention also provides a job recommendation device based on heterogeneous graphs and neural networks, comprising: a graph construction module, used to acquire historical user questions, historical recommended jobs, and recommendation times, and construct a job heterogeneous graph based on the aforementioned historical user questions, recommendation times, and historical recommended jobs; wherein the job heterogeneous graph includes question nodes, time nodes, and job nodes; a learning module, used to input the job heterogeneous graph into a graph neural network to obtain a job embedding representation of each job output by the graph neural network; wherein, when the job heterogeneous graph is updated in the graph neural network, for any question node, only nodes whose recommendation time is no later than that question node are allowed to participate in the propagation of that question node; the job heterogeneous graph in... During updates in the graph neural network, for any of the aforementioned problem nodes, positive and negative samples of that problem node are compared and learned. The positive samples include job nodes whose recommended time is less than or equal to a time threshold, and the negative samples include job nodes whose recommended time is greater than the time threshold. The problem acquisition module is used to acquire the user problem to be solved and the problem acquisition time. The acquired user problem to be solved and the problem acquisition time are input into the graph neural network to obtain the problem embedding representation of the user problem to be solved output by the graph neural network. The recommendation module is used to recommend suitable problem-solving jobs for the user based on the job embedding representation and the problem embedding representation of each job.
[0017] Based on the same inventive concept, the present invention also provides an electronic device, comprising: a processor; a memory for storing executable instructions; wherein the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement any of the methods described above.
[0018] Based on the same inventive concept, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor performs any of the above-described methods.
[0019] The beneficial effects of this invention are as follows: The method provided by this invention constructs a heterogeneous relationship graph between questions, time and job positions, and uses graph neural networks and contrastive learning to introduce time entities as independent nodes into the job heterogeneous graph and participate in feature propagation, thereby achieving job recommendation for user questions, improving the accuracy and stability of matching between questions and job positions, and solving the problems of manpower consumption and human error during job assignment. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A flowchart illustrating a job recommendation method based on heterogeneous graphs and neural networks provided in an embodiment of the present invention; Figure 2 This is a structural schematic diagram of a job heterogeneity diagram provided in an embodiment of the present invention; Figure 3 A flowchart illustrating a system optimization method provided in an embodiment of the present invention; Figure 4 A flowchart illustrating another job recommendation method based on heterogeneous graphs and neural networks provided in an embodiment of the present invention; Figure 5 A schematic diagram of a job recommendation device based on heterogeneous graphs and neural networks provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0023] To better understand the above-mentioned objectives, features, and advantages of the embodiments of the present invention, the solutions of the embodiments of the present invention will be further described below. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.
[0024] Many specific details are set forth in the following description in order to provide a full understanding of the embodiments of the present invention, but the embodiments of the present invention may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of the embodiments of the present invention, and not all embodiments.
[0025] One embodiment of the present invention provides a job recommendation method based on heterogeneous graphs and neural networks, such as... Figure 1 As shown, it includes: S1. Obtain historical user questions, historical recommended job postings, and recommendation times, and construct a job heterogeneity graph based on these data. The job heterogeneity graph includes question nodes, time nodes, and job posting nodes.
[0026] Specifically, this embodiment of the invention first parses the original historical data, extracting time entities (i.e., the aforementioned recommendation time), problem entities (i.e., the aforementioned historical user problems), and job entities (i.e., the aforementioned historical recommended jobs). The time entity is composed of multi-granularity time information such as year, month, day, hour, minute, and second. Time information not only records the order of events but also directly affects the job recommendation strategy. Job processing capabilities, problem type distribution, and job flow paths all exhibit significant time dynamics; the same problem type often corresponds to different optimal job recommendation strategies within different time periods. Unlike recommendation methods in related technologies that rely solely on semantic similarity or static structural relationships, this embodiment of the invention introduces the time entity as an independent node into the job heterogeneous graph. This prevents the time factor from existing as a secondary attribute but rather participates in graph structure modeling and information propagation, making the job recommendation results more consistent with reality. The problem entity includes work order identifiers, original problem text, and cleaned problem text. In specific implementations, knowledge enhancement can be applied to the cleaned problem text based on a large model and domain knowledge base. The job entity is mapped through the job database, forming a structured representation containing job identifiers, job types, and hierarchical attributes. Specifically, in the embodiments of this invention, "job post" refers to a work post set up according to social functions, responsibilities, and work needs. Each job post has its fixed functions, and there can be one or more job posts with the same functions. Generally speaking, only one staff member is assigned to a job post. Recommending a job post to a user means recommending the staff member in that job post to solve the user's problem. In other cases, such as when multiple staff members take turns on duty for a job posting, this invention does not involve a specific solution for which person is responsible. Other embodiments of this invention are similar and will not be described in detail.
[0027] After completing entity construction, the above-mentioned heterogeneous job diagram is constructed using issues, positions, and times as different types of nodes, and based on the relationships between entities, providing structured input for subsequent steps. Figure 2For example, when a question in historical data is recommended to a specific job at a certain recommendation time, it indicates that there is a correlation between this historical user question, this recommendation time, and this historically recommended job. Furthermore, for question nodes, a user's question text may contain multiple questions that need to be answered, so a question entity may extract more than one question node. For job nodes, a user question may require multiple jobs to solve, so a question node may be associated with more than one job node. Moreover, there may be multiple jobs of the same type; for example, a business hall may include a business manager, multiple job A positions responsible for business A, and multiple job B positions responsible for business B, so multiple job entities can also correspond to the same job node.
[0028] S2. Input the job heterogeneity graph into the graph neural network to obtain the job embedding representation of each job output by the graph neural network.
[0029] Based on heterogeneous graphs, this embodiment of the invention uses graph neural networks to perform multi-layer feature propagation and aggregation on the information carried by the heterogeneous graphs, thereby obtaining the embedded representation of each job node.
[0030] Specifically, when the aforementioned heterogeneous job graph is updated in the graph neural network, for any given problem node, only nodes whose recommendation time is no later than that problem node are allowed to participate in the propagation of that problem node. This mechanism ensures that information propagation follows a chronological order at the structural level, thereby enhancing the rationality of temporal reasoning.
[0031] Meanwhile, when the aforementioned job heterogeneity graph is updated in the graph neural network, for any problem node, the positive and negative samples of the problem node are compared and learned. Positive samples include job nodes whose recommended time is less than or equal to the time threshold, and negative samples include job nodes whose recommended time is greater than the time threshold.
[0032] The embodiments of the present invention also introduce a structure-aware contrastive learning mechanism, constructing positive and negative samples with problem nodes as the center, and introducing time consistency constraints to bring the problem-job representation closer to the real match in the embedding space and distinguish the non-matching job representation, thereby improving the discriminativeness and structural consistency of the embedding representation.
[0033] S3. Obtain the user problem to be solved and the time when the problem was obtained. Input the obtained user problem to be solved and the time when the problem was obtained into the graph neural network to obtain the problem embedding representation of the user problem to be solved output by the graph neural network.
[0034] In specific implementations, S3 may further include constructing a graph structure relationship between the user problem to be solved and the problem acquisition time, and inputting it into a graph neural network for propagation to obtain an embedded representation. That is, S3 can refer to the processes of S1 and S2. In other embodiments, S3 may also be implemented in other ways, which will be further explained in the following embodiments.
[0035] S4. Recommend suitable problem-solving positions to users based on the job embedding representation and problem embedding representation of each position.
[0036] Specifically, after obtaining the question embedding and the job embedding, this embodiment of the invention introduces a recommendation model to perform a one-time matching calculation on the question embedding and all job embeddings, outputs the matching score between the question and the job, and forms the job recommendation result.
[0037] The method provided in this invention constructs a heterogeneous relationship graph between questions, time, and job positions. By utilizing graph neural networks and contrastive learning, time entities are introduced as independent nodes into the job heterogeneous graph and participate in feature propagation. This enables job recommendations for user questions, thereby improving the accuracy and stability of matching between questions and job positions and solving the problems of manpower consumption and human error during job assignment.
[0038] It is understood that this invention uses the transfer of problematic positions in the telecommunications field as an application scenario to illustrate specific implementation methods. It is not intended to limit the invention to the telecommunications field. This invention can also be applied to other fields that require and recommend positions with performance issues, such as the medical and engineering fields.
[0039] In specific implementation, after S4 above, such as Figure 3 As shown, new data can also be collected from user satisfaction feedback after problem resolution and added to historical data to optimize the recommendation system. Through continuous iteration, the system can efficiently and accurately provide optimal job recommendations.
[0040] In one specific embodiment, S1 above includes the following steps.
[0041] S11. Obtaining Time Entities: First, the time information of the recommendation interaction is parsed from the original historical work order data and broken down into six independent time dimensions: year, month, day, hour, minute, and second. Then, the six-tuple of time is associated with the unique work order identifier corresponding to each piece of business data and stored to support subsequent time-series analysis. By constructing time nodes and establishing explicit connections with problem nodes and job nodes, the graph neural network can learn the evolutionary pattern of the matching relationship between problems and jobs over time, thereby achieving time-aware job recommendation optimization and improving adaptability and recommendation stability in highly dynamic business environments. A time entity can be represented as... .
[0042] S12. Obtain and Clean the Question Entity: For historical user question data, extract question-related fields from the original work orders and construct a question entity containing the work order ID, the original question text, and the cleaned question text. The original question text fully retains the user's input; the cleaned text undergoes noise reduction processing using preset data cleaning rules to eliminate irrelevant characters, redundant descriptions, and non-semantic information, thereby highlighting the core semantics of the question. This question entity provides a unified semantic input basis for subsequent steps. The question entity can be represented as... .
[0043] S13. Problem Knowledge Enhancement: After the problem entity is constructed as described above, this embodiment of the invention introduces a problem knowledge enhancement method that integrates world knowledge and domain knowledge. Specifically, the cleaned problem text is used as input prompts and input into both a large language model and a domain knowledge base for knowledge expansion. Then, the outputs of different models are cross-scored and their consistency verified. A voting mechanism is used to select the model output with the highest overall score as the final knowledge enhancement result for the problem. In specific implementation, the large language model can be Qwen2.5-14B, Qwen2-VL-72B, dsv3128k, or Qwen-32B.
[0044] S14. Obtain Job Entities: Identify the corresponding job positions for resolving issues from the original work order data and complete the job identifier mapping in the job database, assigning each a unique job ID. Each issue, after cleaning, corresponds to a unique job position. The job structure supports both single-level and multi-level job formats. Simultaneously, job entities are categorized according to job function type and geographically labeled according to the three-tiered administrative division of province, city, and county. In a specific embodiment, the job processing flow typically follows a resolution path that gradually escalates from county-level positions to city-level and provincial-level positions, thus reflecting the job collaboration and workflow relationships in real business operations. A job entity can be represented as... .
[0045] S15. Construction of Job Heterogeneity Map: This involves constructing the job heterogeneity map... Defined as a heterogeneous graph structure with attributes. ,in, Represents a set of nodes, including the set of problem nodes. Job node set and time node set ; This represents a set of edges, used to characterize the relationships between problems and job positions, problems and time, and job positions. This represents a set of node types, used to distinguish between problem nodes, job nodes, and time nodes; Represents a set of edge types.
[0046] After constructing the heterogeneous job graph, this embodiment of the invention further proposes a semantic representation generation method based on contrastive learning and graph neural networks, used to generate job embedding representations in a unified vector space. This method uses the heterogeneous graph as a structural constraint carrier, encodes the contextual relationships of nodes through a graph neural network, and combines a contrastive learning mechanism to explicitly constrain the real relationships between nodes, thereby obtaining a discriminative semantic representation for subsequent job matching and recommendation. In a specific embodiment, S2 above includes the following steps.
[0047] S21. Constructing the initial feature vector for a node: For a question node, an initial feature vector is constructed based on the question entity and its corresponding question knowledge entity as follows:
[0048] in, The problem entity is constructed by combining world knowledge and domain knowledge enhanced by the aforementioned knowledge. This is a feature mapping function used to map a problem to a vector space.
[0049] For each job node, the initial feature vector is constructed based on the job entity attributes as follows:
[0050] in, For job identification, As for job type, For geographic location information, This is a feature mapping function used to map job positions to a vector space.
[0051] For each time node, the structured temporal features of the time entity are encoded into vector form:
[0052] in, They are respectively year, month, day, hour, minute, and second. This is a feature mapping function used to map time to a vector space.
[0053] S22. Heterogeneous Graph Neural Network Encoding: The above heterogeneous graph of job positions and initial node features are input into a graph neural network to aggregate multi-layer structural information for the nodes. For any node... , its first Layer Embedded Representation Calculated as follows:
[0054] in For nodes In the Layer embedding representation, Indicates the relationship With nodes Connected neighbor nodes gather, Neighboring nodes In the Layer embedding representation; These are the transformation matrices corresponding to different edge types; It is a non-linear activation function; As the normalization factor, For graph neural networks The self-weight transformation matrix of the layer.
[0055] The above method enables the embedded representation of problem nodes to incorporate their associated job positions, time, and contextual structure information.
[0056] S23. Contrastive Learning Sample Construction: Construct a structure-aware contrastive sample set for any problem node. Build job positions The set of positions, including the set of full-time positions. include:
[0057] Candidate negative job set include:
[0058] Define a job level distance function based on the administrative level of the job entity (e.g., county / city / province). The job level distance is defined as follows:
[0059] This distance reflects how similar the job duties are to those in actual business operations.
[0060] At the same time, targeting the problem nodes With any negative job node Define structure-aware weights :
[0061] in, This represents the hierarchy sensitivity coefficient. The aforementioned structure-aware weights result in stronger penalties for negative positions that are closer in hierarchy to each other, and weaker impacts on negative samples for positions that are further apart in hierarchy.
[0062] Finally, a graph structure similarity adjustment factor is introduced to define the problem nodes. Job Nodes Structural similarity in heterogeneous graphs :
[0063] in, Represents the set of graph neighborhoods of a node.
[0064] S24. Construct an adaptive structure-weighted contrastive loss function:
[0065] in, Indicates that the problem node is The adaptive structure-aware contrastive learning loss value of the anchor point; each problem node corresponds to a loss value, and the training objective of the graph neural network is to minimize the loss corresponding to all problem nodes; Indicates the first These problem nodes serve as anchor nodes in comparative learning. Indicates the first Each job node Indicates the problem node The corresponding set of negative job positions, and the negative job positions and problem nodes. This does not constitute a true match. Indicates the problem node Low-dimensional embedding representation after graph neural network encoding; Indicates the positive job node Embedded representation; Indicates job node Embedded representation; Indicates job node Relative to the problem node The adaptive weights are used to characterize the interference intensity of the position on the current problem, reflect the closeness between the two at the graph structure level, and modulate the strength of the role of semantic similarity in the loss. Indicates the problem node Job Nodes In heterogeneous graphs, structural similarity or structural correlation strength This represents a temperature coefficient used to adjust the smoothness of the similarity distribution and control the gradient scale of contrastive learning. This represents the natural logarithm operation, used to transform a ratio-based comparison objective into an optimizable loss form; This represents the natural exponential function, used to amplify differences in embedding similarity and enhance the contrast effect; This represents a similarity calculation function in the embedding space, used to measure the proximity of question nodes and job nodes in the semantic space. The higher the similarity, the closer the two are in the representation space.
[0066] The loss function described above introduces a structural similarity modulation term and adaptive negative sample weights into the contrastive learning framework, enabling problem nodes to not only rely on semantic similarity when learning the embedding representation, but also to perceive the strength of their structural association in the job heterogeneity graph, thereby improving the ability of the embedding representation to discriminate the matching relationship of real jobs.
[0067] Based on the above adaptive structure-weighted contrastive learning, this embodiment of the invention further introduces an explicit time-constrained temporal modeling and reasoning mechanism to characterize the dynamic features of the problem-job matching relationship evolving over time, enabling the graph neural network to not only learn structural and semantic relationships, but also to model and reason about temporal order and time span.
[0068] First, this invention proposes a time-consistency-constrained graph information propagation mechanism. In the information propagation process of heterogeneous graph neural networks, a time-consistency constraint function is introduced to restrict nodes to receiving information only from time-consistent neighbor nodes, preventing future information from interfering with current problem decisions. Specifically, when the job heterogeneous graph is updated in the graph neural network, any problem node... In graph neural networks Layer Embedded Representation for:
[0069] in, This is a time consistency indicator function used to allow only nodes no later than the problem node to be included. Recommended time The nodes participate in the problem nodes The spread of For the problem node The neighboring nodes, For the problem node The set of neighboring nodes, Neighboring nodes Recommended time, For edge types in a job heterogeneity graph, This is the set of edge types in the job heterogeneity graph; Neighboring nodes In the graph neural network Layer embedding representation, For the first graph neural network Edge types in layers The corresponding learnable linear transformation matrix, This is a time decay function used to adjust the influence intensity of nodes at different time intervals. It is a non-linear activation function.
[0070] Through the above mechanism, graph neural networks ensure that information propagation follows the temporal order at the structural level, thereby enhancing the rationality of temporal reasoning.
[0071] This invention also introduces a time-consistent comparison sample construction mechanism. When constructing structure-aware comparison learning samples centered on problem nodes, a time-consistency constraint is further introduced to extend the construction rules for positive and negative samples. Specifically, when the job heterogeneity graph is updated in the graph neural network, problem nodes... The set of positive samples include:
[0072] in, As a job milestone, Let be the set of edges in the heterogeneous job graph. For job nodes Recommended time, For the problem node Recommended time, This is a time threshold used to limit the time consistency range of positive samples.
[0073] When updating the heterogeneous job graph in a graph neural network, problem nodes The set of negative samples include:
[0074] in, For the problem node Job Nodes The semantic or structural similarity between them. Negative samples are used to explicitly constrain the model to distinguish job nodes that are temporally unreasonable but semantically or structurally similar.
[0075] Furthermore, this invention also proposes a time-modulated adaptive structure-weighted contrastive loss function. Based on the original structure-aware contrastive loss, time-modulated weights are introduced to dynamically adjust the constraint strength of negative samples. Specifically, for any problem node, comparative learning is performed using the positive and negative samples of that problem node, including: For any problem node, a contrastive loss function is constructed using the positive and negative samples of that problem node, and contrastive learning is performed based on this loss function. Specifically, the problem node... The contrast loss function constructed from positive and negative samples include:
[0076] in, For the problem node The set of positive samples, For the problem node The set of negative samples, This is a function for calculating semantic similarity or structural similarity. For the problem node Embedded representation, To the problem node The embedding representation of job nodes in positive samples. For job nodes Embedded representation, This is a temperature coefficient used to adjust the smoothness of the similarity distribution in contrastive learning. The structural weights are calculated based on the distance between nodes (job level and structural distance). This refers to time weights based on time differences.
[0077] By jointly modulating time and structure, graph neural networks maintain both structural and temporal consistency in the embedding space. Introducing temporal consistency propagation constraints, temporal perturbation negative samples, and contrastive loss with temporal modulation, this invention explicitly models the evolution of job matching relationships over time, reduces the interference of cross-temporal noise on representation learning, and improves the model's stability and generalization ability in dynamic business environments.
[0078] In some embodiments, the process of obtaining the user problem to be solved and the problem acquisition time in S3 above, and inputting them into the graph neural network to obtain the problem embedding representation of the user problem to be solved by the graph neural network output, includes: S31. Input the user problem to be solved and the problem acquisition time into the graph neural network to obtain the first embedding representation based on the user problem to be solved and the second embedding representation based on the problem acquisition time.
[0079] Specifically, the process of obtaining the first embedded representation based on the user problem to be solved can be referred to the problem node in the above embodiments. Embedded representation The acquisition process (i.e., any of the above problem nodes) In graph neural networks Layer Embedded Representation The specific process of obtaining the second embedded representation based on the question acquisition time can be found in any of the above nodes. Embedded representation The process of obtaining (i.e., for any node) its first Layer Embedded Representation ).
[0080] S32. Determine the problem embedding representation based on the first embedding representation and the second embedding representation.
[0081] Specifically, the question embedding obtained by S32 is represented as follows: , For the first embedding representation mentioned above, This is the second embedding representation mentioned above. This is a time-conditionalization function used to fuse the first and second embedding representations.
[0082] In some embodiments, S4 includes: S41. Input the job embedding representation and question embedding representation of each job position into the recommendation model to obtain the matching score between the user question to be solved and each job position output by the recommendation model; wherein, the recommendation model utilizes historical user questions and historical recommended jobs, and is trained and updated based on a single-step loss function.
[0083] S42. Recommend suitable problem-solving positions to users based on their matching scores.
[0084] After obtaining the question embedding and job embedding, this embodiment of the invention introduces a recommendation model to perform a one-time matching calculation on the question embedding and all job embeddings, outputting the matching score between the question and the job and forming the job recommendation result. For each question, a question-level loss function based on the single-step recommendation result is constructed, incorporating the real job and all candidate jobs into the same optimization space. The recommendation model parameters are optimized through question-level constraints, thereby achieving direct optimization of the question-job matching result.
[0085] Specifically, in the recommendation model described above, for problem nodes... With any job node Its matching score Defined as:
[0086] in, To embed the problem into a time-conditional representation; Embedded representation for job positions; It is a learnable matching function used for joint modeling of problem embeddings and job embeddings.
[0087] because Since time information has been incorporated, the job matching process is implicitly constrained by time, thus making the recommendation results time-sensitive. Using the above method, the matching scores between the question and all job nodes can be obtained in a single forward computation, and the job ranking scores can be displayed, directly serving the job recommendation task.
[0088] In some embodiments, the above single-step loss function include:
[0089] in, For the first The matching score between a historical user's question and its corresponding historical recommended job position. For the first The first historical user issue and the first The matching score of each historical recommended job posting. This represents the total number of job postings recommended in the past.
[0090] In practice, the single-step loss function described above is defined with a problem as the computational object. Therefore, the single-step loss function itself constitutes the problem-level loss function, hence the problem-level loss function is defined as follows:
[0091] in, For each question, the set of all questions in the training set of the recommendation model is defined. This corresponds to a complete single-step recommendation and loss calculation.
[0092] Furthermore, this embodiment of the invention uses a single problem as the smallest optimization unit and directly applies the single-step loss function as the problem-level loss function, thereby achieving direct optimization with the goal of "problem-job recommendation accuracy". Through the above method, this embodiment of the invention achieves an effective connection from embedded representation to job recommendation decision-making, ensuring that the model's optimization objective remains consistent with the actual job allocation business scenario.
[0093] Figure 4 This document illustrates a complete flowchart of a specific embodiment of the present invention, which can be viewed as a system comprising three interconnected functional modules. First, Module One performs structured processing on historical work order data, extracting key entities such as time, problem, and job position, and constructs a heterogeneous graph structure containing problem nodes, job position nodes, and time nodes. Simultaneously, it uses a large model to enhance knowledge, providing a unified structural representation foundation for subsequent modeling. Second, Module Two introduces a graph neural network and an adaptive structure-aware contrastive learning mechanism based on the heterogeneous graph, fusing semantic and structural association information of problems and jobs, as well as time constraints, to learn a discriminative job embedding representation. This process effectively improves the structural consistency and semantic distinguishability of problems and jobs in the representation space. Building upon this, Module Three, based on the learned problem and job embeddings, introduces a recommendation model to complete single-step matching modeling between problems and jobs. It then uses a loss function with the problem as the smallest optimization unit to directly supervise and optimize the job recommendation results, thereby achieving a closed loop from representation learning to recommendation decision-making. Through the synergistic effect of these three modules, this embodiment of the invention can achieve accurate matching between problems and jobs in complex job systems and diverse problem scenarios, improving the accuracy and stability of job recommendation and allocation results.
[0094] It should be noted that the method of this embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this embodiment, and the multiple devices will interact with each other to complete the above method.
[0095] It should be noted that some embodiments of the present invention have been described above. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0096] Based on the same inventive concept, corresponding to any of the above embodiments, the present invention also provides a job recommendation device based on heterogeneous graphs and neural networks, such as... Figure 5 As shown, it includes: Graph construction module 10 is used to obtain historical user questions, historical recommended positions, and recommendation time, and to construct a job heterogeneity graph based on historical user questions, recommendation time, and historical recommended positions; wherein, the job heterogeneity graph includes question nodes, time nodes, and job nodes.
[0097] Learning module 20 is used to input the job heterogeneity graph into the graph neural network to obtain the job embedding representation of each job output by the graph neural network. When the job heterogeneity graph is updated in the graph neural network, for any problem node, only nodes whose recommendation time is no later than that problem node are allowed to participate in the propagation of that problem node. When the job heterogeneity graph is updated in the graph neural network, for any problem node, the positive and negative samples of that problem node are compared and learned. Positive samples include job nodes whose recommendation time is less than or equal to the time threshold of the problem node, and negative samples include job nodes whose recommendation time is greater than the time threshold of the problem node.
[0098] The problem acquisition module 30 is used to acquire the user problem to be solved and the time of problem acquisition. The acquired user problem to be solved and the time of problem acquisition are input into the graph neural network to obtain the problem embedding representation of the user problem to be solved output by the graph neural network.
[0099] The recommendation module 40 is used to recommend suitable problem-solving positions to users based on the job embedding representation and problem embedding representation of each position.
[0100] The device provided in this embodiment of the invention constructs a heterogeneous relationship graph between questions, time, and job positions, and uses graph neural networks and contrastive learning to introduce time entities as independent nodes into the job heterogeneous graph and participate in feature propagation, thereby achieving job recommendation for user questions. This improves the accuracy and stability of matching between questions and job positions, and solves the problems of manpower consumption and human error during job assignment.
[0101] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, in implementing this invention, the functions of each module can be implemented in one or more software and / or hardware components.
[0102] The apparatus described above is used to implement the corresponding job recommendation method based on heterogeneous graphs and neural networks in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0103] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown.
[0104] like Figure 6 As shown, the electronic device may include a processor 1101 and a memory 1102 storing computer program instructions.
[0105] Specifically, the processor 1101 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present invention.
[0106] Memory 1102 may include a mass storage device for information or instructions. For example, and not limitingly, memory 1102 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 1102 may include removable or non-removable (or fixed) media. Where appropriate, memory 1102 may be internal or external to the integrated gateway device. In a particular embodiment, memory 1102 is a non-volatile solid-state memory. In a particular embodiment, memory 1102 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0107] The processor 1101 reads and executes computer program instructions stored in the memory 1102 to perform the steps of the job recommendation method based on heterogeneous graphs and neural networks provided in this embodiment of the invention.
[0108] In one example, the electronic device may also include a transceiver 1103 and a bus 1104. Wherein, as... Figure 6 As shown, the processor 1101, memory 1102 and transceiver 1103 are connected via bus 1104 and communicate with each other.
[0109] Bus 1104 may include hardware, software, or both. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 1104 may include one or more buses. Although specific buses are described and illustrated in the embodiments of the present invention, the present invention is contemplated by any suitable bus or interconnect.
[0110] The following are embodiments of a computer-readable storage medium provided in this invention. This computer-readable storage medium and the job recommendation method based on heterogeneous graphs and neural networks in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the computer-readable storage medium, please refer to the embodiments of the job recommendation method based on heterogeneous graphs and neural networks described above.
[0111] This embodiment provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a job recommendation method based on heterogeneous graphs and neural networks.
[0112] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the above-described method operations, but can also execute related operations in the job recommendation method based on heterogeneous graphs and neural networks provided in any embodiment of the present invention.
[0113] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer cloud platform (which can be a personal computer, server, or network cloud platform, etc.) to execute the job recommendation method based on heterogeneous graphs and neural networks provided in the various embodiments of the present invention.
[0114] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the aforementioned element.
[0115] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments described above, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A job recommendation method based on heterogeneous graphs and neural networks, characterized in that, include: Obtain historical user questions, historical recommended job postings, and recommendation times, and construct a job heterogeneity graph based on the historical user questions, recommendation times, and historical recommended job postings; wherein, the job heterogeneity graph includes question nodes, time nodes, and job posting nodes; The job heterogeneity graph is input into a graph neural network to obtain the job embedding representation of each job output by the graph neural network. When the job heterogeneity graph is updated in the graph neural network, for any given problem node, only nodes whose recommendation time is no later than that problem node are allowed to participate in the propagation of that problem node. When the job heterogeneity graph is updated in the graph neural network, for any given problem node, positive and negative samples of that problem node are compared and learned. Positive samples include job nodes whose recommendation time differs from the recommendation time of that problem node by a time threshold less than or equal to a time threshold, and negative samples include job nodes whose recommendation time differs from the recommendation time of that problem node by a time threshold greater than the time threshold. Obtain the user problem to be solved and the time when the problem was obtained, and input the obtained user problem to be solved and the time when the problem was obtained into the graph neural network to obtain the problem embedding representation of the user problem to be solved output by the graph neural network; Based on the job embedding representation and the problem embedding representation for each job, suitable problem-solving jobs are recommended to the user.
2. The method as described in claim 1, characterized in that, When the job heterogeneity graph is updated in the graph neural network, any of the problem nodes In graph neural networks Layer Embedded Representation for: in, This is a time consistency indicator function used to allow only nodes no later than the problem node to be included. Recommended time The nodes participate in the problem nodes The spread of For the problem node The neighboring nodes, For the problem node The set of neighboring nodes, Neighboring nodes Recommended time, The edge type in the heterogeneous graph of the job positions. This is the set of edge types in the heterogeneous graph of the job positions; Neighboring nodes In the graph neural network Layer embedding representation, For the first graph neural network Edge types in layers The corresponding learnable linear transformation matrix, It is a time decay function. It is a non-linear activation function.
3. The method as described in claim 1, characterized in that, When the heterogeneous job graph is updated in the graph neural network, the problem node... The set of positive samples include: in, For the aforementioned job node, Let be the set of edges in the heterogeneous graph of the job positions. For job nodes Recommended time, For the problem node Recommended time, The time threshold; When the heterogeneous job graph is updated in the graph neural network, the problem node... The set of negative samples include: in, For the problem node Job Nodes The semantic or structural similarity between them.
4. The method as described in claim 3, characterized in that, For any of the aforementioned problem nodes, the step of comparing and learning using the positive and negative samples of that problem node includes: For any of the aforementioned problem nodes, a contrastive loss function is constructed using the positive and negative samples of the problem node, and contrastive learning is performed based on the contrastive loss function. Among them, utilizing this problem node The contrast loss function constructed from positive and negative samples include: in, For the problem node The set of positive samples, For the problem node The set of negative samples, This is a function for calculating semantic similarity or structural similarity. For the problem node Embedded representation, To the problem node The embedding representation of job nodes in positive samples. For job nodes Embedded representation, For temperature coefficient, The structural weights are calculated based on the distance between nodes. Time weighting.
5. The method as described in claim 1, characterized in that, The step of inputting the acquired user problem and the time of problem acquisition into a graph neural network to obtain the problem embedding representation of the user problem to be solved output by the graph neural network includes: The user problem to be solved and the time when the problem was acquired are input into a graph neural network to obtain a first embedding representation based on the user problem to be solved and a second embedding representation based on the time when the problem was acquired. The problem embedding representation is determined based on the first embedding representation and the second embedding representation.
6. The method as described in claim 1, characterized in that, The step of recommending suitable problem-solving positions to users based on the job embedding representation and the problem embedding representation for each position includes: The job embedding representation and the question embedding representation of each job are input into the recommendation model to obtain the matching score between the user question to be solved and each job output by the recommendation model; wherein, the recommendation model uses the historical user questions and the historical recommended jobs, and is trained and updated based on a single-step loss function; Based on the matching score, suitable problem-solving positions are recommended to the user.
7. The method of claim 6, characterized in that, The single-step loss function include: in, For the first The matching score between a historical user's question and its corresponding historical recommended job position. For the first The first historical user issue and the first The matching score of each historical recommended job posting. This represents the total number of job postings recommended in the past.
8. A job recommendation device based on heterogeneous graphs and neural networks, characterized in that, include: The graph construction module is used to obtain historical user questions, historical recommended positions, and recommendation time, and to construct a job heterogeneous graph based on the historical user questions, the recommendation time, and the historical recommended positions; wherein, the job heterogeneous graph includes question nodes, time nodes, and job nodes; A learning module is used to input the job heterogeneity graph into a graph neural network to obtain a job embedding representation for each job output by the graph neural network. When the job heterogeneity graph is updated in the graph neural network, for any given problem node, only nodes whose recommendation time is no later than that problem node are allowed to participate in the propagation of that problem node. When the job heterogeneity graph is updated in the graph neural network, for any given problem node, positive and negative samples of that problem node are compared and learned. Positive samples include job nodes whose recommendation time differs from the recommended time of that problem node by a time threshold less than or equal to a time threshold, and negative samples include job nodes whose recommendation time differs from the recommended time of that problem node by a time threshold greater than the time threshold. The problem acquisition module is used to acquire user problems to be solved and the time when the problems were acquired. The acquired user problems to be solved and the time when the problems were acquired are input into the graph neural network to obtain the problem embedding representation of the user problems to be solved output by the graph neural network. The recommendation module is used to recommend suitable problem-solving positions to users based on the job embedding representation and the problem embedding representation for each position.
9. An electronic device, characterized in that, include: processor; A memory for storing executable instructions; wherein the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The storage medium stores a computer program that, when executed by a processor, causes the processor to implement the method described in any one of claims 1 to 7.