Index template generation method and device, equipment, storage medium and product

By obtaining and processing target scene information in the message queue and generating index templates, the problem of traditional Elasticsearch being inefficient when accessing new scene content is solved, and the effect of quickly generating index templates is achieved.

CN119415741APending Publication Date: 2025-02-11CHINA MERCHANTS BANK
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411402887.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

When traditional Elasticsearch accesses new scene content, it needs to go through a long joint debugging and testing stage, resulting in inefficient index template generation.

Method used

By obtaining the target scene information in the preset format sent by the message queue, classifying it based on the field type, and applying the preset mapping rules for mapping conversion, the target scene information including the index template name and index processing rules is obtained. Then, the converted target scene information is indexed and executed. If the result is qualified, an index template is generated.

Benefits of technology

The docking of new scenario retrieval needs without going through a long joint debugging and testing stage can be completed, which significantly improves the efficiency of index template generation and avoids the problem that each new access scenario needs to go through a long joint debugging and testing stage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415741A_ABST
    Figure CN119415741A_ABST
Patent Text Reader

Abstract

The invention discloses an index template generation method and device, equipment, a storage medium and a product, and relates to the technical field of data processing, and the index template generation method comprises the following steps: obtaining target scene information in a preset format sent by a message queue; classifying the target scene information based on a field type, and performing mapping conversion on the classified target scene information based on a preset mapping rule to obtain converted target scene information comprising an index template name and an index processing rule; the target scene information is subjected to index execution, if the obtained execution result is qualified, an index template is generated based on the converted target scene information, the situation that each newly-accessed scene needs to be subjected to long joint debugging and testing stages to complete docking of new scene retrieval requirements can be avoided, and the retrieval efficiency is improved. And the generation efficiency of the index template is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an index template generation method, device, equipment, storage medium and product. Background Art

[0002] As a popular distributed search and analysis engine, Elasticsearch (ES) is widely used due to its powerful full-text search, real-time analysis, and high scalability.

[0003] In related technologies, the steps for using traditional Elasticsearch in new access scenario content can be roughly divided into demand clarification, index template establishment, development and joint debugging, and online deployment. Each newly accessed scenario needs to go through a long joint debugging and testing phase to complete the docking of new scenario retrieval requirements, which reduces the efficiency of index template generation. Summary of the invention

[0004] The main purpose of this application is to provide an index template generation method, which aims to solve the technical problem that each newly connected scene needs to go through a long joint debugging and testing phase to complete the docking of the new scene retrieval requirements, which reduces the efficiency of index template generation.

[0005] To achieve the above purpose, the present application proposes a method for generating an index template, the method comprising:

[0006] Get the target scene information in a preset format sent by the message queue;

[0007] Classifying the target scene information based on the field type, and performing mapping conversion on the classified target scene information based on a preset mapping rule to obtain the converted target scene information including an index template name and an index processing rule;

[0008] The target scene information is indexed and executed, and if the obtained execution result is qualified, an index template is generated based on the converted target scene information.

[0009] In one embodiment, the step of performing indexing on the target scene information and, if the obtained execution result is qualified, generating an index template based on the converted target scene information comprises:

[0010] Obtain target information for user recommendation;

[0011] Through a preset recommendation model, feature extraction is performed on the target information to obtain a preset number of initial features, feature aggregation is performed on the initial features, and recommendation prediction is performed on the aggregated target features to obtain a recommendation result that meets the needs of the user.

[0012] In one embodiment, before the step of obtaining target information for user recommendation, the following steps are included:

[0013] Obtaining sample information and recommendation results corresponding to the sample information;

[0014] Using the recommendation result as a sample label;

[0015] Obtain an initial recommendation model;

[0016] The sample information and the sample labels are input into the initial recommendation model for iterative training to obtain a preset recommendation model that meets the accuracy requirements.

[0017] In one embodiment, the initial features include product features, and the step of extracting features from the target information using a preset recommendation model to obtain a preset number of initial features includes:

[0018] Based on the sample information, determining the target search record of the user;

[0019] Based on the target search record, a preset product word prediction model is used to predict and obtain a target product word;

