Business request processing method, device and storage medium for historical chat records

By using the Core Data framework to generate initial data models and tables and store historical chat records as object graphs, the problem of low efficiency in handling historical chat data business is solved, and efficient chat record query and analysis is achieved.

CN117932098BActive Publication Date: 2025-05-13SHENZHEN MAIFENG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410097805.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-23
Publication Date
2025-05-13
Estimated Expiration
2044-01-23

AI Technical Summary

Technical Problem

The prior art is less efficient when processing historical chat data, and requires frequent type conversion, which affects processing efficiency.

Method used

By calling Core Data to generate an initial data model, establish a table and preset attributes, establish a relationship between attributes, generate a target data model, and map it to a preset database, perform data conversion operations, store chat records as an object graph, and respond to the request based on the object graph database when a business request is detected.

Benefits of technology

It realizes efficient query, analysis and display of historical chat records, improves the efficiency of business processing of historical chat data, and reduces frequent operations of type conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117932098B_ABST
    Figure CN117932098B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing, and discloses a method, device and storage medium for processing business requests for historical chat records. The method comprises: calling Core Data to generate an initial data model; generating a table in the initial data model; creating a preset attribute in the table; establishing a relationship between the preset attributes to obtain a target data model; mapping the target data model to a preset database to obtain a target database, and obtaining chat records to be stored; performing a data conversion operation on the chat records to be stored to obtain an object graph, and storing the object graph in the target database to obtain an object graph database; when a business request is detected, responding to the business request according to the object graph database. In an embodiment of the present invention, the efficiency of business processing of historical chat data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method, device and storage medium for processing business requests for historical chat records. Background Art

[0002] IM communication software is an application that enables instant communication through the Internet. It can be used on mobile phones, computers and other devices, providing multiple communication methods such as text, voice, video, and supports group chat, file transfer, payment and other functions. IM communication software has become an indispensable part of people's daily life and work. Usually, the data format of chat messages may include text, pictures, videos, voice and other types. Saving historical chat data to the local App is a technical means that IM communication software cannot avoid.

[0003] For example, the historical chat data is stored in the format of a text file on a local device. This method requires frequent type conversion. Conversely, when business processing such as query is required, corresponding type conversion is also required. This operation reduces the efficiency of business processing of historical chat data. Summary of the invention

[0004] The main purpose of the present invention is to solve the technical problem of low efficiency in business processing of historical chat data.

[0005] A first aspect of the present invention provides a method for processing a service request for a historical chat record, the method comprising:

[0006] Call Core Data to generate the initial data model;

[0007] generating a table in the initial data model;

[0008] Creating a new preset attribute in the table;

[0009] Establishing the relationship between the preset attributes to obtain a target data model;

[0010] Mapping the target data model to a preset database to obtain a target database, and acquiring chat records to be stored;

[0011] Performing a data conversion operation on the chat record to be stored to obtain an object graph, and storing the object graph in the target database to obtain an object graph database;

[0012] When a business request is detected, the business request is responded to according to the object graph database.

[0013] Optionally, in a first implementation of the first aspect of the present invention, when a service request is detected, the step of responding to the service request according to the object graph database includes:

[0014] When a query request is detected, the query request is parsed to obtain a parsing result;

[0015] Extract the NSPredicate object in the parsing result;

[0016] Convert the NSPredicate object into an underlying query statement to obtain a first query statement;

[0017] According to the first query statement, a query operation is performed in the object graph database to determine a first target object graph;

[0018] The first target object graph is outputted in response to the query request.

[0019] Optionally, in a second implementation of the first aspect of the present invention, the step of performing a query operation in the object graph database according to the first query statement to determine the first target object graph includes:

[0020] According to the first query statement, a query operation is performed in the object graph database to obtain a first query result;

[0021] The first query result is converted into a managed object instance to obtain a first target object graph.

[0022] Optionally, in a third implementation of the first aspect of the present invention, the step of performing a query operation in the object graph database according to the first query statement to obtain a first query result includes:

