BERT-based intelligent position recommendation method

Through the intelligent job recommendation method based on BERT, the problem that traditional job recommendation methods cannot fully consider students' personalized needs is solved, and multi-dimensional information matching is achieved, which significantly improves the accuracy and recall rate of recommendations and enhances the interview success rate.

CN119293343AInactive Publication Date: 2025-01-10ZHENGFANG SOFTWARE CO LTD

Patent Information

Application Number
CN202411826637.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-01-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional job recommendation methods cannot fully consider students' personalized needs, resulting in inaccurate recommendation results and it is difficult to adapt to multi-dimensional career choice needs.

Method used

Using BERT-based intelligent job recommendation method, through screening, filling, feature analysis, data transformation and model training of student employment data, the BERT model's natural language understanding ability is used to match multi-dimensional information, and positions that meet students' career goals are recommended.

Benefits of technology

It significantly improves the recall and accuracy of recommended results, enhances the targetedness of the interview, and improves the success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293343A_ABST
    Figure CN119293343A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent position recommendation method based on BERT. The method specifically comprises the following steps: performing data screening, data filling, feature analysis, data sampling and data conversion processing on employment data of original students; personalized information of students is converted into a natural language text form, and corresponding labels are marked according to original employment data, so that the data can be used for training a text classification model; dividing the processed data into a training set and a test set according to a proportion of 8: 2, and carrying out training, testing and verification by utilizing a pre-trained bert-based-history model; the mapping relation between the employer industry and the position is preset, and the corresponding position is recommended according to the output of the model; the effectiveness of the method is proved by comparing experimental results of other models under the same data. The method has the advantages that the recall rate and accuracy of recommendation results are improved, interview pertinence is enhanced, and the success rate is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field related to natural language processing, and in particular to an intelligent job recommendation method based on BERT. Background Art

[0002] In the direction of intelligent job recommendations, accurate matching based on students’ personalized information is particularly critical. Traditional recruitment methods often fail to fully consider students’ personalized needs, resulting in limited recommendation results.

[0003] With the rapid development of artificial intelligence and big data technology, intelligent job recommendation systems have become an important tool for modern recruitment. Traditional job recommendation methods usually rely on manual screening and matching, which often fail to fully consider the personalized needs of students, including their professional background, interests, career development direction, etc., resulting in low accuracy and effectiveness of recommendations. This matching method based on a single factor is difficult to adapt to the multi-dimensional and complex career selection needs.

[0004] In recent years, intelligent recommendation systems based on machine learning and natural language processing (NLP) have gradually begun to be applied in the recruitment field, using students' personalized data for analysis and modeling to improve the accuracy of job recommendations. Summary of the invention

[0005] The present invention aims to overcome the above-mentioned deficiencies in the prior art and provides a BERT-based intelligent job recommendation method that can improve the accuracy of recommendation.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions: An intelligent job recommendation method based on BERT specifically includes the following steps: (1) Data screening, data filling, feature analysis, data sampling, and data conversion are performed on the original student employment data. In the sampling part, the data is upsampled and downsampled by using replication and random discarding respectively. In the data conversion part, the student’s personalized information is converted into natural language text and labeled accordingly according to the original employment data, so that the data can be used to train the text classification model. (2) The processed data is divided into training set and test set in a ratio of 8:2, and the pre-trained BERT-Base-Chinese model is used for training, testing and verification. In the test part, the output of the model is the employer industry, and the mapping relationship between the employer industry and the position is pre-set. The corresponding position is recommended according to the output of the model. The specific method of data segmentation is: (21) Read all the data rows from the text file obtained from the data conversion. Each row of data contains two parts separated by a space. The first half is the output label, which represents the category to which the row of data belongs, and the second half is the text in natural language form. Then, initialize a dictionary, where the key of the dictionary stores the output label and the value of the dictionary stores the row data. Then traverse all the data rows, parse the row data, and add it to the dictionary. (22) Initialize the training set and test set: traverse each output label and the corresponding label group data, use the shuffle algorithm to randomly shuffle the current group data, calculate the position of the split point according to the ratio of 8:2, add the data before the split point to the training set, and add the data after the split point to the test set; among them, the shuffle algorithm is used to randomly shuffle the given list data, and the steps are as follows: Assume that n is the length of the data list data; first, start from the last element of the list and traverse forward to the second element. For each index i, perform the following operations: generate a random number j between 0 and i; swap the positions of data[i] and data[j] to ensure that each element can be randomly swapped to another position in the list; after the traversal, return the shuffled data list; (23) Use the shuffling algorithm again to randomly shuffle the data of the training set and test set; (3) Compare the experimental results of other models under the same data to prove the effectiveness of the BERT-based intelligent job recommendation method.

