Information storage method and device, storage medium and electronic equipment
By extracting and tagging the feature information of unstructured data, and generating summary information in structured databases, the problem of low efficiency in unstructured data management in existing technologies is solved, and efficient and precise data management and querying are achieved.
Patent Information
- Application Number
- CN202511428314.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-02-06
AI Technical Summary
Existing technologies struggle to efficiently manage unstructured data, resulting in low information utilization efficiency and poor user experience.
By extracting feature information from target information, obtaining tag information and determining associated information, adjusting associated information to generate summary information, and storing it in a structured database, combined with the intelligent query mechanism of structured and unstructured databases, efficient management of unstructured data can be achieved.
It enables efficient and refined management of large amounts of unstructured data, improves information retrieval speed and user experience, and provides powerful data processing capabilities.
Smart Images

Figure CN121478852A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home technology, and more specifically, to an information storage method and apparatus, storage medium and electronic device. Background Technology
[0002] With the widespread adoption of smart devices and internet applications, individuals and businesses face increasing challenges in managing digital information. Traditional memory management systems, such as Memo, while providing some information storage and retrieval capabilities, often struggle to efficiently manage large amounts of unstructured data. Especially in applications like intelligent dialogue, knowledge management, and personalized recommendations, direct processing and retrieval of raw data are not only slow but also lack in-depth content understanding and intelligent analysis capabilities, resulting in low information utilization efficiency and a poor user experience.
[0003] No effective solution has yet been proposed to address the problem of inefficient management of unstructured data in related technologies. Summary of the Invention
[0004] This application provides an information storage method and apparatus, storage medium and electronic device to at least solve the problem of inefficient management of unstructured data in related technologies.
[0005] According to one embodiment of this application, an information storage method is provided, comprising: extracting first feature information from target information; obtaining tag information of the first feature information and determining association information of the first feature information based on the tag information; adjusting the association information based on the first feature information to obtain adjusted association information; determining first summary information of the adjusted association information and storing the first summary information in a first database, wherein the first database is a structured database.
[0006] In one exemplary embodiment, determining the association information of the first feature information based on the tag information includes: determining whether the association information of the first feature information exists in the first database based on the tag information; if the association information of the first feature information does not exist in the first database based on the tag information, determining the association information of the first feature information in a second database based on the tag information, wherein the second database is an unstructured database; and if the association information of the first feature information exists in the first database based on the tag information, determining the association information of the first feature information in the first database based on the tag data.
[0007] In an exemplary embodiment, adjusting the associated information based on the first feature information to obtain adjusted associated information includes: when the associated information is feature information, determining a first feature vector of the first feature information and a second feature vector of the associated information; determining a first similarity between the first feature vector and the second feature vector; adjusting the associated information based on the first similarity to obtain adjusted associated information; when the associated information is summary information, determining a second summary information of the first feature information; determining a third feature vector of the second summary information and a second feature vector of the associated information; determining a second similarity between the third feature vector and the second feature vector; and adjusting the associated information based on the second similarity to obtain adjusted associated information.
[0008] In one exemplary embodiment, adjusting the association information according to the second similarity to obtain adjusted association information includes: adding the first summary information to the association information when the second similarity is less than or equal to a second preset similarity to obtain adjusted association information; and adjusting the association information to the first summary information when the second similarity is greater than the second preset similarity to obtain adjusted association information.
[0009] In one exemplary embodiment, storing the first summary information in a first database includes: placing the target task into a target queue according to the task level of the target task, wherein the target task is used to indicate that the first summary information is stored in the first database; obtaining an idle thread in a linear pool and obtaining the target task in the target queue according to the task level of the target task; and executing the target task through the idle thread to store the first summary information in the first database.
[0010] In one exemplary embodiment, the method further includes: receiving a query request sent by a query object, wherein the query request is used to query information of the query object; determining whether summary information or feature information of the query object exists in the first database; if the summary information or feature information of the query object does not exist in the first database, obtaining second feature information of the query object from a second database, generating a query response based on the second feature information, and sending the query response to the query object, wherein the second database is an unstructured database; if the summary information or feature information of the query object exists in the first database, obtaining third summary information or third feature information of the query object from the first database, generating a query response based on the third summary information or third feature information, and sending the query response to the query object.
[0011] In an exemplary embodiment, after obtaining the feature information of the query object from the second database, the method further includes: determining the quantity of the second feature information; if the quantity of the second feature information is greater than or equal to a preset quantity, inputting the second feature information into a preset model so that the preset model outputs second summary information of the second feature information, and saving the second summary information to the first database according to the storage rules of the first database; if the quantity of the second feature information is less than the preset quantity, saving the second feature information to the first database according to the storage rules of the first database.
[0012] According to another embodiment of the present application, an information storage device is also provided, comprising: an extraction module for extracting first feature information from target information; a determination module for obtaining tag information of the first feature information and determining association information of the first feature information based on the tag information; an adjustment module for adjusting the association information based on the first feature information to obtain adjusted association information; and a storage module for determining first summary information of the adjusted association information and storing the first summary information in a first database, wherein the first database is a structured database.
[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the storage method of the above information when it is run.
[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the aforementioned information storage method through the computer program.
[0015] In this embodiment, first feature information is extracted from target information; tag information of the first feature information is obtained, and association information of the first feature information is determined based on the tag information; the association information is adjusted based on the first feature information to obtain adjusted association information; a first summary information of the adjusted association information is determined, and the first summary information is stored in a first database, wherein the first database is a structured database. This embodiment, through feature information extraction, tagging management, association information adjustment, and intelligent summary storage in a structured database, achieves efficient and refined management of large amounts of unstructured data, thereby solving the problem of inefficient management of unstructured data in related technologies. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the hardware environment for an information storage method according to an embodiment of this application;
[0019] Figure 2 This is a flowchart of an information storage method according to an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of an information storage method according to an embodiment of this application;
[0021] Figure 4 This is a structural block diagram of an information storage device according to an embodiment of this application. Detailed Implementation
[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises 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 apparatus.
[0024] According to one aspect of the embodiments of this application, an information storage method is provided. This information storage method is widely used in whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligence house ecosystems. Optionally, in this embodiment, the above-mentioned information storage method can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.
[0025] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.
[0026] This embodiment provides an information storage method, applied to the aforementioned terminal device. Figure 2 This is a flowchart of an information storage method according to an embodiment of this application, which includes the following steps:
[0027] Step S202: Extract the first feature information from the target information;
[0028] It should be noted that the aforementioned target information can be the interaction information between the target object and the target device. Feature information is managed through tagging and assigned descriptive tags, such as topic tags, sentiment tags, and user behavior tags. The purpose of tagging is to transform unstructured data into information with a certain structure and category, facilitating subsequent management and analysis. By extracting and labeling feature information, target information is given category attributes, making information retrieval and understanding more intuitive and efficient.
[0029] Step S204: Obtain the tag information of the first feature information, and determine the association information of the first feature information based on the tag information;
[0030] Step S206: Adjust the association information according to the first feature information to obtain the adjusted association information;
[0031] Step S208: Determine the first summary information of the adjusted association information and store the first summary information in the first database, wherein the first database is a structured database.
[0032] In step S208, a "first summary information" can be generated from the adjusted association information using a Large Language Model (LLM). LLM can understand complex contexts and generate highly condensed and accurate summaries based on feature and association information, compressing unstructured data into structured small fragments of information. The generated summary information is then stored in a structured database (the first database).
[0033] Storing intelligently generated summaries in a structured database solves the problem of low query efficiency for unstructured data. Structured databases such as MySQL not only provide fast data query services but also maintain strong data consistency, ensuring fast and accurate data retrieval even in environments with large amounts of data. Furthermore, storing summary information further reduces data redundancy. Organizing and storing data in a structured manner improves the system's efficiency in managing and querying unstructured data.
[0034] Through the above steps, first feature information is extracted from the target information; tag information of the first feature information is obtained, and association information of the first feature information is determined based on the tag information; the association information is adjusted based on the first feature information to obtain adjusted association information; first summary information of the adjusted association information is determined, and the first summary information is stored in a first database, wherein the first database is a structured database. This application embodiment, through feature information extraction, tagging management, association information adjustment, and intelligent summary storage in a structured database, achieves efficient and refined management of large amounts of unstructured data, thereby solving the problem of inefficient management of unstructured data in related technologies.
[0035] Optionally, step S204 above can be implemented in the following ways: determining whether there is associated information of the first feature information in the first database based on the tag information; if it is determined that there is no associated information of the first feature information in the first database based on the tag information, determining the associated information of the first feature information in the second database based on the tag information, wherein the second database is an unstructured database; if it is determined that there is associated information of the first feature information in the first database based on the tag information, determining the associated information of the first feature information in the first database based on the tag data.
[0036] In this embodiment, the extracted tag information is used to search for "related information" that is related to the first feature information in a first database (structured database). Through the indexing and query optimization capabilities of the structured database, records matching the tags can be quickly located, providing a highly efficient and low-latency data retrieval service.
[0037] If no relevant information is found in the first database, a further search is conducted in the second database (an unstructured database, such as Elasticsearch). If relevant information can be found in the first database, it is retrieved from the first database without further searching in the second. The second database can handle more complex and diverse content, such as unstructured data like text, images, and videos. This cross-database query mechanism ensures that even when information is insufficient in the structured database, valuable relevant information can be obtained from the unstructured database to meet more comprehensive data needs.
[0038] This application embodiment establishes an intelligent query mechanism between structured and unstructured databases, determines associated information based on tag information, overcomes the limitations of structured queries, achieves efficient management and intelligent utilization of unstructured data, and provides powerful data processing capabilities for application scenarios such as intelligent dialogue and knowledge management.
[0039] Optionally, embodiments of this application provide an implementation scheme for optimizing and adjusting associated information related to target object information, including: when the associated information is feature information, determining a first feature vector of the first feature information and a second feature vector of the associated information; determining a first similarity between the first feature vector and the second feature vector; adjusting the associated information according to the first similarity to obtain adjusted associated information; when the associated information is summary information, determining a second summary information of the first feature information; determining a third feature vector of the second summary information and a second feature vector of the associated information; determining a second similarity between the third feature vector and the second feature vector; adjusting the associated information according to the second similarity to obtain adjusted associated information.
[0040] In this embodiment, the "first feature information" and "association information" are converted into a first feature vector and a second feature vector. The feature vectors can be generated based on word embedding models or more advanced semantic representation techniques, such as BERT and T5. The "first similarity" or "second similarity" between these two vectors is calculated to determine their semantic similarity. This feature vector representation solves the problem of direct comparison of text data, enabling the system to understand the meaning and structure of text content based on deep learning models, and thus perform fine-grained similarity calculations.
[0041] Based on the calculated first or second similarity scores, the associated information is filtered and adjusted. Associated information with high similarity is considered more relevant to the first feature information, while information with low similarity may be excluded or downweighted to reduce redundant data. When the associated information is summary information, a "second summary" is generated, for example, by re-evaluating and rewriting an existing summary to ensure its accuracy and semantic consistency.
[0042] Abstract optimization can improve the efficiency and quality of information delivery. By further analyzing and adjusting the abstract content, more accurate and concise abstracts can be generated, better serving scenarios such as intelligent dialogue, knowledge management, and personalized recommendations, thereby improving user satisfaction and system performance.
[0043] Optionally, the association information can be adjusted according to the second similarity to obtain the adjusted association information, including: adding the first summary information to the association information when the second similarity is less than or equal to the second preset similarity to obtain the adjusted association information; and adjusting the association information to the first summary information when the second similarity is greater than the second preset similarity to obtain the adjusted association information.
[0044] In this embodiment of the application, the similarity between the extracted "first summary information" and the existing "related information" is calculated, namely the "second similarity". The methods for calculating the similarity between the extracted "first summary information" and the existing "related information" include, but are not limited to: cosine similarity calculation, Jaccard similarity coefficient, and semantic matching algorithm, to quantify the degree of semantic similarity between the two.
[0045] If the second similarity is less than or equal to the second preset similarity, it indicates that the first summary information differs significantly from existing related information or adds new viewpoints or details. In this case, the system adds the first summary information as new information to the related information, expanding its content and improving its comprehensiveness and diversity. If the second similarity is greater than the second preset similarity, it means that the first summary information highly overlaps with existing related information, potentially containing duplicate or outdated information. In this case, the system adopts an overwrite strategy, directly replacing the related information with the first summary information to ensure the timeliness and accuracy of stored information and avoid information redundancy.
[0046] By introducing a similarity-based adjustment strategy, a key problem in information storage and updating is solved: how to maintain information diversity while avoiding the accumulation of duplicate and outdated information. This ensures that the stored information set is always in an optimal state, enabling rapid response to the addition of new information while reasonably maintaining the quality of existing information, thereby improving the efficiency of the entire system and the user experience.
[0047] Optionally, storing the first summary information in a first database includes: placing the target task into a target queue according to the task level of the target task, wherein the target task is used to indicate that the first summary information is stored in the first database; obtaining an idle thread in a linear pool and obtaining the target task in the target queue according to the task level of the target task; and executing the target task through the idle thread to store the first summary information in the first database.
[0048] The target task is placed into the target queue based on its "task level." The task level may be determined based on factors such as the importance of the summary information, time sensitivity, or processing priority. Queuing ensures that high-priority tasks (such as storing critical summary information) are processed promptly, while low-priority tasks are executed when resources allow. Idle threads are obtained from a thread pool to execute the storage task. Thread pools are a common resource management technique in multithreaded programming, pre-creating and managing a certain number of worker threads to avoid the overhead of frequently creating and destroying threads. When a storage task arrives, an idle thread is obtained from the thread pool to execute the task. After obtaining an idle thread, the task is retrieved from the target queue and executed according to the task level of the target task. In other words, high-priority tasks will receive thread resources first, ensuring that the storage of important or urgent summary information is not delayed.
[0049] This application's embodiments, through queued management of target tasks, efficient utilization of thread pools, and task priority-driven execution strategies, not only solve the problems of task processing order and resource management, but also ensure that high-value information can be stored and managed in a timely manner by controlling task priorities, thereby improving the overall performance and stability of the system.
[0050] Optionally, the following scheme may also be implemented in this embodiment: receiving a query request sent by a query object, wherein the query request is used to query information of the query object; determining whether summary information or feature information of the query object exists in the first database; if the summary information or feature information of the query object does not exist in the first database, obtaining second feature information of the query object from the second database, generating a query response based on the second feature information, and sending the query response to the query object, wherein the second database is an unstructured database; if the summary information or feature information of the query object exists in the first database, obtaining third summary information or third feature information of the query object from the first database, generating a query response based on the third summary information or third feature information, and sending the query response to the query object.
[0051] In this embodiment, upon receiving a query request from a query object (such as a user in an intelligent customer service system), the requested information is first searched in a first database (structured database). The first database has higher query efficiency and data consistency, and can quickly locate information directly related to the query object. If the requested summary information or feature information is not found in the first database, the query request is downgraded to a second database (unstructured database). The second database can handle more complex and diverse data, such as text, images, and audio, providing a wider range of data retrieval. A query response is generated based on the "second feature information" obtained from the second database.
[0052] The degradation query strategy addresses the limitations of structured databases in handling unstructured data queries. By introducing unstructured databases as a supplement to queries, the system can still provide users with the necessary information even when structured data is missing, ensuring the comprehensiveness and accuracy of information retrieval.
[0053] Optionally, after obtaining the feature information of the query object from the second database, the method further includes: determining the quantity of the second feature information; if the quantity of the second feature information is greater than or equal to a preset quantity, inputting the second feature information into a preset model so that the preset model outputs a second summary information of the second feature information, and saving the second summary information to the first database according to the storage rules of the first database; if the quantity of the second feature information is less than the preset quantity, saving the second feature information to the first database according to the storage rules of the first database.
[0054] The system retrieves feature information of the query object from the second database and counts the quantity of this information. Feature information may include various forms such as text descriptions, images, and audio clips. By evaluating the quantity of feature information, the system can determine whether summary information needs to be generated. When the quantity of information reaches a certain threshold (preset quantity), it indicates that the information is relatively rich and complex, and generating summary information will help with subsequent efficient retrieval and management. Therefore, when the quantity of "second feature information" is greater than or equal to the preset quantity, this information is input into the preset model to generate "second summary information." The preset model can be a trained Large Language Model (LLM), such as the GPT series or Claude. When the quantity of "second feature information" is less than the preset quantity, the system directly saves this information to the first database according to the storage rules of the first database, instead of generating summary information.
[0055] To better understand the process of the above information storage method, the implementation flow of the above information storage method will be described below in conjunction with optional embodiments, but it is not intended to limit the technical solution of the embodiments of this application.
[0056] This embodiment provides a method for storing information. Figure 3 This is a schematic diagram of an information storage method according to an embodiment of this application, such as... Figure 3 As shown, the specific steps are as follows:
[0057] Step S301: Obtain the memory information to be operated (including: id, tag, content, even) (equivalent to the target information in the above embodiment);
[0058] Building upon the existing memory retrieval functionality, a new tag-based categorization capability has been added, supporting structured organization of memories by theme, time, user, and other dimensions. Tag information is stored in association with the original memory, facilitating subsequent retrieval and summarization.
[0059] Step S302: Group the information according to tags and assemble the memory information to be summarized;
[0060] Step S303: Query data from the MySQL database (equivalent to the first database in the above embodiment);
[0061] Step S304: Determine whether data was found in the MySQL database, and determine whether the data found in the MySQL database was summarized using the large model based on the is_llm field;
[0062] Step S305: If no data is found in the MySQL database, call the ES library to query the data;
[0063] Step S306: Determine whether the number of records retrieved from the ES database is greater than or equal to 10;
[0064] Step S307: If there are 10 or more records, or if the data retrieved from the MySQL database has not been summarized by the large model, call the large model to perform incremental (full) summarization;
[0065] Step S308: If there are fewer than 10 records, concatenate the memory data;
[0066] Step S309: Obtain the response results of the large model;
[0067] Step S310: Encapsulate data (including device_id, summary, is_llm == 1, etc.);
[0068] Step S311: Update the memory summary data to MySQL;
[0069] Step S312: Parameter validation and validity check;
[0070] When the system receives a query request, it first performs parameter validation and validity checks to ensure that the parameters in the request are correct and meet the system requirements, thereby avoiding invalid queries or data security risks.
[0071] Step S313: Call the database structure to obtain the memory summary (equivalent to the summary information in the above embodiment);
[0072] If the parameters are verified to be correct, the system will retrieve the existing memory summary data from the database. This step is preferably performed in MySQL because MySQL provides structured data storage and fast retrieval capabilities.
[0073] Step S314: Determine if a memory summary exists in the MySQL database;
[0074] The system checks if a memory summary related to the query request exists in MySQL. If it exists, the process proceeds directly to step S315, preparing to return the summary information. If no memory summary exists in MySQL, the process proceeds to step S305.
[0075] Step S315: Encapsulate and summarize the memory data and return it.
[0076] If the original memory data exists in the Elasticsearch cache, the system will encapsulate this data and prepare to return it. Simultaneously, the system will trigger an asynchronous summary task to update the summary information in MySQL, improving the efficiency of subsequent queries.
[0077] In this embodiment, a thread pool is used to implement parallel memory summarization, which improves processing efficiency and avoids blocking the main business process.
[0078] Through the above steps, this application embodiment improves query efficiency and reduces latency while ensuring data integrity and service quality, making it suitable for various scenarios such as intelligent dialogue and knowledge management.
[0079] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0080] Figure 4This is a structural block diagram of an information storage device according to an embodiment of this application; as shown below. Figure 4 As shown, it includes:
[0081] Extraction module 42 is used to extract the first feature information from the target information;
[0082] The determining module 44 is used to obtain the tag information of the first feature information and determine the association information of the first feature information based on the tag information;
[0083] Adjustment module 46 is used to adjust the association information according to the first feature information to obtain the adjusted association information;
[0084] Storage module 48 is used to determine the first summary information of the adjusted association information and store the first summary information in a first database, wherein the first database is a structured database.
[0085] The aforementioned apparatus extracts first feature information from target information; obtains tag information of the first feature information, and determines association information of the first feature information based on the tag information; adjusts the association information based on the first feature information to obtain adjusted association information; determines first summary information of the adjusted association information, and stores the first summary information in a first database, wherein the first database is a structured database. This embodiment of the application, through feature information extraction, tagging management, association information adjustment, and intelligent summary storage in a structured database, achieves efficient and refined management of large amounts of unstructured data, thereby solving the problem of inefficient management of unstructured data in related technologies.
[0086] In one exemplary embodiment, the determining module is configured to determine whether there is associated information of the first feature information in the first database based on the tag information; if it is determined that there is no associated information of the first feature information in the first database based on the tag information, the module determines the associated information of the first feature information in a second database based on the tag information, wherein the second database is an unstructured database; if it is determined that there is associated information of the first feature information in the first database based on the tag information, the module determines the associated information of the first feature information in the first database based on the tag data.
[0087] In an exemplary embodiment, the adjustment module is configured to: determine a first feature vector of the first feature information and a second feature vector of the associated information when the associated information is feature information; determine a first similarity between the first feature vector and the second feature vector; adjust the associated information according to the first similarity to obtain adjusted associated information; determine a second summary information of the first feature information when the associated information is summary information; determine a third feature vector of the second summary information and a second feature vector of the associated information; determine a second similarity between the third feature vector and the second feature vector; and adjust the associated information according to the second similarity to obtain adjusted associated information.
[0088] In an exemplary embodiment, the adjustment module is configured to add the first summary information to the association information to obtain adjusted association information when the second similarity is less than or equal to the second preset similarity; and to adjust the association information to the first summary information when the second similarity is greater than the second preset similarity to obtain adjusted association information.
[0089] In one exemplary embodiment, a storage module is configured to place the target task into a target queue according to the task level of the target task, wherein the target task is used to indicate that the first summary information is stored in a first database; obtain an idle thread in a linear pool, and obtain the target task in the target queue according to the task level of the target task; execute the target task through the idle thread to store the first summary information in the first database.
[0090] In one exemplary embodiment, the apparatus further includes: a query module, configured to receive a query request sent by a query object, wherein the query request is used to query information of the query object; determine whether summary information or feature information of the query object exists in the first database; if the summary information or feature information of the query object does not exist in the first database, obtain second feature information of the query object from a second database, generate a query response based on the second feature information, and send the query response to the query object, wherein the second database is an unstructured database; if the summary information or feature information of the query object exists in the first database, obtain third summary information or third feature information of the query object from the first database, generate a query response based on the third summary information or third feature information, and send the query response to the query object.
[0091] In one exemplary embodiment, the query module is configured to determine the quantity of the second feature information; if the quantity of the second feature information is greater than or equal to a preset quantity, input the second feature information into a preset model so that the preset model outputs a second summary of the second feature information, and saves the second summary information to the first database according to the storage rules of the first database; if the quantity of the second feature information is less than the preset quantity, save the second feature information to the first database according to the storage rules of the first database.
[0092] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.
[0093] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:
[0094] S1, acquire target information of the target object and the target device, and extract the first feature information from the target information;
[0095] S2, obtain the tag information of the first feature information, and determine the association information of the first feature information based on the tag information;
[0096] S3, adjust the association information according to the first feature information to obtain the adjusted association information;
[0097] S4, determine the first summary information of the adjusted association information, and store the first summary information in the first database, wherein the first database is a structured database.
[0098] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0099] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0100] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0101] S1, acquire target information of the target object and the target device, and extract the first feature information from the target information;
[0102] S2, obtain the tag information of the first feature information, and determine the association information of the first feature information based on the tag information;
[0103] S3, adjust the association information according to the first feature information to obtain the adjusted association information;
[0104] S4, determine the first summary information of the adjusted association information, and store the first summary information in the first database, wherein the first database is a structured database.
[0105] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0106] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0107] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0108] The embodiments described herein also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.
[0109] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0110] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0111] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A storage method of information, characterized by, The method comprises: extracting first feature information in target information; obtaining label information of the first feature information, and determining associated information of the first feature information according to the label information; adjusting the associated information according to the first feature information to obtain adjusted associated information; determining first summary information of the adjusted associated information, and storing the first summary information into a first database, wherein the first database is a structured database.
2. The information storage method according to claim 1, wherein The method further comprises: determining whether the associated information of the first feature information exists in the first database according to the label information; in a case where it is determined according to the label information that the associated information of the first feature information does not exist in the first database, determining the associated information of the first feature information in a second database according to the label information, wherein the second database is an unstructured database; in a case where it is determined according to the label information that the associated information of the first feature information exists in the first database, determining the associated information of the first feature information in the first database according to the label information.
3. The information storage method according to claim 1, wherein The method further comprises: in a case where the associated information is feature information, determining a first feature vector of the first feature information and a second feature vector of the associated information, determining a first similarity between the first feature vector and the second feature vector, and adjusting the associated information according to the first similarity to obtain adjusted associated information; in a case where the associated information is summary information, determining second summary information of the first feature information, determining a third feature vector of the second summary information and a second feature vector of the associated information, determining a second similarity between the third feature vector and the second feature vector, and adjusting the associated information according to the second similarity to obtain adjusted associated information. The method further comprises:
4. The information storage method according to claim 3, wherein in a case where the second similarity is less than or equal to a second preset similarity, adding the first summary information to the associated information to obtain adjusted associated information; in a case where the second similarity is greater than the second preset similarity, adjusting the associated information to the first summary information to obtain adjusted associated information. The method further comprises:
5. The information storage method according to claim 1, wherein placing the target task into a target queue according to a task level of the target task, wherein the target task is used to indicate storing the first summary information into the first database; obtaining an idle thread in a linear pool, and obtaining the target task in the target queue according to the task level of the target task; executing the target task by the idle thread to store the first summary information into the first database. The method further comprises:
6. The information storage method according to claim 1, wherein receiving a query request sent by a query object, wherein the query request is used to query information of the query object; determining whether the summary information or the feature information of the query object exists in the first database; in the case that the summary information or the feature information of the query object does not exist in the first database, obtaining second feature information of the query object in a second database, generating a query response based on the second feature information, and sending the query response to the query object, wherein the second database is an unstructured database; in the case that the summary information or the feature information of the query object exists in the first database, obtaining third summary information or third feature information of the query object in the first database, generating a query response based on the third summary information or the third feature information, and sending the query response to the query object.
7. The information storage method according to claim 6, wherein after obtaining the feature information of the query object in the second database, the method further comprises: determining the number of the second feature information; in the case that the number of the second feature information is greater than or equal to a preset number, inputting the second feature information into a preset model to make the preset model output second summary information of the second feature information, and saving the second summary information to the first database according to a storage rule of the first database; in the case that the number of the second feature information is less than the preset number, saving the second feature information to the first database according to the storage rule of the first database.
8. An information storage device, characterized by comprising: comprises: an extraction module configured to extract first feature information in target information; a determination module configured to obtain label information of the first feature information, and determine associated information of the first feature information according to the label information; an adjustment module configured to adjust the associated information according to the first feature information to obtain adjusted associated information; a storage module configured to determine first summary information of the adjusted associated information, and save the first summary information to a first database, wherein the first database is a structured database.
9. A computer readable storage medium, characterized in that, The computer readable storage medium comprises a stored program, wherein the program executes the method described in any one of claims 1 to 7 when running.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 7 by using the computer program.
Citation Information
Patent Citations
Data storage method and device
CN114186099A
Unstructured data storage method and device, equipment and storage medium
CN115454947A
System and Methods for Extracting Statistical Information From Documents
US20240370448A1
Interaction intention information determination method based on generative pre-trained (GPT) model
WO2024230736A1