Data query method and device, electronic equipment and medium

By converting query condition text into vectors and calculating weights based on user preferences, the problems of high system complexity and low efficiency in multimodal data query are solved, achieving efficient and flexible multimodal data query.

CN123178591APending Publication Date: 2026-11-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510687344.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing multimodal data query solutions require the establishment of independent retrieval subsystems for different modalities of content, resulting in high system complexity, low efficiency, and difficulty in meeting flexible query needs.

Method used

The query condition text is converted into a query condition text vector. The similarity between each query content vector in the query content vector library and the query condition text vector is calculated. A user content type preference vector is generated based on the query user's historical information. The weight of the query content vector is determined. The query result is determined among multiple query contents by weighted similarity.

Benefits of technology

It improves the efficiency of data retrieval for various content types, meets the personalized needs of query users, and enhances the flexibility of queries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178591A_ABST
    Figure CN123178591A_ABST
Patent Text Reader

Abstract

The present disclosure provides a data query method and device, electronic equipment and medium. The data query method comprises: converting a query condition text of a query user into a query condition text vector; calculating the similarity between each to-be-queried content vector in a to-be-queried content vector library and the query condition text vector; generating a user content type preference vector of the query user based on the first query history information of the query user on the to-be-queried content; determining the weight corresponding to the to-be-queried content vector; weighting the similarity corresponding to the to-be-queried content vector based on the weight corresponding to the to-be-queried content vector to obtain a weighted similarity, and determining the query result corresponding to the query condition text based on the weighted similarity of each to-be-queried content vector. For data query of multiple content types, the present embodiment can improve the query efficiency and flexibility. The present embodiment can be applied to various scenarios such as information retrieval, smart home, creative generation, etc.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of natural language processing, and in particular to a data query method, apparatus, electronic device, and medium. Background Technology

[0002] Multimodal data query is a technique that allows you to retrieve content of multiple modalities (such as text, images, audio, video, etc.) using a single query condition.

[0003] In related multimodal data query solutions, independent indexes and retrieval subsystems need to be established for different modalities of content. For example, a retrieval subsystem is established for images, and another for videos. When a user initiates a query, queries are performed in parallel across multiple retrieval subsystems, and the results are then integrated. This solution requires maintaining multiple independent retrieval subsystems, leading to high system complexity and low efficiency. Moreover, users often prioritize certain types of content depending on the context, such as videos. In this solution, multiple retrieval subsystems operate equally, making it difficult to meet flexible query needs. Summary of the Invention

[0004] This disclosure provides a data query method, apparatus, electronic device, and medium that can improve query efficiency and flexibility for data queries of various content types.

[0005] According to one aspect of this disclosure, a data query method is provided, comprising:

[0006] Convert the query text of the user into a query text vector;

[0007] Calculate the similarity between each query content vector in the query content vector library and the query condition text vector, wherein the query content vector is obtained by converting the query content, and the query content has a content type;

[0008] Based on the query user's first query history information for the content to be queried, a user content type preference vector is generated for the query user, and the user content type preference vector indicates the query user's preference for the content to be queried of various content types;

[0009] Based on the user content type preference vector and the content type of the content to be queried corresponding to the content vector to be queried, the weight corresponding to the content vector to be queried is determined;

[0010] Based on the weights corresponding to the content vectors to be queried, the similarities corresponding to the content vectors to be queried are weighted to obtain a weighted similarity. Based on the weighted similarities of each content vector to be queried, the query results corresponding to the query condition text are determined.

[0011] According to one aspect of this disclosure, a data query apparatus is provided, the data query apparatus comprising:

[0012] The transformation unit is used to convert the query condition text of the query user into a query condition text vector;

[0013] A calculation unit is used to calculate the similarity between each query content vector in the query content vector library and the query condition text vector, wherein the query content vector is obtained by converting the query content, and the query content has a content type;

[0014] The generation unit is configured to generate a user content type preference vector for the querying user based on the querying user's first query history information for the content to be queried, wherein the user content type preference vector indicates the querying user's preference for the content to be queried of various content types;

[0015] The determining unit is used to determine the weight corresponding to the query content vector based on the user content type preference vector and the content type of the query content corresponding to the query content vector;

[0016] The weighting unit is used to weight the similarity corresponding to the content vector to be queried based on the weight corresponding to the content vector to be queried, to obtain a weighted similarity, and to determine the query result corresponding to the query condition text based on the weighted similarity of each content vector to be queried.

[0017] Optionally, the conversion unit is specifically used for:

[0018] The query condition text is analyzed to obtain the query entity and query intent in the query condition text;

[0019] The query entity and the query intent are expanded using the expansion model to obtain multiple expanded entities corresponding to the query entity and multiple expanded intents corresponding to the query intent.

[0020] Based on the expanded entity and the expanded intent, a vector transformation is performed to obtain the query condition text vector.

[0021] Optionally, the conversion unit is specifically used for:

[0022] The expanded entity and the expanded intent are respectively converted into an expanded entity vector and an expanded intent vector using a vector transformation model.

[0023] Determine the first weight corresponding to each of the extended entity vectors and the second weight corresponding to each of the extended intent vectors;

[0024] The expanded entity vector and the expanded intent vector are weighted and averaged based on the first weight and the second weight to obtain the query condition text vector.

[0025] Optionally, the computing unit is specifically used for:

[0026] Retrieve the content to be queried;

[0027] Convert the content to be queried into a vector of content to be queried;

[0028] The vector of the content to be queried and the storage location information of the content to be queried are stored in correspondence to obtain the vector library of the content to be queried.

[0029] Optionally, the computing unit is specifically used for:

[0030] If the content type of the content to be queried is text, perform vector conversion on the content to be queried to obtain the vector of the content to be queried;

[0031] If the content type of the content to be queried is a non-text type, a summary text extraction model is used to extract summary text from the content to be queried, and the summary text is vectorized to obtain the vector of the content to be queried.

[0032] Optionally, the computing unit is specifically used for:

[0033] If the content type of the content to be queried is text, perform text cleaning on the content to be queried to obtain noise-reduced text;

[0034] Determine the entity information and semantic information in the denoised text;

[0035] The entity information and semantic information are summarized using a text summarization model to obtain the summary text corresponding to the content to be queried.

[0036] The summary text is vectorized to obtain the vector of the content to be queried.

[0037] Optionally, the non-text type includes image type, and the calculation unit is specifically used for:

[0038] If the content type of the content to be queried is an image, perform key region detection on the content to be queried to obtain multiple key regions;

[0039] By extracting visual features from the key regions, we can obtain the image content, image objects, and image scene.

[0040] The summary text is obtained by using the summary text extraction model to extract the summary of the image content, the image object, and the image scene.

[0041] Optionally, the non-text type includes audio type, and the computing unit is specifically used for:

[0042] If the content type of the content to be queried is audio, perform speech recognition on the content to be queried to obtain speech recognition data;

[0043] Determine the speech content, the corresponding time point, and the speech features in the speech recognition data;

[0044] The speech content and speech features are analyzed using a sentiment analysis model to obtain speech sentiment information;

[0045] The summary text is obtained by using the summary text extraction model to extract the summary text from the speech content, the time point corresponding to the speech content, the speech features and the speech emotion information.

[0046] Optionally, the non-text type includes video type, and the computing unit is specifically used for:

[0047] If the content type of the content to be queried is a video type, the content to be queried is sampled at intervals to extract frames, resulting in multiple video frame data.

[0048] Key region detection and visual feature extraction are performed on the video frame data to obtain video frame content, video frame objects, and video frame scenes;

[0049] The summary text extraction model is used to extract the summary text of the video frame content, the video frame object, and the video frame scene to obtain the summary text corresponding to each video frame data.

[0050] Extract video and audio data from the content to be queried, and determine the video and audio content, the time point corresponding to the video and audio content, video and audio features, and video emotional information in the video and audio data;

[0051] The summary text extraction model is used to extract the summary text of the video audio content, the time points corresponding to the video audio content, the video audio features, and the video emotional information to obtain the summary text corresponding to the video audio data.

[0052] The summary text corresponding to each video frame data and the summary text corresponding to the video audio data are integrated to obtain the summary text of the content to be queried.

[0053] Optionally, the computing unit is specifically used for:

[0054] The query complexity is determined based on the query condition text.

[0055] The detection parameters are determined based on the query complexity.

[0056] Based on the detection parameters, an approximate nearest neighbor search is performed in the query content vector library to obtain the similarity between each query content vector and the query condition text vector.

[0057] Optionally, the generation unit is specifically used for:

[0058] In the first query history information, determine the first occurrence count of the content to be queried for each content type;

[0059] In the first query history information, determine the first total number of occurrences of the content to be queried;

[0060] Based on the first occurrence count and the first total occurrence count for each content type, calculate the proportion of the first content for each content type;

[0061] Based on the first content proportion corresponding to each content type, the user content type preference vector is generated.

[0062] Optionally, the determining unit is specifically used for:

[0063] Based on the second query history information of multiple platform users for the content to be queried, an average content type preference vector of the multiple platform users is generated. The average content type preference vector indicates the average preference of each platform user for the content to be queried of various content types. The multiple platform users include the querying user.

[0064] Calculate the difference vector between the user content type preference vector and the average content type preference vector;

[0065] Based on the difference vector and the content type of the content to be queried corresponding to the content vector to be queried, the weight corresponding to the content vector to be queried is determined.

[0066] Optionally, the determining unit is specifically used for:

[0067] In the second query history information, determine the second occurrence count of the content to be queried for each content type;

[0068] In the second query history information, determine the second total number of occurrences of the content to be queried;

[0069] Based on the second occurrence count and the second total occurrence count for each content type, calculate the proportion of the second content for each content type;

[0070] Based on the second content proportion corresponding to each content type, the average content type preference vector is generated.

[0071] Optionally, the determining unit is specifically used for:

[0072] For each content type, calculate the difference between the percentage of the first content corresponding to the content type and the percentage of the second content corresponding to the content type;

[0073] The percentage difference corresponding to each content type is used as a vector element to form the difference vector.

[0074] Optionally, the determining unit is specifically used for:

[0075] In the difference vector, determine the vector element corresponding to the content type;

[0076] The vector elements are transformed to obtain the weights corresponding to the vector of the content to be queried.

[0077] Optionally, the determining unit is specifically used for:

[0078] Get the base number greater than 1;

[0079] The exponent obtained by using the vector elements as the base is used as the weight.

[0080] Optionally, the weighting unit is specifically used for:

[0081] Based on the weighted similarity of each of the query content vectors, the target content vector is determined among the query content vectors;

[0082] The content to be queried corresponding to the target content vector is determined as the query result.

[0083] Optionally, the vector of content to be queried and the storage location information of the content to be queried corresponding to the vector of content to be queried are stored in the vector of content to be queried in association.

[0084] The weighting unit is specifically used for:

[0085] In the content vector library to be queried, determine the storage location information corresponding to the target content vector;

[0086] Based on the storage location information, the content to be queried corresponding to the target content vector is found and used as the query result.

[0087] Optionally, the data query device further includes an integration unit, which is specifically used for:

[0088] The query results for each content type are integrated using a content integration model to obtain the presented content.

[0089] According to one aspect of this disclosure, an electronic device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the data query method as described above.

[0090] According to one aspect of this disclosure, a computer-readable storage medium is provided, the storage medium storing a computer program that, when executed by a processor, implements the data query method described above.

[0091] According to one aspect of this disclosure, a computer program product is provided, comprising a computer program that is read and executed by a processor of a computer device, causing the computer device to perform the data query method as described above.

[0092] This embodiment of the disclosure eliminates the need to construct a separate retrieval subsystem for each content type. Regardless of content type, all content is converted into a query content vector and stored in a query content vector library. When a user performs a query, the query condition text is converted into a query condition text vector. By calculating the weighted similarity between each query content vector in the query content vector library and the query condition text vector, the query result is determined among multiple query contents. This method blurs the distinctions between various content types through the comparison of weighted similarity, eliminating the need for a separate retrieval subsystem and improving query efficiency for data queries involving multiple content types. In obtaining the weights in the weighted similarity calculation, this embodiment generates a user content type preference vector based on the user's first query history information for the query content, and determines the weight corresponding to the query content vector based on the user content type preference vector and the content type of the query content. Therefore, it fully considers the user's preferences for different content types of query content to determine the content type emphasis when returning query results, making the query results more in line with the user's personalized needs and improving the flexibility of data querying.

[0093] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objectives and other advantages of this disclosure may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0094] The accompanying drawings are provided to further understand the technical solutions of this disclosure and constitute a part of the specification. They are used together with the embodiments of this disclosure to explain the technical solutions of this disclosure and do not constitute a limitation on the technical solutions of this disclosure.

[0095] Figure 1 This is a system architecture diagram of a data query method applied according to an embodiment of the present disclosure;

[0096] Figure 2A This is a schematic diagram illustrating an application scenario of the data query method according to embodiments of the present disclosure applied to information retrieval;

[0097] Figure 2B This is a schematic diagram illustrating the application scenario of the data query method according to the embodiments of this disclosure in a smart home.

[0098] Figure 2C This is a schematic diagram illustrating an application scenario where the data query method according to embodiments of this disclosure is applied to creative generation.

[0099] Figure 3 This is a main flowchart of a data query method according to an embodiment of the present disclosure;

[0100] Figure 4 This is a schematic diagram illustrating the expansion of the query entity and query intent according to embodiments of this disclosure;

[0101] Figure 5 This is a schematic diagram illustrating the determination of content type for query content of different content types according to an embodiment of this disclosure;

[0102] Figure 6 This is a schematic diagram illustrating the processing of query content of different content types according to embodiments of this disclosure;

[0103] Figure 7 This is a schematic diagram illustrating the interaction process between a user terminal, a query engine, a vector library of content to be queried, and a retrieval enhancement generation engine during data querying according to an embodiment of this disclosure.

[0104] Figure 8 This is a schematic diagram illustrating the calculation of the proportion of the first content corresponding to each content type according to an embodiment of this disclosure;

[0105] Figure 9 This is a schematic diagram illustrating the calculation of the second content percentage corresponding to each content type according to embodiments of this disclosure;

[0106] Figure 10 This is a schematic diagram illustrating the integration of query results for various content types according to embodiments of this disclosure;

[0107] Figure 11 This is a schematic diagram illustrating the integration of text-type query results, image-type query results, and video-type query results according to embodiments of this disclosure;

[0108] Figure 12 This is a block diagram of a data query apparatus according to an embodiment of the present disclosure;

[0109] Figure 13 This is a terminal structure diagram of a data query method according to an embodiment of the present disclosure;