[0020] Feature extraction is performed on the target product word to obtain product features, and based on the product features, a preset number of initial features are determined.

[0021] In one embodiment, the sample information includes search record data, and before the step of obtaining the sample information and the recommendation result corresponding to the sample information, the following steps are included:

[0022] Acquire the historical search record of the user, wherein the historical search record includes historical search data and product data selected by the user;

[0023] splicing the historical search records in chronological order to obtain a spliced ​​historical search sequence;

[0024] Based on a preset time segmentation rule, segmenting the spliced ​​historical search sequence to obtain at least one historical search record after segmentation;

[0025] Based on each of the historical search records, determining the search term and product term corresponding to the historical search record;

[0026] Obtaining an initial product prediction model;

[0027] The search terms and the product terms are input into the initial product prediction model for iterative training to obtain a preset product term prediction model that meets the accuracy requirements.

[0028] In one embodiment, before the step of obtaining the target scene information in a preset format sent by the message queue, the following steps are included:

[0029] Receiving a content access application, and acquiring initial scene information based on the access application, wherein the initial scene information includes scene content information and self-built content information;

[0030] Encapsulating the initial scene information to obtain the encapsulated initial scene information in a preset format, and pushing the initial scene information to a message queue;

[0031] The step of obtaining the target scene information in a preset format sent by the message queue comprises:

[0032] Get the initial scene information in a preset format sent by the message queue;

[0033] Based on a preset authorization list, the initial scene information is screened to obtain target scene information.

[0034] In addition, to achieve the above purpose, the present application also proposes an index template generation device, the index template generation device comprising:

[0035] An acquisition module is used to acquire target scene information in a preset format sent by a message queue;

[0036] A conversion module, used to classify the target scene information based on the field type, and perform mapping conversion on the classified target scene information based on a preset mapping rule to obtain the converted target scene information including the index template name and the index processing rule;

[0037] The execution module is used to perform index execution on the target scene information, and if the execution result obtained is qualified, generate an index template based on the converted target scene information.

[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes an index template generation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the index template generation method described above.

[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the index template generation method described above are implemented.

[0040] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the index template generation method described above are implemented.

[0041] One or more technical solutions proposed in this application have at least the following technical effects:

[0042] Compared with the related art, each newly connected scene needs to go through a long joint debugging and testing phase to complete the docking of the new scene retrieval requirements, which reduces the efficiency of index template generation. In this application, the target scene information in a preset format is obtained by the message queue; the target scene information is classified based on the field type, and the classified target scene information is mapped and converted based on the preset mapping rules to obtain the converted target scene information including the index template name and the index processing rules; the target scene information is indexed and executed, and if the execution result is qualified, an index template is generated based on the converted target scene information. It can be understood that this The application obtains the target scene information in a preset format sent by the message queue, and classifies the obtained target scene information according to the field type, and maps and converts the classified target scene information to obtain the target scene information including the index template name and the index processing rule. There is no need to go through a long joint debugging and testing phase to complete the docking of the new scene retrieval requirements, and then execute the converted target scene information. After the execution is qualified, an index template is generated based on the converted target scene information. Furthermore, it can be avoided that each newly connected scene needs to go through a long joint debugging and testing phase to complete the docking of the new scene retrieval requirements, which reduces the efficiency of index template generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0045] Figure 1 A flowchart of the first embodiment of the index template generation method of the present application is provided;

[0046] Figure 2 An index template generation flow chart for the index template generation method of the present application;

[0047] Figure 3 A flowchart of the second embodiment of the index template generation method of the present application is provided;

[0048] Figure 4 This is a flowchart of the recommendation result prediction of the index template generation method of this application;

[0049] Figure 5 This is a schematic diagram of the module structure of the index template generating device according to an embodiment of the present application;

[0050] Figure 6 A schematic diagram of the device structure of the hardware operating environment involved in the index template generation method in the embodiment of the present application.

[0051] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0054] The main solution of the embodiment of the present application is: obtain the target scene information in a preset format sent by the message queue; classify the target scene information based on the field type, and map and convert the classified target scene information based on the preset mapping rules to obtain the converted target scene information including the index template name and index processing rules; index and execute the target scene information, and if the execution result obtained is qualified, generate an index template based on the converted target scene information.