[0023] According to the target data ID in the first query statement, a query operation is performed in the object graph database to obtain a first query result.

[0024] Optionally, in a fourth implementation manner of the first aspect of the present invention, the step of mapping the target data model to a preset database to obtain the target database includes:

[0025] The target data model is mapped to a local database to obtain a target database.

[0026] Optionally, in a fifth implementation of the first aspect of the present invention, the step of obtaining the chat record to be stored includes:

[0027] Check whether the local database stores the chat records to be stored;

[0028] If the local database does not store the chat record to be stored, sending a data acquisition request to the cloud server to obtain the chat record to be stored;

[0029] If the local database stores the chat record to be stored, read the chat record to be stored.

[0030] Optionally, in a sixth implementation of the first aspect of the present invention, when a service request is detected, the step of responding to the service request according to the object graph database includes:

[0031] When a storage request is detected, the storage request is parsed to obtain the data to be stored and the second query statement;

[0032] According to the second query statement, performing a query operation in the object graph database to determine a second target object graph;

[0033] The data to be stored is converted into an object graph to be updated, and an update operation is performed on the second target object graph according to the object graph to be updated to respond to the storage request.

[0034] If the second target object graph is not determined, converting the data to be stored into an object graph to be stored;

[0035] The object graph to be stored is stored in the object graph database.

[0036] Optionally, in a seventh implementation manner of the first aspect of the present invention, when a service request is detected, the step of responding to the service request according to the object graph database includes:

[0037] When a deletion request is detected, the deletion request is parsed to obtain a third query statement;

[0038] According to the third query statement, performing a query operation in the object graph database to determine a third target object graph;

[0039] Performing a delete operation on the third target object graph in response to the delete request;

[0040] If the third target object graph is not determined, a prompt message is outputted indicating that the content to be deleted does not exist.

[0041] A second aspect of the present invention provides a business request processing device for historical chat records, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via a line; the at least one processor calls the instructions in the memory so that the business request processing device for historical chat records executes the above-mentioned business request processing method for historical chat records.

[0042] A third aspect of the present invention provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the above-mentioned method for processing business requests for historical chat records.

[0043] In an embodiment of the present invention, the Core Dat framework can conveniently generate initial data models and tables, reduce the workload of manually creating data structures, and improve development efficiency. New preset attributes in the table can meet business needs, such as adding attributes such as sending time and message type, so as to better organize and analyze historical chat records. By establishing the relationship between attributes, a complete data structure can be established so that data from different parts can be related to each other. For example, by establishing a relationship between a user and a chat record, all historical chat records of a certain user can be easily queried. By performing a data conversion operation, the chat records to be stored are converted into an object graph and stored in the target database. In this way, the chat records can be saved in a structured manner, which is convenient for subsequent query, analysis and display. When a business request is detected, the request can be quickly responded to according to the object graph database. Through the optimized query capability and relationship establishment of the object graph database, efficient historical chat record query, filtering and sorting functions can be realized, which improves the efficiency of business processing of historical chat data. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is a schematic diagram of a first embodiment of a method for processing a business request for a historical chat record in an embodiment of the present invention;

[0045] Figure 2 A schematic diagram of a specific embodiment of step 105 of the method for processing a business request for a historical chat record in an embodiment of the present invention;

[0046] Figure 3 It is a schematic diagram of a specific embodiment after step 107 of the method for processing a service request for historical chat records in an embodiment of the present invention;

[0047] Figure 4 It is a schematic diagram of a specific embodiment of step 111 of the method for processing a service request for a historical chat record in an embodiment of the present invention;

[0048] Figure 5 The figure is a schematic diagram of an embodiment of a service request processing device for historical chat records in an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The embodiment of the present invention provides a method, device and storage medium for processing a business request of a historical chat record.

[0050] The embodiments disclosed in the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments disclosed in the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments disclosed in the present invention are only for exemplary purposes and are not intended to limit the scope of protection disclosed in the present invention.