[0110] Figure 14 This is a server structure diagram of a data query method according to an embodiment of the present disclosure. Detailed Implementation

[0111] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this disclosure.

[0112] Before providing a further detailed description of the embodiments of this disclosure, the terms and concepts used in these embodiments are explained, and they are subject to the following interpretations:

[0113] Multimodal retrieval: Multimodal retrieval is a technology that combines multiple data modalities (such as text, images, audio, and video) for information retrieval. By integrating data from different modalities, it provides more comprehensive, accurate, and richer search results to meet diverse user query needs. Multimodal retrieval has significant advantages in handling complex queries and providing a more natural interactive experience.

[0114] Multimodal fusion: Multimodal fusion refers to the integration and processing of data from different modalities (such as text, images, audio, video, etc.) to generate more comprehensive, accurate, and richer information. Multimodal fusion technology is widely used in fields such as natural language processing (NLP), computer vision (CV), speech recognition, and multimodal learning, aiming to improve system performance and user experience.

[0115] Embedding: Embedding is a technique that maps data from its original space to a lower-dimensional vector space. Its purpose is to transform complex, unstructured data (such as text, images, audio, etc.) into a numerical form that is easier for computers to process, while preserving the important features and semantic information of the data.

[0116] In natural language processing, word embeddings are the process of mapping words or phrases to a high-dimensional vector space. For example, models such as Word2Vec, GloVe, and BERT represent each word as a fixed-length vector. These vectors can capture the semantic relationships between words; for example, "king" and "queen" may have similar features in the vector space because they are semantically related.

[0117] In computer vision, image embedding is the process of converting an image into a fixed-length vector. These vectors can be used for tasks such as image classification, image retrieval, and object detection. For example, feature vectors extracted by convolutional neural networks (CNNs) can serve as embedded representations of images.

[0118] Multimodal data querying is a technique that retrieves content of multiple modalities (such as text, images, audio, and video) using a single query condition. Related multimodal data query solutions require establishing independent indexes and retrieval subsystems for different modalities of content. For example, a retrieval subsystem is established for images, and another for videos. When a user initiates a query, queries are performed in parallel across multiple retrieval subsystems, and the results are then integrated. This solution requires maintaining multiple independent retrieval subsystems, leading to high system complexity and low efficiency. Moreover, users often prioritize certain types of content depending on the context, such as a greater preference for videos. In this solution, multiple retrieval subsystems operate equally, making it difficult to meet flexible query needs.

[0119] Based on this, embodiments of this disclosure provide a data query method, apparatus, electronic device, and medium. The data query method provided by embodiments of this disclosure eliminates the need to construct a separate retrieval subsystem for each content type. Regardless of the content type, all content is converted into a query content vector and stored in a query content vector library. When a user performs a query, the query condition text is converted into a query condition text vector. By calculating the weighted similarity between each query content vector in the query content vector library and the query condition text vector, the query result is determined among multiple query contents. It blurs the distinction between various content types by comparing the weighted similarity of vectors, eliminating the need to construct a separate retrieval subsystem and improving query efficiency for data queries of multiple content types. In obtaining the weights in the weighted similarity calculation, embodiments of this disclosure generate a user content type preference vector based on the user's first query history information of the query content, and determine the weights corresponding to the query content vectors based on the user content type preference vector and the content type of the query content. Therefore, it fully considers the user's preferences for different content types when querying content, and decides the content type emphasis when returning query results, making the query results more in line with the user's personalized needs and improving the flexibility of data query.

[0120] Figure 1 This is a system architecture diagram of the data query method according to the embodiments of this disclosure. It includes a terminal 140, an Internet 130, a gateway 120, a server 110, etc.

[0121] Terminal 140 can take various forms, including desktop computers, laptops, PDAs (personal digital assistants), mobile phones, in-vehicle terminals, home theater terminals, and dedicated terminals. Furthermore, it can be a single device or a collection of multiple devices. Terminal 140 can communicate with the Internet 130 via wired or wireless means to exchange data. It is understood that the data query method of this disclosure embodiment can be deployed on terminal 140 as an application.

[0122] Server 110 refers to a computer system capable of providing certain services to terminal 140. Compared to ordinary terminal 140, server 110 has higher requirements in terms of stability, security, and performance. Server 110 can be a single high-performance computer in a network platform, a cluster of multiple high-performance computers, a portion of a single high-performance computer (e.g., a virtual machine), or a combination of portions of multiple high-performance computers (e.g., virtual machines). In a distributed system, multiple servers 110 are interconnected as computing and storage units to transmit data and coordinate task processing using shared communication lines.

[0123] Gateway 120, also known as an internetwork connector or protocol converter, is a computer system or device that acts as a translator, enabling network interconnection at the transport layer. It bridges the gap between two systems using different communication protocols, data formats, languages, or even completely different architectures. Gateways can also provide filtering and security functions. Messages sent from terminal 140 to server 110 are forwarded to the corresponding server 110 via gateway 120. Messages sent from server 110 to terminal 140 are also forwarded to the corresponding terminal 140 via gateway 120.

[0124] This disclosure can be applied to information retrieval, where information retrieval refers to the process of searching for specific information related to user needs from a large amount of information. It is understood that the data query method of this disclosure can be deployed as an application on a user terminal, or it can be hosted in the cloud as software for users to access and use via the Internet. (See also...) Figure 2A Users can Figure 2A Enter your query terms or questions in the dialog box at the bottom, and the application will perform a search based on your input. Once the user submits their query, the application will return the results within milliseconds. Furthermore, to facilitate user understanding, the application will assemble the query results from different modalities, intelligently interspersing images or audio / video within the text to generate visually appealing results. For example... Figure 2A As shown, after a user submits the question "How do I check my phone's battery health?", the terminal interface not only returns relevant text steps for checking the phone's battery health but also automatically displays an illustration of the phone's interface when checking the battery health. This combination of text and images in the search results conveys the full picture more accurately. Furthermore, in mobile applications, the system adaptively adjusts the display of search results. If the mobile device is in an environment with poor network signal, the application will automatically reduce the resolution of images or the quality of videos in the search results and prioritize loading text content to ensure that the user experience is not negatively impacted.

[0125] This disclosure can also be applied to smart homes, whereby a smart home refers to a home environment that connects various devices (such as lighting, air conditioning, curtains, and audio equipment) through Internet of Things (IoT) technology to achieve intelligent control and management. Smart home systems can be remotely controlled via mobile applications or voice assistants for greater convenience. It is understood that the data query method of this disclosure can also be deployed in the user's home in the form of a voice assistant. (See also...) Figure 2B Users can input search terms or questions via voice in a dialog box, allowing the application to perform searches based on the user's input. For example... Figure 2B As shown, if the smart speaker is currently playing rock music, after the user tells the voice assistant, "The song playing now is too loud, find me some instrumental music," the voice assistant will not only return the names of the requested instrumental music for the user to view, but also the audio files of the instrumental music. The user can play the instrumental music by clicking on any instrumental music file on the voice assistant's display interface, or by controlling the voice assistant to play instrumental music.

[0126] This disclosure can also be applied to idea generation, whereby idea generation refers to the process of automatically generating novel, unique, and valuable ideas or content through computer systems or artificial intelligence. (See also...) Figure 2C If a user wants to decorate their bedroom in a creamy style but doesn't know how, they can ask the app. After submitting the question, "I'm decorating my bedroom now, and I want to decorate it in a creamy style. Do you have any recommended designs?", the app will not only return relevant creamy style design styles but also automatically match design images for reference. Through the illustrated search results, users can understand how to decorate their bedroom.

[0127] It should be understood that the above description only illustrates some application scenarios of this disclosure. The business scenarios to which this disclosure can be applied may include, but are not limited to, the specific embodiments described above.

[0128] General Description of Embodiments in this Disclosure

[0129] In related multimodal data query solutions, independent indexes and retrieval subsystems need to be established for different modalities of content. For example, a retrieval subsystem is established for images, and another for videos. When a user initiates a query, queries are performed in parallel across multiple retrieval subsystems, and the results are then integrated. This solution requires maintaining multiple independent retrieval subsystems, leading to high system complexity and low efficiency. Moreover, users often prioritize certain types of content depending on the context, such as videos. The current solution, with multiple retrieval subsystems operating equally, struggles to meet flexible query needs.

[0130] Some embodiments of this disclosure provide a data query method, apparatus, electronic device, and medium. It eliminates the need to construct a separate retrieval subsystem for each content type. Regardless of content type, all content is converted into a query content vector and stored in a query content vector library. When a user performs a query, embodiments of this disclosure determine the query result from multiple query contents by calculating the similarity between each query content vector in the query content vector library and the query condition text vector. This method blurs the distinction between various content types and improves query efficiency for data queries involving multiple content types. Furthermore, embodiments of this disclosure can determine the content type emphasis when returning query results based on the user's preference for different content types of query content, making the query results more personalized to the query user and satisfying flexible query needs.

[0131] According to one embodiment of this disclosure, a data query method is provided. This method can be applied to application scenarios such as information retrieval, smart homes, and creative generation.

[0132] like Figure 3 As shown, a data query method according to an embodiment of this disclosure includes:

[0133] Step 310: Convert the query condition text of the query user into a query condition text vector;

[0134] Step 320: Calculate the similarity between each query content vector in the query content vector library and the query condition text vector, wherein the query content vector is obtained by converting the query content, and the query content has a content type;

[0135] Step 330: Based on the query user's first query history information of the content to be queried, generate the query user's content type preference vector. The content type preference vector indicates the query user's preference for various content types of the content to be queried.

[0136] Step 340: Based on the user content type preference vector and the content type of the content to be queried corresponding to the content vector to be queried, determine the weight corresponding to the content vector to be queried;

[0137] Step 350: Based on the weights corresponding to the vectors of content to be queried, the similarity of the vectors of content to be queried is weighted to obtain a weighted similarity. Based on the weighted similarity of each vector of content to be queried, the query result corresponding to the query condition text is determined.

[0138] The following is a brief description of steps 310-350 above.

[0139] In step 310, the query condition text of the query user is converted into a query condition text vector.

[0140] It is understood that the data query method of this disclosure can be deployed as an application on a user terminal, or hosted as software in the cloud for users to access and use via the Internet. The query user refers to a user using these applications or software. The query user can input query condition text into the application or software via voice or text. Here, the query condition text refers to the question or query term entered by the user. For example, in... Figure 2A In the text, "How do I check a user's battery health?" is the query condition text. Figure 2B In the text, "The song playing now is too noisy, please find me some instrumental music" is the query condition text. Figure 2C The query text is: "I'm currently renovating my bedroom, and I'd like to decorate it in a creamy style. Do you have any design recommendations?"

[0141] Furthermore, to convert complex, unstructured query condition text into a numerical format that is easier for computers to process, while preserving the important features and semantic information of the query condition text, it can be represented as a fixed-length vector, namely a query condition text vector. Converting query condition text into a query condition text vector facilitates the implementation of more complex query logic, improving the flexibility and accuracy of data retrieval.

[0142] In step 320, the similarity between each query content vector in the query content vector library and the query condition text vector is calculated, wherein the query content vector is obtained by converting the query content, and the query content has a content type.

[0143] It is understood that the content to be queried can be a document (e.g., news, papers, essays, etc.), an image (e.g., photos, illustrations, etc.), audio (e.g., music, recorded conversations, etc.), or video (e.g., tutorials, movies, etc.). Each piece of content to be queried has a content type, which refers to the category of the content to be queried. For example, Figure 2A The phrase "First, open the settings on your phone's home screen" is the content to be searched. The content type of this content is text. The image below this content, which displays the phone's interface, is also part of the content to be searched. This image is the content type of the content to be searched. Figure 2B The "Canon" in the query is the content to be queried, and the content type of the content to be queried is text. The audio with the play symbol below the content to be queried is also the content to be queried, and the content type of the audio is audio.

[0144] According to embodiments of this disclosure, the query content vector refers to the data obtained by mapping the query content from the original space to a low-dimensional vector space, and the query content vector library is a database storing all query content vectors. Specifically, regardless of the content type of the query content, embodiments of this disclosure first extract the summary text of the query content, and then convert the summary text corresponding to the query content into a query content vector, rather than directly converting the query content of each content type into a query content vector. This is because the vectors obtained by directly converting query content of image type, audio type, and video type are far more complex than those obtained by directly converting query content of text type. Directly converting the query content of each content type into a query content vector would result in a huge computational load, leading to significant computational consumption. Therefore, it is preferable to first extract the summary text of each query content, and then convert the summary text corresponding to the query content into a query content vector. This process preserves the semantic information and key features of the content to be queried, while blurring the distinctions between different content types. It eliminates the need to build a separate retrieval subsystem and significantly reduces system complexity.

[0145] "Calculating the similarity between each query content vector in the query content vector library and the query condition text vector" refers to measuring the similarity between each query content vector and the query condition text vector. By calculating the similarity between each query content vector and the query condition text vector, query content that is semantically similar to the query condition text can be found. For example, if the query condition text is "bicycle," the query content vector library includes query content vectors corresponding to the query content "bicycle," query content vectors corresponding to the query content "motorcycle," and so on. By calculating the similarity between each query content vector in the query content vector library and the query condition text vector, it can be found that the query content vector corresponding to the query content "bicycle" has a very high similarity to the query condition text vector. That is to say, "bicycle" and "bicycle" are semantically related.

[0146] In step 330, based on the query user's first query history information of the content to be queried, a user content type preference vector is generated for the query user. The user content type preference vector indicates the query user's preference for various content types of the content to be queried.

[0147] It is understandable that the first query history information refers to the query results corresponding to all the query condition texts entered by the user in the past. The query results refer to the content retrieved by the system that best matches the query condition text. For example, if the user previously only entered the query condition texts "bicycle maintenance" and "how to check the phone's battery health?", then the first query history information would be the query results corresponding to the query condition texts "bicycle maintenance" and "how to check the phone's battery health?".

[0148] The first query history includes query results of different content types. Some results are text, some are images, some are audio, and some are video. Based on this first query history, a user content type preference vector can be generated. This vector represents the proportion of each content type in the query history. By analyzing this user content type preference vector, the user's preferences for different content types can be clearly identified.

[0149] For example, if the first query history information includes query results corresponding to 100 query condition texts previously entered by the querying user, and among these 100 query condition texts, 50 query results are text, 20 are images, 10 are audio, and 20 are video, then it can be concluded that the querying user's preference for query content with text content is 50%, for query content with image content is 20%, for query content with audio content is 10%, and for query content with video content is 20%.

[0150] In step 340, the weight corresponding to the content vector to be queried is determined based on the user content type preference vector and the content type of the content to be queried corresponding to the content vector to be queried.

