Data query model training method and device, computer equipment and storage medium

By constructing an enterprise graph and training a deep learning model, combined with multi-loss function optimization, the problems of insufficient semantic association and user preference adaptability in traditional search ranking technology are solved, achieving high accuracy and personalized ranking of enterprise data queries.

CN120910074APending Publication Date: 2025-11-07SUZHOU LANGDONG NET TEC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511017072.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Traditional search ranking techniques rely on the BM25 algorithm based on keyword matching and machine learning ranking methods, which cannot capture semantic associations and adapt to dynamic user preferences, resulting in insufficient information retrieval and ranking accuracy.

Method used

By acquiring the feature data, relationships, and data interaction records of sample enterprises, an enterprise graph is constructed, structural vectors and semantic vectors are extracted, a target data query model is trained using a deep learning framework, and a multi-loss function optimization model is combined to achieve accurate sorting of enterprise data.

Benefits of technology

It improves the accuracy and personalization of enterprise data queries, enabling a better understanding of enterprise relationships and characteristics, adapting to dynamic user preferences, reducing the risk of overfitting, and ensuring the stability and accuracy of the model under different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910074A_ABST
    Figure CN120910074A_ABST
Patent Text Reader

Abstract

The invention relates to a data query model training method and device, computer equipment, a storage medium and a computer program product. The method comprises the steps of obtaining feature data of sample enterprises, an incidence relation between the sample enterprises, a data interaction record of the sample enterprises and a description text of the sample enterprises; performing feature extraction on the data interaction records to generate dynamic interaction features of the sample enterprises; determining an enterprise map according to the association relationship between the sample enterprises, and extracting features of the enterprise map to obtain structure vectors of the sample enterprises; extracting semantic features of the description text of the sample enterprise to obtain a semantic vector of the sample enterprise; and training by utilizing the feature data of the sample enterprise, the dynamic interaction feature, the structure vector and the semantic vector to obtain a target data query model. By adopting the method, the enterprise data of the target enterprise can be more accurately sequenced and output according to user requirements.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of big data, and in particular to a data query model training method and device, computer equipment, a storage medium and a computer program product. BACKGROUND

[0002] Under the background of the big data era, search engines and recommendation systems have become the core channel for users to obtain information, and the accuracy and personalization of their ranking results directly determine the quality of user experience and the commercial value of the platform. Traditional search ranking techniques mainly rely on the BM25 algorithm based on keyword matching and the early Learning-to-Rank (LTR) method. Although these techniques can achieve basic information recall and preliminary sorting functions, they have significant limitations: the BM25 algorithm only considers static features such as word frequency and inverse document frequency, and cannot capture semantic associations and user intent; traditional LTR models rely on manually designed features and are difficult to adapt to dynamically changing user preferences. SUMMARY

[0003] Therefore, it is necessary to provide a data query model training method, device, computer equipment, computer readable storage medium and computer program product to solve the above technical problems.

[0004] In a first aspect, the present application provides a data query model training method. The method comprises:

[0005] obtaining feature data of sample enterprises, association relationships between sample enterprises, data interaction records of sample enterprises, and description texts of sample enterprises; the association relationships include resource interaction relationships between sample enterprises and control object relationships between sample enterprises;

[0006] performing feature extraction on the data interaction records to generate dynamic interaction features of the sample enterprises;

[0007] determining an enterprise graph according to the association relationships between the sample enterprises, extracting features of the enterprise graph to obtain structure vectors of the sample enterprises;

[0008] extracting semantic features of the description texts of the sample enterprises to obtain semantic vectors of the sample enterprises;

[0009] training a target data query model using the feature data of the sample enterprises, the dynamic interaction features, the structure vectors and the semantic vectors; wherein the target data query model is used to input a data query statement into the target data query model, and output enterprise data of a target enterprise according to the matching strength of the sample enterprises and data identifiers.

[0010] In one embodiment, the training of the target data query model using the feature data of the sample enterprise, the dynamic interaction feature, the structure vector and the semantic vector comprises:

[0011] An initial data query model is constructed.

[0012] The initial data query model is trained using the feature data, the dynamic interaction feature, the structure vector and the semantic vector, and a loss value of the initial data query model is determined using a first loss function and a second loss function; the first loss function is used to determine the quality of the enterprise data of the matched target enterprise; and the second loss function is used to determine the quality of the matched target enterprise.

[0013] When the loss value is within a preset range, the initial data query model is determined as the target data query model.

[0014] In one embodiment, the extraction of the semantic feature of the description text of the sample enterprise to obtain the semantic vector of the sample enterprise comprises:

[0015] An initial semantic model is established based on a lightweight bidirectional encoder representation model, and the initial semantic model is fine-tuned using sample description texts to obtain a semantic vector model.

[0016] The description text is input into the semantic vector model to obtain the semantic vector of the sample enterprise.

[0017] In one embodiment, the data interaction record of the sample enterprise comprises an access duration, an access frequency and an access depth of the enterprise data; and the training of the target data query model using the feature data of the sample enterprise, the dynamic interaction feature, the structure vector and the semantic vector further comprises:

[0018] According to the data interaction record of the sample enterprise, an initial positive sample enterprise and an initial negative sample enterprise are determined.

[0019] According to the access duration, the access frequency and the access depth, a sample weight of the initial positive sample enterprise is determined.