[0051] In the description of the embodiments disclosed in the present invention, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0052] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 An embodiment of the method for processing a business request for a historical chat record in an embodiment of the present invention includes:

[0053] 101. Call Core Data to generate the initial data model;

[0054] Specifically, use the CoreData template in Xcode to create a new data model file (.xcdatamodeld). In this file, you can define entities, attributes, relationships, etc.

[0055] In the data model file, define the entities and attributes that need to be stored. An entity represents a table in the database, and an attribute represents a column in the table. You can add the required attributes to each entity and specify the type and default value for these attributes.

[0056] Based on the data model requirements, use CoreData's relationship types to define the relationships between entities. Relationship types include one-to-one (OneToOne), one-to-many (OneToMany), and many-to-many (ManyToMany). You can add relationship attributes to entities and associate them with other entities.

[0057] In Xcode, select the data model file and select the appropriate Target in the FileInspector panel. Then, click the "CreateNSManagedObjectSubclass" option in the Editor menu. This will automatically generate an entity class (a subclass of NSManagedObject) corresponding to the data model.

[0058] Import the generated entity classes into your project. These entity classes will provide access and operation methods for CoreData entities.

[0059] When the application starts, you can use the generated entity class to create initial data. You can write code to create entity objects and set the values ​​of the attributes. Then, use the CoreData context (NSManagedObjectContext) to save these entity objects to the database.

[0060] 102. Generate a table in the initial data model;

[0061] Specifically, define the data model of chat records, including chat content, sending time, sender and other attributes. This data model can be represented by the entity provided by the Core Data framework. To generate a table in the initial data model, you can create a table object (Table), which is used to represent an entity in the data model.

[0062] 103. Create a new preset attribute in the table;

[0063] Specifically, add columns to the table object. Each column represents an attribute in the data model. For example, you can add a column to represent the chat content and another column to represent the sending time. Set the column properties, such as data type, length, constraints, etc. According to specific business needs, you can select appropriate property settings, such as setting the sending time column to the date type and the chat content column to the text type.

[0064] 104. Establishing a relationship between the preset attributes to obtain a target data model;

[0065] Specifically, in the data model, there may be relationships between different entities, such as the relationship between users and chat records. You can use the relationship properties provided by the Core Data framework to establish these relationships. When generating tables, you need to consider and establish these relationships. In addition to the basic columns, you can also add other preset attributes according to business needs, such as message type, sender, etc. You can represent these attributes by creating new columns and setting appropriate attribute settings.

[0066] 105. Map the target data model to a preset database to obtain the target database, and obtain the chat records to be stored;

[0067] Specifically, connect to the preset database through a database connection tool or a database API of a programming language. Create corresponding tables and columns in the preset database according to the entities and attributes defined in the data model. Ensure that the attribute type, length, etc. of the tables and columns are consistent with those defined in the data model. Determine the source of the chat records to be stored based on the business logic. It can be user input, network transmission, third-party applications, etc. According to the entities and attributes defined in the data model, obtain the chat records to be stored and convert them into the format required by the data model. Store chat records in the preset database: Use a database connection tool or a database API of a programming language to perform an insert operation to store the chat records in the corresponding table in the preset database. Ensure that the various attributes of the chat records are correctly mapped to the various columns of the database table.

[0068] After the insert operation is completed, you can check the returned result to confirm whether the chat record is successfully stored in the preset database. If necessary, you can handle the storage failure and take corresponding measures.

[0069] Optionally, the target data model is mapped to a local database to obtain a target database. After the target data model is mapped to the local database, the index and query optimization functions of the database and the high performance characteristics of the local database can be used to achieve fast and efficient data access. By mapping the target data model to the local database, offline data processing can be performed on the local database. This means that even if there is no network connection, the data can continue to be operated and analyzed. This is very useful for some tasks that do not require high real-time performance or require batch processing.