[0151] According to embodiments of this disclosure, a user's preference for different content types in the query content can be determined using a user content type preference vector. Based on this, when a user focuses on querying certain types of content, the weight of each query content vector can be determined based on the user content type preference vector and the content type of each query content vector in the query content vector library, thereby determining the content type emphasis when returning the query results. The weight of each query content vector reflects its importance; a higher weight indicates that the returned query results place greater emphasis on the query content corresponding to that vector.

[0152] For example, if the user's content type preference vector shows a 70% preference for text-type query content, it indicates that the user prefers text-type query content. Therefore, if the content type of the query content vector is text, the weight corresponding to this vector can be set to a larger value. Similarly, if the user's content type preference vector shows a 65% preference for image-type query content, it indicates that the user prefers image-type query content. Therefore, if the content type of the query content vector is image, the weight corresponding to this vector can be set to a larger value.

[0153] Understandably, by incorporating user content type preference vectors and the content types of the content to be queried corresponding to the content vector to be queried into the factors to be considered in determining the query results, the query results can be made more in line with the personalized needs of the querying users, thus improving the flexibility of data query.

[0154] In step 350, the similarity of the content vectors to be queried is weighted based on the weights corresponding to the content vectors to be queried, and a weighted similarity is obtained. Based on the weighted similarity of each content vector to be queried, the query result corresponding to the query condition text is determined.

[0155] As we can understand, weighted similarity refers to the numerical value obtained by multiplying the weight corresponding to the query content vector by its similarity score. By determining the magnitude of the weighted similarity of the query content vector, and considering the content type preferences of the querying user, we can ascertain the semantic similarity between the query content and the query condition text. A higher weighted similarity indicates a greater semantic similarity between the query content and the query condition text, meaning a better match. Conversely, a lower weighted similarity might indicate a lower semantic similarity or that the content type of the query content does not match the querying user's preferred content type. This method allows for rapid identification of query content that matches the query condition text while considering the user's preferred content type, significantly improving query efficiency.

[0156] According to embodiments of this disclosure, after calculating the weighted similarity between each query content vector in the query content vector library and the query condition text vector, the query content vectors can be sorted from largest to smallest based on the weighted similarity. The query content corresponding to the top-ranked query content vector is then determined as the query result corresponding to the query condition text. The specific number of query content vectors selected and their corresponding query content used as the query result depends on the complexity of the query condition text. If the query condition text is highly complex, the number of selected query content vectors will increase to allow users to gain a more comprehensive understanding through the query results.

[0157] For example, if the query content vector library contains query content vectors A, B, C, and D, and the weighted similarity of query content vector A is 0.8, B is 0.9, C is 0.5, and D is 0.6, then after sorting the query content vectors from largest to smallest based on their weighted similarity, the resulting order is query content vector B, query content vector A, query content vector D, and query content vector C. When the query condition text is relatively simple, the query content corresponding to the first-ranked query content vector B can be directly identified as the query result corresponding to the query condition text. When the query condition text is more complex, the query content corresponding to the first-ranked query content vector B and the second-ranked query content vector A can be identified as the query results corresponding to the query condition text.

[0158] The embodiments of steps 310 to 350 above do not require building a separate retrieval subsystem for each content type. Regardless of content type, all content is converted into a query content vector and stored in a query content vector library. When a user performs a query, the query condition text is converted into a query condition text vector. By calculating the weighted similarity between each query content vector in the query content vector library and the query condition text vector, the query result is determined among multiple query contents. This method blurs the distinction between various content types through the comparison of weighted similarity, eliminating the need to build a separate retrieval subsystem and improving query efficiency for data queries of multiple content types. In obtaining the weights in the weighted similarity calculation, this embodiment generates a user content type preference vector based on the user's first query history information of the query content, and determines the weight corresponding to the query content vector based on the user content type preference vector and the content type of the query content. Therefore, it fully considers the user's preferences for different content types of query content to determine the content type emphasis when returning query results, making the query results more in line with the user's personalized needs and improving the flexibility of data querying.

[0159] The above is a general description of steps 310 to 350. The following is a detailed description of the specific implementation process of steps 310 to 350.

[0160] Detailed description of step 310

[0161] In step 310, the query condition text of the query user is converted into a query condition text vector.

[0162] In one embodiment, step 310 includes:

[0163] Step 410: Analyze the query condition text to obtain the query entity and query intent in the query condition text;

[0164] Step 420: Use the expansion model to expand the query entity and query intent respectively to obtain multiple expanded entities corresponding to the query entity and multiple expanded intents corresponding to the query intent;

[0165] Step 430: Perform vector transformation based on the expanded entity and expanded intent to obtain the query condition text vector.

[0166] Steps 410 to 430 are described in detail below.

[0167] In step 410, the query condition text is analyzed to obtain the query entity and query intent in the query condition text.

[0168] It's understandable that a query entity refers to a distinct and independently existing thing or object within the query text, while the query intent refers to a field within the query text that indicates a desired purpose. Specifically, named entity recognition algorithms can identify entities with specific meanings from the query text, such as names of people, places, organizations, and dates. Intent recognition algorithms can identify the intent or purpose of the querying user from the query text. Combining named entity recognition and intent recognition algorithms when analyzing query text allows for a more comprehensive understanding of the query text, improving the accuracy of data retrieval.

[0169] For example, refer to Figure 4 If the query text is "maintenance of new energy electric vehicles", after analyzing the query text by combining named entity recognition algorithm and intent recognition algorithm, we can obtain the query entity as "new energy electric vehicles" and the query intent as "maintenance".

[0170] In step 420, the query entity and query intent are expanded using the expansion model to obtain multiple expanded entities corresponding to the query entity and multiple expanded intents corresponding to the query intent.

[0171] It's understandable that the expansion model is a deep learning model used to semantically expand input, and it can also be used to find synonyms for the input. The input to the expansion model can be a query entity, and the output can be multiple expanded entities corresponding to the query entity. These expanded entities can be synonyms of the query entity or words obtained after semantically expanding the query entity. The input to the expansion model can also be a query intent, and the output can be multiple expanded intents corresponding to the query intent. These expanded intents can be synonyms of the query intent or fields obtained after semantically expanding the query intent. By using the expansion model to expand both the query entity and the query intent, the understanding of the intent of the query condition text can be enhanced, improving search relevance.

[0172] For example, refer to Figure 4 As mentioned above, after analyzing the query text, the query entity is "new energy electric vehicle" and the query intent is "maintenance". Expanding "new energy electric vehicle" and "maintenance" using entity expansion, we obtain multiple expanded entities for "new energy electric vehicle", including "new energy electric vehicle", "new energy vehicle", "electric vehicle", and "electric sedan". For "maintenance", multiple expanded intents include "maintenance", "maintenance guide", "maintenance precautions", "maintenance cycle", "daily maintenance methods", "winter maintenance tips", "summer maintenance points", "maintenance cost analysis", and "maintenance cycle recommendations".

[0173] In step 430, a vector transformation is performed based on the expanded entity and the expanded intent to obtain the query condition text vector.

[0174] Understandably, after determining the expanded entities and expanded intents, it is necessary to convert the complex, unstructured expanded entities and expanded intents into query condition text vectors to facilitate subsequent similarity matching between the query condition text and each query content vector in the query content vector library. By converting the expanded entities and expanded intents into query condition text vectors, computers can quickly understand the semantics of the expanded entities and expanded intents, thereby enabling more complex query logic.

[0175] The specific method for "converting the query condition text vector based on the expanded entity and expanded intent" will be described in detail below.

[0176] The embodiments of steps 410 to 430 described above can utilize an expansion model to expand the query entity and query intent respectively, to obtain multiple expanded entities corresponding to the query entity and multiple expanded intents corresponding to the query intent. In this way, not only can more diverse data be generated, but the understanding of the intent of the query condition text can also be enhanced, improving search relevance.

[0177] In one embodiment, step 430 includes:

[0178] Step 510: Convert the expanded entity and expanded intent into expanded entity vector and expanded intent vector respectively using the vector transformation model;

[0179] Step 520: Determine the first weight corresponding to each extended entity vector and the second weight corresponding to each extended intent vector;

[0180] Step 530: Perform a weighted average of the expanded entity vector and the expanded intent vector based on the first weight and the second weight to obtain the query condition text vector.

[0181] Steps 510 to 530 are described in detail below.

[0182] In step 510, the expanded entity and expanded intent are converted into expanded entity vector and expanded intent vector respectively through the vector transformation model.

[0183] As we can understand, a vector transformation model refers to a deep learning model used to convert input into vectors. Through vector transformation models, the semantics of the input can be better understood, thereby improving the accuracy and relevance of subsequent data queries. Specifically, the input of a vector transformation model can be an expanded entity, and the output can be an expanded entity vector, where the expanded entity vector refers to the data obtained after vector transformation of the expanded entity. The input of a vector transformation model can also be an expanded intent, and the output can be an expanded intent vector, where the expanded intent vector refers to the data obtained after vector transformation of the expanded intent.

[0184] In step 520, the first weight corresponding to each extended entity vector and the second weight corresponding to each extended intent vector are determined.

[0185] Understandably, the semantic similarity between different expanded entities and the query entity varies. To enhance the understanding of the query entity's intent while comprehensively capturing its original intent, a first weight can be assigned to the expanded entity vector corresponding to each expanded entity based on the semantic similarity between the expanded entity and the query entity. This first weight represents the impact of the expanded entity vector corresponding to the expanded entity on enhancing intent understanding. The closer the semantics between the expanded entity and the query entity, the larger the first weight; conversely, the greater the semantic difference between the expanded entity and the query entity, the smaller the first weight.

[0186] For example, if the expanded entities corresponding to the query entity include expanded entities A, B, C, and D, and the semantic similarity between expanded entities A and the query entity is 80%, the semantic similarity between expanded entities B and the query entity is 70%, the semantic similarity between expanded entities C and the query entity is 90%, and the semantic similarity between expanded entities D and the query entity is 85%, then the first weight of the expanded entity vector C corresponding to expanded entity C > the first weight of the expanded entity vector D corresponding to expanded entity D > the first weight of the expanded entity vector A corresponding to expanded entity A > the first weight of the expanded entity vector B corresponding to expanded entity B.

[0187] Correspondingly, for each expanded intent, the semantic similarity between different expanded intents and query intents varies. To enhance semantic understanding of the query intent while comprehensively capturing its original semantics, a second weight can be assigned to the expanded intent vector corresponding to each expanded intent based on the semantic similarity between the expanded intent and the query intent. This second weight represents the impact of the expanded intent vector corresponding to the expanded intent on enhancing semantic understanding. The closer the semantics of the expanded intent and the query intent, the larger the second weight; conversely, the greater the semantic difference between the expanded intent and the query intent, the smaller the second weight.

[0188] For example, if the expanded intents corresponding to the query intent include expanded intent A, expanded intent B, expanded intent C, and expanded intent D, and the semantic similarity between expanded intent A and the query intent is 60%, the semantic similarity between expanded intent B and the query intent is 75%, the semantic similarity between expanded intent C and the query intent is 80%, and the semantic similarity between expanded intent D and the query intent is 65%, then the second weight of the expanded intent vector C corresponding to expanded intent C can be obtained as follows: > the second weight of the expanded intent vector B corresponding to expanded intent B > the second weight of the expanded intent vector D corresponding to expanded intent D > the second weight of the expanded intent vector A corresponding to expanded intent A.

[0189] In step 530, the expanded entity vector and the expanded intent vector are weighted and averaged based on the first weight and the second weight to obtain the query condition text vector.

[0190] Understandably, the query condition text vector is obtained by weighting the various expanded entity vectors and expanded intent vectors based on the first weight corresponding to each expanded entity vector and the second weight corresponding to each expanded intent vector. The query condition text vector determined in this way not only better represents the semantics of the original query condition text but also improves the relevance and accuracy of subsequent query results.

[0191] In the embodiments of steps 510 to 530 above, a first weight is assigned to the expanded entity vector corresponding to each expanded entity based on the semantic similarity between the expanded entity and the query entity, and a second weight is assigned to the expanded intent vector corresponding to each expanded intent based on the semantic similarity between the expanded intent and the query intent. In this way, the semantics of the original query entity and query intent can be comprehensively captured while enhancing the understanding of the intent of the query entity and query intent. Furthermore, embodiments of this disclosure will also perform a weighted average of the expanded entity vector and the expanded intent vector based on the first and second weights to determine the query condition text vector. Under the influence of the first and second weights, the query condition text vector can not only better represent the semantics of the original query condition text, but also improve the relevance and accuracy of subsequent query results.

[0192] Detailed description of step 320

[0193] In step 320, the similarity between each query content vector in the query content vector library and the query condition text vector is calculated. The query content vector is obtained by converting the query content, and the query content has a content type.

[0194] In one embodiment, the vector library of content to be queried in step 320 is obtained in the following way:

[0195] Step 610: Obtain the content to be queried;

[0196] Step 620: Convert the content to be queried into a vector of content to be queried;

[0197] Step 630: Store the vector of the content to be queried and the storage location information of the content to be queried accordingly to obtain the vector library of the content to be queried.

[0198] Steps 610 to 630 are described in detail below.

[0199] In step 610, the content to be queried is obtained.

[0200] It is understandable that the content to be queried includes various types of content such as documents, images, audio, and video. To ensure the diversity of the content to be queried, it can be obtained from academic forums, news websites, music software, video websites, and social media platforms.

[0201] In step 620, the content to be queried is converted into a vector of content to be queried.

[0202] Understandably, directly converting various content types of query content into query content vectors would result in a huge computational burden. Therefore, this embodiment first summarizes each query content to obtain a summary text, and then converts the summary text into query content vectors. Because the content type of the summary text of the query content is text, and the data complexity of text converted into vectors is much lower than that of other vectors (such as vectors after image conversion, audio conversion, and video conversion), it can greatly reduce the subsequent consumption of computational resources.

[0203] The specific method for "converting the content to be queried into a vector of the content to be queried" will be described in detail below.

[0204] In step 630, the vector of the content to be queried and the storage location information of the content to be queried are stored accordingly to obtain the vector library of the content to be queried.

[0205] According to embodiments of this disclosure, the storage location information of the content to be queried can be understood as the URL of the content to be queried, or it can be understood as the address of the folder where the content to be queried is stored. For example, if the content to be queried is an academic paper, the storage location information can be the URL of the academic paper on an academic forum. If the content to be queried is a clip from a TV series, the storage location information can be the URL of the episode on a TV series platform. If the content to be queried is a photo uploaded by a user, the storage location information can be the photo album on the user's terminal where the photo is stored.