[0020] According to the sample weight, a positive sample enterprise and a negative sample enterprise are determined.

[0021] The target data query model is trained using the feature data of the sample enterprise, the dynamic interaction feature, the structure vector, the semantic vector, the positive sample enterprise and the negative sample enterprise.

[0022] In one embodiment, the method further comprises:

[0023] acquire a data query statement corresponding to the query request in response to a query request of a target account for target data;

[0024] input the data query statement into the target data query model, and sort and output enterprise data of a target enterprise; and generate an interaction log of the query request based on an interaction operation of the target account on the enterprise data of the target enterprise;

[0025] determine a query index of the target data query model based on the interaction log;

[0026] train and optimize the target data query model in a case where the query index reaches a preset threshold.

[0027] In one of the embodiments, the interaction log includes data interaction records of the target enterprise, and the method further includes:

[0028] train and optimize the target data query model by using the data interaction records in the interaction log in a case where the number of the interaction logs reaches a preset number.

[0029] In a second aspect, the application further provides a data query model training device. The device includes:

[0030] a data acquisition module configured to acquire feature data of sample enterprises, association relationships between the sample enterprises, data interaction records of the sample enterprises, and description texts of the sample enterprises; the association relationships include resource interaction relationships between the sample enterprises and control object relationships between the sample enterprises;

[0031] a feature extraction module configured to perform feature extraction on the data interaction records to generate dynamic interaction features of the sample enterprises;

[0032] The feature extraction module is further configured to determine an enterprise graph according to the association relationships between the sample enterprises, extract features of the enterprise graph, and obtain structure vectors of the sample enterprises.

[0033] The feature extraction module is further configured to extract semantic features of the description texts of the sample enterprises to obtain semantic vectors of the sample enterprises.

[0034] a model training module configured to train a target data query model by using the feature data of the sample enterprises, the dynamic interaction features, the structure vectors, and the semantic vectors; wherein the target data query model is configured to input a data query statement into the target data query model, and sort and output enterprise data of a target enterprise according to a matching strength between the sample enterprises and data identifiers.

[0035] In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the data query model training method according to any one of the embodiments of the present application when executing the computer program.

[0036] In a fourth aspect, the present application also provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the data query model training method according to any one of the embodiments of the present application.

[0037] In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program, and the computer program is executed by a processor to implement the data query model training method according to any one of the embodiments of the present application.

[0038] The above data query model training method, device, computer device, storage medium and computer program product can obtain the data of the sample enterprise from multiple aspects, including feature data, correlation, data interaction record and description text, and perform feature extraction on these data in different dimensions to generate dynamic interaction features, structure vectors and semantic vectors, and finally train the target data query model by using these features. This method can fully mine the multi-source information of the sample enterprise, depict the characteristics of the enterprise from different angles, so that the target data query model can more accurately understand the relationship and characteristics between enterprises. The dynamic interaction feature reflects the dynamic degree and law of the sample enterprise in data interaction, which helps the model to capture the dynamic performance of the enterprise in business activities. The structure vector reflects the position of the enterprise in the graph and the associated structure with other enterprises, providing the model with relationship information between enterprises at a macro level. The semantic vector provides support for the model to understand the connotation and characteristics of the enterprise from the perspective of text semantics. When the data query statement is input into the trained target data query model, the model can comprehensively consider the matching strength between the sample enterprise and the data identifier, so as to more accurately sort and output the enterprise data of the target enterprise. BRIEF DESCRIPTION OF DRAWINGS

[0039] Figure 1 FIG. 1 is a diagram of the application environment of the data query model training method in an embodiment;

[0040] Figure 2 FIG. 2 is a flowchart of the data query model training method in an embodiment;

[0041] Figure 3 FIG. 3 is a flowchart of the acquisition of the basic feature set in an embodiment;

[0042] Figure 4 FIG. 4 is a flowchart of the acquisition of the enterprise vector feature in an embodiment;

[0043] Figure 5 Flowchart for obtaining positive and negative sample sets in an embodiment;

[0044] Figure 6 Flowchart for model optimization and seamless online in an embodiment;

[0045] Figure 7 Flowchart for implementing the data query model training method in an embodiment;

[0046] Figure 8 Structural block diagram of the data query model training device in an embodiment;

[0047] Figure 9 Internal structure diagram of the computer device in an embodiment. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.

[0049] The data query model training method provided by the embodiments of the present application can be applied in an application environment as shown in Figure 1 . The terminal 102 communicates with the server 104 through the network. The data storage system can store the data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The data query request can be sent to the server 104 through the terminal 102, and the server 104 processes the request based on the trained target data query model, and sorts and outputs the enterprise data of the target enterprise. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart TV, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0050] In an embodiment, as shown in Figure 2 , a data query model training method is provided, comprising the following steps:

[0051] Step S200, obtaining the feature data of the sample enterprises, the association relationship between the sample enterprises, the data interaction record of the sample enterprises, and the description text of the sample enterprises; the association relationship includes the resource interaction relationship between the sample enterprises and the control object relationship between the sample enterprises.