[0070] Specifically, refer to Figure 2 , Figure 2 This is a schematic diagram of a specific embodiment of step 105 of the method for processing a service request for a historical chat record in an embodiment of the present invention. Step 105 includes the following specific implementation methods:

[0071] 1051. Detect whether the local database stores the chat records to be stored;

[0072] 1052. If the local database does not store the chat record to be stored, send a data acquisition request to the cloud server to obtain the chat record to be stored;

[0073] 1053. If the local database stores the chat record to be stored, read the chat record to be stored.

[0074] In steps 1051-1053, by detecting whether the local database stores chat records to be stored and reading the records in the local database first, data acquisition requests to the cloud server can be reduced. This can reduce network transmission volume and delay, improve system response speed, and reduce the load pressure on the cloud server.

[0075] 106. Performing a data conversion operation on the chat record to be stored to obtain an object graph, and storing the object graph in the target database to obtain an object graph database;

[0076] Specifically, according to the entities and attributes defined in the data model, the chat records to be stored are converted into corresponding entity objects in the object graph. The attribute values ​​of each entity object are set to reflect the content of the chat records. Use the database connection tool or the database API of the programming language to connect to the target database. Create an object graph database in the target database. This can be done by calling the corresponding methods provided by the database management system, such as creating a table in a relational database or creating a collection in a NoSQL database.

[0077] Convert entity objects in the object graph into data structures in the target database and store them in corresponding tables or collections.

[0078] After the store operation is completed, you can check the returned results to confirm whether the object graph was successfully stored in the object graph database.

[0079] 107. When a business request is detected, respond to the business request according to the object graph database.

[0080] Specifically, according to the format and content of the business request, the required information is parsed, involving operations such as data type conversion, verification, and extraction.

[0081] According to the content of the business request, the corresponding operation is performed in the object graph database, which can be query, insert, update, delete and other operations.

[0082] According to the execution result of the business operation, the corresponding response data is obtained, which can be the query result set, the flag of whether the operation is successful or not, the error message, etc.

[0083] Construct a business response that meets the requirements based on the business request, which can be operations such as data format conversion, result encapsulation, and exception handling.

[0084] The constructed business response is returned to the requester to complete the response process of the business request.

[0085] Specifically, refer to Figure 3 , Figure 3This is a schematic diagram of a specific embodiment after step 107 of the method for processing a service request for a historical chat record in an embodiment of the present invention. Step 107 includes the following specific implementation methods:

[0086] 108. When a query request is detected, the query request is parsed to obtain a parsing result;

[0087] 109. Extract the NSPredicate object in the parsing result;

[0088] 110. Convert the NSPredicate object into an underlying query statement to obtain a first query statement;

[0089] 111. According to the first query statement, perform a query operation in the object graph database to determine a first target object graph;

[0090] Specifically, refer to Figure 4 , Figure 4 This is a schematic diagram of a specific embodiment of step 111 of the method for processing a service request for a historical chat record in an embodiment of the present invention. Step 111 includes the following specific implementation methods:

[0091] 1111. According to the first query statement, execute a query operation in the object graph database to obtain a first query result;

[0092] Optionally, according to the target data ID in the first query statement, a query operation is performed in the object graph database to obtain a first query result. Since the first query statement has determined the ID of the target data, performing a query operation in the object graph database can quickly locate the target data and return the query result. This can improve query efficiency and reduce unnecessary data scanning and processing.

[0093] 1112. Convert the first query result into a managed object instance to obtain a first target object graph.

[0094] In steps 1111-1112, the object graph database can be used to quickly query and return a large amount of data. This can improve the query efficiency of historical chat records and reduce the complexity that needs to be considered during the query process. After the query results are converted into managed object instances, they can be easily managed, such as modification, deletion, and saving. This can make the code clearer and easier to maintain, and avoid the workload of manually handling object relationships. By using the tools and methods provided by the Core Data framework, it is easy to expand the data model, add new attributes and entities, etc. This can meet different business needs without having too much impact on existing code. The CoreData framework can easily implement data persistence and store chat records locally or on a remote server. This can prevent data loss and support functions such as offline browsing. The Core Data framework can separate data access and business logic, making the code more modular and easier to maintain. At the same time, it can also improve the readability and testability of the code.

