Entity label processing method and device based on elastic search engine

By constructing a target physical model, creating a solid label, and generating physical label portrait, the accuracy and efficiency of the acquisition and storage of physical label attribute information in existing technologies have been solved, and more efficient physical search responses are achieved.

CN119377467AActive Publication Date: 2025-01-28BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Application Number
CN202411330920.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-28
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately obtain attribute information corresponding to entity tags and store them effectively, which affects the accuracy and efficiency of entity searches.

Method used

By constructing a target physical model, creating a physical label, and generating physical label portraits according to the physical identification information, stored to the elastic search engine ES to respond to the physical search request.

Benefits of technology

Improve the accuracy and obtaining efficiency of physical tags and physical tag portraits, and improve the response accuracy of elastic search engines for physical search requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377467A_ABST
    Figure CN119377467A_ABST
Patent Text Reader

Abstract

The invention provides an entity tag processing method and device based on an elastic search engine, electronic equipment and a readable storage medium, and relates to the technical field of artificial intelligence such as big data and cloud services. The entity label processing method based on the elastic search engine comprises the following steps: constructing a target entity model according to at least one basic attribute field in at least one entity basic attribute data table; according to a target field in the target entity model and the at least one entity basic attribute data table, creating at least one entity tag, the entity tag including a tag type and a tag value; according to the entity identification information and the at least one entity tag, obtaining an entity tag portrait corresponding to the at least one entity; and storing the entity tag portrait corresponding to the at least one entity in an elastic search engine ES, so that the ES responds to an entity search request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technology, in particular to the field of artificial intelligence technology such as big data and cloud services. Provided are an entity tag processing method, device, electronic device and readable storage medium based on an elastic search engine. Background Art

[0002] In recent years, the rapid development of the Internet has led to an explosion in the amount of information. The demand for obtaining entity tags from big data is increasing day by day. The accuracy and efficiency of entity search based on entity tags are closely related to the accuracy of the attribute information corresponding to the entity tags and the storage of the attribute information. Therefore, how to more accurately obtain and store the attribute information corresponding to the entity tags is a technical problem that needs to be solved urgently. Summary of the invention

[0003] According to a first aspect of the present disclosure, a method for processing entity tags based on an elastic search engine is provided, comprising: constructing a target entity model according to at least one basic attribute field in at least one entity basic attribute data table; creating at least one entity tag according to the target field in the target entity model and the at least one entity basic attribute data table, wherein the entity tag includes a tag type and a tag value; obtaining an entity tag portrait corresponding to at least one entity respectively according to entity identification information and the at least one entity tag; and storing the entity tag portrait corresponding to the at least one entity respectively in an elastic search engine ES, so as to be used by the ES to respond to entity search requests.

[0004] According to a second aspect of the present disclosure, an entity tag processing device based on an elastic search engine is provided, comprising: a construction unit, for constructing a target entity model according to at least one basic attribute field in at least one entity basic attribute data table; a creation unit, for creating at least one entity tag according to the target field in the target entity model and the at least one entity basic attribute data table, wherein the entity tag includes a tag type and a tag value; a processing unit, for obtaining an entity tag portrait corresponding to at least one entity according to entity identification information and the at least one entity tag; and a storage unit, for storing the entity tag portrait corresponding to the at least one entity in the elastic search engine ES, so that the ES can be used to respond to entity search requests.

[0005] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable 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 method as described above.

[0006] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method as described above.

[0007] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the method as described above when executed by a processor.

[0008] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0010] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;

[0011] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;

[0012] Figure 3 is a schematic diagram according to a third embodiment of the present disclosure;

[0013] Figure 4 is a schematic diagram according to a fourth embodiment of the present disclosure;

[0014] Figure 5 is a schematic diagram according to a fifth embodiment of the present disclosure;

[0015] Figure 6 It is a block diagram of an electronic device used to implement the entity tag processing method based on the elastic search engine of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0016] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and mechanisms is omitted in the following description.

[0017] Figure 1 Schematic diagram of the first embodiment of the present disclosure. Figure 1 As shown, the entity tag processing method based on the elastic search engine of this embodiment specifically includes the following steps:

[0018] S101, constructing a target entity model according to at least one basic attribute field in at least one entity basic attribute data table;

[0019] S102: Create at least one entity tag according to the target field in the target entity model and the at least one entity basic attribute data table, wherein the entity tag includes a tag type and a tag value;

[0020] S103, obtaining an entity label portrait corresponding to at least one entity according to the entity identification information and the at least one entity label;