[0206] Furthermore, after determining the storage location information of the content to be queried, the vector of the content to be queried and its storage location can be stored correspondingly in the content to be queried vector library, serving as an index structure in the content to be queried vector library. This index structure organizes the various content to be queried vectors and their storage locations, facilitating subsequent rapid retrieval of content to be queried vectors that match the text vector of the query conditions within the content to be queried vector library, thus improving the efficiency of data retrieval.

[0207] The embodiments described in steps 610 to 630 above can store the vector of the content to be queried and the storage location information of the content to be queried in a corresponding vector library of the content to be queried, as an index structure. This storage method optimizes the organization of data in the vector library of the content to be queried, reduces misjudgments, and improves the accuracy of vector retrieval.

[0208] In one embodiment, step 620 includes:

[0209] Step 710: If the content type of the content to be queried is text, perform vector transformation on the content to be queried to obtain the vector of the content to be queried;

[0210] Step 720: If the content type of the content to be queried is non-text, use the summary text extraction model to extract summary text from the content to be queried, and perform vector transformation on the summary text to obtain the vector of the content to be queried.

[0211] Steps 710 and 720 are described in detail below.

[0212] In step 710, if the content type of the content to be queried is text, the content to be queried is vectorized to obtain the vector of the content to be queried.

[0213] According to embodiments of this disclosure, for various types of input query content, differentiated processing procedures can be adopted based on different content types. If the content type of the query content is text, no complex processing flow is required. After simple text processing, the text-processed query content can be converted into a query content vector, such as... Figure 5 As shown. This process captures the semantic information of the content to be queried, improving the accuracy and relevance of subsequent data queries.

[0214] For example, if the retrieved query content is a news article consisting entirely of text, it can be determined that the content type of this query content is text. Based on this, before writing the query content into the query content vector library, simple text processing can be performed on the query content to extract fields that can summarize the news article, and then these fields that can summarize the query content can be converted into query content vectors.

[0215] The specific method for "if the content to be queried is text, perform vector conversion on the content to be queried to obtain the vector of the content to be queried" will be described in detail below.

[0216] In step 720, if the content type of the content to be queried is non-text, the summary text extraction model is used to extract the summary text from the content to be queried, and the summary text is vectorized to obtain the vector of the content to be queried.

[0217] As can be understood, a summary text extraction model refers to a deep learning model used to process and analyze query content of various types to determine the summary text of the query content. The input to the summary text extraction model is the query content of various types, and the output is the summary text corresponding to the query content. Summary text refers to text that can describe the specific content and important features of the query content. Furthermore, the summary text generated by the summary text extraction model is a structured description, which can express and store the specific content of the query content in an organized and structured format, enabling it to be efficiently processed and analyzed by computer systems.

[0218] According to embodiments of this disclosure, the data complexity of the vector obtained by directly converting query content of non-text type is much higher than that of the vector obtained by directly converting query content of text type. Therefore, it is necessary to use a summary text extraction model to analyze the query content to output summary text that can describe the specific content and important features of the query content. Then, the summary text is vectorized to obtain the query content vector. In this way, on the one hand, the semantic information and important features of the query content can be preserved while greatly reducing the subsequent computational cost; on the other hand, the distinction between query content of various content types can be blurred, so that all query content is stored in the form of text vectors, eliminating the need to build a separate retrieval subsystem and greatly reducing the system complexity.

[0219] For example, if the obtained query content is a landscape photo, it can be determined that the content type of this query content is an image, which is not text. Based on this, before writing the query content into the query content vector library, a summary text extraction model can be used to extract summary text from the image that can describe the important features and specific content of the image, and then the summary text can be converted into a query content vector.

[0220] The specific method for "if the content type of the query is not text, extract summary text from the query content using the summary text extraction model, and perform vector transformation on the summary text to obtain the query content vector" will be described in detail below.

[0221] The embodiments of steps 710 to 720 described above can employ differentiated processing procedures based on the different content types of the query content. For text-type query content, after simple text processing, the processed query content can be converted into a query content vector. For non-text-type query content, after extracting summary text from the query content using a summary text extraction model, the summary text is then vectorized to obtain the query content vector. This method not only preserves the semantic information and important features of the query content while significantly reducing subsequent computational costs, but also blurs the distinctions between various content types of query content, storing all query content in the form of text vectors. This eliminates the need to construct a separate retrieval subsystem, greatly reducing system complexity.

[0222] In one embodiment, step 710 includes:

[0223] Step 810: If the content type of the query is text, perform text cleaning on the query to obtain denoised text;

[0224] Step 820: Determine the entity information and semantic information in the denoised text;

[0225] Step 830: Use a text summarization model to summarize entity information and semantic information to obtain the summary text corresponding to the content to be queried;

[0226] Step 840: Perform vector conversion on the summary text to obtain the vector of the content to be queried.

[0227] Steps 810 to 840 are described in detail below.

[0228] In step 810, if the content type of the content to be queried is text, the content to be queried is cleaned to obtain denoised text.

[0229] Understandably, the text cleaning steps for the query content include: first, removing Hypertext Markup Language (HTML) used to define the structure and style of the webpage content, retaining only the plain text; then, removing special characters and punctuation marks; removing redundant spaces and line breaks; converting all letters in the query content to lowercase (or uppercase); removing common but meaningless words; restoring the stems or forms of words in the query content; and removing numbers. After performing these text cleaning steps, the final text is the denoised text. Compared to the original query content, the noise in the denoised text is significantly reduced.

[0230] In step 820, entity information and semantic information in the denoised text are determined.

[0231] Understandably, entity information refers to proper nouns or entities with specific meaning in denoised text, such as names of people, places, organizations, dates, and times. Named entity recognition algorithms can be used to identify entity information in denoised text. Semantic information refers to sentences in denoised text that play a crucial role in understanding the overall content. Semantic information typically includes core information (such as important clauses and regulations in legal documents), main points, or key details, helping readers quickly grasp the main idea and focus of the denoised text. Deep learning models (such as BERT and GPT) can be used to identify semantic information in denoised text.

[0232] For example, if the denoised text is "Zhang San attended the annual technology conference at Company A's headquarters in New York City on December 25, 2023. The theme of the conference was 'The Future of Artificial Intelligence,' and Zhang San presented a paper on deep learning at the conference. After the conference, Zhang San exchanged ideas with several industry experts and plans to continue participating in related research in 2024," then the entity information in the denoised text can be determined to include "Zhang San," "December 25, 2023," "2024," "New York City," "Company A," and "Annual Technology Conference." The semantic information in the denoised text can also be determined to include "Zhang San attended the annual technology conference at Company A's headquarters in New York City on December 25, 2023," "The theme of the conference was 'The Future of Artificial Intelligence,' and Zhang San presented a paper on deep learning at the conference," and "After the conference, Zhang San exchanged ideas with several industry experts and plans to continue participating in related research in 2024."

[0233] In step 830, the entity information and semantic information are summarized using a text summarization model to obtain the summary text corresponding to the content to be queried.

[0234] As we can understand, a text summarization model refers to a deep learning model used to summarize and generalize text. The input to a text summarization model can be entity information and semantic information, and the output can be a summary text corresponding to the query content. The summary text is a concise summary of the query content, aiming to summarize the main points, core information, and key content. Compared to the query content, the summary text is more concise.

[0235] In step 840, the summary text is vectorized to obtain the vector of the content to be queried.

[0236] Understandably, pre-trained sentence embedding models can be used to vectorize the summary text, converting it into a numerical vector—the query content vector. This query content vector can be a 768- or 1024-dimensional floating-point vector. A sentence embedding model is a deep learning model that converts sentences into fixed-length vectors, and its output vector captures the semantic information of the input sentence. By utilizing sentence embedding models to convert summary text into query content vectors, computers can process and analyze the summary text more efficiently, improving the efficiency of subsequent data queries.

[0237] The embodiments of steps 810 to 840 above summarize the entity and semantic information in the denoised text using a text summarization model, resulting in a more concise and shorter summary text. Furthermore, by performing vector transformation on the summary text, a query content vector is obtained. This processing allows the summary text to be processed and analyzed by the computer more efficiently, improving the efficiency of subsequent data queries.

[0238] In one embodiment, the non-text type includes the image type, and step 720 includes:

[0239] Step 910: If the content type of the query is an image, perform key region detection on the query to obtain multiple key regions;

[0240] Step 920: By extracting visual features from key areas, the image content, image objects, and image scene are obtained;

[0241] Step 930: Use the summary text extraction model to extract the summary text of the image content, image objects and image scene.

[0242] Steps 910 to 930 are described in detail below.

[0243] In step 910, if the content type of the content to be queried is an image, key region detection is performed on the content to be queried to obtain multiple key regions.

[0244] As we can understand, key region detection in query content refers to identifying regions within the query content that contain important information or features, i.e., key regions. Key regions may include target objects, important feature points, and areas with significant texture changes. Specifically, key regions in query content can be identified using techniques such as color thresholding, edge detection, and shape matching, or they can be identified using pre-trained deep learning models.

[0245] For example, if the query content is a captured road condition image, then the key region detected from the query content could be an area containing vehicles and pedestrians. If the query content is a medical image, then the key region detected from the query content could be an area containing tumors.

[0246] In step 920, visual features are extracted from key regions to obtain image content, image objects, and image scenes.

[0247] As can be understood, visual feature extraction refers to the process of extracting features from an image that can describe its content. For example... Figure 6As shown, by extracting visual features from key regions, the most important visual information within those regions—that is, the image content—can be accurately identified. Image content typically includes the main object, background scene, and overall atmosphere. Furthermore, image objects and scene scenes can also be identified. The image object refers to the most prominent and attention-grabbing object within the key region, while the scene scene represents the background information within that region. Specifically, visual features of key regions can be extracted using a scale-invariant feature transform algorithm, or deep learning models can be used to automatically extract image content, objects, and scene scenes from key regions.

[0248] For example, if the content in the key region is two people walking on the beach, by extracting visual features from the key region, the image content can be extracted as "two people walking on the beach, with the background being the sea, sand, and sunset, creating a warm and peaceful atmosphere," the image object is the two people in the image, and the image scene is "beach, sea, sunset, and sky, with a peaceful atmosphere."

[0249] In step 930, the summary text extraction model is used to extract the summary text of the image content, image objects, and image scene.

[0250] According to embodiments of this disclosure, referring to Figure 6 By using a summary text extraction model to extract summaries of image content, objects, and scenes, the resulting summary text is a fixed template containing these elements. This process allows for the efficient processing and analysis of the summary text by computer systems using clearly defined fields and formats, facilitating subsequent vector transformation. Furthermore, it enables the direct exchange and sharing of summary text across different systems, reducing the complexity of data conversion.

[0251] The embodiments of steps 910 to 930 described above can utilize a summary text extraction model to extract summaries of image content, image objects, and image scenes, resulting in summary text with a fixed template containing image content, image objects, and image scenes. Through this processing, image content, image objects, and image scenes can be expressed and stored in an organized and structured format, enabling efficient processing and analysis by a computer system.

[0252] In one embodiment, the non-text type includes an audio type, and step 720 includes:

[0253] Step 1010: If the content type of the query is audio, perform speech recognition on the query to obtain speech recognition data;

[0254] Step 1020: Determine the speech content, the corresponding time point, and speech features in the speech recognition data;

[0255] Step 1030: Analyze the speech content and speech features using a sentiment analysis model to obtain speech sentiment information;

[0256] Step 1040: Use the summary text extraction model to extract the summary text of the speech content, the time point corresponding to the speech content, speech features and speech emotion information.

[0257] Steps 1010 to 1040 are described in detail below.

[0258] In step 1010, if the content type of the content to be queried is audio, speech recognition is performed on the content to be queried to obtain speech recognition data.

[0259] As we can understand, speech recognition of a query refers to the process of identifying the speech content and features within that query. Speech recognition data, then, refers to the speech content and features identified from the query. Specifically, speech recognition of the query can be performed using Fast Fourier Transform or Mel-frequency cepstral coefficients to obtain speech recognition data.

[0260] For example, if the content to be queried is an audio recording of a conversation between two people, then after performing speech recognition on the content to be queried, the resulting speech recognition data consists of the text data corresponding to all the content of the conversation between the two people, as well as speech features such as tone, speed and spectrum of the two people speaking.

[0261] In step 1020, the speech content, the time point corresponding to the speech content, and the speech features in the speech recognition data are determined.

[0262] As can be understood, speech content refers to the actual information conveyed by speech recognition data, reflecting the speaker's intent and specific content in the query, and is usually represented in text form. The time point corresponding to the speech content refers to the point in time when the speaker utters the speech content. Speech features refer to the numerical features extracted from speech recognition data; these features can effectively represent the characteristics of the speech recognition data. Through speech content, the corresponding time point, and speech features, the system can more accurately identify and understand the semantics in the query content.

[0263] For example, if the query content is A saying to B, "The weather is nice today, perfect for a picnic in the park," and B replies, "Then I'll prepare the food, let's go on a picnic together." Based on this, the speech content can be determined as "The weather is nice today, perfect for a picnic in the park" and "Then I'll prepare the food, let's go on a picnic together." The time points corresponding to the speech content "The weather is nice today, perfect for a picnic in the park" are from second 0 to second 3, and the time points corresponding to the speech content "Then I'll prepare the food, let's go on a picnic together" are from second 5 to second 8. Speech features are numerical values ​​representing the spectral characteristics of the query content.

[0264] In step 1030, the speech content and speech features are analyzed using a sentiment analysis model to obtain speech sentiment information.

[0265] Understandably, speech emotion information refers to the speaker's emotional inclination (such as positive, negative, or neutral) while speaking, as well as the atmosphere of the conversation. A sentiment analysis model is a deep learning model used to analyze input speech content and features, and output the speech emotion information hidden within those content and features.

[0266] For example, as described above, if the speech content is "The weather is nice today, perfect for a picnic in the park" and "Then I'll prepare the food, let's go on a picnic together," the speech features are numerical values ​​representing the spectral characteristics of the query content. After analyzing the speech content and speech features using a sentiment analysis model, the resulting speech sentiment information includes: the speaker's emotional inclination is positive, and the atmosphere of the conversation is pleasant.

[0267] In step 1040, the summary text extraction model is used to extract the summary text from the speech content, the corresponding time point, speech features and speech emotion information.

[0268] According to embodiments of this disclosure, referring to Figure 6 By using a summary text extraction model to extract the speech content, its corresponding time points, speech features, and emotional information, the resulting summary text is a fixed template containing the speech content, its corresponding time points, speech features, and emotional information. This process allows for the use of clearly defined fields and formats, enabling efficient processing and analysis of the summary text by computer systems and facilitating subsequent vector conversion. Furthermore, it facilitates the direct exchange and sharing of summary text across different systems, reducing the complexity of data conversion.