[0007] Among them, the BERT (Bidirectional Encoder Representations from Transformers) model has become an effective recommendation tool with its powerful natural language understanding capabilities. By analyzing the employment information data of students in previous years, the intelligent system can achieve multi-dimensional information matching, thereby providing students with recommendation results that are more in line with their career goals. This recommendation method based on deep learning significantly improves the recall rate and accuracy of recommendation results. By analyzing personalized data, the intelligent recommendation system can provide students with job options that are more in line with their career development direction, thereby significantly improving the accuracy of recommendations, enhancing the pertinence of interviews, and increasing the success rate.

[0008] Preferably, in step (1), for data screening, the original student employment information data is a table in csv format, and sensitive information and useless information need to be filtered out; for data filling, since the model will eventually use the data in the "employer industry" column as the output label column, the data in this column cannot be empty. If this column in the original student employment information data is empty, after the label grouping statistics of the output label column, the "employer industry" column with the largest number of label grouping data is used to fill it.

[0009] Preferably, in step (1), for feature analysis, each column of data after filling is encoded, an index table is established, and the "employer industry" column is converted into a corresponding code according to the index table. After the encoding is completed, a relationship diagram is drawn between the other columns and the "employer industry" column. Through the above feature analysis, the correlation between the other columns and the "employer industry" column is found, and several columns of data with the highest correlation with the "employer industry" column are retained; wherein, the encoding work is performed on each column of data after filling using a label encoding algorithm, and the label encoding algorithm is used to label encode a list series and convert it into a unique value array and a corresponding encoding array. The specific steps are as follows: First, initialize two empty arrays: one is the array uniques for storing unique values, and the other is an empty array codes with the same size as the input list, which is used to store the encoding results; at the same time, initialize a dictionary value_to_index to map each unique value to its index position in uniques; Then, iterate over each element value in the input list series: for each element value, if the element does not already appear in the dictionary value_to_index, add it to the uniques array and store its position index in the uniques dictionary value_to_index; Next, use the index as the code of the element and store it in the corresponding position of the codes array; if the element already exists in the dictionary, get its corresponding index directly from the dictionary and fill the index into the codes array; Finally, after the traversal is completed, a tuple (codes, uniques) is returned, where codes is the encoding array corresponding to each element in the input list, and uniques is the array of unique values ​​in the input list.

[0010] Preferably, in step (1), for data sampling, before performing the data sampling operation, the data distribution of the employer industry is counted and label data is established, wherein data that is not helpful for job recommendation is directly filtered out, and data with only single digits is also filtered out; after processing, the data distribution of each label is re-counted, and for label groups with a number less than the target sampling number, these data are up-sampled by replication, and for label groups with a number not less than the target sampling number, these data are down-sampled by random discarding.

[0011] Preferably, the upsampling operation is as follows: assuming that the number of A groups is K and the target number of samples is N, the data of A group is copied T times. If the number of A groups is less than N after T times of copying, the first N-KT data of A group is copied again. The specific value formula of T is: The downsampling operation is as follows: Assuming that the number of B groups is P and the target sampling number is N, N data are randomly selected from the data of B group, and the rest of the data are directly discarded; wherein, random selection is used to randomly select N non-repeating data items from a given data list P, and the specific steps are as follows: First, initialize two empty arrays: data is used to store randomly selected data, and indices is used to record the selected index values; Then, enter the loop and repeat the following steps until the number of selected data items reaches N: randomly generate an index index in the range of 0 to Length(P) - 1; if the index index does not yet appear in indices, add the data corresponding to P[index] to the data array, and add the index to the indices array to ensure that the data will not be selected repeatedly in the future; when the number of elements in the data array reaches N, stop the loop and return the data array.

[0012] Preferably, in step (1), for data conversion, since the model receives training data of natural language type, it is necessary to convert the data in csv format into data of natural language type before training the model; specifically, the training data is stored in txt format, and each line of the txt file represents a training data. The data consists of two parts, one is the output label of the model, corresponding to the data of the "employer industry" column, and the other is a short text of natural language type, which is converted from other column data obtained according to correlation after feature analysis.