[0021] S104: Storing entity label portraits corresponding to the at least one entity in the elastic search engine ES, so that the ES can be used to respond to entity search requests.

[0022] The entity labeling processing method based on the elastic search engine (Elastic Search, ES) of this embodiment first builds a target entity model according to the basic attribute fields included in the basic attribute data of different entities, and then creates at least one entity label according to the target field in the target entity model and different entity basic attribute data tables, and then obtains the entity label portrait corresponding to at least one entity according to the entity identification information and the at least one entity label, and finally stores the entity label portrait corresponding to the at least one entity in the elastic search engine ES for ES to respond to entity search requests. The present disclosure can improve the accuracy of the created entity labels and the obtained entity label portraits, and can also improve the efficiency of obtaining entity label portraits, thereby improving the accuracy of ES's response to entity search requests based on the stored entity label portraits.

[0023] In this embodiment, different entity basic attribute data tables can come from the same data source (such as MySQL data source, Doris data source, HIVE data source, etc.), or from different data sources. The entity basic attribute data table includes different basic attribute fields and their corresponding field values.

[0024] Among them, the basic attribute fields included in the entity basic attribute data table can be user ID (that is, entity identification information, different entity identification information is used to identify different users), user name, user age, user gender, user department, etc., or vehicle brand, vehicle model, vehicle type, etc.

[0025] In order to improve the integrity of the attribute fields included in the constructed target entity model, this embodiment can also adopt the following implementation method when executing S101: obtain at least one behavior attribute field in at least one entity behavior attribute data table. In this embodiment, different entity behavior attribute data tables can come from the same data source or from different data sources; construct the target entity model based on at least one behavior attribute field and at least one basic attribute field.

[0026] That is to say, this embodiment can also construct the target entity model according to the attribute fields in the entity basic attribute data table and the entity behavior attribute data table at the same time, thereby improving the accuracy of the attribute fields included in the target entity model.

[0027] In this embodiment, the behavior attribute fields included in the entity behavior attribute data table may be user ID (ie, entity identification information), user consumption amount, user purchase item ID, and the like.

[0028] For example, the target entity model constructed by executing S101 in this embodiment includes a user ID field, a user name field, a user age field, a user gender field, a user consumption amount field, a user purchase item ID field, and the like.

[0029] In addition, when executing S101, this embodiment can also construct corresponding different types of target entity models according to different entity basic attribute data tables, or according to different entity basic attribute data tables and different entity behavior attribute data tables. Different types of target entity models include different attribute fields, so that users can select target entity models according to actual needs in subsequent use.

[0030] For example, if there are entity basic attribute data table 1, entity basic attribute data table 2 and entity behavior attribute data table 3 (for example, a data table corresponding to user consumption behavior), when executing S101, this embodiment can construct a target entity model 1 corresponding to the user basic attributes based on data table 1 and data table 2 according to user selection or business needs (excluding the consumption behavior attribute fields in data table 3), and can also construct a target entity model 2 corresponding to user consumption based on data table 1 and data table 3 (excluding the basic attribute fields in data table 2), etc.

[0031] After executing S101 to build the target entity model, this embodiment executes S102 to create at least one entity tag according to the target field in the target entity model and at least one entity basic attribute data table; wherein the created entity tag includes a tag type and a tag value.

[0032] In this embodiment, the tag type of the entity tag corresponds to the target field, and the tag value of the entity tag is a field value obtained from the corresponding attribute data table according to the target field.

[0033] Since different target entity models may include different attribute fields, this embodiment may create different entity tags according to different target fields in different target entity models, thereby improving the flexibility of creating entity tags.

[0034] It is understandable that if this embodiment also uses the behavior attribute field included in the entity behavior attribute data table when executing S101 to build the target entity model, then when executing S102, this embodiment will also obtain the label value corresponding to the target field based on both the entity behavior attribute data table and the entity basic attribute data table.

[0035] For example, if the target entity model includes a user ID field, a user name field, a user age field, a user gender field, a user consumption amount field, and a user purchased item ID field, and if the target fields are the user name field, the user age field, and the user consumption amount field, then the entity tags created in this embodiment may be "name tag: specific name", "age tag: specific age", "high consumption amount tag: consumption amount greater than 2000", "low consumption amount tag: consumption amount less than or equal to 2000", etc.

[0036] When executing S102, this embodiment may obtain a preset attribute field as the target field, or may obtain an attribute field input or selected by the input end according to the target entity model as the target field; the target field in this embodiment may be one or more.