[0052] The characteristic data can be data related to the characteristics of the enterprise itself, or static data of sample enterprises, etc. For example, enterprise entity, industry classification, geographic location, enterprise size, business scope, establishment time, registered capital, associated enterprise information, etc. The characteristic data can be obtained from the official website of the enterprise, the industrial database, etc. through data collection tools. The association between sample enterprises can reflect the mutual relationship between enterprises, the resource interaction relationship reflects the exchange of enterprises in materials, funds, technology, etc. The control object relationship indicates the control and control relationship between enterprises such as holding, stockholding, etc. The control object relationship can also include the relationship between the persons in charge of the enterprises, or the relationship between the parent and subsidiary companies, etc. For example, the persons in charge of A company and B company are a; or C company is a subsidiary of D company, etc. The control object relationship can be obtained by analyzing the equity structure, querying the industrial and commercial registration information, etc. The data interaction record of the sample enterprise can be used to represent the record of the data interaction of the sample enterprise. Specifically, it can include the number of times the data of the sample enterprise is exposed, clicked, and followed, as well as the dwell time, browsing depth, interaction frequency, etc. when the account interacts with the data of the sample enterprise. The data interaction record of the sample enterprise can be obtained by data burying technology, log recording system, etc. The description text of the sample enterprise can be the introduction document, news report, product manual, etc. of the enterprise. The description text can be obtained from the Internet, the official website of the enterprise, etc. through text extraction tools, etc. Specifically, the description text can include the historical evaluation, historical ranking, etc. of the enterprise. For example, the description text can include one of the top ten companies. The model is trained through the text, and when the user searches for the top ten companies, the company can be queried.

[0053] In step S202, the data interaction record is feature extracted to generate the dynamic interaction feature of the sample enterprise.

[0054] The feature extraction can be realized by various methods, such as statistical-based method, machine learning algorithm, etc. The statistical-based method can calculate the statistical quantity in the data interaction record, such as mean, variance, median, etc. as the dynamic interaction feature. The machine learning algorithm can use a deep learning model, such as recurrent neural network (RNN), long short-term memory network (LSTM), etc. to sequence model the data interaction record, so as to extract more complex dynamic interaction features. Through feature extraction on the data interaction record, the original interaction data can be converted into representative and distinguishable features, so that the subsequent model can better learn and utilize these features.

[0055] In an example embodiment, the data interaction record can include exposure, click, attention, etc. data of the account in different time periods (such as 3 days, 7 days, etc.), and the data interaction record is used to generate CTR (user point record, which can be click volume / exposure volume), CVR (conversion rate) and other conversion features, thereby enhancing the model's learning ability for the heat and conversion of the enterprise.

[0056] In step S204, the enterprise graph is determined according to the association relationship between the sample enterprises, the features of the enterprise graph are extracted, and the structure vector of the sample enterprise is obtained.

[0057] In an example embodiment, the node can represent the enterprise, the edge can represent the association relationship, and the weight of the edge can be initialized in a static manner, thereby constructing the enterprise relationship graph, using the Node2vec technology to learn the vector representation of the enterprise on the graph, and capturing the structural relationship between enterprises through the vector to obtain the structure vector, etc.

[0058] In step S206, the semantic features of the description text of the sample enterprise are extracted, and the semantic vector of the sample enterprise is obtained.

[0059] In an example embodiment, a lightweight BERT pre-training model can be used to extract semantic features of the description text, which can specifically include using an ALBERT lightweight pre-training model as a model base, using sample enterprise information as training data to fine-tune the model, optimizing the spatial distribution of the text vector, and balancing the effect and computational efficiency, etc. The description text obtained from the official website information, news reports, etc. of the enterprise is input into the lightweight BERT model, and the high-dimensional semantic vector of the enterprise is extracted, etc.

[0060] In step S208, the target data query model is trained using the feature data of the sample enterprise, the dynamic interaction feature, the structure vector, and the semantic vector; wherein the target data query model is used to input the data query statement into the target data query model, and according to the matching strength of the sample enterprise and the data identifier, the enterprise data of the target enterprise is sorted and output.

[0061] In an exemplary embodiment, a deep learning framework such as TensorFlow or PyTorch can be employed to build a multi-layer neural network model. The feature data, dynamic interaction features, structure vectors and semantic vectors of the sample enterprises are input into the input layer, and the features are nonlinearly transformed and combined through multiple hidden layers, and finally the matching strength score of the sample enterprises and the data identifier is obtained in the output layer. During the training process, a suitable loss function such as cross-entropy loss function is used to measure the difference between the model prediction result and the true label, and through optimization algorithms such as stochastic gradient descent (SGD) or adaptive moment estimation (Adam), the parameters of the model are constantly adjusted, so that the value of the loss function gradually decreases, thereby improving the accuracy and generalization ability of the model.

[0062] In an exemplary embodiment, an initial data query model can be built and trained using feature data, dynamic interaction features, structure vectors and semantic vectors to obtain a target data query model. Specifically, the initial data query model can include basic model structures such as multi-layer perceptron (MLP) and support vector machine (SVM). For the multi-layer perceptron model, different numbers of hidden layers and neurons can be set, and through multiple trials and evaluation of the validation set, the optimal network structure parameters are determined. The support vector machine model can be trained and compared according to different kernel functions (such as linear kernel, polynomial kernel, radial basis kernel, etc.), and the most suitable kernel function for the data set is selected.