[0013] Preferably, in step (2), BERT captures the previous and next information of the text from the context simultaneously through a bidirectional Transformer structure to generate a deep semantic representation; in the short text classification task, BERT first performs word segmentation on the input text, then embeds it into the model and extracts the feature vector; the model is a BERT-based text classifier that uses a pre-trained bert-base-chinese model; the classifier is based on the output of BERT's [CLS] and performs category prediction through a fully connected layer and a softmax function.

[0014] Preferably, in step (2), the specific process of training is: (a) Loading training data: Load training data from the segmented training set file. The data in the training set consists of two columns, namely output label and text; (b) Model training: set the model’s hyperparameters and enable CUDA to accelerate the training; (c) Save the model: After training is completed, the model will be saved to the specified output directory for subsequent loading and use.

[0015] Preferably, in step (2), the specific process of the test is as follows: a number of samples are randomly selected from the test set for prediction, and after obtaining the output label with the highest probability, the corresponding position is recommended according to the mapping relationship between the employer's industry and the position; wherein, the mapping relationship between the employer's industry and the position is established by first using the LLM large model to generate an initial mapping relationship, and then comparing it with the information on mainstream recruitment websites to form a final mapping relationship.

[0016] The beneficial effects of the present invention are: it can achieve multi-dimensional information matching, thereby providing students with recommendation results that are more in line with their career goals, significantly improving the recall rate and accuracy of the recommendation results, and providing students with job options that are more in line with their career development direction, thereby significantly improving the accuracy of recommendations, enhancing the pertinence of interviews, and increasing the success rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a flow chart of the method of the present invention; Figure 2 is the gender and employer industry distribution diagram of the present invention; Figure 3 is the age and employer industry distribution diagram of the present invention; Figure 4 The names of the places of origin of the students and the industry distribution map of the employers of the present invention; Figure 5 It is a distribution map of the departments and employers of the present invention; Figure 6It is the distribution map of professions and employers in the present invention; Figure 7 It is the learning curve of the model of the present invention under the training data. DETAILED DESCRIPTION

[0018] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0019] like Figure 1 In the above-mentioned implementation, a BERT-based intelligent job recommendation method specifically includes the following steps: (1) Data processing such as data screening, data filling, feature analysis, data sampling, and data conversion are performed on the original student employment data to ensure the quality and validity of the data. In particular, in the sampling part, the data is upsampled and downsampled using replication and random discarding respectively; in the data conversion part, the student's personalized information is converted into natural language text and labeled accordingly according to the original employment data, so that the data can be used to train the text classification model.

[0020] (11) Data screening: The original student employment information data is a table in csv format, which counts the employment information of college graduates from 2021 to 2023, with a total of 15,992 data; including student number, name, gender code, gender name, age, date of birth, name of place of origin, code of place of origin, ethnic name, ethnic code, urban and rural place of origin, academic level, academic code, school system code, school system, department, major code, school major, Ministry of Education major, class, admission time, graduation time, graduation year, graduation destination, employer name, employer code, nature of employer, employer industry, employer location, employer location code, and job position category.

[0021] It is necessary to filter out sensitive information and useless information; specifically: filter out some sensitive information, such as student ID, name, date of birth; at the same time, filter out some useless information, such as data with an empty "Graduation Destination" column, and data with words such as "Waiting for employment", "Not employed and planning to continue studying", "Other not employed yet - not employed yet" in the "Graduation Destination" column.

[0022] (12) Data filling: Since the model will eventually use the data in the "Employer Industry" column as the output label column, the data in this column cannot be empty. If this column is empty in the original student employment information data, after the label grouping statistics of the output label column, the "Employer Industry" column with the largest number of label grouping data is used to fill it.

[0023] Specifically, when this column is empty in the original data, considering the data in the "Employer Industry" column after grouping statistics (as shown in Table 1 below), the number of grouped data in "Accommodation and Catering Industry" is the largest. The subsequent sampling operation will randomly discard the data with a large number of groups. In order to reduce the impact of data filling on model training, for the data with empty "Employer Industry", we directly use "Accommodation and Catering Industry" to fill it.

[0024] (13) Feature analysis: Encode the data in each column after filling, establish an index table, and convert the "employer industry" column into the corresponding code according to the index table. After the encoding is completed, draw a relationship diagram between other columns and the "employer industry" column. Through the above feature analysis, find the correlation between other columns and the "employer industry" column, and retain the columns with the highest correlation with the "employer industry" column. The details are as follows: First, the corresponding data was encoded. For the "place of origin" column, the area within the province where the school is located is coded as 0, and the area outside the province where the school is located is coded as 1. For the "department" and "school major" columns, label encoding is used (the pseudo code of the label encoding algorithm is shown below).