[0037] It can be understood that the different entity tags created by executing S102 in this embodiment, in addition to the tag type and tag value, also correspond to corresponding entity identification information (such as user ID), that is, each entity tag can determine which entity the entity tag corresponds to based on the corresponding entity identification information.

[0038] After executing S102 to create at least one entity tag, this embodiment executes S103 to obtain an entity tag portrait corresponding to at least one entity based on the entity identification information and the at least one entity tag; wherein the entity tag portrait obtained by executing S103 in this embodiment includes tag values ​​corresponding to different tag types of the entity.

[0039] For example, the entity corresponding to entity identification information 1 is entity 1, and the entity label portrait corresponding to entity 1 can be "Name: Zhang San, Age: 20, High Consumption Amount: 8000"; the entity corresponding to entity identification information 2 is entity 3, and the entity label portrait corresponding to entity 2 can be "Name: Li Si, Age: 30, Low Consumption Amount: 1000".

[0040] When executing S103, this embodiment can obtain all entity tags corresponding to the same entity in at least one entity tag based on the entity identification information corresponding to each entity tag, and then obtain the entity tag portrait of the entity corresponding to the entity identification information based on all the obtained entity tags.

[0041] After executing S103 to obtain the entity label portrait corresponding to at least one entity, this embodiment executes S104 to store the entity label portrait corresponding to at least one entity in the elastic search engine ES, so that ES can respond to entity search requests.

[0042] When executing S104, this embodiment can use binary efficient compression to compress the entity label portraits corresponding to different entities, and then directly store the compressed results in ES.

[0043] In this embodiment, after executing S104 to store the entity label portraits corresponding to different entities into ES, ES can respond to the input entity search request according to the stored identification label portraits corresponding to different entities, thereby outputting entity search results corresponding to the entity search request.

[0044] In this embodiment, when the entity tag portrait is stored in ES, it involves updating the online index in ES, for example, a child document is newly associated with a parent document.

[0045] Therefore, in order to avoid the impact of index updates on entity searches, this embodiment may further include the following contents after executing S104: after storing the entity label portraits corresponding to at least one entity in ES, updating the non-online index of ES according to the storage results; replacing the current online index with the updated non-online index; using the replaced current online index as the replaced non-online index, and updating the replaced non-online index according to the storage results.

[0046] That is to say, this embodiment maintains two indexes in ES, one online index and one offline index. When the index is updated, the two indexes will switch back and forth to avoid the problem of being unable to search for entities due to the unavailability of the online index when the index is updated. That is, the label update process in this embodiment is isolated from the entity search process based on the old version. When all stages of the update of a label have not been fully successful (including index update), dirty data will not be read out, thus achieving read concurrency and unlocked write, referring to the COW (Copy On Write) concept.

[0047] Figure 2 is a schematic diagram according to the second embodiment of the present disclosure. Figure 2 As shown, in this embodiment, when executing S103 "storing the entity label portraits corresponding to the at least one entity in the elastic search engine ES", the following contents may also be included:

[0048] S201. For each entity label portrait corresponding to an entity, a parent document corresponding to the entity identification information of the entity in the ES is used as a target parent document;

[0049] S202, determining, through the online index of the ES, at least one child document associated with the target parent document in the ES as at least one candidate child document;

[0050] S203: for each entity tag in the entity tag portrait, determine, according to the tag type, a candidate sub-document corresponding to the entity tag from the at least one candidate sub-document as a target sub-document;

[0051] S204: Store the tag value in the entity tag into the target sub-document.

[0052] That is to say, this embodiment can adopt the storage structure of parent-child documents in ES to store the obtained entity label portrait. Since the parent document will not be affected by the child document, and the child document will not be affected by the parent document, and other child documents can be directly associated under the parent document, it is particularly suitable for the storage of entity labels, which can greatly reduce the amount of data during updates.

[0053] In this embodiment, the parent document in the ES corresponds to different entity identification information. Only one parent document can be determined according to one entity identification information, and the entity identification information is recorded in the parent document.

[0054] When executing S203, if the target subdocument corresponding to the entity tag cannot be determined in the candidate subdocuments, the present embodiment can also create a new subdocument under the target parent document according to the tag type and tag value, and use the newly created subdocument as the target subdocument.

[0055] In this embodiment, the online index of the ES maintains the mapping relationship between different parent documents and different child documents. Through the online index, at least one child document associated with the target parent document can be determined.