[0055] In related technologies, the steps for using traditional Elasticsearch in new access scenario content can be roughly divided into demand clarification, index template establishment, development and joint debugging, and online deployment. Each newly accessed scenario needs to go through a long joint debugging and testing phase to complete the docking of new scenario retrieval requirements, which reduces the efficiency of index template generation.

[0056] The present application obtains the target scene information in a preset format sent by the message queue, classifies the obtained target scene information according to the field type, and maps and converts the classified target scene information to obtain the target scene information including the index template name and the index processing rule. It does not need to go through a long joint debugging and testing phase to complete the docking of the new scene retrieval requirements, and then executes the converted target scene information. After the execution is qualified, an index template is generated based on the converted target scene information. Furthermore, it can be avoided that each newly connected scene needs to go through a long joint debugging and testing phase to complete the docking of the new scene retrieval requirements, which reduces the efficiency of index template generation.

[0057] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes the index template generation device as an example to illustrate this embodiment and the following embodiments.

[0058] Based on this, the present application embodiment provides a method for generating an index template, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the index template generation method of the present application.

[0059] In this embodiment, the index template generation method includes steps S100 to S300:

[0060] Step S100, obtaining target scene information in a preset format sent by a message queue;

[0061] It should be noted that the execution subject of this embodiment is an index template generation device, which is provided with a data access layer, which can automatically or semi-automatically adapt to the API format and data source of various scene contents, reduce the complexity of development and maintenance, reduce the access cost, and make the access and docking of new scenes more convenient and efficient. The index template generation device obtains the information of the new scene through the data access layer, and generates a scene information that can be directly applied to Elasticsearch (search engine).

[0062] It is understandable that the data access layer includes a search middle platform. The target scene information is the basic information of the scene content, including the display name, path, jump URL or menu unique ID, whether login is required to retrieve, whether to use the native navigation bar, branch number, service type, icon ID, channel ID, system ID and search field, etc., which constitute the complete interface agreed JSON Schema information. The message queue is Kafka. The target scene information in the preset format is JSON Schema information. The index template generation device obtains the information of the new scene sent by the message queue in the JSON Schema format that conforms to the interface agreement through the search middle platform of the data access layer. JSON Schema is a standard for describing JSON data structures. This format can define the structure, constraints and semantics of data. Using JSON Schema can help ensure that the data format passed to Elasticsearch is correct and meets the expected constraints.

[0063] In a feasible implementation manner, the following steps are included before step S100:

[0064] Receiving a content access application, and acquiring initial scene information based on the access application, wherein the initial scene information is scene information of an upstream channel and / or self-built scene information;

[0065] It should be noted that the initial scene information includes upstream channel scene content and self-built content. Among them, self-built content also needs to provide basic information of the corresponding content, including display name, path, jump URL or menu unique ID, whether login is required for retrieval, whether to use the native navigation bar, branch number, service type, icon ID, channel ID, system ID, search field and other information.

[0066] It is understandable that the index template generating device receives an access application sent by the upstream channel scene content or self-built content, and obtains basic information of the scene content based on the access application.

[0067] Encapsulating the initial scene information to obtain the encapsulated initial scene information in a preset format, and pushing the initial scene information to a message queue;

[0068] It should be noted that the index template generation device encapsulates the basic information in the scene content to form a complete JSON Schema information of the interface agreement.

[0069] In a feasible implementation manner, the step of obtaining the target scene information in a preset format sent by the message queue includes:

[0070] The initial scene information in a preset format sent by the message queue is obtained, and the initial scene information is screened based on a preset authorization list to obtain the target scene information.

[0071] It is understandable that the search middle station of the index template generating device needs to verify the received messages to ensure that only data from authorized sources will be processed, and then the target scene information will be obtained.

[0072] Step S200, classifying the target scene information based on the field type, and performing mapping conversion on the classified target scene information based on a preset mapping rule to obtain the converted target scene information including an index template name and an index processing rule;