[0063] In an exemplary embodiment, the target enterprise can include multiple sample enterprises; after inputting the account data query statement, the data query model will filter out sample enterprises with a matching degree greater than a preset threshold, or filter out sample enterprises with a matching degree in the top preset number, and output the filtered sample enterprises in order of matching degree from high to low, etc.

[0064] In the data query model training method, the data of the sample enterprises in multiple aspects are obtained, including feature data, association relationship, data interaction record, and description text, and feature extraction is performed on the data in different dimensions to generate dynamic interaction features, structure vectors, and semantic vectors. Finally, the target data query model is trained using the features. This method can fully mine the multi-source information of the sample enterprises, depict the features of the enterprises from different angles, and enable the target data query model to more accurately understand the relationship and features between the enterprises. The dynamic interaction features reflect the dynamic degree and law of the sample enterprises in data interaction, which helps the model to capture the dynamic performance of the enterprises in business activities. The structure vectors reflect the position of the enterprises in the graph and the association structure with other enterprises, providing relationship information between the enterprises at a macro level for the model. The semantic vectors provide support for the model to understand the connotation and characteristics of the enterprises from the perspective of text semantics. When a data query statement is input into the trained target data query model, the model can comprehensively consider the matching strength between the sample enterprises and the data identifiers, thereby more accurately ranking and outputting the enterprise data of the target enterprises.

[0065] In one embodiment, the training of the target data query model using the feature data of the sample enterprises, the dynamic interaction features, the structure vectors, and the semantic vectors comprises:

[0066] An initial data query model is constructed.

[0067] The initial data query model can adopt different architecture forms. For example, based on a neural network architecture, a network structure with different numbers of layers and neurons can be designed. For a multi-layer perceptron type initial data query model, a network structure with a small number of hidden layers and neurons can be initially tried, such as 2-3 hidden layers, each containing 0-100 neurons. At the same time, the activation functions of different layers can be selected and tested, such as commonly used ReLU, Sigmoid, and other activation functions. By comparing the convergence speed and performance of the model during training of different activation functions, the most suitable activation function for the task can be determined.

[0068] The initial data query model is trained using the feature data, the dynamic interaction features, the structure vectors, and the semantic vectors, and the loss value of the initial data query model is determined using a first loss function and a second loss function. The first loss function is used to determine the quality of the enterprise data of the matched target enterprises, and the second loss function is used to determine the quality of the matched target enterprises.

[0069] In an example embodiment, the first and second sub-loss values of the initial data query model can be determined according to the first and second loss functions respectively, and the final loss value can be calculated based on a weighted sum of the two sub-loss values. Specifically, the first loss function can include a Point-wise loss function, and the second loss function can include a List-wise loss function. It can be understood that the Point-wise loss function focuses on the relevance of a single document, i.e., the enterprise data quality of the target enterprise, and the List-wise loss function focuses on the ranking order and overall quality of the entire search result list.

[0070] In the case where the loss value is within a preset range, the initial data query model is determined as the target data query model.

[0071] In an example embodiment, a reasonable range of the loss value can be preset, for example, the loss value is between 0.1 and 0.3. When the calculated loss value is within this preset range, it indicates that the training effect of the initial data query model has reached the expectation, and the initial data query model can be determined as the target data query model. If the loss value is not within the preset range, for example, the loss value is too large, it indicates that the difference between the prediction result of the model and the true label is large, and the accuracy of the model is low. In this case, the model needs to be adjusted, such as increasing the amount of training data, adjusting the parameters of the model, replacing the loss function or optimizing the algorithm, and retraining until the loss value is within the preset range. In this way, by strictly controlling the loss value within the preset range to determine the target data query model, the model can have high accuracy and reliability in actual application, so as to more accurately process the data query request and output the enterprise data of the target enterprise.

[0072] In this embodiment, by constructing an initial data query model, training with multi-aspect feature data and determining a loss value in combination with two loss functions, and then determining a target data query model according to whether the loss value is within a preset range, the fine control of the model training process is realized. This training method based on multi-source information and multi-loss functions can also improve the generalization ability of the model. When facing new enterprise data and query scenarios, the model can better adapt and handle, reduce the risk of overfitting, and ensure that the model can work stably and accurately in different environments.

[0073] In one embodiment, the semantic features of the description text of the sample enterprise are extracted to obtain a semantic vector of the sample enterprise, including:

[0074] An initial semantic model is established based on a lightweight bidirectional encoder representation model, and the initial semantic model is fine-tuned using sample description texts to obtain a semantic vector model.

[0075] The lightweight bidirectional encoder representation model can include an ALBERT lightweight pre-training model, etc.

[0076] In an exemplary embodiment, a pre-trained ALBERT model can be loaded first, and the sample description text is input into the model for fine-tuning training. During the fine-tuning process, the parameters of the model are adjusted to better adapt to the characteristics and semantic information of the sample description text. Small batch stochastic gradient descent and other optimization algorithms can be used, and appropriate learning rate, training round number and other hyperparameters can be set to improve the performance and convergence speed of the model.

[0077] The description text is input into the semantic vector model to obtain the semantic vector of the sample enterprise.