[0025]

[0026] The label encoding algorithm is used to perform label encoding on a list (series), converting it into an array of unique values ​​and a corresponding encoding array. The specific steps are as follows: First, initialize two empty arrays: one is the array uniques for storing unique values, and the other is an empty array codes of the same size as the input list, which is used to store the encoding results. At the same time, initialize a dictionary value_to_index to map each unique value to its index position in uniques.

[0027] Then, we iterate over each element in the input list series: For each element value, if the element does not appear in the dictionary value_to_index, add it to the uniques array and store its position index in the uniques dictionary value_to_index. Then, store the index as the code of the element in the corresponding position of the codes array.

[0028] If the element already exists in the dictionary, get its corresponding index directly from the dictionary and fill the index into the codes array.

[0029] After the traversal is completed, a tuple (codes, uniques) is returned, where codes is the encoding array corresponding to each element in the input list, and uniques is the unique value array in the input list. The result of this algorithm is to uniquely encode all elements in the input list in the order in which they appear, and return the encoded array and the corresponding unique value list.

[0030] For the "Employer Industry" column, an index table is first established, and then the "Employer Industry" column is converted into the corresponding code according to the index table. The specific content of the index table is as follows: "Transportation, warehousing and postal services": 0, "Accommodation and catering": 1, "Information transmission, software and information technology services": 2, "Public administration, social security and social organizations": 3, "Agriculture, forestry, animal husbandry and fishery": 4, "Manufacturing": 5, "Further study - from junior college to ordinary undergraduate": 6, "Health and social work": 7, "Study abroad": 8, "Residential services, repairs and other services": 9, "Conscripted soldiers": 10, "Construction": 11, "Real estate": 12, "Wholesale and retail": 13, "Education": 14, "Culture, sports and entertainment": 15, "Water conservancy, environment and public facilities management": 16, "Electricity, heat, gas and water production and supply": 17, "Scientific research and technical services": 18, "Leasing and business services": 19, "Mining": 20, "Financial industry": 21.

[0031] After the coding is completed, relationship diagrams are drawn for the columns of "gender name", "age", "place of origin", "department", "school major" and "employer industry", such as Figure 2 , Figure 3 , Figure 4 , Figure 5 , Figure 6 As shown. Figure 2 It can be seen that the overall number of girls is greater than that of boys, and in most industries, the number of girls is also greater than that of boys. Among all industries, the number of girls in the "accommodation and catering industry" is the largest. Figure 3 It can be seen that most of the data are between the ages of 20 and 25, with the largest number of graduates aged 22, and there are differences in the industries chosen by people of different ages. Figure 4 It can be seen that the number of graduates from the province where the school is located is significantly greater than that from outside the province, and the industry choices of graduates from within and outside the province are completely different. Figure 5 It can be seen that College 5 and College 7 have the largest number of graduates, while the number of graduates from other colleges is relatively balanced. Figure 6It can be seen that the proportion of industries chosen by graduates of different majors is different. For example, the largest number of graduates from major 5 choose industry 11, and the largest number of graduates from major 11 choose industry 6.

[0032] Through the above feature analysis, we found that the "Gender Name", "Age", "Place of Origin Name", "Department", "School Major" and "Employer Industry" columns have a large correlation, so we retained the data in the "Gender Name", "Age", "Place of Origin Name", "Department", "School Major" and "Employer Industry" columns.

[0033] (14) Data sampling: Before data sampling, the data distribution of employers’ industries was counted and label data was established. There are 22 label data in total, namely, “transportation, warehousing and postal services”, “accommodation and catering services”, “information transmission, software and information technology services”, “public administration, social security and social organizations”, “agriculture, forestry, animal husbandry and fishery”, “manufacturing”, “upgrading from junior college to ordinary undergraduate”, “health and social work”, “studying abroad”, “resident services, repairs and other services”, “conscripted soldiers”, “construction”, “real estate”, “wholesale and retail”, “education”, “culture, sports and entertainment”, “water conservancy, environment and public facilities management”, “electricity, heat, gas and water production and supply”, “scientific research and technical services”, “leasing and business services”, “mining” and “financial services”.

