Method, device and medium for obtaining correlation between industries and disciplines
By generating semantic vectors and calculating paragraph pair similarity through a text encoding model, this approach solves the problems of subjectivity and inaccuracy in obtaining industry-disciplinary connections in existing technologies, providing interpretable and quantifiable connections suitable for various application scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF SCI & TECHN INFORMATION OF CHINA
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies rely heavily on human experience when acquiring relationships between industries and disciplines, are highly subjective, struggle to cover large-scale systems, lack multi-dimensional semantic relationship modeling, and lack quantitative standards for the association results, making dynamic updates difficult and resulting in poor adaptability.
A text encoding model is used to encode industry and academic text paragraphs to generate semantic vectors. The degree of association is obtained by calculating the similarity of paragraph pairs. Contrastive learning is used to train the model to improve semantic representation ability, and difficult negative samples are selected for iterative training.
It enables interpretable and quantifiable relationships between industries and disciplines, applicable to industrial development analysis and technological innovation decision support, and improves the accuracy and adaptability of these relationships.
Smart Images

Figure CN122196577A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of big data analytics technology. More specifically, this disclosure relates to a method, system, device, and medium for obtaining the relationship between industries and disciplines. Background Technology
[0002] Industry and discipline refer to the organizational form of economic activity and the classification of knowledge systems, respectively. Industry is a product of social division of labor and the development of productive forces, typically referring to a collection of enterprises that provide similar products or services, use the same raw materials or technologies, and operate on the same or related value chains. Discipline is the basic unit of academic classification, referring to a branch of science with an independent knowledge system, research methods, and theoretical framework. In practical applications, the correspondence between industry and discipline is widely used in scenarios such as industrial planning analysis, discipline layout evaluation, talent training direction design, and technological innovation decision support.
[0003] Currently, in addition to human experience or expert rule mapping methods, methods based on statistical indicators or correlation analysis and methods based on keywords or overall text similarity can also be used to obtain the relationship between industries and disciplines. However, these methods only perform similarity analysis at the word level. Since words themselves contain very little semantic information, it is difficult to capture the rich and complex relationship between industries and disciplines, resulting in a rough and inaccurate relationship between industries and disciplines. Summary of the Invention
[0004] This disclosure provides a method, apparatus, device, and medium for obtaining the correlation between industry and discipline, which can solve the above-mentioned problems of the prior art. The technical solution is as follows: According to one aspect of the present disclosure, a method for obtaining the relationship between industry and discipline is provided, comprising: Obtain a first set of paragraphs for industries and a second set of paragraphs for disciplines. The first set of paragraphs includes industry text paragraphs describing the corresponding industries, and the second set of paragraphs includes discipline text paragraphs describing the corresponding disciplines. Each industry text paragraph and each discipline text paragraph are encoded according to a pre-trained text encoding model to obtain the first semantic vector of each industry text paragraph and the second semantic vector of each discipline text paragraph. For any pair of paragraphs consisting of an industry text paragraph and a discipline text paragraph, calculate the similarity between the first semantic vector and the second semantic vector corresponding to the paragraph pair; Based on the similarity of each paragraph to its corresponding text, the degree of correlation between industries and disciplines is obtained.
[0005] In one possible implementation, the text encoding model is generated as follows: Obtain the total paragraph set, which includes the first paragraph set of multiple sample industries and the second paragraph set of multiple sample disciplines; Based on the total set of paragraphs, the initial first model is trained iteratively for multiple rounds until the iteration stopping condition is met. The first model that meets the iteration stopping condition is used as the text encoding model. Each round of iterative training includes: Extract a first paragraph set from at least one sample industry and a second paragraph set from at least one sample discipline from the total paragraph set to obtain a sub-paragraph set; Based on the first model, obtain the semantic vector corresponding to each text paragraph in the sub-paragraph set; Each industry text segment in the sub-segment set is used as the original sample, and positive and negative samples corresponding to the original samples are obtained from the sub-segment set to obtain the training sample set. The training sample set includes multiple original samples and positive and negative samples corresponding to each original sample. The original sample and the positive sample corresponding to the original sample belong to the same industry. In the case where the negative sample is an industry text segment, the original sample and the negative sample corresponding to the original sample belong to different industries. Based on the semantic vectors of each sample in the training sample set, the loss function value for this iteration is obtained. The parameters of the first model in this iteration are then fine-tuned using the loss function value to obtain the first model for the next iteration.
[0006] In one possible implementation, the loss function value for the current iteration is obtained based on the semantic vectors of each sample in the training sample set, including: For each original sample, the original sample and any positive sample corresponding to the original sample form a positive sample pair, and the similarity between the semantic vectors corresponding to the positive samples is calculated. The original sample and any negative sample corresponding to the original sample form a negative sample pair, and the similarity between the semantic vectors corresponding to the negative samples is calculated. For each original sample, the similarity of each positive sample pair is exponentially transformed and summed to obtain the first summation result, and the similarity of each negative sample pair is exponentially transformed and summed to obtain the second summation result. For each original sample, the ratio of the first summation result to the total summation result is determined based on the first summation result and the second summation result. The negative logarithm of the ratio is calculated as the loss function value of the original sample in this iteration. The total summation result is the sum of the first summation result and the second summation result.
[0007] In one possible implementation, negative samples are obtained in the following way: For each original sample, calculate the similarity between the semantic vector of the original sample and the semantic vectors of the primary industry text paragraph and the subject text paragraph respectively. The primary industry text paragraph and the original sample do not belong to the same industry. For each original sample, from the semantic vectors corresponding to each primary industry text segment and each discipline text segment, select the text segment whose similarity to the semantic vector of the original sample is greater than a preset threshold as the negative sample corresponding to the original sample.
[0008] In one possible implementation, the degree of correlation between industries and disciplines is obtained based on the similarity of all paragraphs to their respective corresponding pairs, including: For each industry text paragraph, calculate the average similarity of each paragraph pair corresponding to the industry text paragraph to obtain the degree of correlation between the industry text paragraph and the discipline; Calculate the average degree of correlation between the text paragraphs corresponding to each industry and the discipline, and obtain the degree of correlation between industries and disciplines.
[0009] In one possible implementation, the average similarity of each paragraph pair corresponding to the industry text paragraph is calculated to obtain the degree of correlation between the industry text paragraph and the discipline, including: Based on the similarity of each paragraph pair corresponding to the industry text paragraph, select the preset number of paragraph pairs with the highest similarity from each paragraph pair as the target paragraph pairs; Calculate the average similarity of each target paragraph to obtain the degree of correlation between industry text paragraphs and disciplines.
[0010] In one possible implementation, the first set of industry segments and the second set of discipline segments are obtained, including: The names of industries are augmented using a large language model to obtain industry text describing the industries; the names of disciplines are augmented using a large language model to obtain discipline text describing the disciplines. The industry text is split into multiple industry text paragraphs to obtain the first paragraph set of the industry, and the discipline text is split into multiple discipline text paragraphs to obtain the second paragraph set of the discipline.
[0011] In one possible implementation, the industry text is used to describe at least one of the following: the relevant academic disciplines required by the industry, the skills required for the positions, and the academic categories of the main practitioners in the industry. The subject-specific text is used to describe at least one of the following: the employment direction of talents in the subject, the category of industries related to the subject, and the job requirements.
[0012] According to another aspect of the present disclosure, an apparatus for obtaining the relationship between industry and discipline is provided, comprising: The text paragraph acquisition module is used to obtain a first paragraph set for industries and a second paragraph set for disciplines. The first paragraph set includes industry text paragraphs describing the corresponding industries, and the second paragraph set includes discipline text paragraphs describing the corresponding disciplines. The semantic vector acquisition module is used to encode each industry text paragraph and each discipline text paragraph according to the pre-trained text encoding model, so as to obtain the first semantic vector of each industry text paragraph and the second semantic vector of each discipline text paragraph. The similarity calculation module is used to calculate the similarity between the first semantic vector and the second semantic vector of any paragraph pair consisting of any industry text paragraph and any discipline text paragraph; The correlation degree acquisition module is used to obtain the correlation degree between industries and disciplines based on the similarity of each paragraph.
[0013] According to another aspect of the present disclosure, an electronic device is provided, the electronic device including a memory, a processor, and a computer program stored in the memory, the processor executing the computer program to implement the above-described method.
[0014] According to another aspect of the present disclosure, a computer-readable storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described method.
[0015] According to one aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method.
[0016] The beneficial effects of the technical solutions provided in this disclosure are: Using text paragraphs as the basic encoding unit of semantic vectors, text paragraphs carry relatively complete ideas and have logical coherence. This avoids the context loss caused by word-level and sentence-level semantic fragmentation, and also avoids the noise interference caused by the generalization of the theme of the whole text. This achieves precise semantic focus and obtains higher quality semantic vectors. By combining the similarity of the semantic vectors of each paragraph to (industry text paragraphs - discipline text paragraphs), the degree of correlation between industry and discipline can be obtained, so that the degree of correlation can be more directly and accurately quantified. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below.
[0018] Figure 1 A flowchart illustrating a method for obtaining the relationship between industry and discipline provided in this embodiment of the disclosure; Figure 2 This is a schematic diagram illustrating a process for obtaining the relationship between industries and disciplines, provided as an embodiment of the present disclosure. Figure 3 A schematic diagram of the structure of a device for obtaining the relationship between industries and disciplines provided in an embodiment of this disclosure; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0019] The embodiments of this disclosure are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions of the embodiments of this disclosure.
[0020] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this disclosure mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element are connected through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”
[0021] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.
[0022] The following description of several exemplary embodiments illustrates the technical solutions of this disclosure and the technical effects produced by these solutions. It should be noted that the following embodiments can be referenced, learned from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0023] The relevant technologies involved in this application are described below: In practical applications, the correspondence between industries and disciplines is widely used in scenarios such as industry planning analysis, discipline layout evaluation, talent training direction design, and science and technology innovation decision support.
[0024] Existing methods for obtaining industry-disciplinary connections mainly include the following categories: Related technology 1: Manual experience or expert rule mapping method, in which industry experts or managers manually formulate the correspondence between industries and disciplines based on experience.
[0025] Related technology 2: Methods based on statistical indicators or correlation analysis, using statistical indicators such as industry size, number of disciplines, and employment data to calculate the degree of correlation between industries and disciplines.
[0026] Related technology 3: Methods based on keyword or overall text similarity, directly performing keyword matching or overall text similarity calculation on industry tags and subject tags.
[0027] The existing technology has the following main shortcomings: The process of obtaining the relationship between industries and disciplines relies on human experience, which is highly subjective, labor-intensive, and difficult to cover large-scale industry and discipline systems. Using keywords as the smallest semantic modeling unit results in insufficient semantic information. There is a lack of modeling capabilities for multi-dimensional semantic relationships between industries and disciplines. The results of the relationship lack unified quantitative standards, making it difficult to evaluate and compare, and difficult to update dynamically. It has poor adaptability to emerging industries and interdisciplinary fields, and it is difficult to achieve extended analysis of newly added relationships.
[0028] This disclosure addresses the lack of automated and scalable means of obtaining correlations between industries and disciplines by providing a method for obtaining such correlations. Compared to existing technologies, this method can obtain interpretable, quantifiable, and more accurate correlations between industries and disciplines, and can be applied to various scenarios such as industrial development analysis systems, science and technology innovation decision support platforms, discipline structure optimization and evaluation systems, and regional industry and discipline collaborative analysis projects.
[0029] The following description of several exemplary embodiments illustrates the technical solutions of this disclosure and the technical effects produced by these solutions. It should be noted that the following embodiments can be referenced, learned from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0030] It is understood that in the method for obtaining the relationship between industry and discipline provided in the embodiments of this disclosure, any step of the method can be executed by an electronic device and / or a server, and all steps in the method can be executed independently by an electronic device or a server, or jointly by an electronic device and a server.
[0031] The server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services. Electronic devices can be smartphones, tablets, laptops, desktop computers, smart voice interaction devices (such as smart speakers), wearable electronic devices (such as smartwatches), in-vehicle terminals, smart home appliances (such as smart TVs), AR / VR devices, etc., but are not limited to these.
[0032] The embodiments of this disclosure will be described subsequently using electronic devices as the execution subject; however, this does not constitute a limitation on the embodiments of this disclosure.
[0033] Figure 1 A flowchart illustrating a method for obtaining the relationship between industry and discipline provided in this disclosure embodiment is shown below. Figure 1 As shown, the method includes the following steps: Step S101: Obtain a first paragraph set for industries and a second paragraph set for disciplines. The first paragraph set includes industry text paragraphs used to describe the corresponding industries, and the second paragraph set includes discipline text paragraphs used to describe the corresponding disciplines.
[0034] In this context, a text paragraph is the basic unit of text composition. It is a unit divided according to the text's content structure and semantic logic. Each text paragraph includes one or more sentences, used to express a relatively complete thought or attention. Text paragraphs typically have consistent logical relationships and semantic coherence. This embodiment of the disclosure uses the text paragraph as the smallest semantic modeling unit, that is, the basic encoding unit of semantic vectors.
[0035] Specifically, industry and discipline refer to the organizational forms of economic activities and the classification of knowledge systems, respectively. Industry is a product of social division of labor and the development of productive forces, and usually refers to a group of enterprises that provide similar products or services, use the same raw materials or technologies, and operate on the same or related value chains. Discipline is the basic unit of academic classification, referring to a branch of science with an independent knowledge system, research methods, and theoretical framework.
[0036] In this embodiment of the disclosure, "industry" and "discipline" refer to the names of industries and disciplines, respectively. With the development of science and technology and the rise of emerging industries, the classification methods and names of disciplines and industries may vary at different times. The classification rules and names of each industry and discipline can be determined according to actual needs.
[0037] For example, based on their diversity, representativeness, and complexity, the selection covered traditional and emerging industries, as well as different technology fields, resulting in 71 industries, including but not limited to the battery industry, modern logistics, modern services, modern finance, aerospace, and high-end manufacturing, thus obtaining an industry cluster. , where m=71.
[0038] This publication uses 110 first-level disciplines from the "Introduction to First-Level Disciplines for Degree Conferral and Talent Cultivation" as the disciplines, including but not limited to philosophy, mathematics, physics, chemistry, computer science and technology, mechanical engineering, electrical engineering, and electronic science and technology, to obtain the discipline set. , where n=110.
[0039] Figure 2 This is a schematic diagram illustrating a process for obtaining the relationship between industries and disciplines, as provided in an embodiment of this disclosure. Figure 2 As shown, taking the analysis of the correlation pair composed of any profession and any discipline as an example, the method for obtaining the correlation between industries and disciplines provided in this disclosure embodiment will be described in detail.
[0040] In step S101, the first set of industry segments and the second set of discipline segments are obtained.
[0041] The first paragraph set includes industry text paragraphs used to describe the corresponding industries. These industry text paragraphs can be generated directly by the Large Language Model (LLM) or extracted from industry texts describing the industries. Industry texts include, but are not limited to, industry reports, industry-related policy documents, and industry-related news.
[0042] The second paragraph set includes subject text paragraphs used to describe the corresponding discipline. These subject text paragraphs can be generated directly by LLM or extracted from subject texts describing the discipline. Subject texts include, but are not limited to, discipline introductions, academic papers, and subject textbooks.
[0043] Understandably, in practical applications, the number of industry text paragraphs in the first paragraph set for each industry and the number of discipline text paragraphs in the second paragraph set for each discipline can be determined according to actual needs. For example, each paragraph set may contain 15 text paragraphs, or each paragraph may contain 10-20 text paragraphs.
[0044] Step S102: Encode each industry text segment and each discipline text segment according to the pre-trained text encoding model to obtain the first semantic vector of each industry text segment and the second semantic vector of each discipline text segment.
[0045] Specifically, in this embodiment of the disclosure, text paragraphs are used as the basic encoding units of semantic vectors. A pre-trained text encoding model is used to encode each text paragraph in the first paragraph set and the second paragraph set into a semantic vector.
[0046] The specific type of text encoding model can be determined according to actual needs, including but not limited to pre-trained language models based on Transformer encoders (Bidirectional Encoder Representations from Transformers, or BERT for short) and robustly optimized BERT Approach (RoBERTa for short).
[0047] In step S102, each industry text paragraph in the first paragraph set is encoded according to the pre-trained text encoding model to obtain the first semantic vector of each industry text paragraph, and each subject text paragraph in the second paragraph set is encoded to obtain the second semantic vector corresponding to each subject text paragraph.
[0048] Step S103: For any paragraph pair consisting of an industry text paragraph and a subject text paragraph, calculate the similarity between the first semantic vector and the second semantic vector corresponding to the paragraph pair.
[0049] Specifically, any industry text paragraph is identified in the first paragraph set, and any subject text paragraph is identified in the second paragraph set. Together they form a paragraph pair. All paragraph pairs are obtained by exhaustive pairing. The total number of paragraph pairs is the product of the sizes of the two paragraph sets (the number of text paragraphs included in each paragraph set).
[0050] In step S103, for each paragraph pair, the similarity between the first semantic vector of the industry text paragraph and the second semantic vector of the subject text paragraph is calculated. The similarity is used to quantify the distance between the two semantic vectors in the vector space, including but not limited to cosine similarity, Euclidean distance, dot product, etc.
[0051] For example, the industry The corresponding industry text paragraph is denoted as ,discipline The corresponding text paragraph of any subject is denoted as They are then converted into their respective semantic vectors to obtain and .
[0052] Calculated using the following formula and Cosine similarity between .
[0053]
[0054] Each text paragraph is an independent semantic unit. Semantic modeling is performed at the paragraph level, using text paragraphs as the basic encoding unit for semantic vectors. The similarity between the semantic vectors of industry text paragraphs and discipline text paragraphs is calculated, which can more accurately capture the local semantic relationships between industries and disciplines.
[0055] Step S104: Based on the similarity of each paragraph, obtain the degree of correlation between industries and disciplines.
[0056] Specifically, in this embodiment of the disclosure, the degree of correlation is used to quantify the relationship between a specific industry and a specific discipline, that is, to quantify the semantic relevance and knowledge coupling between the industry and the discipline, in order to reflect the extent to which the industry depends on, applies or involves the theory, technology and knowledge system of the discipline.
[0057] The similarity of paragraph pairs is used to reflect the semantic proximity between industry text paragraphs and discipline text paragraphs. In step S104, the similarity of all paragraph pairs is aggregated to obtain the degree of association between industry and discipline. The degree of association is used as a comprehensive measure of all similarities. The specific aggregation methods include, but are not limited to, taking the average value, weighted summation, etc.
[0058] It is understood that the method for obtaining the relationship between industries and disciplines provided in this disclosure is the smallest unit for the practical application of this invention, obtaining the degree of correlation between a specific industry and a specific discipline in a one-to-one manner. Furthermore, the relationship between industries and disciplines can be graded according to the magnitude of the correlation.
[0059] For example, four levels of correlation are set for the relationship: strong correlation, relatively relevant, generally relevant, and relatively unrelevant. The correlation degree takes values between [0, 1]. Strong correlation corresponds to a correlation degree range of [0.9, 1], indicating that the relationship between the industry and the discipline is very close, and the discipline usually constitutes the core support for industrial development; relatively relevant corresponds to a correlation degree range of [0.7, 0.9), indicating that the industry and the discipline have a relatively obvious correlation, but it is weaker than strong correlation in terms of importance and directness; generally relevant corresponds to a correlation degree range of [0.3, 0.7), indicating that there is some connection between the industry and the discipline, but it is mostly an auxiliary or peripheral relationship and not the main disciplinary support for industrial development; relatively unrelevant corresponds to a correlation degree range of [0, 0.3), indicating that there is almost no substantial connection between the industry and the discipline.
[0060] In addition, within this technical framework, the correlation strength can be used to determine the mapping relationship between industries and disciplines (Industry–Discipline Mapping).
[0061] For example, from an industry perspective, a one-to-many approach can be adopted to obtain the degree of correlation between a specific industry and each discipline in the entire discipline system, and the degree of correlation can be ranked to select the five disciplines with the highest degree of correlation with the industry, forming an industry-discipline mapping result, which can be used to analyze which disciplines the industry needs.
[0062] From a disciplinary perspective, a many-to-one approach is adopted to obtain the correlation strength between each industry in the entire industrial system and a specific discipline. The correlation is then ranked, and the five industries with the highest correlation to the discipline are selected to form a discipline-industry mapping result, which is used to analyze which industries the discipline serves.
[0063] Another approach is to use a many-to-many method to obtain the degree of correlation between each industry and discipline in the industrial system and the discipline system. This is used to construct a network of mapping relationships between disciplines and industries, and to analyze the relationships between various industries and disciplines from a global perspective. This can help to adjust the layout of industries and disciplines, such as to identify interdisciplinary disciplines or related industries.
[0064] The technical solution provided in this disclosure uses text paragraphs as the basic encoding unit of semantic vectors. Text paragraphs carry relatively complete ideas and have logical coherence. This can avoid the context loss caused by word-level and sentence-level semantic fragmentation, and also avoid noise interference caused by the generalization of the theme of the whole text. This achieves precise semantic focus, obtains higher quality semantic vectors, and obtains the degree of correlation between industry and discipline by combining the similarity of semantic vectors of each paragraph to (industry text paragraphs - discipline text paragraphs). This allows the degree of correlation to be quantified more directly and accurately.
[0065] Existing technologies that analyze the relationship between industries and disciplines based on keywords, using keywords (such as industry names, discipline names, or other related keywords) for text vectorization, result in insufficient semantic information and highly concentrated vector distribution, thus affecting the distinguishability and stability of the industry-discipline mapping results. Technologies that analyze the relationship between industries and disciplines based on the entire text, using the whole text for vector representation, are prone to interference between different semantic dimensions, especially reducing mapping accuracy in interdisciplinary industries. This disclosure provides a paragraph-level technical solution, using text paragraphs as the basic encoding unit for semantic vectors, which effectively improves the expressive power of semantic vectors and solves the problems existing in the prior art.
[0066] In one possible implementation, the text encoding model is generated as follows: Obtain the total paragraph set, which includes the first paragraph set of multiple sample industries and the second paragraph set of multiple sample disciplines; Based on the total set of paragraphs, the initial first model is trained iteratively for multiple rounds until the iteration stopping condition is met. The first model that meets the iteration stopping condition is used as the text encoding model. Each round of iterative training includes: Extract a first paragraph set from at least one sample industry and a second paragraph set from at least one sample discipline from the total paragraph set to obtain a sub-paragraph set; Based on the first model, obtain the semantic vector corresponding to each text paragraph in the sub-paragraph set; Each industry text segment in the sub-segment set is used as the original sample, and positive and negative samples corresponding to the original samples are obtained from the sub-segment set to obtain the training sample set. The training sample set includes multiple original samples and positive and negative samples corresponding to each original sample. The original sample and the positive sample corresponding to the original sample belong to the same industry. In the case where the negative sample is an industry text segment, the original sample and the negative sample corresponding to the original sample belong to different industries. Based on the semantic vectors of each sample in the training sample set, the loss function value for this iteration is obtained. The parameters of the first model in this iteration are then fine-tuned using the loss function value to obtain the first model for the next iteration.
[0067] Specifically, in this embodiment of the disclosure, a text encoding model is used to obtain the semantic vectors corresponding to each text segment. In order to enable the text encoding model to learn deeper and finer-grained language features and semantic information, and to better understand and represent the text content of industries and disciplines, the obtained industry text segments and discipline text segments are used to retrain the text encoding model through comparative learning.
[0068] The text encoding model is generated in the following way: Multiple sample industries and multiple sample disciplines are identified. For each sample industry, a corresponding first paragraph set is obtained, and for each sample discipline, a corresponding second paragraph set is obtained. All first paragraph sets and all second paragraph sets are used to construct a total paragraph set.
[0069] The initial first model is trained iteratively multiple times based on the total set of paragraphs until the iteration stopping condition is met. The first model that meets the iteration stopping condition is used as the text encoding model. The initial first model can be a pre-trained language model.
[0070] Each round of iterative training includes: Based on the total paragraph set, extract the first paragraph set of at least one sample industry and the second paragraph set of at least one sample discipline from the total paragraph set to obtain the sub-paragraph set for this round of iterative training application.
[0071] Based on the first model, obtain the semantic vector corresponding to each text paragraph in the sub-paragraph set.
[0072] Each industry text paragraph in the sub-paragraph set is used as the original sample, and positive and negative samples corresponding to the original samples are obtained from the sub-paragraph set to obtain the training sample set.
[0073] The training sample set includes multiple original samples and corresponding positive and negative samples for each original sample. The original samples and their corresponding positive samples belong to the same industry. Positive samples can be text paragraphs from other industries whose original samples belong to the same industry. When the number of positive samples is insufficient, positive samples can also be obtained by applying data augmentation techniques to the original text. The remaining samples after removing the original and positive samples from the sub-segment set are designated as negative samples. If the negative samples are industry text paragraphs, the original samples and their corresponding negative samples belong to different industries.
[0074] In each round of training iteration, the original samples and positive samples in the training sample set form positive sample pairs, and the original samples and negative samples form negative sample pairs. Based on the semantic vector of each sample, the loss function value of this round of iteration is obtained with the optimization objective of minimizing the contrastive loss function. The parameters of the first model in this round of iteration are fine-tuned with the loss function value to obtain the first model of the next round of iteration.
[0075] It is understood that the embodiments of this disclosure employ contrastive learning to train the model. The contrastive loss function is a loss function used to measure the similarity between two input samples in the embedding space. Minimizing the contrastive loss function is the optimization objective, meaning that the first embedding model learns to maximize the similarity between positive sample pairs and minimize the similarity between negative sample pairs in the embedding space, so as to learn more effective feature representations.
[0076] Accordingly, the contrast loss function used may include, but is not limited to, Information Noise-Contrastive Estimation loss (InfoNCE) and the normalized temperature-scaled cross entropy loss (NT-Xent).
[0077] The technical solution provided in this disclosure constructs a training sample set for iterative training using text segments from industries and disciplines, defines original samples, positive samples, and negative samples, and fine-tunes the model with the goal of minimizing the loss function value. The trained text encoding model can achieve better results in processing professional texts such as those from industries and disciplines, mapping semantically similar industry text segments and discipline text segments to similar positions in the vector space, providing a foundation for subsequent high-quality similarity calculations.
[0078] In one possible implementation, the loss function value for the current iteration is obtained based on the semantic vectors of each sample in the training sample set, including: For each original sample, the original sample and any positive sample corresponding to the original sample form a positive sample pair, and the similarity between the semantic vectors corresponding to the positive samples is calculated. The original sample and any negative sample corresponding to the original sample form a negative sample pair, and the similarity between the semantic vectors corresponding to the negative samples is calculated. For each original sample, the similarity of each positive sample pair is exponentially transformed and summed to obtain the first summation result, and the similarity of each negative sample pair is exponentially transformed and summed to obtain the second summation result. For each original sample, the ratio of the first summation result to the total summation result is determined based on the first summation result and the second summation result. The negative logarithm of the ratio is calculated as the loss function value of the original sample in this iteration. The total summation result is the sum of the first summation result and the second summation result.
[0079] Specifically, in this embodiment of the disclosure, a contrastive learning loss function is used for each round of iterative training to obtain the loss function value for the current round of iteration, including: For each original sample, the original sample and any positive sample corresponding to the original sample form a positive sample pair. The similarity between the semantic vectors corresponding to the positive samples is calculated to obtain the similarity set of the positive sample pairs. The original sample and any negative sample corresponding to the original sample form a negative sample pair. The similarity between the semantic vectors corresponding to the negative samples is calculated to obtain the similarity set of the negative sample pairs.
[0080] The similarity of each positive sample pair is exponentially transformed and summed to obtain the first summation result, which reflects the overall attractiveness of positive samples to the model. The similarity of each negative sample pair is exponentially transformed and summed to obtain the second summation result, which characterizes the total interference energy of negative samples on the model's decision. It is understandable that a temperature coefficient is introduced to scale the similarity, and the exponential transformation deals with the scaled similarity.
[0081] The total summation result is obtained by summing the first summation result and the second summation result, and the ratio of the first summation result to the total summation result is determined. This ratio is used to quantify the relative advantage of positive samples in all candidate samples (the sum of positive samples and negative samples).
[0082] The negative logarithm of the ratio is used as the loss function value of the original sample in this iteration. The smaller the loss function value, the higher the proportion of the first summation result in the total summation result, that is, the total affinity of the positive sample is significantly greater than the total competitive weight of the negative sample.
[0083] This round of iterative training batch includes multiple original samples. The loss function value of this round of iterative training (i.e., the total loss of this round of iterative training) can be the sum or average of the loss function values corresponding to each original sample. The parameters of the model are adjusted to minimize the total loss optimization objective.
[0084] For example, taking cosine similarity as the similarity metric, for each original sample... The comparison loss function formula is as follows:
[0085] In the formula, Original sample The loss function value in this iteration, Represents the original sample. Represents the original sample The corresponding m-th positive sample, Represents the original sample The total number of corresponding positive samples, Represents the original sample The corresponding nth negative sample, Represents the original sample The total number of corresponding negative samples, For temperature coefficient, For cosine similarity, This represents the first summation result. This represents the result of the second summation.
[0086] The technical solution provided in this disclosure uses a contrastive learning loss function as the loss function for training a text encoding model. By minimizing the loss function value and fine-tuning the model parameters, the optimized text encoder can effectively improve its semantic representation and discrimination capabilities for industrial and academic texts.
[0087] In one possible implementation, negative samples are obtained in the following way: For each original sample, calculate the similarity between the semantic vector of the original sample and the semantic vectors of the primary industry text paragraph and the subject text paragraph respectively. The primary industry text paragraph and the original sample do not belong to the same industry. For each original sample, from the semantic vectors corresponding to each primary industry text segment and each discipline text segment, select the text segment whose similarity to the semantic vector of the original sample is greater than a preset threshold as the negative sample corresponding to the original sample.
[0088] Specifically, in machine learning and natural language processing (NLP) tasks, negative samples are data samples that do not match the target or correct answer. They are typically used to train models to distinguish between correct and incorrect situations. In contrastive learning frameworks (such as SimCSE), negative samples play a particularly important role in helping models better identify dissimilar samples, thereby improving model performance.
[0089] This disclosure provides a technical solution for selecting difficult negative samples from regular negative samples and applying them to each round of iterative training.
[0090] Negative samples are obtained in the following ways: For each original sample, the primary industry text paragraph and the subject text paragraph are regular negative samples. The similarity between the semantic vector of the original sample and the semantic vectors corresponding to the primary industry text paragraph and the subject text paragraph is calculated respectively. The primary industry text paragraph and the original sample do not belong to the same industry.
[0091] For each original sample, from the semantic vectors corresponding to each primary industry text segment and each discipline text segment, select the text segment whose similarity to the semantic vector of the original sample is greater than a preset threshold as the negative sample corresponding to the original sample. The preset threshold can be determined according to actual needs.
[0092] That is, text segments with a similarity greater than a preset threshold between their semantic vectors and those of the original samples are selected from the regular negative samples as difficult negative samples, and only difficult negative samples are used for training.
[0093] For example, suppose in the current batch of training, a text segment A from the new energy vehicle industry is selected as the original sample, and its semantic vector is obtained through encoding. The set of sub-segments used in this round of iterative training... Text paragraphs from other industries are extracted from the overall paragraph set as the primary industry text paragraphs. Simultaneously, text paragraphs from various disciplines are extracted. The semantic vector similarity between the original sample A and each primary industry text paragraph and each discipline text paragraph is calculated. A preset threshold of 0.7 is set, and text paragraphs with a similarity greater than 0.7 are selected as negative samples.
[0094] The technical solution provided in this disclosure adds a "difficult negative sample mining" step. By calculating similarity, paragraphs that are semantically similar to the original samples but are actually different are selected as negative samples. This makes the negative samples used during training difficult negative samples that are semantically "confusing" with the original samples. This allows the model to learn to distinguish difficult negative samples, enabling the model to learn more refined and deeper semantic features, improve the model's accuracy in judging boundaries, and thus generate text vector representations with higher discriminative power and better quality.
[0095] In one possible implementation, the degree of correlation between industries and disciplines is obtained based on the similarity of all paragraphs to their respective corresponding pairs, including: For each industry text paragraph, calculate the average similarity of each paragraph pair corresponding to the industry text paragraph to obtain the degree of correlation between the industry text paragraph and the discipline; Calculate the average degree of correlation between the text paragraphs corresponding to each industry and the discipline, and obtain the degree of correlation between industries and disciplines.
[0096] Specifically, in this embodiment of the disclosure, an industry corresponds to multiple industry text paragraphs, and a discipline corresponds to multiple discipline text paragraphs. After obtaining the similarity of each paragraph pair, for each industry text paragraph, the average similarity of each paragraph pair corresponding to the industry text paragraph is calculated to obtain the degree of association between the industry text paragraph and the discipline.
[0097] Furthermore, the average correlation between the text paragraphs corresponding to each industry and the discipline is calculated to obtain the correlation between industries and disciplines.
[0098] For example, the industry The corresponding industry text paragraph is denoted as ,discipline The corresponding text paragraph of any subject is denoted as Industry text paragraph With subject text paragraphs Paragraph pairs The similarity of paragraph pairs is denoted as... .
[0099] For each industry text paragraph ,exist K Each paragraph is related to the industry-related text paragraph, and the industry-related text paragraph is related to the discipline. degree of correlation between It is calculated using the following formula:
[0100] industry correspond H A paragraph about an industry, industry and disciplines degree of correlation between It is calculated using the following formula:
[0101] The technical solution provided in this disclosure adopts a "two-layer aggregation" calculation path. First, it calculates the degree of association between each industry text paragraph and the entire discipline by using the similarity of each paragraph pair. Then, based on the degree of association between all industry text paragraphs and the discipline, it calculates the degree of association between the industry and the discipline. This calculation method, from fine-grained to overall, can effectively capture the rich and complex association between the industry and the discipline, and improves the interpretability of quantifying the degree of association between the industry and the discipline.
[0102] In one possible implementation, the average similarity of each paragraph pair corresponding to the industry text paragraph is calculated to obtain the degree of correlation between the industry text paragraph and the discipline, including: Based on the similarity of each paragraph pair corresponding to the industry text paragraph, select the preset number of paragraph pairs with the highest similarity from each paragraph pair as the target paragraph pairs; Calculate the average similarity of each target paragraph to obtain the degree of correlation between industry text paragraphs and disciplines.
[0103] Specifically, this disclosure also provides a method for calculating the correlation between industry text paragraphs and disciplines by filtering and constraining subject-specific text paragraphs.
[0104] For each industry text paragraph, based on the similarity of each paragraph pair corresponding to that industry text paragraph, a preset number of paragraph pairs with the highest similarity are selected as target paragraph pairs. The preset number can be set according to actual needs.
[0105] Understandably, for each industry text paragraph, the number of paragraph pairs corresponding to that industry paragraph is the same as the number of subject text paragraphs. Only the preset number of subject text paragraphs with the highest similarity to the industry text paragraph are retained for subsequent association degree calculation, and the remaining similarity results are not included in subsequent calculations.
[0106] Based on the filtered target paragraph pairs, the average similarity of each target paragraph pair is calculated to obtain the degree of correlation between industry text paragraphs and disciplines.
[0107] In the technical solution provided by this disclosure, for each industry text paragraph, only a preset number of subject text paragraphs with the highest similarity are retained, and the remaining similarity results are not included in the subsequent calculation. This can reduce the interference of irrelevant subject text paragraphs on the subsequent correlation degree calculation and prevent the problem of similarity dilution caused by uneven number of text paragraphs.
[0108] In one possible implementation, the first set of industry segments and the second set of discipline segments are obtained, including: The names of industries are augmented using a large language model to obtain industry text describing the industries; the names of disciplines are augmented using a large language model to obtain discipline text describing the disciplines. The industry text is split into multiple industry text paragraphs to obtain the first paragraph set of the industry, and the discipline text is split into multiple discipline text paragraphs to obtain the second paragraph set of the discipline.
[0109] Specifically, in this embodiment, a two-stage processing method of "global generation + local decomposition" is adopted to obtain text segments.
[0110] The names of industries are augmented using a large language model to obtain industry texts describing the industries. Similarly, the names of disciplines are augmented using the same large language model to obtain discipline texts describing the disciplines. The number of augmented industry texts and discipline texts can be determined according to actual needs.
[0111] Augmentation processing refers to constructing prompts to instruct a large language model to generate corresponding descriptive text. In practical applications, the type of large language model and the prompts can be set according to actual needs. For example, for the industry name "new energy vehicle industry", the prompts can be constructed as follows: "Please describe in detail the definition, core technologies, industrial chain composition and development trends of the new energy vehicle industry, and generate descriptive text of no less than 500 words."
[0112] The generated industry text is split into multiple industry text paragraphs to obtain the first paragraph set of the industry, and the generated subject text is split into multiple subject text paragraphs to obtain the second paragraph set of the subject.
[0113] For example, for industrial clusters Every industry in and subject collection Each subject in Each of these processes is augmented to obtain the industry text. and subject texts .
[0114]
[0115] in, Expand() This indicates that the description of disciplines is extended through generative large language models. or industry .
[0116] The expanded text is semantically divided into multiple text segments, each representing a portion of semantic information from an industry or discipline. The industry text segment is denoted as... Subject-specific text paragraphs are denoted as .
[0117] For the industry ,include t The industry text of a text paragraph It can be represented as:
[0118] For the discipline ,include o Subject text of each text paragraph It can be represented as:
[0119] The industries that will be expanded Each corresponding industry text is broken down into paragraphs to obtain the first paragraph set. Correspondingly, the augmented disciplines are... Each subject text is divided into paragraphs to obtain a second set of paragraphs.
[0120] It is understandable that a text paragraph is a unit divided according to the text content structure and semantic logic. Long texts can be split into independent text paragraphs by recognizing line breaks, paragraph indentation marks, and other methods.
[0121] To ensure the quality of the obtained text paragraphs, the split text paragraphs can be filtered. For example, extreme paragraphs with fewer than 30 or more than 500 characters can be removed, transitional paragraphs containing a large number of meaningless conjunctions can be eliminated, and text paragraphs that express complete semantic entities can be retained.
[0122] If a large language model is directly asked to generate text paragraphs, the model tends to output fragmented and isolated key points (such as only listing keywords), making it difficult to automatically construct a complete knowledge chain related to the industry or discipline. Furthermore, when directly generating independent text paragraphs, the model has difficulty coordinating the mutual exclusivity and complementarity between text paragraphs, which can easily lead to text paragraphs with repetitive content or logical conflicts, thus affecting the quality of the text paragraphs.
[0123] The embodiments disclosed herein enable the large language model to generate long texts, which can ensure the systematic nature of the global knowledge architecture during a single text generation process. This ensures that each paragraph is both relatively independent and interconnected, forming a multi-perspective and three-dimensional portrayal of industries and disciplines, covering all dimensions of industry or discipline features. Furthermore, logically coherent paragraph units are extracted through intelligent segmentation, avoiding the omission of key knowledge dimensions caused by direct segmentation.
[0124] The technical solution provided in this disclosure uses a two-stage process of "global generation + local decomposition" to retain the advantages of the continuity of long texts in large models, while obtaining the smallest semantic unit suitable for vector encoding through fine-grained decomposition, thus achieving a balance between the integrity of macro knowledge and the accuracy of micro semantics.
[0125] In one possible implementation, the industry text is used to describe at least one of the following: the relevant academic disciplines required by the industry, the skills required for the positions, and the academic categories of the main practitioners in the industry. The subject-specific text is used to describe at least one of the following: the employment direction of talents in the subject, the category of industries related to the subject, and the job requirements.
[0126] Specifically, in this embodiment of the disclosure, by limiting the "semantic dimension" that industry texts and discipline texts need to include, a large language model is used to perform targeted augmentation on the names of industries or disciplines.
[0127] Industry texts are used to describe at least one of the following: the relevant academic disciplines required for the industry, the skills required for the positions, and the academic categories of the main practitioners in the industry.
[0128] The subject-specific text is used to describe at least one of the following: the employment direction of talents in the subject, the category of industries related to the subject, and the job requirements.
[0129] For example, the prompt word "Prompt" generated by augmenting the industry label (i.e. the name of the industry) describes in detail the information related to the industry category and disciplines of "{industry_label}", especially listing relevant information on the relevant disciplines of the talents needed in the industry, the talents required for the positions, and the disciplines of the main practitioners in the industry.
[0130] The prompt word for generating descriptive text is to augment the subject label (i.e., the name of the subject). Based on the {desc} description of this "{discipline_label}" subject category, and combined with information related to the industry classification of this subject category, especially listing talent-related information in terms of talent employment direction, related industry categories, and job requirements, generate descriptive text for this subject.
[0131] The technical solution provided in this disclosure achieves targeted text augmentation by limiting the "semantic dimension" corresponding to industry text and subject text, so that industry text and subject text have an alignable descriptive dimension in the semantic space, thereby improving the accuracy and interpretability of similarity calculation.
[0132] Compared with the prior art, this disclosure has at least the following beneficial effects: It automates the process of mapping industries to disciplines, significantly reducing labor costs; it improves the semantic expressive power of short tags through text augmentation and paragraph-level modeling; it is applicable to emerging industries and interdisciplinary scenarios and has good scalability; the mapping results are quantifiable and sortable, facilitating system integration and decision support; and it has stronger robustness and stability compared to rule-based or keyword-based methods.
[0133] Figure 3 A schematic diagram of the structure of a device for obtaining the relationship between industry and discipline provided in this disclosure embodiment is shown below. Figure 3 As shown, another aspect of this disclosure provides an apparatus 30 for acquiring relationships between industries and disciplines, comprising: The text paragraph acquisition module 301 is used to obtain a first paragraph set of industries and a second paragraph set of disciplines. The first paragraph set includes industry text paragraphs used to describe the corresponding industries, and the second paragraph set includes discipline text paragraphs used to describe the corresponding disciplines. The semantic vector acquisition module 302 is used to encode each industry text paragraph and each discipline text paragraph according to the pre-trained text encoding model, so as to obtain the first semantic vector of each industry text paragraph and the second semantic vector corresponding to each discipline text paragraph. The similarity calculation module 303 is used to calculate the similarity between the first semantic vector and the second semantic vector corresponding to any paragraph pair consisting of any industry text paragraph and any discipline text paragraph; The correlation degree acquisition module 304 is used to obtain the correlation degree between industries and disciplines based on the similarity of each paragraph.
[0134] In one possible implementation, the text encoding model is generated as follows: Obtain the total paragraph set, which includes the first paragraph set of multiple sample industries and the second paragraph set of multiple sample disciplines; Based on the total set of paragraphs, the initial first model is trained iteratively for multiple rounds until the iteration stopping condition is met. The first model that meets the iteration stopping condition is used as the text encoding model. Each round of iterative training includes: Extract a first paragraph set from at least one sample industry and a second paragraph set from at least one sample discipline from the total paragraph set to obtain a sub-paragraph set; Based on the first model, obtain the semantic vector corresponding to each text paragraph in the sub-paragraph set; Each industry text segment in the sub-segment set is used as the original sample, and positive and negative samples corresponding to the original samples are obtained from the sub-segment set to obtain the training sample set. The training sample set includes multiple original samples and positive and negative samples corresponding to each original sample. The original sample and the positive sample corresponding to the original sample belong to the same industry. In the case where the negative sample is an industry text segment, the original sample and the negative sample corresponding to the original sample belong to different industries. Based on the semantic vectors of each sample in the training sample set, the loss function value for this iteration is obtained. The parameters of the first model in this iteration are then fine-tuned using the loss function value to obtain the first model for the next iteration.
[0135] In one possible implementation, the loss function value for the current iteration is obtained based on the semantic vectors of each sample in the training sample set, including: For each original sample, the original sample and any positive sample corresponding to the original sample form a positive sample pair, and the similarity between the semantic vectors corresponding to the positive samples is calculated. The original sample and any negative sample corresponding to the original sample form a negative sample pair, and the similarity between the semantic vectors corresponding to the negative samples is calculated. For each original sample, the similarity of each positive sample pair is exponentially transformed and summed to obtain the first summation result, and the similarity of each negative sample pair is exponentially transformed and summed to obtain the second summation result. For each original sample, the ratio of the first summation result to the total summation result is determined based on the first summation result and the second summation result. The negative logarithm of the ratio is calculated as the loss function value of the original sample in this iteration. The total summation result is the sum of the first summation result and the second summation result.
[0136] In one possible implementation, negative samples are obtained in the following way: For each original sample, calculate the similarity between the semantic vector of the original sample and the semantic vectors of the primary industry text paragraph and the subject text paragraph respectively. The primary industry text paragraph and the original sample do not belong to the same industry. For each original sample, from the semantic vectors corresponding to each primary industry text segment and each discipline text segment, select the text segment whose similarity to the semantic vector of the original sample is greater than a preset threshold as the negative sample corresponding to the original sample.
[0137] In one possible implementation, the degree of correlation between industries and disciplines is obtained based on the similarity of all paragraphs to their respective corresponding pairs, including: For each industry text paragraph, calculate the average similarity of each paragraph pair corresponding to the industry text paragraph to obtain the degree of correlation between the industry text paragraph and the discipline; Calculate the average degree of correlation between the text paragraphs corresponding to each industry and the discipline, and obtain the degree of correlation between industries and disciplines.
[0138] In one possible implementation, the average similarity of each paragraph pair corresponding to the industry text paragraph is calculated to obtain the degree of correlation between the industry text paragraph and the discipline, including: Based on the similarity of each paragraph pair corresponding to the industry text paragraph, select the preset number of paragraph pairs with the highest similarity from each paragraph pair as the target paragraph pairs; Calculate the average similarity of each target paragraph to obtain the degree of correlation between industry text paragraphs and disciplines.
[0139] In one possible implementation, the first set of industry segments and the second set of discipline segments are obtained, including: The names of industries are augmented using a large language model to obtain industry text describing the industries; the names of disciplines are augmented using a large language model to obtain discipline text describing the disciplines. The industry text is split into multiple industry text paragraphs to obtain the first paragraph set of the industry, and the discipline text is split into multiple discipline text paragraphs to obtain the second paragraph set of the discipline.
[0140] In one possible implementation, the industry text is used to describe at least one of the following: the relevant academic disciplines required by the industry, the skills required for the positions, and the academic categories of the main practitioners in the industry. The subject-specific text is used to describe at least one of the following: the employment direction of talents in the subject, the category of industries related to the subject, and the job requirements.
[0141] The apparatus of this disclosure embodiment can execute the method provided in this disclosure embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each disclosure embodiment correspond to the steps in the method of each disclosure embodiment. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0142] Furthermore, in this disclosure, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Moreover, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0143] This disclosure provides an electronic device (computer device / equipment / system) including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method provided in any optional embodiment of this disclosure and achieve the corresponding technical effects.
[0144] In one alternative embodiment, an electronic device is provided. Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as... Figure 4 As shown, the electronic device 40 includes a processor 401 and a memory 403. The processor 401 and the memory 403 are connected, for example, via a bus 402. Optionally, the electronic device 40 may further include a transceiver 404, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 404 is not limited to one type, and the structure of the electronic device 40 does not constitute a limitation on the embodiments of this disclosure.
[0145] Processor 401 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), a FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. Processor 401 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0146] Bus 402 may include a pathway for transmitting information between the aforementioned components. Bus 402 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 402 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0147] The memory 403 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0148] The memory 403 is used to store computer programs that execute embodiments of the present disclosure, and the execution is controlled by the processor 401. The processor 401 is used to execute the computer programs stored in the memory 403 to implement the steps shown in the foregoing method embodiments.
[0149] The electronic devices in this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable devices, and fixed terminals such as digital TVs and desktop computers.
[0150] This disclosure provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0151] This disclosure also provides a computer program product, including a computer program, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments and achieve the corresponding technical effects.
[0152] It should be noted that the computer-readable storage medium described above in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, gateway, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0153] In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used or combined with an instruction execution system, gateway, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
[0154] Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, gateway, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0155] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0156] The terms “first,” “second,” “third,” “fourth,” “1,” “2,” etc. (if present) in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in a sequence other than that shown in the figures or text.
[0157] It should be understood that although arrows indicate various operation steps in the flowcharts of the embodiments of this disclosure, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of the embodiments of this disclosure, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured as required, and the embodiments of this disclosure do not limit this.
[0158] The above description is only an optional implementation method for some implementation scenarios of this disclosure. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this disclosure without departing from the technical concept of this disclosure also fall within the protection scope of the embodiments of this disclosure.
Claims
1. A method for obtaining the relationship between industry and discipline, characterized in that, include: Obtain a first set of paragraphs for industries and a second set of paragraphs for disciplines. The first set of paragraphs includes industry text paragraphs describing the corresponding industries, and the second set of paragraphs includes discipline text paragraphs describing the corresponding disciplines. Each industry text paragraph and each discipline text paragraph are encoded according to a pre-trained text encoding model to obtain the first semantic vector of each industry text paragraph and the second semantic vector of each discipline text paragraph. For any pair of paragraphs consisting of an industry text paragraph and a discipline text paragraph, calculate the similarity between the first semantic vector and the second semantic vector corresponding to the paragraph pair; Based on the similarity of each paragraph, the degree of correlation between the industry and the discipline is obtained.
2. The method according to claim 1, characterized in that, The text encoding model is generated in the following way: Obtain the total paragraph set, which includes a first paragraph set of multiple sample industries and a second paragraph set of multiple sample disciplines; The initial first model is trained iteratively multiple times based on the total paragraph set until the iteration stopping condition is met. The first model that meets the iteration stopping condition is taken as the text encoding model. Each round of iterative training includes: From the total paragraph set, extract at least one first paragraph set of sample industries and at least one second paragraph set of sample disciplines to obtain a sub-paragraph set; Based on the first model, obtain the semantic vector corresponding to each text paragraph in the sub-paragraph set; Each industry text paragraph in the sub-paragraph set is used as an original sample, and positive and negative samples corresponding to the original samples are obtained from the sub-paragraph set to obtain a training sample set. The training sample set includes multiple original samples and positive and negative samples corresponding to each original sample. The original sample and the positive sample corresponding to the original sample belong to the same industry. When the negative sample is an industry text paragraph, the original sample and the negative sample corresponding to the original sample belong to different industries. Based on the semantic vectors of each sample in the training sample set, the loss function value for this iteration is obtained. The parameters of the first model in this iteration are then fine-tuned using the loss function value to obtain the first model for the next iteration.
3. The method according to claim 2, characterized in that, The step of obtaining the loss function value for this iteration based on the semantic vectors of each sample in the training sample set includes: For each original sample, the original sample and any positive sample corresponding to the original sample form a positive sample pair, and the similarity between the semantic vectors corresponding to the positive samples is calculated. The original sample and any negative sample corresponding to the original sample form a negative sample pair, and the similarity between the semantic vectors corresponding to the negative samples is calculated. For each original sample, the similarity of each positive sample pair is exponentially transformed and summed to obtain the first summation result, and the similarity of each negative sample pair is exponentially transformed and summed to obtain the second summation result. For each original sample, the ratio of the first summation result to the total summation result is determined based on the first summation result and the second summation result. The negative logarithm of the ratio is calculated as the loss function value of the original sample in this iteration. The total summation result is the sum of the first summation result and the second summation result.
4. The method according to claim 2, characterized in that, The negative samples were obtained in the following way: For each original sample, the similarity between the semantic vector of the original sample and the semantic vectors corresponding to the first industry text paragraph and the subject text paragraph is calculated respectively, wherein the first industry text paragraph and the original sample do not belong to the same industry; For each original sample, from the semantic vectors corresponding to each primary industry text segment and each discipline text segment, text segments with a similarity greater than a preset threshold to the semantic vectors of the original sample are selected as negative samples corresponding to the original sample.
5. The method according to any one of claims 1-4, characterized in that, The step of obtaining the degree of correlation between the industry and the discipline based on the similarity of all paragraphs includes: For each industry text paragraph, calculate the average similarity of each paragraph pair corresponding to the industry text paragraph to obtain the degree of association between the industry text paragraph and the discipline; Calculate the average degree of correlation between the text paragraphs corresponding to the industry and the discipline, and obtain the degree of correlation between the industry and the discipline.
6. The method according to claim 5, characterized in that, The calculation of the average similarity of each paragraph pair corresponding to the industry text paragraph, to obtain the degree of association between the industry text paragraph and the discipline, includes: Based on the similarity of each paragraph pair corresponding to the industry text paragraph, a preset number of paragraph pairs with the highest similarity are selected as target paragraph pairs from each paragraph pair; Calculate the average similarity of each target paragraph to obtain the degree of correlation between the industry text paragraph and the discipline.
7. The method according to claim 5, characterized in that, The first set of industry segments and the second set of discipline segments include: The name of the industry is augmented using a large language model to obtain industry text describing the industry; the name of the discipline is augmented using the same large language model to obtain discipline text describing the discipline. The industry text is split into multiple industry text paragraphs to obtain the first paragraph set of the industry, and the discipline text is split into multiple discipline text paragraphs to obtain the second paragraph set of the discipline.
8. The method according to claim 7, characterized in that, The industry text is used to describe at least one of the following: the relevant academic disciplines required for the industry, the skills required for the positions, and the academic categories of the main practitioners in the industry. The subject-specific text is used to describe at least one of the following: the employment direction of talents in the subject, the category of industries related to the subject, and the job requirements.
9. A device for acquiring the relationship between industry and discipline, characterized in that, include: The text paragraph acquisition module is used to obtain a first paragraph set for industries and a second paragraph set for disciplines. The first paragraph set includes industry text paragraphs describing the corresponding industries, and the second paragraph set includes discipline text paragraphs describing the corresponding disciplines. The semantic vector acquisition module is used to encode each industry text paragraph and each discipline text paragraph according to the pre-trained text encoding model, so as to obtain the first semantic vector of each industry text paragraph and the second semantic vector of each discipline text paragraph. The similarity calculation module is used to calculate the similarity between the first semantic vector and the second semantic vector of any paragraph pair consisting of any industry text paragraph and any discipline text paragraph; The correlation degree acquisition module is used to obtain the correlation degree between industries and disciplines based on the similarity of each paragraph.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-8.