[0269] The embodiments described in steps 1010 to 1040 above can utilize a sentiment analysis model to analyze speech content and speech features, obtaining speech sentiment information and enhancing the understanding of intent regarding the query content. Furthermore, embodiments of this disclosure can also utilize a summary text extraction model to extract a summary of the speech content, the corresponding time point, speech features, and speech sentiment information, obtaining a summary text containing the speech content, the corresponding time point, speech features, and speech sentiment information. Through this processing, the speech content, the corresponding time point, speech features, and speech sentiment information can be expressed and stored in an organized and structured format, enabling efficient processing and analysis by a computer system.

[0270] In one embodiment, the non-text type includes the video type, and step 720 includes:

[0271] Step 1110: If the content type of the content to be queried is video, extract the content to be queried at interval sampling time to obtain multiple video frame data;

[0272] Step 1120: Perform key region detection and visual feature extraction on the video frame data to obtain the video frame content, video frame object, and video frame scene;

[0273] Step 1130: Use the summary text extraction model to extract the summary text of video frame content, video frame objects and video frame scenes to obtain the summary text corresponding to each video frame data.

[0274] Step 1140: Extract video audio data from the content to be queried, and determine the video audio content, the time point corresponding to the video audio content, video audio features, and video emotional information in the video audio data;

[0275] Step 1150: Use the summary text extraction model to extract the summary text of the video audio content, the time points corresponding to the video audio content, the video audio features and the video emotional information, and obtain the summary text corresponding to the video audio data.

[0276] Step 1160: Integrate the summary text corresponding to each video frame data and the summary text corresponding to the video audio data to obtain the summary text of the content to be queried.

[0277] Steps 1110 to 1160 are described in detail below.

[0278] In step 1110, if the content type of the content to be queried is video, the content to be queried is extracted at interval sampling time to obtain multiple video frame data.

[0279] As we can understand, video frame data refers to a single static image within the query content. Similar to a single frame in a film reel, the rapid playback of a sequence of consecutive video frames creates the visual effect of continuous motion. The sampling time, on the other hand, is the time interval between extracting video frame data. The sampling time can be one second or two seconds. The specific sampling time can be determined based on the length of the query content; the longer the query content, the longer the sampling time can be set, and vice versa.

[0280] For example, if the query content is a five-second video, the sampling time is one second. Based on this, the query content can be extracted every one second, resulting in five video frame data.

[0281] According to another embodiment of this disclosure, sampling can also be dynamically performed based on video changes in the content to be queried. For example, when the video content of the content to be queried changes significantly, the content to be queried is sampled to obtain video frame data.

[0282] In step 1120, key region detection and visual feature extraction are performed on the video frame data to obtain video frame content, video frame objects, and video frame scenes.

[0283] As can be understood, video frame content refers to the most important visual information in video frame data, which typically includes the main object, scene background, and overall atmosphere. Furthermore, video frame objects and video frame scenes can also be identified. A video frame object refers to the most prominent and attention-grabbing object in the video frame data, while the video frame scene is the background information within the video frame data.

[0284] For "key region detection and visual feature extraction of video frame data", the specific extraction method has been explained in steps 910 to 920 above, and will not be repeated here.

[0285] In step 1130, the summary text extraction model is used to extract the summary text of the video frame content, video frame objects and video frame scenes to obtain the summary text corresponding to each video frame data.

[0286] It is understandable that the specific method for “using the summary text extraction model to extract the summary text of video frame content, video frame objects and video frame scenes to obtain the summary text corresponding to each video frame data” has been explained in step 930 above, and will not be repeated here.

[0287] In step 1140, video audio data is extracted from the content to be queried, and the video audio content, the time point corresponding to the video audio content, video audio features, and video emotional information in the video audio data are determined.

[0288] According to embodiments of this disclosure, video audio data refers to audio data within the query content. Video audio data within the query content can be extracted by separating the audio track of the query content. Video audio content refers to the actual information conveyed by the video audio data, reflecting the speaker's intent and specific content within the query content, and is typically represented in text form. The time point corresponding to the video audio content refers to the point in time when the speaker utters the video audio content. Video audio features refer to numerical features extracted from the video audio data; these features can effectively represent the characteristics of the video audio data. Through video audio content, the time point corresponding to the video audio content, and video audio features, the system can more accurately identify and understand the semantics within the query content.

[0289] Video emotional information can be determined from the video audio content and video audio characteristics. Video emotional information refers to the speaker's emotional inclination (such as positive, negative or neutral) when speaking, as well as the atmosphere of the conversation.

[0290] It is understandable that the specific methods for "extracting video audio data from the content to be queried, and determining the video audio content, the time point corresponding to the video audio content, the video audio features and video emotional information" have been explained in steps 1020 to 1030 above, and will not be repeated here.

[0291] In step 1150, a summary text extraction model is used to extract the summary text of the video audio content, the time points corresponding to the video audio content, the video audio features, and the video emotional information, thereby obtaining the summary text corresponding to the video audio data.

[0292] It is understandable that the specific method for "using the summary text extraction model to extract the summary text of the video audio content, the time point corresponding to the video audio content, the video audio features and the video emotional information, and obtaining the summary text corresponding to the video audio data" has been explained in step 1040 above, and will not be repeated here.

[0293] In step 1160, the summary text corresponding to each video frame data and the summary text corresponding to the video audio data are integrated to obtain the summary text of the content to be queried.

[0294] Understandably, because the video frame data and audio data for the query are processed separately, after processing the video frame data and audio data, it is necessary to integrate the summary text corresponding to each video frame data and the audio data to generate a summary text for the query content. Specifically, the summary text corresponding to each video frame data and the summary text corresponding to each audio data can be mapped to the same feature space, and the integration process can be completed through feature concatenation or weighted summation. Alternatively, attention mechanisms or graph neural networks can be used to weight the summary text corresponding to each video frame data and the summary text corresponding to each audio data to complete the integration process. Alternatively, a weighted average or voting method can be used to complete the integration process.

[0295] The embodiments described in steps 1110 to 1160 above can process the video frame data and video audio data of the content to be queried separately. By processing the video frame data and video audio data of the content to be queried independently and in parallel, the efficiency of processing the content to be queried can be improved. Moreover, after processing the video frame data and video audio data, the embodiments of this disclosure integrate the summary text corresponding to each video frame data and the summary text corresponding to each video audio data to generate a summary text of the content to be queried. The summary text of the content to be queried is a fixed template with the summary text corresponding to each video frame data and the summary text corresponding to each video audio data. Through this processing, the summary text corresponding to each video frame data and the summary text corresponding to each video audio data can be expressed and stored in an organized and orderly format, allowing the summary text of the content to be queried to be efficiently processed and analyzed by the computer system, facilitating subsequent vector conversion of the summary text.

[0296] In one embodiment, step 330 includes:

[0297] Step 1210: Determine the query complexity based on the query condition text;

[0298] Step 1220: Determine the probe parameters based on query complexity;

[0299] Step 1230: Perform an approximate nearest neighbor search in the query content vector library based on the probe parameters to obtain the similarity between each query content vector and the query condition text vector.

[0300] Steps 1210 to 1230 are described in detail below.

[0301] In step 1210, the query complexity is determined based on the query condition text.

[0302] It is understood that query complexity refers to a measure of the resources (such as time, computing power, storage space, etc.) required to resolve the query content. In this embodiment of the disclosure, query complexity can be evaluated based on the characteristics of the query condition text. Specifically, the text length and semantic complexity of the query condition text can both be used to evaluate query complexity. The longer the text length of the query condition text and the higher the semantic complexity, the greater the query complexity. The semantic complexity of the query condition text can be determined using a semantic evaluation model.

[0303] In step 1220, the probe parameters are determined based on the query complexity.

[0304] Understandably, the probing parameters include search speed and search range. Search speed refers to the speed at which the vector of the query content and the vector of the query conditions are calculated, while search range refers to the number of query content vectors that need to be explored during the search process. Specifically, higher query complexity allows for a reduction in search speed to balance the load on the computer system and the efficiency of data retrieval, while simultaneously increasing the search range to ensure recall. Conversely, lower query complexity allows for a reduction in search speed to decrease the waiting time for users, while simultaneously decreasing the search range to increase the speed of data retrieval.

[0305] In step 1230, an approximate nearest neighbor search is performed in the query content vector library based on the probe parameters to obtain the similarity between each query content vector and the query condition text vector.

[0306] According to embodiments of this disclosure, after determining the detection parameters, an approximate nearest neighbor search can be performed in the content vector library to be queried based on the detection parameters, such as... Figure 7As shown in the diagram, Approximate Nearest Neighbor Search (APNSOS) is a technique that utilizes an index structure composed of query content vectors and their storage locations to quickly find query content vectors that are sufficiently similar to the query condition text vector within a query content vector library. Specifically, ANSOS constructs a multi-layered graph structure based on the query content vectors in the library. Each layer's query content vectors are subsets of the previous layer, with the upper layers being sparse and the lower layers dense. During ANSOS, it starts from the top layer, quickly skipping a large number of irrelevant query content vectors and progressively refining the search downwards to locate the multiple query content vectors most similar to the query condition text vector at the bottom layer. This eliminates the need to calculate the similarity between every query content vector in the library and the query condition text vector; it only requires calculating the similarity between the multiple (e.g., 100) most similar query content vectors and the query condition text vector. By using ANSOS, not only can a large number of query content vectors in the library be processed efficiently, improving data query efficiency, but it also significantly reduces computational resource consumption.

[0307] It is understandable that after determining the similarity between the multiple query content vectors and the query condition text vectors that are most similar to the query condition text vectors, the embodiments of this disclosure can further sort the multiple query content vectors from largest to smallest based on the magnitude of the similarity between the query content vectors and the query condition text vectors, so as to perform a coarse sorting of the query content vectors, which is convenient for further filtering to select the query content vector that best matches the query condition text vector.

[0308] The embodiments of steps 1210 to 1230 described above can flexibly adjust the probing parameters based on query complexity, and perform an approximate nearest neighbor search in the query content vector library based on the probing parameters to obtain the similarity between each query content vector and the query condition text vector. The probing parameters include search speed and search range. When the query complexity of the query content is high, the search speed can be appropriately reduced and the search range increased; when the query complexity of the query content is low, the search speed can be appropriately increased and the search range reduced. This approach effectively balances the load on the computer system and the efficiency of data querying. Furthermore, the approximate nearest neighbor search allows for a coarse ranking of the query content vectors, facilitating further selection of the query content vectors that best match the query condition text vectors.

[0309] Detailed description of step 330

[0310] In step 330, based on the query user's first query history information of the content to be queried, a user content type preference vector is generated for the query user. The user content type preference vector indicates the query user's preference for various content types of the content to be queried.

[0311] In one embodiment, step 330 includes:

[0312] Step 1310: In the first query history information, determine the first occurrence count of the content to be queried for each content type;

[0313] Step 1320: In the first query history information, determine the first total occurrence count of the content to be queried;

[0314] Step 1330: Based on the first occurrence count and the first total occurrence count for each content type, calculate the percentage of the first content for each content type;

[0315] Step 1340: Generate a user content type preference vector based on the proportion of the first content corresponding to each content type.

[0316] Steps 1310 and 1340 are described in detail below.

[0317] In step 1310, the first occurrence count of the content to be queried for each content type is determined in the first query history information.

[0318] It is understandable that the first occurrence count of the content to be queried for each content type refers to the number of times each content type appears in the query results corresponding to all the query condition texts entered by the querying user in the past.

[0319] For example, refer to Figure 8 We can see that in the first query history, the first occurrence count of the text type query content is 80, the first occurrence count of the image type query content is 40, the first occurrence count of the audio type query content is 30, and the first occurrence count of the video type query content is 50.

[0320] In step 1320, the first total number of occurrences of the content to be queried is determined in the first query history information.

[0321] It is understandable that the first total occurrence count of the query content is the sum of the first occurrence counts of the query content across all content types. For example, refer to... Figure 8 We can see that the first total occurrence count is the sum of the first occurrence counts of the text-type query content, the first occurrence counts of the image-type query content, the first occurrence counts of the audio-type query content, and the first occurrence counts of the video-type query content, and the first total occurrence count is 200.

[0322] In step 1330, the percentage of the first content corresponding to each content type is calculated based on the first occurrence count and the first total occurrence count for each content type.

[0323] As can be understood, the "first content percentage" refers to the ratio of the number of times each content type appears first to the total number of times it appears first. By analyzing the first content percentage for each content type, we can determine the types of content that users prefer when querying data.

[0324] For example, refer to Figure 8 By analyzing the first occurrence count and total first occurrence count for each content type, we can see that the percentage of first occurrences for text is 2 / 5, for images it is 1 / 5, for audio it is 3 / 20, and for video it is 1 / 4.

[0325] In step 1340, a user content type preference vector is generated based on the first content proportion corresponding to each content type.

[0326] According to one embodiment of this disclosure, the vector corresponding to the first content proportion of each content type can be used as the user content type preference vector. This processing allows for a quick understanding of the query user's preferences for various content types of the query content. For example, refer to... Figure 8 We can treat the first content proportion of 2 / 5 for text type, 1 / 5 for image type, 3 / 20 for audio type, and 1 / 4 for video type as a whole, and convert this whole into a vector. This converted vector is the user content type preference vector.

[0327] According to another embodiment of this disclosure, the first occurrence frequency corresponding to each content type can also be used as a user content type preference vector. For example, refer to... Figure 8 The first occurrence count (80) of text-type query content, the first occurrence count (40) of image-type query content, the first occurrence count (30) of audio-type query content, and the first occurrence count (50) of video-type query content can be treated as a whole and converted into a vector. This converted vector is the user content type preference vector.

[0328] The embodiments of steps 1310 to 1340 described above can calculate the first content proportion corresponding to each content type based on the first occurrence count and the first total occurrence count corresponding to each content type, and generate a user content type preference vector based on the first content proportion corresponding to each content type. This process allows for a quick understanding of the user's preferences for various content types of the query content, facilitating subsequent adjustments to the query results to better meet the personalized needs of the querying user.

[0329] Detailed description of step 340

[0330] In step 340, the weight corresponding to the content vector to be queried is determined based on the user content type preference vector and the content type of the content to be queried corresponding to the content vector to be queried.

[0331] According to one embodiment of this disclosure, the weights corresponding to the vector of the query content can also be determined based on the freshness and source authority of the query content. The freshness of the query content can be determined based on its publication time; the more recent the publication time, the higher the freshness. The source authority of the query content can be determined based on the account that published it. If the account is an official account, the source authority is higher; if the account is a private account, the source authority is lower. If the query content is academic literature, the source authority can also be determined by the number of citations. If the content type is audio or video, the source authority can be determined by the listen completion rate and watch completion rate.