[0034] The data that are not helpful for job recommendation are directly filtered out, and the data with only single digits are also filtered out; for example, the data of "further study - junior college to ordinary undergraduate" and "study abroad" are not helpful for job recommendation, so they are directly filtered out. The data of "enlistment" has only one piece of data, which is also filtered out. After processing, the data distribution of each label is re-counted, as shown in Table 1. For the label groups with a number less than the target sampling number (1000), these data are upsampled by replication, and for the label groups with a number not less than the target sampling number (1000), these data are downsampled by random discarding.

[0035] Table 1: Label data grouping

[0036] The upsampling operation is as follows: Assuming that there are K groups in group A and the target sampling number is N, the data of group A is copied T times. If there are still less than N after copying T times, the first N-KT data of group A (recorded as M) is taken and copied again. The specific formula for the value of T is: .

[0037] The downsampling operation is as follows: Assuming that the number of B groups is P and the target sampling number is N, N data are randomly selected from the data of B group (the pseudo code of the random selection algorithm is shown below), and the rest of the data is directly discarded.

[0038]

[0039] The random selection algorithm is used to randomly select N non-repeating data items from a given data list P. The steps are as follows: First, initialize two empty arrays: data is used to store randomly selected data, and indices is used to record the selected index values.

[0040] Then, enter the loop and repeat the following steps until the number of selected data items reaches N: Randomly generate an index index in the range of 0 to Length(P) - 1.

[0041] If the index index does not appear in indices, the data corresponding to P[index] is added to the data array, and the index is added to the indices array to ensure that the data will not be selected repeatedly later.

[0042] When the number of elements in the data array reaches N, stop the loop and return the data array.

[0043] The algorithm ensures that the N data randomly selected from the data list P are not repeated by recording the selected index.

[0044] In the present invention, N is equal to 1000, K is less than 1000, and P is greater than 1000. Regarding the selection of the target sampling number, three cases of 500, 1000, and 1500 were tested at the same time, and it was found that when the target sampling number was 1000, the model was easier to converge.

[0045] (15) Data conversion: Since the BERT model receives training data in natural language format, it is necessary to convert the data in csv format into natural language data before training the model. Specifically, the training data is stored in txt format. Each line of the txt file represents a training data. The data consists of two parts. One part is the output label of the model, which corresponds to the data in the "employer industry" column. The other part is a short text of natural language type, which is converted from other column data obtained based on correlation after feature analysis, that is, from feature column data such as "gender name", "age", "place of origin", "department", and "school major".

[0046] The template for data conversion is as follows: I am a {gender name} student from {place of origin}, I am {age} years old, and graduated from {department} {school major} If the data in Table 2 is used as input, the data after conversion is shown in Table 3.

[0047] Table 2: Data before conversion

[0048] Table 3: Data after conversion

[0049] (2) The processed data is divided into training set and test set in a ratio of 8:2, and the pre-trained BERT-Base-Chinese model is used for training, testing and verification. In the test part, the output of the model is not the recommended position, but the employer industry. The mapping relationship between the employer industry and the position is pre-set, so that the corresponding position can be recommended based on the output of the model.

[0050] The specific method of data segmentation is: (21) Read all the data rows from the txt file obtained from the data conversion. Each row of data contains two parts separated by spaces. The first half is the output label, which represents the category to which the row of data belongs, and the second half is the text in natural language form. Then, initialize a dictionary, where the key of the dictionary stores the output label and the value of the dictionary stores the row data. Then traverse all the data rows, parse the row data, and add it to the dictionary. (22) Initialize the training set and test set: traverse each output label and the corresponding label group data, use the shuffle algorithm to randomly shuffle the current group data (the pseudo code of the random shuffle algorithm is shown below), calculate the position of the split point according to the ratio of 8:2, add the data before the split point to the training set, and add the data after the split point to the test set;

[0051] The random shuffle algorithm is used to randomly shuffle the given list data. The steps are as follows: Assume n is the length of the data list data.

[0052] First, start at the last element of the list (index n-1) and traverse forward until you get to the second element (index 1). For each index i, do the following: Generate a random number j between 0 and i (that is, the current index and before). Swap the positions of data[i] and data[j], making sure that each element can be randomly swapped to another position in the list.

[0053] After the traversal is completed, the shuffled data list is returned.

[0054] (23) Use the shuffling algorithm again to randomly shuffle the data of the training set and test set.

[0055] By splitting the data set in this way, we can ensure that different labels can maintain corresponding proportions in the training set and the test set, avoid the data of certain labels being concentrated in a certain set, and the final training set and test set data are disordered, ensuring that the training of the model will not be affected by the order.