[0078] In an exemplary embodiment, the description text of the enterprise, such as the introduction document and news report, can be preprocessed, such as removing special characters and performing word segmentation, and then the processed text is input into the trained semantic vector model. The semantic vector model will encode the input text and convert the text into a vector representation to obtain the semantic vector of the sample enterprise. This semantic vector can reflect the semantic information of the sample enterprise description text and help the target data query model understand the connotation and characteristics of the enterprise from the text semantic perspective. The semantic vector obtained in this way can be used together with feature data, dynamic interaction features, and structure vectors to train the target data query model, so that the model can better depict the characteristics of the enterprise and improve the accuracy and precision of the model in processing data query requests. At the same time, the introduction of the semantic vector also enriches the information dimension used by the model, allowing the model to perform better in complex enterprise data and query scenarios, further enhancing the model's generalization ability and adaptability, and ensuring that the model can work stably and efficiently in different actual application environments to provide better enterprise data query services to users, etc.

[0079] In this embodiment, the semantic vector model is established and fine-tuned based on the lightweight bidirectional encoder representation model, effectively extracting the semantic vector from the description text of the sample enterprise. This method not only fully extracts the semantic information in the description text, but also enables the model to better adapt to specific enterprise data and query scenarios. When using the target data query model later, the semantic vector cooperates with other feature data (such as dynamic interaction features, structure vectors, etc.) to allow the model to accurately depict the enterprise from multiple dimensions.

[0080] In an embodiment, the data interaction record of the sample enterprise includes access duration, access frequency and access depth of enterprise data; and the training of the target data query model using the feature data of the sample enterprise, the dynamic interaction features, the structure vector and the semantic vector further includes:

[0081] According to the data interaction record of the sample enterprise, an initial positive sample enterprise and an initial negative sample enterprise are determined.

[0082] In an example embodiment, the determination of the initial positive sample enterprise and the initial negative sample enterprise can include whether the data of the sample enterprise is clicked in a preset period, if yes, the initial positive sample enterprise, if no, the initial negative sample enterprise, etc. Specifically, the number of clicks in the preset period can also be set, that is, if the number of clicks in the preset period is greater than a threshold, the initial positive sample enterprise, if not, the initial negative sample enterprise, etc.

[0083] According to the access duration, access frequency and access depth, a sample weight of the initial positive sample enterprise is determined.

[0084] Among them, the access duration can include the duration of the account staying on the result page, if the duration is long, it is considered as a high-quality positive sample; if the staying time is very short, it is considered as a negative sample or a low-quality positive sample; the browsing depth can include that the account clicks into the detail page and further browses multiple pages, that is, a high-quality positive sample; the interaction frequency can include that the user performs positive interaction behaviors such as attention, report acquisition, and comment on the result page, which is considered as a high-quality positive sample, etc.

[0085] In an example embodiment, different weight coefficients can be set to measure the influence of access duration, access frequency and access depth on sample weight. For example, the weight coefficient of access duration is set to 0.3, the weight coefficient of access frequency is set to 0.4, and the weight coefficient of access depth is set to 0.3. The access duration, access frequency and access depth of the initial positive sample enterprise are multiplied by the corresponding weight coefficients respectively, and then added to obtain the sample weight of the initial positive sample enterprise. The longer the access duration, the higher the access frequency, and the deeper the access depth, the greater the sample weight, which indicates that the enterprise is more active in data interaction, and the importance to model training is also greater, etc.

[0086] According to the sample weight, a positive sample enterprise and a negative sample enterprise are determined.

[0087] In an example embodiment, by setting a threshold or a rule, the above-mentioned rich behavior data is used to weight, filter or redefine the preliminary positive and negative samples, etc. Specifically, a sample weight threshold can be set, when the sample weight of the initial positive sample enterprise is greater than the threshold, it is determined as a positive sample enterprise; when the sample weight is less than the threshold, it is reclassified as a negative sample enterprise. In this way, the positive sample enterprises which are important to model training and the negative sample enterprises which are in sharp contrast to the positive samples can be more accurately screened from the sample enterprises, etc.

[0088] The target data query model is trained by using the feature data of the sample enterprise, the dynamic interaction feature, the structure vector, the semantic vector, the positive sample enterprise and the negative sample enterprise.

[0089] In an example embodiment, the data of the positive sample enterprise and the negative sample enterprise can be combined with the feature data, the dynamic interaction feature, the structure vector and the semantic vector to construct a training data set. The data set is input into an initial data query model for training. During the training, the model further learns the differences and correlations between enterprises according to different features of the positive sample enterprise and the negative sample enterprise. For the positive sample enterprise, the model strengthens the learning of its features so as to accurately identify and match in subsequent queries. For the negative sample enterprise, the model learns how to distinguish them from the positive sample enterprise to avoid false matching. At the same time, during the training process, a suitable loss function and optimization algorithm are still used to continuously adjust the parameters of the model. As the training proceeds, the model gradually adapts to the information brought by the positive sample enterprise and the negative sample enterprise, improving the accuracy and reliability of the enterprise data matching. After multiple iterations of training, when the value of the loss function reaches a preset range or meets other stopping conditions, the final target data query model is obtained, etc.

[0090] In this embodiment, the data interaction records of the sample enterprises are analyzed in detail to determine the initial positive sample enterprise and the initial negative sample enterprise, and then the sample weight is determined in combination with the access duration, the access frequency and the access depth, and the positive sample enterprise and the negative sample enterprise are accurately screened out. This sample screening method based on data interaction behavior can more deeply mine the features and values of sample enterprises in actual business interactions. The clear division of the positive sample enterprise and the negative sample enterprise provides more targeted information for model training, so that the target data query model can more clearly distinguish different types of enterprises during the learning process, further improving the accuracy of the model in matching enterprise data.