[0073] It should be noted that the index processing rule is a mapping object, which defines whether a field needs to be retrieved, the retrieval field and the text field, etc. After obtaining the target scene information in a preset format, the index template generation device defines the fields of the target scene information based on the preset mapping rules, and classifies the content information corresponding to the field type with the same processing rules. After the classification, each field in the target scene information is defined with mapping, and the data type and attributes of each field are specified, such as whether it can be retrieved, whether it can be stored, etc., so as to realize the parsing of the target scene information.

[0074] Furthermore, the index template generation device is also provided with a scene content database. After parsing the target scene information, the index template generation device stores the parsed target scene information in the scene content database.

[0075] Furthermore, the index template generating device is also provided with an operation platform, and business or development colleagues confirm and review the newly added scene content stored in the scene content database on the operation platform, and reject those that require manual adjustment, and approve those that do not require adjustment.

[0076] Step S300, indexing the target scene information, and if the obtained execution result is qualified, generating an index template based on the converted target scene information.

[0077] It is understood that the index template generates the device target scene information for execution test. If the result of the execution test is qualified, a new index template is generated based on the converted target scene information. Please refer to Figure 2 , Figure 2 Generates a flow chart for the index template.

[0078] Specifically, the index template generation device will batch execute the approved data through a script at a scheduled time: pull the approved information from the scene content database, and use the Elasticsearch service interface to initialize the index template and mapping information, and then generate the ES index template based on the approved target scene information.

[0079] In this implementation, the index template generation device is accessed through a unified data access layer. Compared with the traditional ES new access scenario, it no longer requires the development of search modules to actively pull data, create indexes, and develop docking for each scenario. New scenarios actively push data according to unified specifications, and the system automatically completes index creation, data writing, etc. This reduces system maintenance work, greatly reduces time costs, and achieves efficient access and launch.

[0080] The present application embodiment provides a method for generating an index template, referring to Figure 3 , Figure 3 This is a flow chart of the second embodiment of the index template generation method of the present application.

[0081] In a feasible implementation manner, step S300 includes steps A10 to A20:

[0082] Step A10, obtaining target information for user recommendation;

[0083] It is understandable that the target information includes scene content information, embedded point information, user portraits and search records, where the scene content information is specific content such as articles, videos and product details pages. Embedded point information is data points collected from user behavior on an application or website, such as clickstream data. User portraits are user models built from user behavior habits, preferences and other related information. Search records are historical search behaviors of users, which can be used to infer user interests. The index template generation device obtains target information for user recommendation, including scene content information, embedded point information, user portraits and search records.

[0084] Step A20, extracting features from the target information through a preset recommendation model to obtain a preset number of initial features, aggregating the initial features, performing recommendation prediction on the aggregated target features, and obtaining a recommendation result that meets the needs of the user.

[0085] It should be noted that the preset recommendation model is trained based on the LightGBM (gradient boosting decision tree framework) model. The initial features include the product dimension features of the scene content information; the user behavior special offer total of the buried information; the Query dimension features of the user portrait; and the Query-item (query and project) features of the search record.

[0086] It is understandable that the index template generation device uses the preset recommendation model to extract features from these target information and combines the extracted initial features into a higher-level feature representation to better capture the user's preferences and behavior patterns. Finally, the target features after feature aggregation will be input into the recommendation model to predict the content that the user may be interested in. Please refer to Figure 4 , Figure 4 A flow chart for predicting recommendation results is provided.

[0087] In a feasible implementation manner, the step of obtaining target information for user recommendation includes the following steps:

[0088] Obtaining sample information and recommendation results corresponding to the sample information;

[0089] It should be noted that sample information refers to the data set used to train the recommendation model, which includes user behavior data (such as clicks, purchases, ratings, etc.), item attributes (such as categories, tags, descriptions, etc.) and other contextual information (such as time, location, etc.). Recommendation results refer to sample labels, that is, known actual user feedback or behavior results, or actual clicks, purchases, or ratings of recommended items by users. The index template generation device obtains sample information used to train the recommendation model and known recommendation results of actual user feedback.