[0056] Figure 3 is a schematic diagram according to the third embodiment of the present disclosure. Figure 3 As shown in , this embodiment may also include the following contents:

[0057] S301, obtaining an entity search request input to the ES, wherein the entity search request includes at least one entity tag information to be queried;

[0058] S302: Determine at least one parent document to be processed in the ES according to the at least one entity tag information to be queried through the online index of the ES;

[0059] S303, acquiring at least one target entity according to at least one entity identification information corresponding to the at least one parent document to be processed;

[0060] S304: Obtain entity search results corresponding to the entity search request according to the at least one target entity.

[0061] That is to say, this embodiment can respond to the entity search request input by the user based on ES. Since the storage structure of parent-child documents is used to store entities and their corresponding attribute information, this embodiment can greatly improve the speed of associated queries, thereby improving the response speed of entity search requests.

[0062] When executing S302 in this embodiment, the implementation method that can be adopted is: matching at least one entity tag information to be queried with each sub-document in ES, and obtaining at least one sub-document to be processed according to the matching result; through the online index of ES, at least one parent document in ES corresponding to at least one sub-document to be processed is used as at least one parent document to be processed.

[0063] That is, when executing S302, this embodiment matches the entity tag information to be queried with the tag value recorded in each sub-document, and then obtains at least one sub-document to be processed based on the matching result, and then uses the online index of ES to take at least one parent document in ES corresponding to at least one sub-document to be processed as at least one parent document to be processed.

[0064] For example, if the entity search request is "search for users whose names contain Liu (entity tag information 1 to be queried) and whose age is less than 30 (entity tag information 2 to be queried)", this embodiment can use the sub-document containing "Liu" in the sub-document corresponding to the name tag as the sub-document 1 to be processed, and the sub-document with an age less than 30 recorded in the sub-document corresponding to the age name tag as the sub-document 2 to be processed, and then use the parent document associated with both the sub-document 1 to be processed and the sub-document 2 to be processed as at least one parent document to be processed.

[0065] When executing S304, this embodiment may also include the following contents: determining all sub-documents in ES that correspond to at least one target entity; obtaining entity label portraits corresponding to at least one target entity based on all sub-documents corresponding to each target entity, wherein the entity label portraits include all label types corresponding to the target entity and their corresponding label values; obtaining entity search results corresponding to the entity search request based on at least one target entity and its corresponding entity label portraits.

[0066] That is to say, when responding to an entity search request, this embodiment can not only determine the corresponding entity, but also determine the entity label portrait corresponding to the entity, which can improve the completeness of the obtained entity search results.

[0067] Figure 4 is a schematic diagram according to the fourth embodiment of the present disclosure. Figure 4 As shown in , this embodiment shows an architecture diagram of entity tag processing based on the elastic search engine; wherein, the business-Service is used to obtain corresponding entity search results based on ES according to the entity search request input by the user; the background-Service is used to schedule the Trino engine to query the tag value according to the attribute field included in the target entity model according to the task forwarded by the business-Service, and store the tag value obtained by the query in ES; in this implementation, the query process of the tag value and the response process of the entity search request can be carried out simultaneously; wherein, the Trino query engine can query the tag value according to the attribute field included in the target entity model.

[0068] Figure 5 is a schematic diagram according to the fifth embodiment of the present disclosure. Figure 5 As shown, the entity tag processing device 500 based on the elastic search engine of this embodiment includes:

[0069] A construction unit 501 is used to construct a target entity model according to at least one basic attribute field in at least one entity basic attribute data table;

[0070] A creating unit 502, configured to create at least one entity tag according to the target attribute field in the target entity model and the at least one entity basic attribute data table, wherein the entity tag includes a tag type and a tag value;

[0071] A processing unit 503 is configured to obtain an entity label portrait corresponding to at least one entity according to the entity identification information and the at least one entity label;

[0072] The storage unit 504 is used to store the entity label portraits corresponding to the at least one entity in the elastic search engine ES, so that the ES can respond to the entity search request.

[0073] In order to improve the integrity of the attribute fields in the constructed target entity model, the construction unit 501 can also adopt the following implementation method: obtain at least one behavior attribute field in at least one entity behavior attribute data table; and construct the target entity model based on at least one behavior attribute field and at least one basic attribute field.

[0074] It is understandable that if the present embodiment also uses the entity behavior attribute data table when constructing the target entity model, the creation unit 502 will also combine the entity behavior attribute data table with the entity basic attribute data table to obtain the tag value.