[0332] Furthermore, the higher the freshness of the content to be queried, the greater the weight of the content vector; similarly, the higher the authority of the source of the content to be queried, the greater the weight of the content vector. This processing allows for differentiated ranking features for different content types of queries, increasing the accuracy of data retrieval.

[0333] In one embodiment, step 340 includes:

[0334] Step 1410: Based on the second query history information of the content to be queried by multiple platform users, generate an average content type preference vector of multiple platform users. The average content type preference vector indicates the average preference of each platform user for various content types of the content to be queried. The multiple platform users include the querying user.

[0335] Step 1420: Calculate the difference vector between the user content type preference vector and the average content type preference vector;

[0336] Step 1430: Based on the difference vector and the content type of the content to be queried corresponding to the content vector to be queried, determine the weight corresponding to the content vector to be queried.

[0337] Steps 1410 to 1430 are described in detail below.

[0338] In step 1410, based on the second query history information of the content to be queried by multiple platform users, an average content type preference vector of multiple platform users is generated. The average content type preference vector indicates the average preference of each platform user for various content types of the content to be queried. The multiple platform users include the querying user.

[0339] It is understood that "multiple platform users" refers to all users who have used the query system employing the data query method of this disclosure embodiment, and "multiple platform users" includes query users. The second query history information refers to the query results corresponding to all query condition texts previously entered by multiple platform users, where the query result refers to the query content that best matches the query condition text as found by the system.

[0340] Based on the second query history information of users on multiple platforms regarding the content to be queried, the average content type preference vector of these users can be determined. This average content type preference vector can be the vector corresponding to the average proportion of each content type in the second query history information. By using this average content type preference vector, the average preference of users on multiple platforms for each content type in the query can be clearly determined.

[0341] For example, if multiple platform users include user A, user B, and user C, the second query history information includes: User A has a 50% preference for query content of text type, a 20% preference for query content of image type, a 10% preference for query content of audio type, and a 20% preference for query content of video type. User B has a 30% preference for query content of text type, a 30% preference for query content of image type, a 30% preference for query content of audio type, and a 10% preference for query content of video type. User C has a 40% preference for query content of text type, a 30% preference for query content of image type, a 20% preference for query content of audio type, and a 10% preference for query content of video type. Based on this, the average content type preference data can be determined as follows: 40% preference for query content of text type, 26.67% preference for query content of image type, 20% preference for query content of audio type, and 13.33% preference for query content of video type. The vector corresponding to the average content type preference data is the average content type preference vector.

[0342] The specific method for "generating an average content type preference vector for users on multiple platforms based on the second query history information of users on multiple platforms regarding the content to be queried" will be described in detail below.

[0343] In step 1420, the difference vector between the user content type preference vector and the average content type preference vector is calculated.

[0344] Understandably, the difference vector between the user content type preference vector and the average content type preference vector represents the deviation between the user content type preference vector and the average content type preference vector for each content type of query content. Through this difference vector, we can clearly understand the preferences of querying users for various content types of query content and the differences in preferences among users across multiple platforms for various content types of query content.

[0345] The specific method for "calculating the difference vector between the user's content type preference vector and the average content type preference vector" will be described in detail below.

[0346] In step 1430, the weight corresponding to the content vector to be queried is determined based on the difference vector and the content type of the content to be queried corresponding to the content vector to be queried.

[0347] According to one embodiment of this disclosure, for the content type of the content to be queried corresponding to the content vector to be queried, the weight corresponding to the content vector to be queried can be determined based on the vector element in the difference vector that corresponds to the content type. By doing so, the deviation between the user's content type preference vector and the average content type preference vector can be incorporated into the factors considered when determining the weight corresponding to the content vector to be queried. This facilitates the subsequent determination of the query results corresponding to the query condition text based on the weight corresponding to the content vector to be queried, allowing the query results to meet the personalized needs of the querying user.

[0348] According to another embodiment of this disclosure, for the content type of the query content corresponding to the query content vector, the weight corresponding to the query content vector can also be determined directly based on the vector element corresponding to the content type in the user content type preference vector. The only difference between this method of determining the weight of the query content vector and the method described above based on the difference vector is that the methods for calculating the weight of the query content vector are different, but the final determined weights of the query content vector are similar. This approach can also meet the personalized needs of query users.

[0349] The specific method for "determining the weight of the query content vector based on the difference vector and the content type of the query content vector" will be described in detail below.

[0350] The embodiments of steps 1410 to 1430 described above can use a difference vector to characterize the deviation between the user's content type preference vector and the average content type preference vector, and determine the weight corresponding to the query content vector based on the difference vector and the content type of the query content corresponding to the query content vector. Through this processing, the deviation between the user's content type preference vector and the average content type preference vector is quantified, thus meeting the personalized needs of the querying user.

[0351] In one embodiment, step 1410 includes:

[0352] Step 1510: In the second query history information, determine the second occurrence count of the content to be queried for each content type;

[0353] Step 1520: In the second query history information, determine the second total occurrence count of the content to be queried;

[0354] Step 1530: Calculate the proportion of the second content for each content type based on the second occurrence count and the second total occurrence count for each content type;

[0355] Step 1540: Generate an average content type preference vector based on the proportion of the second content corresponding to each content type.

[0356] Steps 1510 to 1540 are described in detail below.

[0357] In step 1510, the second occurrence count of the content to be queried for each content type is determined in the second query history information.

[0358] It is understandable that the second occurrence count of the content to be queried for each content type refers to the number of times the query results for each content type appear in the query results corresponding to all the query condition texts entered by users on multiple platforms in the past.

[0359] For example, refer to Figure 9 We can see that in the second query history, the second occurrence count of the text type query content is 250, the second occurrence count of the image type query content is 100, the second occurrence count of the audio type query content is 150, and the second occurrence count of the video type query content is 200.

[0360] In step 1520, the second total number of occurrences of the content to be queried is determined in the second query history information.

[0361] It is understandable that the second total occurrence count of the query content is the sum of the second occurrence counts of the query content across all content types. For example, refer to... Figure 9We can see that the second total occurrence count is the sum of the second occurrence counts of the text-type query content, the second occurrence counts of the image-type query content, the second occurrence counts of the audio-type query content, and the second occurrence counts of the video-type query content, and the second total occurrence count is 700.

[0362] In step 1530, the proportion of the second content for each content type is calculated based on the second occurrence count and the second total occurrence count for each content type.

[0363] As can be understood, the second content proportion refers to the ratio of the number of times a second content appears in each content type to the total number of times a second content appears. By analyzing the second content proportion for each content type, we can determine the content types that users on multiple platforms tend to choose when querying data.

[0364] For example, refer to Figure 9 By analyzing the number of times the second content appears and the total number of times it appears for each content type, we can see that the proportion of the second content for text type is 5 / 14, the proportion of the second content for image type is 1 / 7, the proportion of the second content for audio type is 3 / 14, and the proportion of the second content for video type is 2 / 7.

[0365] In step 1540, an average content type preference vector is generated based on the second content proportion corresponding to each content type.

[0366] According to one embodiment of this disclosure, the vector corresponding to the second content proportion of each content type can be used as the average content type preference vector. This processing allows for a rapid understanding of the preferences of users across multiple platforms for various content types of query content. Simultaneously, the average content type preference vector also reflects the content types of query content preferred by users who have used a data query system employing data query methods. For example, referring to… Figure 9 We can take the proportion of the second content type corresponding to text type (5 / 14), the proportion of the second content type corresponding to image type (1 / 7), the proportion of the second content type corresponding to audio type (3 / 14), and the proportion of the second content type corresponding to video type (2 / 7) as a whole data set, and convert this whole data set into a vector. This converted vector is the average content type preference vector.

[0367] According to another embodiment of this disclosure, the second occurrence frequency corresponding to each content type can also be used as the average content type preference vector. For example, refer to... Figure 9The second occurrence count of text-type query content (250), the second occurrence count of image-type query content (100), the second occurrence count of audio-type query content (150), and the second occurrence count of video-type query content (200) can be treated as a whole data set and converted into a vector. This converted vector is the average content type preference vector.

[0368] The embodiments of steps 1510 to 1540 described above can calculate the second content proportion corresponding to each content type based on the second occurrence count and the second total occurrence count corresponding to each content type, and generate an average content type preference vector based on the second content proportion corresponding to each content type. This processing reflects the content types preferred by users of a data query system that has applied data query methods. Through the average content type preference vector, it is possible to quickly understand the preferences of users on multiple platforms for various content types of query content.

[0369] In one embodiment, step 1420 includes:

[0370] Step 1610: For each content type, calculate the difference between the percentage of the first content corresponding to the content type and the percentage of the second content corresponding to the content type;

[0371] Step 1620: Take the percentage difference corresponding to each content type as a vector element to form a difference vector.

[0372] Steps 1610 to 1620 are described in detail below.

[0373] In step 1610, for each content type, the difference between the proportion of the first content corresponding to the content type and the proportion of the second content corresponding to the content type is calculated.

[0374] As can be understood, the percentage difference refers to the difference between the percentage of the first type of content corresponding to a certain content type and the percentage of the second type of content corresponding to the same content type. By using the percentage difference, we can determine the preferences of querying users for various content types and the differences in preferences among users across multiple platforms for various content types.

[0375] For example, refer to Figure 8 and Figure 9We can see that, for text, the difference between the proportion of the first content type and the proportion of the second content type is 4 / 35. For image, the difference is 2 / 35. For audio, the difference is -9 / 140. For video, the difference is -1 / 28.

[0376] In step 1620, the percentage difference corresponding to each content type is used as a vector element to form a difference vector.

[0377] It is understandable that a vector element refers to the basic unit that makes up the difference vector. The difference vector can be viewed as an ordered list of values, which includes the percentage difference corresponding to each content type. The percentage difference corresponding to a content type represents a vector element.

[0378] For example, as described above, the percentage difference of 4 / 35 corresponding to the text type can be used as a vector element, the percentage difference of 2 / 35 corresponding to the image type can be used as a vector element, the percentage difference of -9 / 140 corresponding to the audio type can be used as a vector element, and the percentage difference of -1 / 28 corresponding to the video type can be used as a vector element. These vector elements constitute the difference vector.

[0379] The embodiments of steps 1610 to 1620 above can use the proportion difference corresponding to each content type as a vector element to construct a difference vector. Through the difference vector, it is possible to clearly understand the preferences of querying users for various content types of query content and the differences between the preferences of users on multiple platforms for various content types of query content, thereby quantifying the deviation between the user content type preference vector and the average content type preference vector.

[0380] In one embodiment, step 1430 includes:

[0381] Step 1710: In the difference vector, determine the vector element corresponding to the content type;

[0382] Step 1720: Transform the vector elements to obtain the weights corresponding to the vector of the content to be queried.

[0383] Steps 1710 to 1720 are described in detail below.

[0384] In step 1710, the vector element corresponding to the content type is determined in the difference vector.

[0385] Understandably, since the difference vector contains multiple vector elements, each representing the percentage difference corresponding to different content types, and determining the weight corresponding to the vector of the content to be queried does not require the percentage difference of all content types, we can first determine the vector element corresponding to the content type of the content to be queried in the difference vector.

[0386] For example, as described above, the difference vector includes a percentage difference of 4 / 35 for text type, a percentage difference of 2 / 35 for image type, a percentage difference of -9 / 140 for audio type, and a percentage difference of -1 / 28 for video type. If the content type of the query content is audio, then the vector element corresponding to the audio type can be determined in the difference vector, which is the percentage difference of -9 / 140 for audio type. If the content type of the query content is text type, then the vector element corresponding to the text type can be determined in the difference vector, which is the percentage difference of 4 / 35 for audio type.

[0387] In step 1720, the vector elements are transformed to obtain the weights corresponding to the vector of the content to be queried.

[0388] According to embodiments of this disclosure, for a single content type, if the proportion of the first content corresponding to that content type is less than the proportion of the second content corresponding to that content type, then the vector element will be a negative number. Directly using negative numbers as the weights of the queried content vector would significantly reduce the accuracy of data queries. Therefore, it is necessary to transform the vector elements to ensure that the weights of the queried content vectors are positive, and that the weights of the queried content vectors increase as the number of vector elements increases. This process can satisfy the personalized needs of query users while ensuring the accuracy of data queries.

[0389] The specific method for "transforming vector elements to obtain the weights corresponding to the vector of the content to be queried" will be described in detail below.

[0390] The embodiments of steps 1710 to 1720 described above can transform the vector elements corresponding to the content type of the content to be queried to obtain the weights corresponding to the vector of the content to be queried. This process avoids the situation where the weights corresponding to the vector of the content to be queried are negative, thus ensuring the accuracy of the data query.

[0391] In one embodiment, step 1720 includes:

[0392] Step 1810: Obtain the base number greater than 1;

[0393] Step 1820: Use the exponents of the vector elements as bases, and use the resulting powers as weights.

[0394] Steps 1810 to 1820 are described in detail below.

[0395] In step 1810, obtain the base number that is greater than 1.

[0396] Understandably, exponentiation refers to multiplying a number by itself a certain number of times, while the base is the number being multiplied by itself in the exponentiation operation. In the mathematical expression a... n In this context, 'a' is the base.

[0397] Specifically, the base can be any number greater than 1, such as 2, 3, or 10. In this embodiment of the disclosure, in order to balance the numerical values ​​of the weights corresponding to the content vector to be queried, e is generally set as the base, where e is an irrational number with a value of approximately 2.71828.

[0398] In step 1820, the exponent obtained by using the vector elements as the base is used as the weight.

[0399] Understandably, the exponent is the number used in exponentiation to represent the power to which the base is multiplied by itself. In the mathematical expression a... n In this context, n is the exponent. To incorporate the deviation between the user's content type preference vector and the average content type preference vector into the weighting of the query content vector, the vector elements in the difference vector corresponding to the content type of the query content can be used as the exponent. Furthermore, the base and exponent are raised to the power of the result, and the resulting power is used as the weight. This process quantifies the deviation between the user's content type preference vector and the average content type preference vector. It not only ensures that the weight of the query content vector is positive, but also that the weight increases with the number of vector elements, and that the weight of the query content vector will not exceed the base.

[0400] For example, if the base is e, the difference vector includes the percentage difference for text type (4 / 35), image type (2 / 35), audio type (-9 / 140), and video type (-1 / 28). When the content type of the query is text, the percentage difference for text type (4 / 35) can be used as the exponent of the base. Based on this, the base and exponent are raised to a power, and the resulting power... As the weights corresponding to the vector of content to be queried.