[0090] Using the recommendation result as a sample label;

[0091] It is understandable that the index template generation device converts the user's actual feedback on the recommended items into a label form that can be understood by the machine learning model. For example, if the user clicks on the recommended content, it can be marked as a positive example (1), and if not clicked, it can be marked as a negative example (0), and then a sample label is obtained.

[0092] Obtain an initial recommendation model;

[0093] It should be noted that the initial recommendation model is the LightGBM model. The index template generation device selects the LightGBM model as the initial recommendation model.

[0094] The sample information and the sample labels are input into the initial recommendation model for iterative training to obtain a preset recommendation model that meets the accuracy requirements.

[0095] It is understandable that the index template generating device inputs the prepared training data set (including sample information and sample labels) into the selected recommendation model for training. During the training process, the model will continuously adjust its internal parameters to minimize the gap between the predicted results and the actual labels (ie, the loss function). The above steps involve an iterative process. In each iteration, the model will update the parameters according to the gradient of the loss function. Through continuous training, until the model reaches the predetermined accuracy standard, the preset recommendation model is obtained.

[0096] In a feasible implementation manner, the step of extracting features from the target information through a preset recommendation model to obtain a preset number of initial features includes the following steps:

[0097] Based on the sample information, determining the target search record of the user;

[0098] It should be noted that the index template generating device determines the user's target search record from the sample information.

[0099] Based on the target search record, a preset product word prediction model is used to predict and obtain a target product word;

[0100] It is understandable that the preset product word prediction model is obtained based on the Skip-gram model training. The index template generation device predicts the products or keywords that may be of interest to the user from the user's search history through the preset product word prediction model.

[0101] Feature extraction is performed on the target product word to obtain product features, and based on the product features, a preset number of initial features are determined.

[0102] It should be noted that the index template generating device extracts features from the obtained target product words to obtain Query-item features, and based on the product features, determines initial features including the product features.

[0103] In a feasible implementation manner, the step of obtaining sample information and a recommendation result corresponding to the sample information includes the following steps:

[0104] Acquire the historical search record of the user, wherein the historical search record includes historical search data and product data selected by the user;

[0105] It is understandable that the index template generating device obtains the user's historical search records, uses the user's historical search records as a corpus, cleans the user's historical search records, removes invalid characters and stop words, etc., and performs standardization processing, performs word segmentation on each search term (query) and product term (item), generates basic vocabulary units, establishes a dictionary from the segmented data, and records the unique identifier of each vocabulary (such as vocabulary ID).

[0106] splicing the historical search records in chronological order to obtain a spliced ​​historical search sequence;

[0107] It should be noted that the index template generating device stitches each user's search record into a sequence in chronological order.

[0108] Based on a preset time segmentation rule, segmenting the spliced ​​historical search sequence to obtain at least one historical search record after segmentation;

[0109] It is understandable that the preset time segmentation rule is a segmentation rule based on daily boundaries. The index template generation device divides the search sequence into several sessions according to time (based on daily boundaries). Each session represents all search activities within a day, and session division helps capture the user's behavior patterns in different time periods.

[0110] Based on each of the historical search records, determining the search term and product term corresponding to the historical search record;

[0111] It should be noted that, for each session, the index template generation device selects continuous search terms as input and the following search terms or product terms as output. In each session, multiple <input, output> pairs are generated according to a certain sliding window size (such as k=2).

[0112] Obtaining an initial product prediction model;

[0113] It is understandable that the index template generating device uses the Skip-gram model as the initial product prediction model.

[0114] The search terms and the product terms are input into the initial product prediction model for iterative training to obtain a preset product term prediction model that meets the accuracy requirements.

[0115] It should be noted that the index template generation device uses the generated <input, output> pairs to train the model and learn the vector representations (embeddings) of the query and item. The goal of model training is to minimize the prediction error between the input and output, and then obtain a preset product word prediction model that meets the accuracy requirements.

[0116] Furthermore, after the model is trained, the index template generating device can extract the vector representation of each query and item from the model, and use cosine similarity to calculate the similarity between the two vectors.