[0075] The entity tag processing device 500 based on the elastic search engine of this embodiment may also include an update unit 505, which is used to perform: after storing the entity tag portraits corresponding to at least one entity in ES, updating the non-online index of ES according to the storage result; replacing the current online index with the updated non-online index; using the replaced current online index as the replaced non-online index, and updating the replaced non-online index according to the storage result.

[0076] When the storage unit 504 stores the entity label portraits corresponding to at least one entity in the elastic search engine ES, it can also include the following contents: for each entity label portrait corresponding to the entity, the parent document corresponding to the entity identification information of the entity in the ES is used as the target parent document; through the online index of the ES, at least one child document associated with the target parent document in the ES is determined as at least one candidate child document; for each entity tag in the entity label portrait, according to the tag type, a candidate subdocument corresponding to the entity tag is determined from at least one candidate subdocument as the target subdocument; and the tag value in the entity tag is stored in the target subdocument.

[0077] The entity tag processing device 500 based on the elastic search engine of this embodiment may also include a response unit 506, which is used to perform the following operations: obtaining an entity search request input into the ES, wherein the entity search request includes at least one entity tag information to be queried; determining at least one parent document to be processed in the ES according to at least one entity tag information to be queried through the online index of the ES; obtaining at least one target entity according to at least one entity identification information corresponding to the at least one parent document to be processed; and obtaining entity search results corresponding to the entity search request according to the at least one target entity.

[0078] When the response unit 506 obtains the entity search result of the corresponding entity search request based on at least one target entity, it may also include the following contents: determining all sub-documents corresponding to the at least one target entity in the ES; obtaining the entity label portrait corresponding to the at least one target entity based on all sub-documents corresponding to each target entity, the entity label portrait including all label types corresponding to the target entity and their corresponding label values; obtaining the entity search result of the corresponding entity search request based on at least one target entity and its corresponding entity label portrait.

[0079] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0080] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0081] like Figure 6 , is a block diagram of an electronic device according to an entity tag processing method based on an elastic search engine according to an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0082] like Figure 6As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0083] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 606, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0084] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as an entity tag processing method based on an elastic search engine. For example, in some embodiments, an entity tag processing method based on an elastic search engine may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608.

[0085] In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the entity tagging processing method based on the elastic search engine described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to execute the entity tagging processing method based on the elastic search engine in any other appropriate manner (e.g., by means of firmware).

[0086] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0087] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable elastic search engine-based entity tag processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0088] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.

[0089] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0090] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0091] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server for a distributed system, or a server combined with a blockchain.

[0092] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0093] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. An entity tag processing method based on an elastic search engine, comprising: Constructing a target entity model according to at least one basic attribute field in at least one entity basic attribute data table; Creating at least one entity tag according to the target attribute field in the target entity model and the at least one entity basic attribute data table, wherein the entity tag includes a tag type and a tag value; Obtaining an entity label portrait corresponding to at least one entity according to the entity identification information and the at least one entity label; The entity label portraits respectively corresponding to the at least one entity are stored in the elastic search engine ES, so that the ES can be used to respond to entity search requests.

2. The method according to claim 1, wherein: The step of constructing a target entity model according to at least one basic attribute field in at least one entity basic attribute data table comprises: Obtain at least one behavior attribute field in at least one entity behavior attribute data table; The target entity model is constructed according to the at least one behavior attribute field and the at least one basic attribute field.

3. The method according to claim 1, wherein: The storing of the entity label portraits corresponding to the at least one entity in the elastic search engine ES includes: For each entity label portrait corresponding to an entity, the parent document corresponding to the entity identification information of the entity in the ES is used as the target parent document; Determine, through the online index of the ES, at least one child document associated with the target parent document in the ES as at least one candidate child document; For each entity tag in the entity tag portrait, according to the tag type, determine a candidate sub-document corresponding to the entity tag from the at least one candidate sub-document as a target sub-document; The tag value in the entity tag is stored in the target sub-document.

4. The method according to claim 1, further comprising: Obtaining an entity search request input to the ES, wherein the entity search request includes at least one entity tag information to be queried; Determine, through the online index of the ES, at least one parent document to be processed in the ES according to the at least one entity tag information to be queried; Acquire at least one target entity according to at least one entity identification information corresponding to the at least one parent document to be processed; According to the at least one target entity, an entity search result corresponding to the entity search request is obtained.