[0056] The model training is as follows: BERT (Bidirectional Encoder Representations from Transformers) short text classifier is a classification method based on a pre-trained language model, which is widely used in classification tasks in natural language processing. BERT captures the previous and next information of the text from the context simultaneously through a bidirectional Transformer structure to generate a deep semantic representation. In the short text classification task, BERT first performs word segmentation on the input text, then embeds it into the model and extracts the feature vector. The classifier is based on the output of BERT's [CLS] (classification label), and performs category prediction through a fully connected layer and a softmax function.

[0057] The model used in this invention is a BERT-based text classifier, which is particularly good at handling short text classification tasks. This classifier uses the pre-trained bert-base-chinese, which is better at handling Chinese text classification problems. The following is the specific process of model training: (a) Loading training data: Load training data from the segmented training set file. The data in the training set consists of two columns, namely output label and text; (b) Model training: Set the model's hyperparameters and enable CUDA to accelerate the training; the model's hyperparameters mainly include batch size and number of training epochs.

[0058] Ideally, the number of epochs should be large enough so that the model can gradually reduce the loss in each iteration until the loss function is close to convergence. However, as the number of epochs increases, the model may fall into a local optimum, especially in the case of high-noise training data, which may lead to overfitting. According to the stochastic gradient descent (SGD) method, a smaller batch_size provides a higher gradient update frequency, making the model learn more frequently, although there is more noise, which may help the model jump out of the local optimal solution. A larger batch_size provides a more accurate gradient estimate, but it may fall into a local optimal solution and is not easy to escape.

[0059] We tried to set batch_size to one of {8, 32, 128} and epochs to one of {5, 10, 20, 30, 50}, and found that when batch_size was 128 and epochs was 30, the Loss convergence value was the smallest and the training effect was the best (the learning curve is shown in Figure 7 as shown).

[0060] (c) Save the model: After training is completed, the model will be saved to the specified output directory for subsequent loading and use.

[0061] The specific process of the test is: Three samples are randomly selected from the test set for prediction. The samples are: "I am a girl from City A, 20 years old, graduated from the School of Art with a major in flight attendant", "I am a girl from City C, 22 years old, graduated from the School of Tourism Planning and Design with a major in exhibition planning and management", "I am a boy from City D, 21 years old, graduated from the School of Tourism Planning and Design with a major in smart scenic spot development and management".

[0062] The prediction results are: predict_label:["Transportation, warehousing and postal industry", "Financial industry", "Water conservancy, environment and public facilities management industry"], predict_proba:[0.9969719159660531, 0.9990466357157275, 0.9955100355369314], where predict_label is the employer industry label predicted for the input text, and predict_proba is the probability of predicting the label.

[0063] After obtaining the output label with the highest probability, the corresponding position is recommended according to the mapping relationship between the employer industry and the position (as shown in Table 4); for example, when the output label is "accommodation and catering industry", the two positions of hotel operation management and front desk receptionist will be recommended. Among them, the mapping relationship between the employer industry and the position is first generated using the LLM large model to generate the initial mapping relationship, and then compared with the information on the mainstream recruitment website to form the final mapping relationship, as shown in Table 4.

[0064] Table 4: Employer industry and position mapping table

[0065] (3) By comparing the experimental results of other models such as RNN and FastText under the same data, the effectiveness of the BERT-based intelligent job recommendation method is proved, and the performance is greatly improved compared with traditional algorithms.

[0066] Five evaluation indicators are used to verify the test data. The following are the specific evaluation indicators: mcc: mcc is a metric used to measure the prediction results of classification problems. It considers the number of true positives (TP), false positives (FP), false negatives (FN), and true negatives (TN). The value range of MCC is between -1 and 1.

[0067] acc: Accuracy is the ratio of samples predicted correctly by the classifier to the total number of samples, and is one of the most commonly used classification evaluation indicators.

[0068] Precision: Precision measures the proportion of true positives (TP) among the positive samples predicted by the model. It focuses on reducing false positives (FP).

[0069] Recall: Recall measures the proportion of actual positive samples that the model correctly identifies. It focuses on reducing false negatives (FN).

[0070] f1: f1-score is the harmonic mean of precision and recall, and is mainly used to balance the relationship between precision and recall. When the values ​​of these two indicators differ greatly, f1-score can give a compromise evaluation.

[0071] The split test set is input into the model for evaluation, and the results are as follows: mcc is 0.759205334927409, acc is 0.7710468153506128, The precision is 0.7557284528473835, The recall is 0.7710468153506128, f1 is 0.7561862419438296.