[0091] In one embodiment, the method further comprises:

[0092] In response to a query request of a target account for target data, a data query statement corresponding to the query request is obtained.

[0093] The data query statement is input into the target data query model, and the enterprise data of the target enterprise is sorted and output; and based on the interaction operation of the target account on the enterprise data of the target enterprise, an interaction log of the query request is generated.

[0094] Based on the interaction log, a query index of the target data query model is determined.

[0095] In the case where the query index reaches a preset threshold, the target data query model is trained and optimized.

[0096] In an exemplary embodiment, when the target account initiates a query request for target data, the system obtains the corresponding data query statement and inputs it into the target data query model. The model will sort and output the enterprise data of the target enterprise according to the enterprise characteristics and relationships learned from previous training. At the same time, the system will record the interactive operations of the target account on these output enterprise data, such as clicking, viewing details, collecting, etc., and generate detailed interaction logs. Based on these interaction logs, the query indicators of multiple target data query models can be determined. For example, the accuracy of the query, i.e., the proportion of the target enterprise data that truly meets the query demand in the output; the recall rate, i.e., the proportion of all relevant target enterprise data retrieved by the model to all actual existing relevant data; and the response time, i.e., the time spent from inputting the query statement to outputting the result, etc.

[0097] Specifically, when the query indicators reach the preset threshold, the target data query model needs to be trained and optimized. For example, if the query accuracy is lower than the preset 80%, or the recall rate is lower than 70%, or the response time is too long and exceeds the preset 5 seconds, etc., it indicates that the performance of the model has certain problems and needs to be optimized. When training and optimizing the target data query model, various methods can be used. On the one hand, new sample enterprise data, especially those not fully covered in previous training, can be added to enrich the learning content of the model. On the other hand, the parameters of the model can be adjusted, such as changing the number of layers and neurons of the neural network, or adjusting the weights of the loss function, etc. It is also possible to try to replace the optimization algorithm, such as replacing the stochastic gradient descent algorithm with the Adam optimization algorithm, etc., to improve the convergence speed and performance of the model. After optimization training, the query indicators are determined again using the interaction logs, and the process is repeated until the query indicators are stable and reach a satisfactory level, thereby ensuring that the target data query model can always efficiently and accurately handle data query requests and provide high-quality enterprise data query services to users.

[0098] In this embodiment, by establishing a query indicator feedback mechanism for the data query model, the changes in the performance of the model can be discovered in a timely manner. The query indicators are determined based on actual interaction logs, making the model optimization more targeted. When the query indicators do not meet the standards, the target data query model can be optimized in various ways such as increasing training data, adjusting model parameters, replacing optimization algorithms, etc., to continuously improve the performance of the model. With continuous optimization of the model, it will be more efficient and accurate in handling data query requests, and can better adapt to changing enterprise data and query scenarios. This process of continuous iteration and optimization ensures that the target data query model always maintains good performance in the long-term use process, providing stable and reliable enterprise data query services to accounts and further improving the user experience in enterprise data query.

[0099] In one embodiment, the interaction log includes data interaction records of the target enterprise, and the method further includes:

[0100] When the number of interaction logs reaches a preset number, the target data query model is trained and optimized using the data interaction records in the interaction logs.

[0101] In an exemplary embodiment, when the query index reaches a preset threshold, the target data query model is trained and optimized using the data interaction records in the interaction logs. When the number of interaction logs reaches a preset number and the query index still does not reach the preset threshold, the target data query model can also be trained and optimized using the data interaction records in the interaction logs, etc.

[0102] In this embodiment, by setting the preset value of the number of interaction logs, another trigger condition is provided for the training and optimization of the model. When the number of interaction logs reaches the preset number, it means that enough interaction information between users and the data of the target enterprise has been accumulated. These data interaction records contain important information such as user behavior preferences and interest points in the actual query process. The target data query model is trained and optimized using these information, thereby improving the accuracy of the model.

[0103] In an exemplary embodiment, the generation of the feature set of the data query model can be as shown in Figure 3 The enterprise basic data can include search understanding brought enterprise feature construction, etc. The document content data can include the establishment time, registered capital, associated enterprises, etc. of the enterprise, and the enterprise has its own enterprise field feature construction, etc. The account online feedback data can include exposure, clicks, and attention, etc. Specifically, it can include the number of exposures, clicks, and attention of the account in different time periods, etc. and generate CTR, CVR, etc. conversion features according to the data. The enterprise basic data and the document content data are static expert feature sets, the user online feedback data is a dynamic conversion feature set, and the static expert feature set and the dynamic conversion feature set are combined into a basic data set, etc.

[0104] In an exemplary embodiment, the feature vector of the data query model can be obtained as shown in Figure 4As shown, specifically includes: obtaining enterprise relationship graph data, and enterprise text information, etc.; Enterprise relationship graph data can include investment, supply chain, cooperation relationship, etc.; Take the enterprise as the node, the relationship as the edge, use the enterprise relationship graph data to construct the enterprise relationship graph, and quote Node2vec to learn the enterprise graph vector, get the enterprise graph vector, enterprise text information can be obtained through description text, official website information and news, etc., can use sample enterprise data as training data, fine-tune ALBERT and other lightweight BERT models, and use ALBERT and other lightweight BERT models to extract enterprise high-dimensional semantic vector, get enterprise semantic vector, etc. The enterprise graph vector and the enterprise semantic vector are combined to obtain the enterprise vector feature. Specifically, the enterprise text information can also be directly extracted to obtain the enterprise high-dimensional semantic vector.