[0401] In the embodiments described in steps 1810 to 1820 above, the vector elements are used as exponents of a base greater than 1, and the base and exponent are raised to the power of each exponent. The resulting power is then used as the weight. This process ensures that the weight corresponding to the queried content vector is positive, and that the weight increases with the number of vector elements, while never exceeding the base, thus guaranteeing the accuracy of the data query.

[0402] Detailed description of step 350

[0403] In step 350, the similarity of the content vectors to be queried is weighted based on the weights corresponding to the content vectors to be queried, and a weighted similarity is obtained. Based on the weighted similarity of each content vector to be queried, the query result corresponding to the query condition text is determined.

[0404] In one embodiment, step 350 includes:

[0405] Step 1910: Based on the weighted similarity of each query content vector, determine the target content vector among each query content vector;

[0406] Step 1920: Determine the content to be queried corresponding to the target content vector, and use it as the query result.

[0407] Steps 1910 to 1920 are described in detail below.

[0408] In step 1910, the target content vector is determined among the various query content vectors based on the weighted similarity of each query content vector.

[0409] Understandably, the target content vector refers to the query content vector that best matches the query condition text vector. Generally, the query content vector with the highest weighted similarity can be used as the target content vector. Alternatively, the query content vectors can be sorted from highest to lowest weighted similarity, and the top-ranked vectors can be used as the target content vectors. The specific number of query content vectors selected depends on the complexity of the query condition text. This approach allows for a more refined sorting of the coarsely ranked query content vectors from step 320, taking into account the content types preferred by the querying user. This refined sorting quickly identifies the target content vectors that best match the query condition text vectors, significantly improving query efficiency.

[0410] For example, if the query content vectors include Query Content Vector 1, Query Content Vector 2, Query Content Vector 3, and Query Content Vector 4, and the weighted similarity of Query Content Vector 1 is 0.9, the weighted similarity of Query Content Vector 2 is 0.67, the weighted similarity of Query Content Vector 3 is 0.78, and the weighted similarity of Query Content Vector 4 is 0.89: If the query text is simple, Query Content Vector 1 with the highest weighted similarity can be directly used as the target content vector. If the query text is complex, the query content vectors can be sorted from largest to smallest, and the top two, Query Content Vector 1 and Query Content Vector 4, can be used as the target content vectors.

[0411] In step 1920, the content to be queried corresponding to the target content vector is determined as the query result.

[0412] Understandably, since the target content vector is vector data, and vector data is in numerical form, it cannot be directly read and understood by the querying user. Therefore, to facilitate understanding by the querying user, it is necessary to determine the original format of the target content vector so that it can be provided to the user as a query result. The original format of the target content vector is, in essence, the content to be queried corresponding to the target content vector.

[0413] The specific method for "determining the content to be queried corresponding to the target content vector as the query result" will be described in detail below.

[0414] The embodiments of steps 1910 to 1920 described above can determine the target content vector among the various query content vectors based on the weighted similarity of each query content vector. This process allows for a refined sorting of the query content vectors from the coarse ranking in step 320, taking into account the content type preferences of the querying user. This refined sorting quickly identifies the target content vector that matches the query condition text vector, significantly improving query efficiency. Furthermore, after determining the target content vector, since it cannot be directly read and understood by the querying user, this embodiment of the disclosure also determines the original format of the target content vector as the query result, facilitating reading and understanding by the querying user.

[0415] In one embodiment, the vector of content to be queried and the storage location information of the content to be queried corresponding to the vector of content to be queried are stored together in the vector of content to be queried;

[0416] Step 1920 includes:

[0417] Step 2010: In the content vector library to be queried, determine the storage location information corresponding to the target content vector;

[0418] Step 2020: Based on the storage location information, find the content to be queried corresponding to the target content vector, and use it as the query result.

[0419] Steps 2010 to 2020 are described in detail below:

[0420] In step 2010, the storage location information corresponding to the target content vector is determined in the content vector library to be queried.

[0421] It's understandable that when writing the content vector to be queried, the content vector and its storage location information are treated as an index structure and written to the content vector library. In other words, within the content vector library, the content vector to be queried and the storage location information of the corresponding content are stored together. Based on this, after determining the target content vector, the storage location information corresponding to the target content vector can be directly determined through the content vector library.

[0422] For example, if the query content vector library stores associated query content vector A and URL a (URL a is the storage location information corresponding to query content vector A), query content vector B and URL b (URL b is the storage location information corresponding to query content vector B), and query content vector C and URL c (URL c is the storage location information corresponding to query content vector C), then when the target content vector is query content vector A, the query content vector library can be used to determine that the storage location information corresponding to the target content vector is URL a.

[0423] In step 2020, based on the storage location information, the content to be queried corresponding to the target content vector is found and used as the query result.

[0424] It's understandable that storage location information can be a file path, a row number in a database table, or an offset of a data block. If the storage location information is a file path, then the file storing the content to be queried corresponding to the target content vector can be located based on the storage location information corresponding to the target content vector. For example, if the storage location information corresponding to the target content vector is " / data / documents / file1.txt", then this file path can be accessed through the file system to find the corresponding content to be queried, and then the content to be queried can be read and used as the query result.

[0425] If the storage location information corresponding to the target content vector is a row number in a database table, then the query content corresponding to the target content vector can be obtained through an SQL (Structured Query Language) query. For example, if there is a work task information table named "work" with an index of row number "id", and you want to retrieve the work task based on index "id=3", you can execute the SQL statement "SELECT * FROM work WHERE id=3". The database will quickly locate the corresponding row based on the row number and return all column data of that row, which is the query content corresponding to the target content vector.

[0426] If the storage location information is the offset of a data block, then the disk storage space can be read based on the storage location information corresponding to the target content vector to determine the content to be queried corresponding to the target content vector. For example, if each data block on the disk is 512 bytes in size and the index is offset = 1024, then by calculating offset / block size = 1024 / 512 = 2, it can be determined that the content to be queried corresponding to the target content vector is located in the 3rd data block (counting from 0). Then, data is read starting from the 3rd data block on the disk to obtain the content to be queried corresponding to the target content vector.

[0427] In the embodiments of steps 2010 to 2020 above, because the query content vector and the storage location information of the query content corresponding to the query content vector are stored in association in the query content vector library, after determining the target content vector, the query content corresponding to the target content vector can be quickly determined based on the storage location information corresponding to the target content vector. This process facilitates indexing of the query content corresponding to the target content vector, greatly improving the efficiency of data retrieval.

[0428] In one embodiment, after step 350, the method further includes:

[0429] Step 2110: Integrate the query results of each content type using the content integration model to obtain the presented content.

[0430] According to embodiments of this disclosure, if there is only one query result, the query result can be directly determined as the content to be presented. If there are more than one query result, it is necessary to integrate the query results of each content type using a content integration model to obtain the content to be presented.

[0431] As we can understand, a content integration model is a deep learning model used to adjust the format of query results of different content types and to assemble these results. The input to a content integration model is query results of different content types, and the output is the presented content, which refers to the content obtained after assembling and combining the query results of different content types. By assembling and combining query results of different content types, the model allows users to quickly understand the essence of the content in the most intuitive way (images, videos, etc.), greatly improving information retrieval efficiency.

[0432] Specifically, refer to Figure 10 First, the query results need to be categorized based on their content type. For text-based queries, a summary text and key segments (fields that highly summarize and reflect the core content, theme, or key information) can be extracted. Keywords (words or phrases crucial for understanding the text) within these key segments are highlighted. Finally, the summary text and key segments are formatted and optimized. For image-based queries, thumbnails of various sizes and resolutions can be generated, with the appropriate size and resolution determined based on the user's network conditions and device type. For audio and video queries, climax segments can be extracted as preview clips, images summarizing the core content of the query results can be extracted as preview images, and playback controls with preview images can be generated based on these preview clips.

[0433] After processing query results of different content types, these results can be combined to obtain the presented content. For example, matching text query results and image query results can be combined to form the presented content; or matching text query results and video query results can be combined to form the presented content.

[0434] Furthermore, the content integration model dynamically adjusts the final presentation of query results for different content types based on the current user's network conditions, device type, and user preferences. If the user is using a computer, a multi-column layout can be used on the user's desktop to simultaneously display query results of different content types. If the user is using a mobile device, text-based query results will be loaded first, while image, audio, and video results will be loaded later. If the user's network conditions are poor, only text-based query results may be presented. For more complex query text conditions, structured overviews, such as timelines, comparison tables, or knowledge graphs, can be generated based on the query results of different content types to help users quickly grasp the overall information.

[0435] For example, refer to Figure 11 For the query text "How to check my phone's battery health?", we can obtain text, image, and video query results. The image query results are thumbnails adapted to the current user's mobile device, and the video query results are playback controls with preview images. Then, a content integration model can be used to integrate the query results of each content type. The first step from the text query result is combined with the first image from its matching image query result; the second step from the text query result is combined with the second image from its matching image query result; and the third step from the text query result is combined with the third image from its matching image query result. Finally, the video query result is appended to the end to obtain the presented content, as shown below. Figure 11 As shown.

[0436] The embodiment of step 2110 above uses a content integration model to splice and assemble query results of different content types, which can quickly help query users understand the essence of the content in the most intuitive way, greatly improving the efficiency of information acquisition.

[0437] Description of apparatus and devices according to embodiments of this disclosure

[0438] It is understood that although the steps in the above flowcharts are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this embodiment, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the above flowcharts may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.

[0439] It should be noted that in various specific embodiments of this application, when processing data related to object characteristics, such as object attribute information or sets of attribute information, is required, the object's permission or consent will be obtained first. Furthermore, the collection, use, and processing of this data will comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require obtaining object attribute information, separate permission or consent from the object will be obtained through pop-ups or redirection to a confirmation page. Only after obtaining the object's separate permission or consent will the necessary object-related data for the proper functioning of these embodiments be acquired.

[0440] Figure 12 A schematic diagram of the structure of a data query device 1200 provided in an embodiment of this disclosure. The data query device 1200 includes:

[0441] The conversion unit 1210 is used to convert the query condition text of the query user into a query condition text vector;

[0442] The calculation unit 1220 is used to calculate the similarity between each query content vector in the query content vector library and the query condition text vector, wherein the query content vector is obtained by converting the query content, and the query content has a content type;

[0443] The generation unit 1230 is used to generate a user content type preference vector for the querying user based on the first query history information of the querying user for the content to be queried. The user content type preference vector indicates the querying user's preference for various content types of the content to be queried.

[0444] The determining unit 1240 is used to determine the weight corresponding to the query content vector based on the user content type preference vector and the content type of the query content corresponding to the query content vector.

[0445] The weighting unit 1250 is used to weight the similarity of the corresponding content vectors based on the weights of the content vectors to be queried, to obtain a weighted similarity, and to determine the query result corresponding to the query condition text based on the weighted similarity of each content vector to be queried.

[0446] Optionally, the conversion unit 1210 is specifically used for:

[0447] Analyze the query condition text to obtain the query entities and query intents within the query condition text;

[0448] The query entity and query intent are expanded using the expansion model to obtain multiple expanded entities corresponding to the query entity and multiple expanded intents corresponding to the query intent.

[0449] Vector transformation is performed based on the expanded entity and expanded intent to obtain the query condition text vector.

[0450] Optionally, the conversion unit 1210 is specifically used for:

[0451] The vector transformation model is used to convert the expanded entity and expanded intent into expanded entity vector and expanded intent vector, respectively.

[0452] Determine the first weight corresponding to each expanded entity vector and the second weight corresponding to each expanded intent vector;

[0453] The expanded entity vector and expanded intent vector are weighted and averaged based on the first and second weights to obtain the query condition text vector.

[0454] Optionally, the computing unit 1220 is specifically used for:

[0455] Retrieve the content to be queried;

[0456] Convert the content to be queried into a vector of the content to be queried;

[0457] The vector of the content to be queried and the storage location information of the content to be queried are stored accordingly to obtain the vector library of the content to be queried.

[0458] Optionally, the computing unit 1220 is specifically used for:

[0459] If the content to be queried is text, perform vector conversion on the content to be queried to obtain the vector of the content to be queried;

[0460] If the content type of the query is not text, the summary text extraction model is used to extract the summary text from the query content, and the summary text is then transformed into a vector to obtain the query content vector.

[0461] Optionally, the computing unit 1220 is specifically used for:

[0462] If the content to be queried is text, perform text cleaning on the content to be queried to obtain noise-reduced text;

[0463] Determine entity and semantic information in the denoised text;

[0464] By using a text summarization model to summarize entity information and semantic information, a summary text corresponding to the content to be queried is obtained.

[0465] The abstract text is vectorized to obtain the vector of the content to be queried.

[0466] Optionally, non-text types include image types, and the calculation unit 1220 is specifically used for:

[0467] If the content to be queried is an image, perform key region detection on the content to be queried to obtain multiple key regions;

[0468] By extracting visual features from key areas, we can obtain image content, image objects, and image scenes.

[0469] The summary text extraction model is used to extract summaries of image content, image objects, and image scenes to obtain summary text.

[0470] Optionally, non-text types include audio types, and the computing unit 1220 is specifically used for:

[0471] If the content to be queried is audio, perform speech recognition on the content to be queried to obtain speech recognition data;

[0472] Determine the speech content, the corresponding time point, and speech features in the speech recognition data;

[0473] Sentiment analysis models are used to analyze speech content and speech features to obtain speech sentiment information;

[0474] The summary text is obtained by using a summary text extraction model to extract the speech content, the corresponding time point, speech features and speech emotion information.

[0475] Optionally, non-text types include video types, and the computing unit 1220 is specifically used for:

[0476] If the content to be queried is a video, the frame to be queried is extracted at interval sampling time to obtain multiple video frame data.

[0477] Key region detection and visual feature extraction are performed on video frame data to obtain video frame content, video frame objects, and video frame scenes;

[0478] The summary text extraction model is used to extract the summary text of video frame content, video frame objects and video frame scenes to obtain the summary text corresponding to each video frame data.

[0479] Extract video audio data from the content to be queried, and determine the video audio content, the time point corresponding to the video audio content, the video audio features, and the video emotional information in the video audio data;

[0480] The summary text extraction model is used to extract the summary text of the video audio content, the time points corresponding to the video audio content, the video audio features and the video emotional information, so as to obtain the summary text corresponding to the video audio data.

[0481] The summary text corresponding to each video frame and the summary text corresponding to the video audio data are integrated to obtain the summary text of the content to be queried.

[0482] Optionally, the computing unit 1220 is specifically used for:

[0483] Determine query complexity based on query condition text;

[0484] Determine probe parameters based on query complexity;