[0117] In this embodiment, the index template generation device builds user portraits and performs model analysis and training on user behaviors. When different customers perform content searches, the model can recommend results that are more in line with the customer's wishes, thereby improving the customer experience.

[0118] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the index template generation method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0119] This application also provides an index template generation device, please refer to Figure 5 , the index template generating device comprises:

[0120] An acquisition module 10 is used to acquire target scene information in a preset format sent by a message queue;

[0121] The conversion module 20 is used to classify the target scene information based on the field type, and perform mapping conversion on the classified target scene information based on a preset mapping rule to obtain the converted target scene information including the index template name and the index processing rule;

[0122] The execution module 30 is used to perform index execution on the target scene information, and if the execution result obtained is qualified, generate an index template based on the converted target scene information.

[0123] Optionally, the acquisition module includes:

[0124] The encapsulation module is used to receive a content access application, and based on the access application, obtain initial scene information, wherein the initial scene information includes scene content information and self-built content information; encapsulate the initial scene information to obtain the encapsulated initial scene information in a preset format, and push the initial scene information to a message queue; obtain the initial scene information in a preset format sent by the message queue; based on a preset authorization list, filter the initial scene information to obtain target scene information.

[0125] Optionally, the execution module includes:

[0126] The recommendation module is used to obtain target information for user recommendation; through a preset recommendation model, feature extraction is performed on the target information to obtain a preset number of initial features, feature aggregation is performed on the initial features, and recommendation prediction is performed on the aggregated target features to obtain recommendation results that meet the needs of the user.

[0127] Optionally, the recommendation module includes:

[0128] The recommendation model training module is used to obtain sample information and recommendation results corresponding to the sample information; use the recommendation results as sample labels; obtain an initial recommendation model; input the sample information and the sample labels into the initial recommendation model for iterative training to obtain a preset recommendation model that meets the accuracy requirements.

[0129] The product prediction module is used to determine the target search record of the user based on the sample information; based on the target search record, predict through a preset product word prediction model to obtain a target product word; extract features of the target product word to obtain product features, and based on the product features, determine a preset number of initial features.

[0130] Optionally, the recommendation model training module includes:

[0131] A prediction model training module is used to obtain the user's historical search records, wherein the historical search records include historical search data and product data selected by the user; splicing the historical search records in chronological order to obtain a spliced ​​historical search sequence; based on a preset time segmentation rule, the spliced ​​historical search sequence is segmented to obtain at least one of the segmented historical search records; based on each of the historical search records, the search terms and product terms corresponding to the historical search records are determined; an initial product prediction model is obtained; the search terms and product terms are input into the initial product prediction model for iterative training to obtain a preset product term prediction model that meets the accuracy requirements.

[0132] The index template generation device provided by the present application adopts the index template generation method in the above embodiment, which can solve the technical problem of index template generation. Compared with the prior art, the beneficial effects of the index template generation device provided by the present application are the same as the beneficial effects of the index template generation method provided by the above embodiment, and other technical features in the index template generation device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0133] The present application provides an index template generating device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the index template generating method in the above-mentioned embodiment one.

[0134] Reference below Figure 6 , which shows a schematic diagram of the structure of an index template generation device suitable for implementing the embodiment of the present application. The index template generation device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, tablet computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The index template generating device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0135] like Figure 6 As shown, the index template generation device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the index template generation device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the index template generation device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an index template generation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0136] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0137] The index template generation device provided by the present application adopts the index template generation method in the above embodiment, which can solve the technical problem of index template generation. Compared with the prior art, the beneficial effects of the index template generation device provided by the present application are the same as the beneficial effects of the index template generation method provided by the above embodiment, and other technical features in the index template generation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0138] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0139] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0140] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the index template generation method in the above-mentioned embodiment.

[0141] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0142] The computer-readable storage medium may be included in the index template generating device; or may exist independently without being assembled into the index template generating device.