5. The method according to claim 4, wherein: The determining, through the online index of the ES, at least one parent document to be processed in the ES according to the at least one entity tag information to be queried comprises: Matching the at least one entity tag information to be queried with each sub-document in the ES, and obtaining at least one sub-document to be processed according to the matching result; At least one parent document in the ES corresponding to the at least one to-be-processed child document is used as the at least one to-be-processed parent document through the online index of the ES.

6. The method according to claim 4, wherein: The obtaining, according to the at least one target entity, entity search result corresponding to the entity search request comprises: Determine all sub-documents in the ES that respectively correspond to the at least one target entity; According to all sub-documents corresponding to each target entity, obtaining entity label portraits corresponding to the at least one target entity respectively; According to the at least one target entity and its corresponding entity label portrait, an entity search result corresponding to the entity search request is obtained.

7. The method according to claim 1, further comprising: After storing the entity label portraits respectively corresponding to the at least one entity in the ES, updating the non-online index of the ES according to the storage result; Replace the current online index with the updated offline index; The replaced current online index is used as the replaced offline index, and the replaced offline index is updated according to the stored result.

8. An entity tag processing device based on an elastic search engine, comprising: A construction unit, configured to construct a target entity model according to at least one basic attribute field in at least one entity basic attribute data table; A creating unit, configured to create at least one entity tag according to the target attribute field in the target entity model and the at least one entity basic attribute data table, wherein the entity tag includes a tag type and a tag value; A processing unit, configured to obtain an entity label portrait corresponding to at least one entity according to the entity identification information and the at least one entity label; The storage unit is used to store the entity label portraits corresponding to the at least one entity in the elastic search engine ES, so that the ES can respond to the entity search request.

9. The device according to claim 8, wherein: When the construction unit constructs the target entity model according to at least one basic attribute field in at least one entity basic attribute data table, the construction unit specifically performs: Obtain at least one behavior attribute field in at least one entity behavior attribute data table; The target entity model is constructed according to the at least one behavior attribute field and the at least one basic attribute field.

10. The device according to claim 8, wherein: When the storage unit stores the entity label portraits corresponding to the at least one entity in the elastic search engine ES, the storage unit specifically performs: For each entity label portrait corresponding to an entity, the parent document corresponding to the entity identification information of the entity in the ES is used as the target parent document; Determine, through the online index of the ES, at least one child document associated with the target parent document in the ES as at least one candidate child document; For each entity tag in the entity tag portrait, according to the tag type, determine a candidate sub-document corresponding to the entity tag from the at least one candidate sub-document as a target sub-document; The tag value in the entity tag is stored in the target sub-document.

11. The apparatus according to claim 8, further comprising a response unit, configured to execute: Obtaining an entity search request input to the ES, wherein the entity search request includes at least one entity tag information to be queried; Determine, through the online index of the ES, at least one parent document to be processed in the ES according to the at least one entity tag information to be queried; Acquire at least one target entity according to at least one entity identification information corresponding to the at least one parent document to be processed; According to the at least one target entity, an entity search result corresponding to the entity search request is obtained.

12. The device according to claim 11, wherein When the response unit determines at least one parent document to be processed in the ES according to the at least one entity tag information to be queried through the online index of the ES, the response unit specifically performs: Matching the at least one entity tag information to be queried with each sub-document in the ES, and obtaining at least one sub-document to be processed according to the matching result; At least one parent document in the ES corresponding to the at least one to-be-processed child document is used as the at least one to-be-processed parent document through the online index of the ES.

13. The device according to claim 11, wherein: When the response unit obtains the entity search result corresponding to the entity search request according to the at least one target entity, specifically: Determine all sub-documents in the ES that respectively correspond to the at least one target entity; According to all sub-documents corresponding to each target entity, obtaining entity label portraits corresponding to the at least one target entity respectively; According to the at least one target entity and its corresponding entity label portrait, an entity search result corresponding to the entity search request is obtained.

14. The apparatus according to claim 8, further comprising an updating unit, configured to execute: After storing the entity label portraits respectively corresponding to the at least one entity in the ES, updating the non-online index of the ES according to the storage result; Replace the current online index with the updated offline index; The replaced current online index is used as the replaced offline index, and the replaced offline index is updated according to the stored result.

15. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; 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 to enable the at least one processor to perform the method according to any one of claims 1 to 7.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.

17. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • User portrait drawing method and device

    CN112182391A

  • Data processing method, device and equipment and readable storage medium

    CN114385620A

  • Multi-entity-oriented label system and processing method

    CN114564482A

  • Method and apparatus for using tag topology

    US20080140619A1

Cited By

  • Data retrieval method and device, computer program product and readable storage medium

    CN120821743A