Entity tag processing method and device based on elastic search engine
By building a target entity model and generating entity label portraits, the problems of inaccurate entity label acquisition and storage are solved, and efficient and accurate response to entity search is achieved.
Patent Information
- Application Number
- CN202411330920.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-09-23
AI Technical Summary
Existing technologies lack accuracy and efficiency in obtaining entity labels from big data, and the storage of attribute information during entity search is not precise enough.
An elastic search engine-based method is adopted to build a target entity model, create entity tags, generate entity tag portraits, and store them in the elastic search engine to respond to entity search requests.
Improves the accuracy and acquisition efficiency of entity tags, and improves the accuracy and speed of responses to entity search requests.
Smart Images

Figure CN119377467B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, in particular to artificial intelligence technologies such as big data and cloud services. A method, device, electronic device, and readable storage medium for entity tagging based on an elastic search engine are provided. Background Art
[0002] In recent years, the rapid development of the internet has led to an explosion in information volume, resulting in a growing demand for entity tags from big data. Furthermore, the accuracy and efficiency of entity searches based on entity tags are closely linked to the accuracy and storage of the attribute information corresponding to the entity tags. Therefore, how to more accurately obtain and store the attribute information corresponding to entity tags is a pressing technical challenge. 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 based on at least one basic attribute field in at least one entity basic attribute data table; creating at least one entity tag based on a 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 based on entity identification information and the at least one entity tag; and storing the entity tag portrait corresponding to the at least one entity in an elastic search engine ES for use by the ES in responding 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 based on 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 based on a 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 based on 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 an elastic search engine ES, so that the ES can 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 to enable the at least one processor to execute the method 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 enable 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 described above when executed by a processor.
[0008] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The accompanying drawings are provided to facilitate a better understanding of the present invention 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 according to the embodiment of the present disclosure. DETAILED DESCRIPTION
[0016] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, and various details of the embodiments of the present disclosure are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize 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, descriptions of well-known functions and mechanisms are 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. Construct 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: Obtain an entity label portrait corresponding to at least one entity based on 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 respond to entity search requests.
[0022] The entity labeling processing method based on the Elastic Search engine (ES) of this embodiment first constructs 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 fields 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, this embodiment can also construct the target entity model based on 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 based on different entity basic attribute data tables, or based on 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 the target entity model according to actual needs in subsequent use.
[0030] For example, if there is an entity basic attribute data table 1, an entity basic attribute data table 2 and an 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 field 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 field 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 based on 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 include different attribute fields, this embodiment can create different entity tags according to different target fields in different target entity models, thereby improving the flexibility of creating entity tags.
[0034] It can be understood that if this embodiment also uses the behavior attribute fields 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 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 can 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 in this embodiment, a preset attribute field may be obtained as the target field, or an attribute field input or selected by the input end according to the target entity model may be obtained 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 including the tag type and tag value, will also correspond to the 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, then 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, then 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 the 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 based on 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 new child document is 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 during the index update. 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, realizing read concurrency and unlocked writing, referring to the COW (Copy On Write) concept.
[0047] Figure 2 Schematic diagram of 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 the entity, the parent document corresponding to the entity identification information of the entity in the ES is used as the target parent document;
[0049] S202. 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;
[0050] S203: For each entity tag in the entity tag portrait, determine, based on the tag type, a candidate subdocument corresponding to the entity tag from the at least one candidate subdocument as a target subdocument;
[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 tag 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 tags, which can greatly reduce the amount of data during updates.
[0053] In this embodiment, the parent documents in the ES correspond to different entity identification information. Only one parent document can be determined based on one entity identification information, and the entity identification information is recorded in the parent document.
[0054] When executing S203, if the target sub-document corresponding to the entity tag cannot be determined in the candidate sub-documents, this embodiment can also create a new sub-document under the target parent document based on the tag type and tag value, and use the newly created sub-document as the target sub-document.
[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 Schematic diagram of the third embodiment of the present disclosure. Figure 3 As shown in , this embodiment may also include the following contents:
[0057] S301: Obtain an entity search request input to the ES, where 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 based on the at least one entity tag information to be queried through the online index of the ES;
[0059] S303: 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;
[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 entity search requests input by users 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 based on 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 label information to be queried with the label 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 use at least one parent document in ES corresponding to the 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 with "Liu" recorded in the sub-document corresponding to the name tag as the sub-document to be processed 1, and the sub-document with the age less than 30 recorded in the sub-document corresponding to the age name tag as the sub-document to be processed 2, and then use the parent document associated with both the sub-document to be processed 1 and the sub-document to be processed 2 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 portrait includes 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 portrait.
[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 Schematic diagram of the fourth embodiment of the present disclosure. Figure 4 As shown in , this embodiment shows an architectural 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 fields 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 tag value query process and the entity search request response process can be carried out simultaneously; wherein, the Trino query engine can query the tag value according to the attribute fields included in the target entity model.
[0068] Figure 5 Schematic diagram of 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 configured 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 is 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 entity behavior attribute data table is also used when constructing the target entity model in this embodiment, the creation unit 502 will also combine the entity behavior attribute data table and the entity basic attribute data table to obtain the label 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 the following operations: 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 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.
[0076] When the storage unit 504 stores the entity label portrait corresponding to at least one entity in the elastic search engine ES, it may 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 label in the entity label portrait, according to the label type, a candidate child document corresponding to the entity label is determined from at least one candidate child document as the target child document; and the label value in the entity label is stored in the target child document.
[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 the 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 results 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 results of the corresponding entity search request based on the at least one target entity and its corresponding entity label portrait.
[0079] In the technical solutions disclosed herein, the acquisition, storage, and application of user personal information involved comply 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 tagging 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, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can 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. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. 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] Various components in device 600 are connected to I / O interface 605, including: input unit 606, such as a keyboard, mouse, etc.; output unit 606, such as various types of displays, speakers, etc.; storage unit 608, such as a magnetic disk, optical disk, etc.; and communication unit 609, such as a network card, modem, wireless communication transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0084] The computing unit 601 can be various 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 that run 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, the entity tag processing method based on an elastic search engine can be implemented as a computer software program that 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 can 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 can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to execute the entity tagging processing method based on the elastic search engine by any other appropriate means (for example, by means of firmware).
[0086] Various embodiments 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), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes 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 when the program code is executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine 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 can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can 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 can 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 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 can 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 having 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 can 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 server are generally remote from each other and typically interact via a communication network. The client-server relationship is established by computer programs running on the respective computers and establishing a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service system that addresses the management difficulties and poor business scalability of traditional physical hosts and VPS services ("Virtual Private Servers," or simply "VPS"). The server may also be a server in a distributed system or a server integrated with blockchain.
[0092] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0093] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A method for processing entity tags 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; Storing 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; The step of storing 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 the entity, the parent document corresponding to the entity identification information of the entity in the ES is used as the target parent document; 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; For each entity tag in the entity tag portrait, determining, according to the tag type, a candidate subdocument corresponding to the entity tag from the at least one candidate subdocument as a target subdocument; The tag value in the entity tag is stored in the target sub-document.
2. The method according to claim 1, wherein The constructing of the target entity model according to at least one basic attribute field in at least one entity basic attribute data table includes: 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, 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; Determining 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; 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, entity search results corresponding to the entity search request are obtained.
4. The method according to claim 3, wherein: Determining 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 includes: 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 corresponding to the at least one to-be-processed child document in the ES is used as the at least one to-be-processed parent document through the online index of the ES.
5. The method according to claim 3, wherein Obtaining entity search results corresponding to the entity search request according to the at least one target entity includes: Determining all sub-documents in the ES that respectively correspond to the at least one target entity; Obtaining entity label portraits corresponding to the at least one target entity, based on all sub-documents corresponding to each target entity; According to the at least one target entity and its corresponding entity label portrait, entity search results corresponding to the entity search request are obtained.
6. The method according to claim 1, further comprising: After storing the entity label portraits corresponding to the at least one entity in the ES, updating the offline 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 offline index after replacement, and the offline index after replacement is updated according to the stored result.
7. 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; A storage unit, configured to store the entity label portraits corresponding to the at least one entity in an elastic search engine ES, so that the ES can respond to entity search requests; When storing 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 the entity, the parent document corresponding to the entity identification information of the entity in the ES is used as the target parent document; 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; For each entity tag in the entity tag portrait, determining, according to the tag type, a candidate subdocument corresponding to the entity tag from the at least one candidate subdocument as a target subdocument; The tag value in the entity tag is stored in the target sub-document.
8. The device according to claim 7, 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.
9. The apparatus according to claim 7, 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; Determining 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; 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, entity search results corresponding to the entity search request are obtained.
10. The device according to claim 9, 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 corresponding to the at least one to-be-processed child document in the ES is used as the at least one to-be-processed parent document through the online index of the ES.
11. The device according to claim 9, wherein When the response unit obtains the entity search result corresponding to the entity search request according to the at least one target entity, the response unit specifically performs: Determining all sub-documents in the ES that respectively correspond to the at least one target entity; Obtaining entity label portraits corresponding to the at least one target entity, based on all sub-documents corresponding to each target entity; According to the at least one target entity and its corresponding entity label portrait, entity search results corresponding to the entity search request are obtained.
12. The apparatus according to claim 7, further comprising an updating unit configured to perform: After storing the entity label portraits corresponding to the at least one entity in the ES, updating the offline 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 offline index after replacement, and the offline index after replacement is updated according to the stored result.
13. 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 6.
14. 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 6.
15. 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 6.
Citation Information
Patent Citations
User portrait drawing method and device
CN112182391A
Data processing method, device and equipment and readable storage medium
CN114385620A