[0072] In order to test the performance improvement of the algorithm of the present invention compared with the traditional algorithm, classifiers based on RNN and FastText are selected for comparative analysis.

[0073] RNN classifier: RNN short text classifier is a deep learning model based on sequence modeling, which is specially used to process and classify short text data. It captures the sequential relationship and semantic dependency in the text by inputting the input text sequence into the network word by word, and using its hidden state to pass context information between time steps. Finally, the RNN classifier will output the prediction result through the fully connected layer and softmax activation function to determine the category to which the text belongs.

[0074] FastText classifier: FastText short text classifier is an efficient text classification model proposed by the Facebook AI Research team, designed for large-scale, fast text classification tasks. It represents text as a bag of words model and uses shallow neural networks to quickly learn the embedding vectors of vocabulary and n-gram features in the text. Compared with traditional deep learning models, FastText has extremely fast training speed, especially when dealing with short text classification, while maintaining high classification accuracy.

[0075] Table 5: Comparison of evaluation indicators of the model under the test set

[0076] From the data in Table 5, the performance gap between RNN and FastText is not large. FastText has a slight advantage in MCC, accuracy and recall, while RNN has a slight advantage in precision and F1 value. Overall, FastText has a greater advantage in large-scale text classification tasks, while RNN has a certain advantage in capturing semantic dependencies and sequential information.

[0077] In contrast, the algorithm of the present invention (BERT-based classifier) ​​is significantly better than RNN and FastText in all performance indicators, especially in MCC (0.7592), accuracy (0.7710) and F1 value (0.7562), demonstrating its powerful text understanding and classification capabilities.

Claims

1. A BERT-based intelligent job recommendation method, characterized in that: The specific steps include: (1) Data screening, data filling, feature analysis, data sampling, and data conversion are performed on the original student employment data. In the sampling part, the data is upsampled and downsampled by using replication and random discarding respectively. In the data conversion part, the student’s personalized information is converted into natural language text and labeled accordingly according to the original employment data, so that the data can be used to train the text classification model. (2) The processed data is divided into training set and test set in a ratio of 8:2, and the pre-trained BERT-Base-Chinese model is used for training, testing and verification. In the test part, the output of the model is the employer industry, and the mapping relationship between the employer industry and the position is pre-set. The corresponding position is recommended according to the output of the model. The specific method of data segmentation is: (21) Read all the data lines from the text file obtained from data conversion. Each line of data contains two parts separated by spaces. The first half is the output label, which represents the category to which the data line belongs, and the second half is the text in natural language form. Next, initialize a dictionary, the key of which stores the output label, and the value of which stores the row data. Then traverse all the data rows, parse the row data, and add it to the dictionary. (22) Initialize the training set and test set: traverse each output label and the corresponding label group data, use the shuffle algorithm to randomly shuffle the current group data, calculate the position of the split point according to the ratio of 8:2, add the data before the split point to the training set, and add the data after the split point to the test set; among them, the shuffle algorithm is used to randomly shuffle the given list data, and the steps are as follows: Assume that n is the length of the data list data; first, start from the last element of the list and traverse forward to the second element. For each index i, perform the following operations: generate a random number j between 0 and i; swap the positions of data[i] and data[j] to ensure that each element can be randomly swapped to another position in the list; after the traversal, return the shuffled data list; (23) Use the shuffling algorithm again to randomly shuffle the data of the training set and test set; (3) Compare the experimental results of other models under the same data to prove the effectiveness of the BERT-based intelligent job recommendation method.

2. The BERT-based intelligent job recommendation method according to claim 1, wherein In step (1), for data screening, the original student employment information data is a table in csv format, and sensitive information and useless information need to be filtered out; for data filling, since the model will eventually use the data in the "employer industry" column as the output label column, the data in this column cannot be empty. If this column in the original student employment information data is empty, after the label grouping statistics of the output label column, the "employer industry" column with the largest number of label grouping data is used to fill it.