[0143] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the index template generation device, the index template generation device: obtains the target scene information in a preset format sent by the message queue; classifies the target scene information based on the field type, and maps and converts the classified target scene information based on the preset mapping rules to obtain the converted target scene information including the index template name and index processing rules; indexes and executes the target scene information, and if the execution result obtained is qualified, generates an index template based on the converted target scene information.

[0144] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0145] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0146] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0147] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned index template generation method, and can solve the technical problem of index template generation. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the index template generation method provided by the above-mentioned embodiment, and will not be repeated here.

[0148] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned index template generation method when executed by a processor.

[0149] The computer program product provided by the present application can solve the technical problem of index template generation. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the index template generation method provided by the above embodiment, which will not be repeated here.

[0150] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for generating an index template, characterized in that: The index template generation method comprises: Get the target scene information in a preset format sent by the message queue; Classifying the target scene information based on the field type, and performing mapping conversion on the classified target scene information based on a preset mapping rule to obtain the converted target scene information including an index template name and an index processing rule; The target scene information is indexed and executed, and if the obtained execution result is qualified, an index template is generated based on the converted target scene information.

2. The index template generation method according to claim 1, characterized in that: The step of indexing the target scene information and, if the result of the indexing is qualified, generating an index template based on the converted target scene information comprises: Obtain target information for user recommendation; Through a preset recommendation model, feature extraction is performed on the target information to obtain a preset number of initial features, feature aggregation is performed on the initial features, and recommendation prediction is performed on the aggregated target features to obtain a recommendation result that meets the needs of the user.

3. The index template generation method according to claim 2, characterized in that: The step of obtaining target information for user recommendation includes: Obtaining sample information and recommendation results corresponding to the sample information; Using the recommendation result as a sample label; Obtain an initial recommendation model; The sample information and the sample labels are input into the initial recommendation model for iterative training to obtain a preset recommendation model that meets the accuracy requirements.

4. The index template generation method according to claim 3, characterized in that: The initial features include product features, and the step of extracting features from the target information through a preset recommendation model to obtain a preset number of initial features includes: Based on the sample information, determining the target search record of the user; Based on the target search record, a preset product word prediction model is used to predict and obtain a target product word; Feature extraction is performed on the target product word to obtain product features, and based on the product features, a preset number of initial features are determined.

5. The index template generation method according to claim 3, characterized in that: The sample information includes search record data, and the step of obtaining the sample information and the recommendation result corresponding to the sample information includes: Acquire the historical search record of the user, wherein the historical search record includes historical search data and product data selected by the user; splicing the historical search records in chronological order to obtain a spliced ​​historical search sequence; Based on a preset time segmentation rule, segmenting the spliced ​​historical search sequence to obtain at least one historical search record after segmentation; Based on each of the historical search records, determining the search term and product term corresponding to the historical search record; Obtaining an initial product prediction model; The search terms and the product terms are input into the initial product prediction model for iterative training to obtain a preset product term prediction model that meets the accuracy requirements.

6. The index template generation method according to claim 1, characterized in that: The step of obtaining the target scene information in a preset format sent by the message queue includes: Receiving a content access application, and acquiring initial scene information based on the access application, wherein the initial scene information is scene information of an upstream channel and / or self-built scene information; Encapsulating the initial scene information to obtain the encapsulated initial scene information in a preset format, and pushing the initial scene information to a message queue; The step of obtaining the target scene information in a preset format sent by the message queue comprises: The initial scene information in a preset format sent by the message queue is obtained, and the initial scene information is screened based on a preset authorization list to obtain the target scene information.

7. An index template generating device, characterized in that: The device comprises: An acquisition module is used to acquire target scene information in a preset format sent by a message queue; A conversion module, used to classify the target scene information based on the field type, and perform mapping conversion on the classified target scene information based on a preset mapping rule to obtain the converted target scene information including the index template name and the index processing rule; The execution module is used to perform index execution on the target scene information, and if the execution result obtained is qualified, generate an index template based on the converted target scene information.

8. An index template generating device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the index template generating method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the index template generation method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the index template generating method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Document data general conversion method and device

    CN120409426A

  • A method and device for converting bill data

    CN120409426B