[0105] In an example embodiment, the training sample of the data query model can be obtained as Figure 5 As shown, specifically includes: obtaining account click logs, taking samples clicked by the account as initial positive samples, and taking samples not clicked by the account as initial negative samples; Obtain account behavior data to enrich account behavior data, which can include dwell time, browsing depth, interaction frequency, etc. Identify high-quality behavior through account behavior data. Based on the set threshold / rule, the identified high-quality behavior is weighted, filtered, and the initial positive and negative samples are redefined, so as to obtain a positive and negative sample set that can better reflect the account frame behavior.

[0106] In an example embodiment, after the data query model is online, it can also be as Figure 6 As shown, specifically includes: after the account interaction or search, real-time log backflow, and model performance evaluation, judge whether the model performance is reduced to the preset threshold or the new data amount in the log is greater than the preset threshold, optimize the model with the new data in the log, and deploy the data query model online seamlessly.

[0107] In an example embodiment, the data query model training method can be as Figure 7 As shown, specifically includes: data source and module one (feature engineering); Connection, extract feature library; Module two (sample construction) and feature library connection, get initial sample from data source, and enhance sample library with feature engineering; Module three (model training) and sample library connection, train model library, and connect trained model library with module four (online service and optimization), module four displays the data query model to the account. When the account uses the model to search, module four (online service and optimization) can also include generating feedback logs, including account behavior data; Module four can also include triggering retraining (specifically, when the model accuracy is lower than the threshold, or the new data is greater than the threshold, optimize the model with the new data).

[0108] It should be understood that, although each step in the flowchart involved in the embodiments described above is shown in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps.

[0109] Based on the same inventive concept, the embodiments of the present application also provide a data query model training device for implementing the above-mentioned data query model training method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more data query model training device embodiments provided below can refer to the limitations of the data query model training method described above, which will not be repeated here.

[0110] In one embodiment, as shown in Figure 8 A data query model training device 400 is provided, comprising a data acquisition module 401, a feature extraction module 403, and a model training module 405, wherein:

[0111] The data acquisition module is configured to acquire feature data of sample enterprises, association relationships between the sample enterprises, data interaction records of the sample enterprises, and description texts of the sample enterprises; the association relationships include resource interaction relationships between the sample enterprises and control object relationships between the sample enterprises.

[0112] The feature extraction module is configured to perform feature extraction on the data interaction records to generate dynamic interaction features of the sample enterprises.

[0113] The feature extraction module is further configured to determine an enterprise graph according to the association relationships between the sample enterprises, extract features of the enterprise graph, and obtain a structure vector of the sample enterprises.

[0114] The feature extraction module is further configured to extract semantic features of the description texts of the sample enterprises to obtain a semantic vector of the sample enterprises.

[0115] The model training module is configured to train a target data query model by using the feature data of the sample enterprise, the dynamic interaction feature, the structure vector, and the semantic vector.

[0116] In an embodiment, the model training module is further configured to:

[0117] construct an initial data query model;

[0118] train the initial data query model by using the feature data, the dynamic interaction feature, the structure vector, and the semantic vector, and determine a loss value of the initial data query model by using a first loss function and a second loss function; the first loss function is configured to determine a quality of enterprise data of a matched target enterprise; and the second loss function is configured to determine a quality of the matched target enterprise.

[0119] In a case where the loss value is within a preset range, the initial data query model is determined as the target data query model.

[0120] In an embodiment, the feature extraction module comprises:

[0121] a semantic vector extraction module configured to establish an initial semantic model based on a lightweight bidirectional encoder representation model, and fine-tune the initial semantic model by using sample description text to obtain a semantic vector model;

[0122] The semantic vector extraction module is further configured to input the description text into the semantic vector model to obtain the semantic vector of the sample enterprise.

[0123] In an embodiment, the data interaction record of the sample enterprise comprises an access duration, an access frequency, and an access depth of enterprise data; and the model training module further comprises:

[0124] a sample generation sub-module configured to determine an initial positive sample enterprise and an initial negative sample enterprise according to the data interaction record of the sample enterprise;

[0125] The sample generation sub-module is further configured to determine a sample weight of the initial positive sample enterprise according to the access duration, the access frequency, and the access depth.

[0126] The sample generation sub-module is further configured to determine a positive sample enterprise and a negative sample enterprise according to the sample weight.

[0127] The model training sub-module is configured to train the target data query model by using the feature data of the sample enterprises, the dynamic interaction features, the structure vectors, the semantic vectors, the positive sample enterprises, and the negative sample enterprises.

[0128] In one embodiment, the apparatus further includes:

[0129] The query obtaining module is configured to obtain a data query statement corresponding to a query request of a target account for target data in response to the query request.

[0130] The data generating module is configured to input the data query statement into the target data query model, sort and output enterprise data of a target enterprise, and generate an interaction log of the query request based on an interaction operation of the target account on the enterprise data of the target enterprise.