3. The BERT-based intelligent job recommendation method according to claim 2, characterized in that: In step (1), for feature analysis, each column of data after filling is encoded, an index table is established, and the "employer industry" column is converted into the corresponding code according to the index table. After the encoding is completed, the relationship diagrams between other columns and the "employer industry" column are drawn. Through the above feature analysis, the correlation between other columns and the "employer industry" column is found, and several columns of data with the highest correlation with the "employer industry" column are retained; wherein, the label encoding algorithm is used to encode the data of each column after filling, and the label encoding algorithm is used to label a list series and convert it into a unique value array and a corresponding encoding array. The specific steps are as follows: First, initialize two empty arrays: one is the array uniques for storing unique values, and the other is an empty array codes with the same size as the input list, which is used to store the encoding results; at the same time, initialize a dictionary value_to_index to map each unique value to its index position in uniques; Then, iterate over each element value in the input list series: for each element value, if the element does not already appear in the dictionary value_to_index, add it to the uniques array and store its position index in the dictionary value_to_index; Next, use the index as the code of the element and store it in the corresponding position of the codes array; if the element already exists in the dictionary, get its corresponding index directly from the dictionary and fill the index into the codes array; Finally, after the traversal is completed, a tuple (codes, uniques) is returned, where codes is the encoding array corresponding to each element in the input list, and uniques is the array of unique values ​​in the input list.

4. The BERT-based intelligent job recommendation method according to claim 1, 2 or 3, wherein: In step (1), for data sampling, before the data sampling operation is performed, the data distribution of the employer industry is counted and label data is established, among which those that are not helpful for job recommendation are directly filtered out, and those with only single-digit data are also filtered out; after processing, the data distribution of each label is re-counted, and for label groups with a number less than the target sampling number, these data are up-sampled by replication, and for label groups with a number not less than the target sampling number, these data are down-sampled by random discarding.

5. The BERT-based intelligent job recommendation method according to claim 4, characterized in that: The upsampling operation is as follows: Assuming that there are K groups in A and the target sampling number is N, the data of group A is copied T times. If there are still less than N after copying T times, the first N-KT data of group A is copied again. The specific value formula of T is: The downsampling operation is as follows: Assuming that the number of B groups is P and the target sampling number is N, N data are randomly selected from the data of B group, and the rest of the data are directly discarded; wherein, random selection is used to randomly select N non-repeating data items from a given data list P, and the specific steps are as follows: First, initialize two empty arrays: data is used to store randomly selected data, and indices is used to record the selected index values; Then, enter the loop and repeat the following steps until the number of selected data items reaches N: randomly generate an index index in the range of 0 to Length(P) - 1; if the index index does not yet appear in indices, add the data corresponding to P[index] to the data array, and add the index to the indices array to ensure that the data will not be selected repeatedly in the future; when the number of elements in the data array reaches N, stop the loop and return the data array.

6. The BERT-based intelligent job recommendation method according to claim 3, wherein In step (1), for data conversion, since the model receives training data in natural language format, it is necessary to convert the data in csv format into data in natural language format before training the model. Specifically, the training data is stored in txt format. Each line of the txt file represents a training data. The data consists of two parts: one is the output label of the model, corresponding to the data in the "employer industry" column, and the other is a short text of natural language type, which is converted from other column data obtained based on correlation after feature analysis.

7. The BERT-based intelligent job recommendation method according to claim 1, characterized in that: In step (2), BERT uses a bidirectional Transformer structure to capture the previous and next information of the text from the context and generate a deep semantic representation. In the short text classification task, BERT first performs word segmentation on the input text, then embeds it into the model and extracts the feature vector. The model is a BERT-based text classifier that uses the pre-trained bert-base-chinese model. The classifier is based on the output of BERT's [CLS] and performs category prediction through a fully connected layer and a softmax function.

8. The BERT-based intelligent job recommendation method according to claim 1 or 7, characterized in that: In step (2), the specific process of training is: (a) Loading training data: Load training data from the segmented training set file. The data in the training set consists of two columns, namely output label and text; (b) Model training: set the model’s hyperparameters and enable CUDA to accelerate the training; (c) Save the model: After training is completed, the model will be saved to the specified output directory for subsequent loading and use.

9. The BERT-based intelligent job recommendation method according to claim 1 or 7, characterized in that: In step (2), the specific process of the test is as follows: randomly select a number of samples from the test set for prediction, and after obtaining the output label with the highest probability, recommend the corresponding position based on the mapping relationship between the employer's industry and the position; wherein, the mapping relationship between the employer's industry and the position is established by first using the LLM large model to generate the initial mapping relationship, and then comparing it with the information on mainstream recruitment websites to form the final mapping relationship.

Citation Information

Patent Citations

  • Automatic modeling system based on big data

    CN113177643A

  • Employment recommendation method and system based on big data

    CN115309998A

  • Occupational recommendation method and device, electronic equipment and storage medium

    CN116501959A

  • Recruitment information data processing method and system

    CN118861381A

Cited By

  • Site construction personnel safety ticket management method and system

    CN122022726A