[0095] 112. Output the first target object graph in response to the query request.

[0096] In steps 108-112, the query process can be automated by parsing the query request and converting it into the underlying query statement. This can reduce the workload of manually writing query code and improve the accuracy and efficiency of the query. By extracting the NSPredicate object from the parsing result, flexible query conditions can be implemented. At the same time, more complex query requirements can also be supported by extending the parsing logic. Converting the NSPredicate object to the underlying query statement can help optimize the performance of the query. The underlying query statement can accelerate the query process through mechanisms such as indexes, and can use the optimization function of the database to generate a query plan, thereby improving the execution efficiency of the query. Object graph databases usually provide transaction support and concurrency control mechanisms to ensure the atomicity and isolation of query operations and avoid data conflicts and errors.

[0097] Specifically, refer to Figure 4 , Figure 4 This is a schematic diagram of a specific embodiment after step 107 of the method for processing a service request for a historical chat record in an embodiment of the present invention. Step 107 includes the following specific implementation methods:

[0098] 113. When a storage request is detected, the storage request is parsed to obtain the data to be stored and the second query statement;

[0099] 114. According to the second query statement, perform a query operation in the object graph database to determine a second target object graph;

[0100] 115. Convert the data to be stored into an object graph to be updated, and perform an update operation on the second target object graph according to the object graph to be updated to respond to the storage request.

[0101] 116. If the second target object graph is not determined, convert the data to be stored into an object graph to be stored;

[0102] 117. Store the object graph to be stored in the object graph database.

[0103] In steps 113-117, data consistency can be ensured by performing query operations in the object graph database. When a data object needs to be updated, a query operation is first performed to locate the target object, and then an update operation is performed, thereby avoiding data inconsistency problems caused by data conflicts or errors. By extracting the data to be stored in the parsing results, flexible storage requirements can be achieved. Converting the object graph to be updated into the underlying update statement can help optimize storage performance. The underlying update statement can accelerate the storage process through mechanisms such as indexes, and can use the optimization function of the database to generate a storage plan, thereby improving the execution efficiency of storage.

[0104] Specifically, after step 107, it also includes: when a deletion request is detected, parsing the deletion request to obtain a third query statement; according to the third query statement, performing a query operation in the object graph database to determine the third target object graph; performing a deletion operation on the third target object graph to respond to the deletion request; if the third target object graph is not determined, outputting a prompt message that the content to be deleted does not exist. Among them, by extracting the third query statement in the parsing result, flexible deletion requirements can be realized. It can be easily deleted according to user needs, and supports a variety of different deletion operations, such as conditional deletion, batch deletion, etc. At the same time, more complex deletion requirements can also be supported by extending the parsing logic.

[0105] In an embodiment of the present invention, the Core Dat framework can conveniently generate initial data models and tables, reduce the workload of manually creating data structures, and improve development efficiency. New preset attributes in the table can meet business needs, such as adding attributes such as sending time and message type, so as to better organize and analyze historical chat records. By establishing the relationship between attributes, a complete data structure can be established so that data from different parts can be related to each other. For example, by establishing a relationship between a user and a chat record, all historical chat records of a certain user can be easily queried. By performing a data conversion operation, the chat records to be stored are converted into an object graph and stored in the target database. In this way, the chat records can be saved in a structured manner, which is convenient for subsequent query, analysis and display. When a business request is detected, the request can be quickly responded to according to the object graph database. Through the optimized query capability and relationship establishment of the object graph database, efficient historical chat record query, filtering and sorting functions can be realized, which improves the efficiency of business processing of historical chat data.