[0131] The model detecting module is configured to determine a query index of the target data query model based on the interaction log.

[0132] The model optimizing module is configured to train and optimize the target data query model when the query index reaches a preset threshold.

[0133] In one embodiment, the interaction log includes data interaction records of a target enterprise, and the model optimizing module is further configured to:

[0134] When the number of interaction logs reaches a preset number, the model optimizing module is configured to train and optimize the target data query model by using the data interaction records in the interaction logs.

[0135] The above-described modules of the data query model training apparatus can be all or partially implemented by software, hardware, or a combination thereof. The above-described modules can be embedded in or independent of a processor in a computer device in a hardware form, or stored in a memory in a computer device in a software form, so as to be called and executed by a processor to perform operations corresponding to the above-described modules.

[0136] In one embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 9As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store feature data and sample data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with the terminal outside through the network connection. The computer program is executed by the processor to realize a data query model training method.

[0137] Those skilled in the art can understand that, Figure 9 The skilled in the art can understand that,

[0138] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0139] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0140] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0141] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A data query model training method, characterized in that, The method comprises: obtaining feature data of sample enterprises, association relationships between the sample enterprises, data interaction records of the sample enterprises, and description texts of the sample enterprises; the association relationships comprise resource interaction relationships between the sample enterprises and control object relationships between the sample enterprises; performing feature extraction on the data interaction records to generate dynamic interaction features of the sample enterprises; determining an enterprise graph according to the association relationships between the sample enterprises, extracting features of the enterprise graph to obtain structure vectors of the sample enterprises; extracting semantic features of the description texts of the sample enterprises to obtain semantic vectors of the sample enterprises; training a target data query model by using the feature data of the sample enterprises, the dynamic interaction features, the structure vectors, and the semantic vectors; wherein the target data query model is configured to input a data query statement into the target data query model, and sort and output enterprise data of a target enterprise according to matching strength between the sample enterprises and data identifiers.

2. The method of claim 1, wherein, The training of the target data query model by using the feature data of the sample enterprises, the dynamic interaction features, the structure vectors, and the semantic vectors comprises: constructing an initial data query model; training the initial data query model by using the feature data, the dynamic interaction features, the structure vectors, and the semantic vectors, and determining a loss value of the initial data query model by using a first loss function and a second loss function; wherein the first loss function is configured to determine quality of enterprise data of a matched target enterprise; and the second loss function is configured to determine quality of the matched target enterprise; in a case where the loss value is within a preset range, determining the initial data query model as the target data query model.

3. The method of claim 1, wherein, The extraction of the semantic features of the description texts of the sample enterprises to obtain the semantic vectors of the sample enterprises comprises: establishing an initial semantic model based on a lightweight bidirectional encoder representation model, and fine-tuning the initial semantic model by using sample description texts to obtain a semantic vector model; inputting the description texts into the semantic vector model to obtain the semantic vectors of the sample enterprises.

4. The method of claim 1, wherein, The data interaction records of the sample enterprises comprise access duration, access frequency, and access depth of enterprise data; and the training of the target data query model by using the feature data of the sample enterprises, the dynamic interaction features, the structure vectors, and the semantic vectors further comprises: determining initial positive sample enterprises and initial negative sample enterprises according to the data interaction records of the sample enterprises; determining sample weights of the initial positive sample enterprises according to the access duration, the access frequency, and the access depth; determining positive sample enterprises and negative sample enterprises according to the sample weights; training the target data query model by using the feature data of the sample enterprises, the dynamic interaction features, the structure vectors, the semantic vectors, the positive sample enterprises, and the negative sample enterprises.

5. The method of claim 1, wherein, The method further comprises: obtaining a data query statement corresponding to a query request of a target account for target data in response to the query request. The data query statement is input into the target data query model, and enterprise data of a target enterprise is output in sequence; and based on an interactive operation of the target account on the enterprise data of the target enterprise, an interaction log of the query request is generated; Based on the interaction log, a query index of the target data query model is determined; In the case where the query index reaches a preset threshold, the target data query model is trained and optimized.

6. The method of claim 5, wherein, The interaction log includes data interaction records of the target enterprise, and the method further includes: In the case where the number of interaction logs reaches a preset number, the target data query model is trained and optimized by using the data interaction records in the interaction logs.

7. A data query model training apparatus, characterized by comprising: The device includes: A data acquisition module is configured to acquire feature data of sample enterprises, association relationships between the sample enterprises, data interaction records of the sample enterprises, and description texts of the sample enterprises; the association relationships include resource interaction relationships between the sample enterprises and control object relationships between the sample enterprises; A feature extraction module is configured to perform feature extraction on the data interaction records to generate dynamic interaction features of the sample enterprises; The feature extraction module is further configured to determine an enterprise graph according to the association relationships between the sample enterprises, extract features of the enterprise graph to obtain structure vectors of the sample enterprises; The feature extraction module is further configured to extract semantic features of the description texts of the sample enterprises to obtain semantic vectors of the sample enterprises; A model training module is configured to train a target data query model by using the feature data of the sample enterprises, the dynamic interaction features, the structure vectors, and the semantic vectors; the target data query model is configured to input a data query statement into the target data query model and output enterprise data of a target enterprise in sequence according to a matching strength between the sample enterprises and data identifiers. 8.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-7. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.