[0485] Based on the probe parameters, an approximate nearest neighbor search is performed in the vector database of content to be queried to obtain the similarity between each vector of content to be queried and the vector of text of the query conditions.

[0486] Optionally, the generating unit 1230 is specifically used for:

[0487] In the first query history, determine the first occurrence count of the query content for each content type;

[0488] In the first query history, determine the first total number of occurrences of the content to be queried;

[0489] Based on the first occurrence count and the total first occurrence count for each content type, calculate the percentage of the first content for each content type.

[0490] Based on the proportion of the first content type corresponding to each content type, a user content type preference vector is generated.

[0491] Optionally, the determining unit 1240 is specifically used for:

[0492] Based on the second query history information of multiple platform users on the content to be queried, an average content type preference vector of multiple platform users is generated. The average content type preference vector indicates the average preference of each platform user for various content types of the content to be queried. Multiple platform users include the querying user.

[0493] Calculate the difference vector between the user content type preference vector and the average content type preference vector;

[0494] The weights corresponding to the query content vectors are determined based on the difference vectors and the content types of the query content vectors.

[0495] Optionally, the determining unit 1240 is specifically used for:

[0496] In the second query history information, determine the second occurrence count of the query content for each content type;

[0497] In the second query history information, determine the second total number of occurrences of the content to be queried;

[0498] Calculate the percentage of second content in each content type based on the number of second occurrences and the total number of second occurrences for each content type.

[0499] Based on the proportion of the second content corresponding to each content type, an average content type preference vector is generated.

[0500] Optionally, the determining unit 1240 is specifically used for:

[0501] For each content type, calculate the difference between the percentage of the first content and the percentage of the second content corresponding to the content type;

[0502] The percentage difference corresponding to each content type is used as a vector element to form a difference vector.

[0503] Optionally, the determining unit 1240 is specifically used for:

[0504] In the difference vector, determine the vector elements corresponding to the content type;

[0505] Transform the vector elements to obtain the weights corresponding to the vector containing the query content.

[0506] Optionally, the determining unit 1240 is specifically used for:

[0507] Get the base number greater than 1;

[0508] The exponent obtained by using the vector elements as the base is used as the weight.

[0509] Optionally, the weighting unit 1250 is specifically used for:

[0510] Based on the weighted similarity of each query content vector, the target content vector is determined among each query content vector;

[0511] The content to be queried corresponding to the target content vector is determined as the query result.

[0512] Optionally, the vector of content to be queried and the storage location information of the content to be queried corresponding to the vector of content to be queried are stored together in the vector of content to be queried;

[0513] Weighting unit 1250 is specifically used for:

[0514] In the content vector library to be queried, determine the storage location information corresponding to the target content vector;

[0515] Based on the storage location information, the query content corresponding to the target content vector is found and used as the query result.

[0516] Optionally, the data query device 1200 further includes an integration unit, which is specifically used for:

[0517] The content integration model is used to integrate the query results of various content types to obtain the presented content.

[0518] Reference Figure 13 , Figure 13 To illustrate the structural block diagram of a terminal for implementing the data query method of this embodiment, the terminal includes: a radio frequency (RF) circuit 1310, a memory 1315, an input unit 1330, a display unit 1340, a sensor 1350, an audio circuit 1360, a wireless fidelity (WiFi) module 1370, a processor 1380, and a power supply 1390, among other components. Those skilled in the art will understand that... Figure 13 The terminal structure shown does not constitute a limitation on mobile phones or computers and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0519] The RF circuit 1310 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and processes it with the processor 1380; in addition, it transmits uplink data to the base station.

[0520] The memory 1315 can be used to store software programs and modules. The processor 1380 executes various functional applications and data processing of the content terminal by running the software programs and modules stored in the memory 1315.

[0521] The input unit 1330 can be used to receive input numeric or character information, and to generate key signal inputs related to the settings and function control of the content terminal. Specifically, the input unit 1330 may include a touch panel 1331 and other input devices 1332.

[0522] The display unit 1340 can be used to display input or provided information, as well as various menus of the content terminal. The display unit 1340 may include a display panel 1341.

[0523] Audio circuitry 1360, speaker 1361, and microphone 1362 provide an audio interface.

[0524] In this embodiment, the processor 1380 included in the terminal can execute the data query method of the previous embodiment.

[0525] The terminals disclosed in this embodiment include, but are not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, and aircraft. The embodiments of this invention can be applied to various scenarios, including but not limited to information retrieval, smart homes, and creative generation.

[0526] Figure 14 This is a partial structural block diagram of a server for implementing the data query method of this disclosure embodiment. The server can vary significantly due to different configurations or performance, and may include one or more Central Processing Units (CPUs) 1422 (e.g., one or more processors) and a memory 1432, and one or more storage media 1430 (e.g., one or more mass storage devices) for storing application programs 1442 or data 1444. The memory 1432 and storage media 1430 can be temporary or persistent storage. The program stored in the storage media 1430 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 1422 may be configured to communicate with the storage media 1430 and execute the series of instruction operations in the storage media 1430 on the server.

[0527] The server may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input / output interfaces 1458, and / or one or more operating systems 1441, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0528] The central processing unit 1422 in the server can be used to execute the data query method of the present disclosure embodiments.

[0529] This disclosure also provides a computer-readable storage medium for storing program code for executing the data query methods of the foregoing embodiments.

[0530] This disclosure also provides a computer program product comprising a computer program. A processor of a computer device reads and executes the computer program, causing the computer device to perform the data query method described above.

[0531] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in this disclosure and the foregoing drawings are used to distinguish similar terms and are not necessarily used to describe a particular order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this disclosure described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “including,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatuses.

[0532] It should be understood that in this disclosure, "at least one item" refers to one or more items, and "more than one item" refers to two or more items. "And / or" is used to describe the relationship between related content, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related content are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0533] It should be understood that in the description of the embodiments disclosed herein, "multiple" means two or more, "greater than", "less than", "exceeding" etc. are understood to exclude the number itself, and "above", "below", "within" etc. are understood to include the number itself.

[0534] In the embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0535] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0536] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0537] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server 130, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0538] It should also be understood that the various implementation methods provided in this disclosure can be combined arbitrarily to achieve different technical effects.

[0539] The above is a detailed description of the embodiments of this disclosure. However, this disclosure is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this disclosure. All such equivalent modifications or substitutions are included within the scope defined by the claims of this disclosure.

Claims

1. A data query method, characterized in that, include: Convert the query text of the user into a query text vector; Calculate the similarity between each query content vector in the query content vector library and the query condition text vector, wherein the query content vector is obtained by converting the query content, and the query content has a content type; Based on the query user's first query history information for the content to be queried, a user content type preference vector is generated for the query user, and the user content type preference vector indicates the query user's preference for the content to be queried of various content types; Based on the user content type preference vector and the content type of the content to be queried corresponding to the content vector to be queried, the weight corresponding to the content vector to be queried is determined; Based on the weights corresponding to the content vectors to be queried, the similarities corresponding to the content vectors to be queried are weighted to obtain a weighted similarity. Based on the weighted similarities of each content vector to be queried, the query results corresponding to the query condition text are determined.

2. The data query method according to claim 1, characterized in that, The process of converting the query text of the querying user into a query text vector includes: The query condition text is analyzed to obtain the query entity and query intent in the query condition text; The query entity and the query intent are expanded using the expansion model to obtain multiple expanded entities corresponding to the query entity and multiple expanded intents corresponding to the query intent. Based on the expanded entity and the expanded intent, a vector transformation is performed to obtain the query condition text vector.

3. The data query method according to claim 1, characterized in that, The vector library of content to be queried is obtained in the following way: Retrieve the content to be queried; Convert the content to be queried into a vector of content to be queried; The vector of the content to be queried and the storage location information of the content to be queried are stored in correspondence to obtain the vector library of the content to be queried.

4. The data query method according to claim 3, characterized in that, The step of converting the content to be queried into a vector of content to be queried includes: If the content type of the content to be queried is text, perform vector conversion on the content to be queried to obtain the vector of the content to be queried; If the content type of the content to be queried is a non-text type, a summary text extraction model is used to extract summary text from the content to be queried, and the summary text is vectorized to obtain the vector of the content to be queried.

5. The data query method according to claim 4, characterized in that, If the content type of the content to be queried is text, the process of performing vector transformation on the content to be queried to obtain the vector of the content to be queried includes: If the content type of the content to be queried is text, perform text cleaning on the content to be queried to obtain noise-reduced text; Determine the entity information and semantic information in the denoised text; The entity information and semantic information are summarized using a text summarization model to obtain the summary text corresponding to the content to be queried. The summary text is vectorized to obtain the vector of the content to be queried.

6. The data query method according to claim 4, characterized in that, The non-text types include image types. If the content type of the content to be queried is a non-text type, extracting summary text from the content to be queried using a summary text extraction model includes: If the content type of the content to be queried is an image, perform key region detection on the content to be queried to obtain multiple key regions; By extracting visual features from the key regions, we can obtain the image content, image objects, and image scene. The summary text is obtained by using the summary text extraction model to extract the summary of the image content, the image object, and the image scene.

7. The data query method according to claim 4, characterized in that, The non-text type includes audio type. If the content type of the content to be queried is a non-text type, the summary text extraction model is used to extract summary text from the content to be queried, including: If the content type of the content to be queried is audio, perform speech recognition on the content to be queried to obtain speech recognition data; Determine the speech content, the corresponding time point, and the speech features in the speech recognition data; The speech content and speech features are analyzed using a sentiment analysis model to obtain speech sentiment information; The summary text is obtained by using the summary text extraction model to extract the summary text from the speech content, the time point corresponding to the speech content, the speech features and the speech emotion information.

8. The data query method according to claim 4, characterized in that, The non-text type includes video type. If the content type of the content to be queried is a non-text type, extracting summary text from the content to be queried using a summary text extraction model includes: If the content type of the content to be queried is a video type, the content to be queried is sampled at intervals to extract frames, resulting in multiple video frame data. Key region detection and visual feature extraction are performed on the video frame data to obtain video frame content, video frame objects, and video frame scenes; The summary text extraction model is used to extract the summary text of the video frame content, the video frame object, and the video frame scene to obtain the summary text corresponding to each video frame data. Extract video and audio data from the content to be queried, and determine the video and audio content, the time point corresponding to the video and audio content, video and audio features, and video emotional information in the video and audio data; The summary text extraction model is used to extract the summary text of the video audio content, the time points corresponding to the video audio content, the video audio features, and the video emotional information to obtain the summary text corresponding to the video audio data. The summary text corresponding to each video frame data and the summary text corresponding to the video audio data are integrated to obtain the summary text of the content to be queried.

9. The data query method according to claim 1, characterized in that, The step of generating a user content type preference vector for the querying user based on the querying user's first query history information for the content to be queried includes: In the first query history information, determine the first occurrence count of the content to be queried for each content type; In the first query history information, determine the first total number of occurrences of the content to be queried; Based on the first occurrence count and the first total occurrence count for each content type, calculate the proportion of the first content for each content type; Based on the first content proportion corresponding to each content type, the user content type preference vector is generated.

10. The data query method according to claim 1, characterized in that, The step of determining the weight corresponding to the query content vector based on the user content type preference vector and the content type of the query content corresponding to the query content vector includes: Based on the second query history information of multiple platform users for the content to be queried, an average content type preference vector of the multiple platform users is generated. The average content type preference vector indicates the average preference of each platform user for the content to be queried of various content types. The multiple platform users include the querying user. Calculate the difference vector between the user content type preference vector and the average content type preference vector; Based on the difference vector and the content type of the content to be queried corresponding to the content vector to be queried, the weight corresponding to the content vector to be queried is determined.

11. The data query method according to claim 10, characterized in that, The step of generating an average content type preference vector for the multiple platform users based on their second query history information regarding the content to be queried includes: In the second query history information, determine the second occurrence count of the content to be queried for each content type; In the second query history information, determine the second total number of occurrences of the content to be queried; Based on the second occurrence count and the second total occurrence count for each content type, calculate the proportion of the second content for each content type; Based on the second content proportion corresponding to each content type, the average content type preference vector is generated.

12. The data query method according to claim 11, characterized in that, The step of calculating the difference vector between the user content type preference vector and the average content type preference vector includes: For each content type, calculate the difference between the percentage of the first content corresponding to the content type and the percentage of the second content corresponding to the content type; The percentage difference corresponding to each content type is used as a vector element to form the difference vector.

13. The data query method according to claim 10, characterized in that, The step of determining the weight corresponding to the query content vector based on the difference vector and the content type of the query content corresponding to the query content vector includes: In the difference vector, determine the vector element corresponding to the content type; The vector elements are transformed to obtain the weights corresponding to the vector of the content to be queried.

14. The data query method according to claim 13, characterized in that, The step of transforming the vector elements to obtain the weights corresponding to the vector of content to be queried includes: Get the base number greater than 1; The exponent obtained by using the vector elements as the base is used as the weight.

15. The data query method according to claim 1, characterized in that, The step of determining the query result corresponding to the query condition text based on the weighted similarity of each of the query content vectors includes: Based on the weighted similarity of each of the query content vectors, the target content vector is determined among the query content vectors; The content to be queried corresponding to the target content vector is determined as the query result.

16. The data query method according to claim 15, characterized in that, The vector of the content to be queried and the storage location information of the content to be queried corresponding to the vector of the content to be queried are stored in the vector of the content to be queried in association. Determining the content to be queried corresponding to the target content vector as the query result includes: In the content vector library to be queried, determine the storage location information corresponding to the target content vector; Based on the storage location information, the content to be queried corresponding to the target content vector is found and used as the query result.

17. A data query device, characterized in that, The data query device includes: The transformation unit is used to convert the query condition text of the query user into a query condition text vector; A calculation unit is used to calculate the similarity between each query content vector in the query content vector library and the query condition text vector, wherein the query content vector is obtained by converting the query content, and the query content has a content type; The generation unit is configured to generate a user content type preference vector for the querying user based on the querying user's first query history information for the content to be queried, wherein the user content type preference vector indicates the querying user's preference for the content to be queried of various content types; The determining unit is used to determine the weight corresponding to the query content vector based on the user content type preference vector and the content type of the query content corresponding to the query content vector; The weighting unit is used to weight the similarity corresponding to the content vector to be queried based on the weight corresponding to the content vector to be queried, to obtain a weighted similarity, and to determine the query result corresponding to the query condition text based on the weighted similarity of each content vector to be queried.

18. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the data query method according to any one of claims 1 to 16.

19. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the data query method according to any one of claims 1 to 16.

20. A computer program product comprising a computer program that is read and executed by a processor of a computer device, causing the computer device to perform the data query method according to any one of claims 1 to 16.