[0106] Figure 5 1 is a schematic diagram of the structure of a business request processing device for historical chat records provided by an embodiment of the present invention. The business request processing device 500 for historical chat records may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 may be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the business request processing device 500 for historical chat records. Furthermore, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the business request processing device 500 for historical chat records.

[0107] The service request processing device 500 based on historical chat records may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, Free BSD, etc. Those skilled in the art will appreciate that Figure 5The structure of the business request processing device based on historical chat records shown does not constitute a limitation on the business request processing device based on historical chat records, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0108] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the method for processing business requests for historical chat records.

[0109] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0110] In addition, although each operation is described in a specific order, this should be understood as requiring such operation to be performed in the specific order shown or in a sequential order, or requiring that all illustrated operations should be performed to obtain desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable sub-combination mode.

[0111] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for processing business requests for historical chat records, characterized in that: The business request processing method for historical chat records includes: Call Core Data to generate an initial data model, in which entities, attributes, and relationships can be defined; generating a table in the initial data model; Create new preset attributes in the table, the preset attributes including sending time and message type; Establishing the relationship between the preset attributes to obtain a target data model; Mapping the target data model to a preset database to obtain the target database, and obtaining the chat records to be stored, wherein the preset database is a local database; Performing a data conversion operation on the chat record to be stored to obtain an object graph, and storing the object graph in the target database to obtain an object graph database; When a business request is detected, responding to the business request according to the object graph database; Wherein, when the business request is detected, the step of responding to the business request according to the object graph database includes: When a query request is detected, the query request is parsed to obtain a parsing result; Extract the NSPredicate object in the parsing result; Convert the NSPredicate object into an underlying query statement to obtain a first query statement; According to the first query statement, a query operation is performed in the object graph database to determine a first target object graph; Outputting the first target object graph in response to the query request; The step of performing a query operation in the object graph database according to the first query statement to determine the first target object graph includes: According to the first query statement, a query operation is performed in the object graph database to obtain a first query result; The first query result is converted into a managed object instance to obtain a first target object graph.

2. The method for processing business requests for historical chat records according to claim 1, characterized in that: The step of performing a query operation in the object graph database according to the first query statement to obtain a first query result includes: According to the target data ID in the first query statement, a query operation is performed in the object graph database to obtain a first query result.

3. The method for processing business requests for historical chat records according to claim 1, characterized in that: The step of obtaining the chat records to be stored includes: Check whether the local database stores the chat records to be stored; If the local database does not store the chat record to be stored, sending a data acquisition request to the cloud server to obtain the chat record to be stored; If the local database stores the chat record to be stored, read the chat record to be stored.

4. The method for processing business requests for historical chat records according to claim 1, characterized in that: When the business request is detected, the step of responding to the business request according to the object graph database includes: When a storage request is detected, the storage request is parsed to obtain the data to be stored and the second query statement; According to the second query statement, performing a query operation in the object graph database to determine a second target object graph; Converting the data to be stored into an object graph to be updated, and performing an update operation on the second target object graph according to the object graph to be updated to respond to the storage request; If the second target object graph is not determined, converting the data to be stored into an object graph to be stored; The object graph to be stored is stored in the object graph database.

5. The method for processing business requests for historical chat records according to claim 1, characterized in that: When the business request is detected, the step of responding to the business request according to the object graph database includes: When a deletion request is detected, the deletion request is parsed to obtain a third query statement; According to the third query statement, performing a query operation in the object graph database to determine a third target object graph; Performing a delete operation on the third target object graph in response to the delete request; If the third target object graph is not determined, a prompt message is outputted indicating that the content to be deleted does not exist.

6. A business request processing device for historical chat records, characterized in that: The business request processing device for historical chat records includes: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instruction in the memory to enable the historical chat record service request processing device to execute the historical chat record service request processing method according to any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for processing business requests for historical chat records according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method and device for constructing pharmaceutical knowledge graph

    CN114328975A

  • Graph database updating method and device, associated network back end and storage medium

    CN115757881A