Message query method and device, equipment and storage medium

By using two databases to store message information in the message gateway, the problem that users cannot view historical messages again is solved, and the flexibility and efficiency of message query are improved.

CN119254738APending Publication Date: 2025-01-03CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411344939.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the prior art, the user cannot view the historical message again after pushing the message, resulting in poor query flexibility and being unable to compare multiple related messages.

Method used

The design of two databases is adopted, one is used to store the field information and message identification of the pushed message, and the other is used to store the pushed message. When the user queryes, the message identification is determined in the database based on the target field information, thereby obtaining the relevant Historical news.

Benefits of technology

Improves the efficiency and user experience of message query, allowing users to query related historical messages through target field information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254738A_ABST
    Figure CN119254738A_ABST
Patent Text Reader

Abstract

The invention provides a message query method and device, equipment and a storage medium. Relates to the technical field of computers. The method comprises: receiving a message query request sent by a first terminal device, the message query request comprising target field information, the target field information comprising at least one field and a field value corresponding to each field; judging whether target field information exists in a first database or not according to the message query request; if yes, obtaining at least one first message identifier corresponding to the target field information in a first database according to the target field information, and obtaining at least one first message corresponding to the at least one first message identifier in a second database according to the at least one first message identifier, sending at least one first message to the first terminal device; and if not, acquiring at least one first message in the second database according to the target field information, and sending the at least one first message to the first terminal equipment, thereby improving the flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a message query method, device, equipment and storage medium. Background Art

[0002] In some scenarios, it is necessary to push messages to users' mobile devices to achieve certain promotional purposes. For example, in financial scenarios, the financial system will push stock price reminders, account dynamic notifications, etc. to users.

[0003] In related technologies, technicians can edit push messages in advance and push messages to users' mobile terminal devices through message gateways. Users can view push messages to understand relevant information and grasp information dynamics to assist in decision-making.

[0004] However, after the message gateway pushes a message to the user, the user cannot view the historical push messages again, which means that once the user misses a push message, he cannot view it again, and when the user needs to compare multiple related messages, he cannot query, resulting in poor flexibility. Summary of the invention

[0005] The present application provides a message query method, apparatus, device and storage medium to solve the problem of poor flexibility of message query.

[0006] In a first aspect, the present application provides a message query method, comprising:

[0007] Receive a message query request sent by a first terminal device, wherein the message query request includes target field information, and the target field information includes at least one field and a field value corresponding to each field;

[0008] According to the message query request, determining whether the target field information exists in the first database;

[0009] If so, obtaining at least one first message identifier corresponding to the target field information in the first database according to the target field information, and obtaining at least one first message corresponding to the at least one first message identifier in the second database according to the at least one first message identifier, and sending the at least one first message to the first terminal device;

[0010] If not, acquiring the at least one first message from the second database according to the target field information, and sending the at least one first message to the first terminal device.

[0011] In a possible design, acquiring, in the first database, at least one first message identifier corresponding to the target field information according to the target field information includes:

[0012] Determine a matching degree between the target field information and field information corresponding to each message identifier in the first database to obtain a plurality of matching degrees;

[0013] According to the multiple matching degrees, determining multiple candidate message identifiers from the message identifiers in the first database, wherein the matching degree between the field information corresponding to the candidate message identifiers and the target field information is greater than or equal to a preset threshold;

[0014] The at least one first message identifier is determined in the message to be selected according to the target field information and the field information corresponding to the message identifier to be selected.

[0015] In a possible design, acquiring, in the first database, at least one first message identifier corresponding to the target field information according to the target field information includes:

[0016] For any message identifier to be selected, determining whether the field information corresponding to the message identifier to be selected includes the target field information;

[0017] If so, the to-be-selected message identifier is determined as the first message identifier.

[0018] In one possible design, sending the at least one first message to the first terminal device includes:

[0019] Determining message attribute information corresponding to each first message;

[0020] According to the message attribute information, the at least one first message is sorted and formatted to obtain a message list, wherein the message list includes the at least one first message;

[0021] The message list is sent to the terminal device.

[0022] In one possible design, the method further includes:

[0023] Acquire a message sending record within a preset time period before the current moment, wherein the message sending record includes the second message, the sending time of the second message, the receiving device of the second message, and the attribute information of the second message;

[0024] performing information extraction processing on the message sending record to obtain the second message, an identifier of the second message, and field information of the second message;

[0025] The field information and the message identifier of the second message are stored in the first database, and the second message is stored in the second database.

[0026] In one possible design, the method further includes:

[0027] Acquire a message sending record within a preset time period before the current moment, wherein the message sending record includes the second message, the sending time of the second message, the receiving device of the second message, and the attribute information of the second message;

[0028] performing information extraction processing on the message sending record to obtain the second message, an identifier of the second message, and field information of the second message;

[0029] The field information and the message identifier of the second message are stored in the first database, and the second message is stored in the second database.

[0030] In one possible design, the method further includes:

[0031] a message receipt sent by a receiving device that receives the second message, wherein the message receipt is used to indicate that the status of the second message is a read status;

[0032] According to the message receipt, the field information of the second message is updated in the first database.

[0033] In one possible design, the method further includes:

[0034] Determine the storage time of each message identifier in the first database, and if the time difference between the storage time of a second message identifier in the first database and the current time is greater than or equal to a first preset duration, delete the second message identifier and the field information corresponding to the second message identifier in the first database;

[0035] Determine the storage time of each message in the second database, and if the time difference between the storage time of the third message in the second database and the current time is greater than or equal to the second preset duration, delete the third message in the second database.

[0036] In a second aspect, the present application provides a message query device, including: a first receiving module, a judgment module, a first acquisition module, and a second acquisition module, wherein:

[0037] The first receiving module is used to receive a message query request sent by the first terminal device, the message query request includes target field information, the target field information includes at least one field and field values ​​corresponding to each field;

[0038] The judging module is used to judge whether the target field information exists in the first database according to the message query request;

[0039] The first acquisition module is used to, if yes, acquire at least one first message identifier corresponding to the target field information in the first database according to the target field information, acquire at least one first message corresponding to the at least one first message identifier in the second database according to the at least one first message identifier, and send the at least one first message to the first terminal device;

[0040] The second acquisition module is used to, if not, acquire the at least one first message from a second database according to the target field information, and send the at least one first message to the first terminal device.

[0041] In a possible design, the first acquisition module is specifically used to:

[0042] Determine a matching degree between the target field information and field information corresponding to each message identifier in the first database to obtain a plurality of matching degrees;

[0043] According to the multiple matching degrees, determining multiple candidate message identifiers from the message identifiers in the first database, wherein the matching degree between the field information corresponding to the candidate message identifiers and the target field information is greater than or equal to a preset threshold;

[0044] The at least one first message identifier is determined in the message to be selected according to the target field information and the field information corresponding to the message identifier to be selected.

[0045] In a possible design, the first acquisition module is specifically used to:

[0046] For any message identifier to be selected, determining whether the field information corresponding to the message identifier to be selected includes the target field information;

[0047] If so, the to-be-selected message identifier is determined as the first message identifier.

[0048] In a possible design, the first acquisition module is specifically used to:

[0049] Determining message attribute information corresponding to each first message;

[0050] According to the message attribute information, the at least one first message is sorted and formatted to obtain a message list, wherein the message list includes the at least one first message;

[0051] The message list is sent to the terminal device.

[0052] In a possible design, the message query device further includes: a third acquisition module, an extraction processing module and a storage module, wherein:

[0053] The third acquisition module is used to acquire a message sending record within a preset time period before the current moment, wherein the message sending record includes the second message, the sending time of the second message, the receiving device of the second message, and the attribute information of the second message;

[0054] The extraction processing module is used to perform information extraction processing on the message sending record to obtain the second message, the identifier of the second message, and the field information of the second message;

[0055] The storage module is used to store the field information and message identifier of the second message in the first database, and to store the second message in the second database.

[0056] In a possible design, the storage module is specifically used for:

[0057] Calling a preset interface through the gateway component to send the second message, the identifier of the second message, and the field information of the second message to the gateway background service;

[0058] Through the gateway background service, the field information and message identifier of the second message are stored in the first database, and the second message is stored in the second database.

[0059] In a possible design, the message query device further includes: a second receiving module and an updating module, wherein:

[0060] The second receiving module is used to receive a message receipt sent by a receiving device of the second message, wherein the message receipt is used to indicate that the status of the second message is a read status;

[0061] The updating module is used to update the field information of the second message in the first database according to the message receipt.

[0062] In a possible design, the message query device further includes: a first determination module and a second determination module, wherein:

[0063] The first determination module is used to determine the storage time of each message identifier in the first database, and if the time difference between the storage time of the second message identifier in the first database and the current time is greater than or equal to the first preset duration, then delete the second message identifier and the field information corresponding to the second message identifier in the first database;

[0064] The second determination module is used to determine the storage time of each message in the second database. If the time difference between the storage time of the third message in the second database and the current time is greater than or equal to the second preset duration, the third message is deleted from the second database.

[0065] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor and a memory; the memory stores computer execution instructions; at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the message query method as described in the first aspect above and various possible designs of the first aspect.

[0066] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, a message query method as described in the first aspect and various possible designs of the first aspect is implemented.

[0067] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the message query method as described in the first aspect and various possible designs of the first aspect.

[0068] The message query method, device, equipment and storage medium provided by the present application can determine the message identifier corresponding to the target field information in the database according to the target field information of the message to be queried, and then determine the message to be queried from the database according to the message identifier. The user can query the relevant historical messages by querying the target field information, which improves the query efficiency and user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0070] Figure 1 A schematic diagram of the system architecture provided for an embodiment of the present application;

[0071] Figure 2 A flowchart of a message query method provided in an embodiment of the present application;

[0072] Figure 3 A schematic diagram of a visual operation window of a query system provided in an embodiment of the present application;

[0073] Figure 4 A schematic diagram of a process of determining a first message provided in an embodiment of the present application;

[0074] Figure 5A schematic diagram of a message list provided in an embodiment of the present application;

[0075] Figure 6 A schematic diagram of a message storage method according to an embodiment of the present invention;

[0076] Figure 7 A schematic diagram of the structure of a message query device provided in an embodiment of the present application;

[0077] Figure 8 A schematic diagram of the structure of another message query device provided in an embodiment of the present application;

[0078] Fig. 9 A schematic diagram of the structure of another message query device provided in an embodiment of the present application;

[0079] Fig.10 A schematic diagram of the structure of another message query device provided in an embodiment of the present application;

[0080] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0081] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0082] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0083] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.

[0084] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0085] For ease of understanding, the following Figure 1, the system architecture applicable to the embodiments of the present application is described.

[0086] Figure 1 This is a schematic diagram of the system architecture provided by the embodiment of this application. Figure 1 , including a gateway 101, a storage device 102 and a user device 103. The gateway 101 includes a gateway component and a gateway background service. The gateway component can push messages to the user device 103, and the gateway background service can push messages to be stored to the storage device 102. The storage device 102 may have a preset database, which can be used to store the messages pushed by the gateway 101. The storage device 102 may be a USB flash drive, a hard disk or a cloud storage device. The user device 103 may be a mobile terminal device of the user, and the user device 103 may query the messages in the storage device 102.

[0087] In the related art, technicians can edit push messages in advance and push messages to users' mobile terminal devices through message gateways. Users can view push messages to understand relevant information and grasp information dynamics to assist in decision-making. However, after the message gateway pushes messages to users, users cannot view historical push messages again, which will result in users being unable to view push messages again once they miss them, and being unable to query when users need to compare multiple related messages, resulting in poor flexibility.

[0088] In view of the above technical problems, in an embodiment of the present application, two databases can be set up, and the field information and message identifiers of the pushed messages can be stored in one database, and the pushed messages can be stored in another database. In this way, when a message needs to be queried, the message identifier corresponding to the target field information can be determined in the database according to the target field information of the message to be queried, and then the message to be queried can be determined from the database according to the message identifier. Users can query related historical messages by querying the target field information, which improves flexibility and user experience.

[0089] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0090] Figure 2 A flowchart of a message query method provided in an embodiment of the present application. Figure 2 As shown, the method may include the following steps:

[0091] S201. Receive a message query request sent by a first terminal device.

[0092] The execution subject of the embodiment of the present application can be a gateway, or a message query device set in the gateway, wherein the gateway includes a gateway component and a gateway background service. The gateway component can be used to push and receive messages, and the gateway background service can be used to store and process messages pushed by the gateway component.

[0093] The first terminal device may refer to a mobile terminal device of a user, such as a mobile phone or tablet of the user.

[0094] The message query request includes target field information, which includes at least one field and field values ​​corresponding to each field. The target field information may refer to keywords of the message that the user wants to query. For example, when the field of the target field information is "push time", the corresponding field value may be "October 12, 2023".

[0095] A message query system may be provided in the first terminal device, and the user may input target field information in the message query system. The visual operation window of the message query system may include a "query" control, and the user may generate a message query request by clicking the "query" control. The message query request is used to request to obtain a message containing the target field information through the gateway.

[0096] Next, combine Figure 3 , through specific examples, the visual operation window of the query system is explained.

[0097] Figure 3 For a schematic diagram of a visual operation window of a query system provided in an embodiment of the present application, see Figure 3 , including a text input box and a "query" control. Users can enter target field information in the text input box of the message query system, and users can generate a message query request by clicking the "query" control.

[0098] S202: Determine whether target field information exists in the first database according to the message query request.

[0099] If yes, execute S203.

[0100] If not, execute S204.

[0101] The first database may be located in the storage space of the gateway. The first database stores a plurality of field information and a plurality of message identifiers, and any message identifier corresponds to a piece of field information.

[0102] According to the message query request, the target field information can be obtained, all the field information in the first database can be traversed, and the field information and the target field information can be compared in turn. If any field information is the same as the target field information, it can be determined that the target field information exists in the first database; if any field information is different from the target field information, it can be determined that the target field information does not exist in the first database.

[0103] S203. According to the target field information, obtain at least one first message identifier corresponding to the target field information in the first database, and according to the at least one first message identifier, obtain at least one first message corresponding to the at least one first message identifier in the second database, and send at least one first message to the first terminal device.

[0104] The first message identifier can be determined in the following manner: determine the degree of match between the target field information and the field information corresponding to each message identifier in the first database to obtain multiple degrees of match; determine multiple candidate message identifiers in the message identifiers in the first database based on the multiple degrees of match, and the degree of match between the field information corresponding to the candidate message identifiers and the target field information is greater than or equal to a preset threshold; for any candidate message identifier, determine whether the field information corresponding to the candidate message identifier includes the target field information; if so, determine the candidate message identifier as the first message identifier.

[0105] The matching degree can be used to determine the matching degree between the target field information and the field information corresponding to each message identifier in the first database. The higher the matching degree, the more the target field information matches the field information corresponding to each message identifier in the first database. The preset threshold value can be a value set in advance by the technician to determine the message identifier to be selected.

[0106] The second database may be located in the storage space of a storage device, and the storage device may be a USB flash drive, a hard disk, or a cloud storage device, etc. The second database stores multiple message identifiers and messages, and any message identifier corresponds to one message. For any first message identifier, the corresponding message may be determined in the second database, and the message may be determined as the first message.

[0107] S204. Acquire at least one first message from the second database according to the target field information, and send at least one first message to the first terminal device.

[0108] The first message may be determined in the following manner: traverse all messages in the second database, determine the matching degree between the target field information and each message in the second database, and obtain multiple matching degrees; and determine at least one first message in the second database according to the multiple matching degrees.

[0109] In the embodiment of the present application, when a message query is required, it is possible to first determine whether the target field information exists in the first database according to the target field information to be queried; if it exists, at least one corresponding first message identifier is obtained in the first database according to the target field information, and at least one first message corresponding to the at least one first message identifier is obtained in the second database according to the at least one first message identifier; if it does not exist, at least one first message is determined in the second database according to the target field information. Users can query related historical messages by querying the target field information, which improves the efficiency of the query and the user experience.

[0110] Based on any of the above embodiments, Figure 4 , a method for determining the first message when the target field information exists in the first database is described in detail.

[0111] Figure 4 This is a process diagram of a method for determining a first message provided in an embodiment of the present application. Figure 4 , the method may include:

[0112] S401. Obtain target field information according to a message query request sent by the first terminal device.

[0113] It should be noted that the execution process of the above S401 can refer to S201 and will not be described in detail here.

[0114] S402: Determine the degree of match between the target field information and the field information corresponding to each message identifier in the first database to obtain multiple degrees of match.

[0115] The degree of match between the target field information and the field information corresponding to each message identifier in the first database can be determined in the following manner: obtain the field information corresponding to each message identifier in the first database; perform word segmentation processing on the target field information to obtain multiple first words, and merge the multiple first words to obtain a first set; for any field information, perform word segmentation processing on the field information to obtain multiple second words, and merge the multiple second words to obtain a second set; determine the intersection value and union value of the first set and the multiple second sets, wherein the intersection value may refer to the number of words commonly owned by the two sets, and the union value may refer to the number of all non-repeating words in the two sets; for any field information, divide the intersection value by the union value to obtain the degree of match between the field information and the target field information.

[0116] The matching degree ranges from 0 to 1, and the closer the matching degree is to 1, the higher the matching degree is.

[0117] For example, assuming that the target field information is "deposit notification" and the field information in the first database is "account deposit notification: deposit one hundred yuan", the first set is {deposit, notification}, and the second set is {account, deposit, notification, deposit, one hundred yuan}. The intersection value is 2, the union value is 4, and the matching degree is 0.5.

[0118] S403: Determine multiple message identifiers to be selected from the message identifiers in the first database according to multiple matching degrees.

[0119] The matching degree between the field information corresponding to the selected message identifier and the target field information is greater than or equal to a preset threshold. The preset threshold may be a value set in advance by a technician to determine the selected message identifier, for example, the preset threshold may be 0.5.

[0120] S404: For any message identifier to be selected, if the field information corresponding to the message identifier to be selected includes target field information, the message identifier to be selected is determined as the first message identifier.

[0121] For any field information corresponding to a candidate message identifier, determine a second set of field information corresponding to the candidate message identifier, and determine in turn whether the second set contains all the words in the first set. If so, determine the candidate message identifier as the first message identifier.

[0122] S405. According to the at least one first message identifier, obtain at least one first message corresponding to the at least one first message identifier in a second database.

[0123] It should be noted that the execution process of the above S405 can refer to S203, which will not be described in detail here.

[0124] S406: Determine message attribute information corresponding to each first message.

[0125] The message attribute information may include message type, push time, etc. For example, when the message attribute information is message type, the message type may include account dynamics, process matters, etc.

[0126] S407. Sort and format the at least one first message according to the message attribute information to obtain a message list, wherein the message list includes the at least one first message.

[0127] According to the message attribute information, at least one first message can be sorted. For example, assuming that the message attribute information is the push time, at least one first message can be sorted in chronological order, and at least one first message can be typeset in the sorted order. The typesetting process can include obtaining a message list in a preset format, wherein the typesetting process can include determining the display format, font, color, spacing, etc.

[0128] Next, combine Figure 5 , the message list is explained through specific examples.

[0129] Figure 5 For a schematic diagram of a message list provided in an embodiment of the present application, see Figure 5 , including message 1, message 2, message 3 and message 4, wherein message 1, message 2, message 3 and message 4 are sorted in the order of push time and arranged in the order of time.

[0130] S408: Send a message list to the terminal device.

[0131] In an embodiment of the present application, when a message needs to be queried, the degree of match between the target field information and the field information corresponding to each message identifier in the first database can be determined first, and the message identifier whose degree of match is greater than or equal to the preset threshold is determined as the selected message identifier; for any selected identifier, if the field information corresponding to the selected message identifier includes the target field information, the selected message identifier is determined as the first message identifier; according to at least one first message identifier, at least one first message is determined in the second database; according to the message attribute information, at least one first message is sorted and formatted, and after obtaining a message list, the message list is sent to the terminal device. The user can query the relevant historical messages by querying the target field information, which improves the query efficiency and user experience.

[0132] Based on any of the above embodiments, Figure 6 , which explains in detail how to store messages.

[0133] Figure 6 This is a process diagram of a message storage method provided in an embodiment of the present application. Figure 6 , the method may include:

[0134] S601: Obtain message sending records within a preset time period before the current moment.

[0135] The preset duration may be a value set in advance, for example, the preset duration may be 1 day.

[0136] The message sending record may include the second message, the sending time of the second message, the receiving device of the second message, and the attribute information of the second message. Among them, the receiving device of the second message may be the identifier of the receiving device of the user. The attribute information of the second message may include the message type, the push time, etc.

[0137] S602: Perform information extraction processing on the message sending record to obtain the second message, the identifier of the second message, and the field information of the second message.

[0138] Through information extraction processing, the data in the message sending record can be integrated into the second message, the identifier of the second message, and the field information of the second message.

[0139] Optionally, a message receipt sent by a receiving device of the second message can also be received. The message receipt can be used to indicate that the status of the second message is read, wherein the status of the second message may include read and unread. Based on the message receipt, the field information of the second message can be updated in the first database.

[0140] S603: Call a preset interface through the gateway component to send the second message, the identifier of the second message, and the field information of the second message to the gateway background service.

[0141] The gateway component can be used to send content to the gateway backend service.

[0142] The technicians can configure a preset interface in advance, which may include the request content of the second message, the identifier of the second message, and the field information of the second message. The gateway component can be used to send the second message, the identifier of the second message, and the field information of the second message to the gateway background service by calling the preset interface.

[0143] S604: Store the field information and message identifier of the second message in the first database and store the second message in the second database through the gateway background service.

[0144] The gateway backend service can be used to store and process content pushed by the gateway component.

[0145] The gateway backend service may obtain the address of the first database, and store the field information and message identifier of the second message in the first database. The gateway backend service may also obtain the address of the second database, and store the second message in the second database.

[0146] Optionally, the gateway background service may clean up the first database and the second database.

[0147] The message identifiers in the first database can be cleaned up in the following manner: determine the storage time of each message identifier in the first database, and if the time difference between the storage time of a second message identifier in the first database and the current time is greater than or equal to a first preset duration, then delete the second message identifier and the field information corresponding to the second message identifier in the first database.

[0148] The messages in the second database can be cleaned up in the following manner: determine the storage time of each message in the second database, and if the time difference between the storage time of a third message in the second database and the current time is greater than or equal to a second preset duration, delete the third message in the second database.

[0149] In an embodiment of the present application, when it is necessary to store a message, the message sending record within a preset time before the current moment can be obtained; the message sending record can be subjected to information extraction processing to obtain a second message, an identifier of the second message, and field information of the second message, and the field information of the second message can be updated according to the message receipt; the preset interface can be called through the gateway component to send the second message, the identifier of the second message, and the field information of the second message to the gateway background service; the gateway background service can store the field information and message identifier of the second message in the first database, and store the second message in the second database; it also includes, when the storage time of the message identifier in the first database is greater than or equal to the first preset time, clearing the message identifier in the first database, and when the storage time of the message in the second database is greater than or equal to the second preset time, clearing the message in the second database.

[0150] Figure 7 A schematic diagram of the structure of a message query device provided in an embodiment of the present application. Figure 7 The message query device 10 includes: a first receiving module 11, a judging module 12, a first obtaining module 13, and a second obtaining module 14, wherein:

[0151] The first receiving module 11 is used to receive a message query request sent by a first terminal device, wherein the message query request includes target field information, and the target field information includes at least one field and field values ​​corresponding to each field;

[0152] The judging module 12 is used to judge whether the target field information exists in the first database according to the message query request;

[0153] The first acquisition module 13 is used to, if yes, acquire at least one first message identifier corresponding to the target field information in the first database according to the target field information, acquire at least one first message corresponding to the at least one first message identifier in the second database according to the at least one first message identifier, and send the at least one first message to the first terminal device;

[0154] The second acquisition module 14 is used to, if not, acquire the at least one first message from the second database according to the target field information, and send the at least one first message to the first terminal device.

[0155] A message query device provided in an embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0156] In a possible design, the first acquisition module 13 is specifically used to:

[0157] Determine a matching degree between the target field information and field information corresponding to each message identifier in the first database to obtain a plurality of matching degrees;

[0158] According to the multiple matching degrees, determining multiple candidate message identifiers from the message identifiers in the first database, wherein the matching degree between the field information corresponding to the candidate message identifiers and the target field information is greater than or equal to a preset threshold;

[0159] The at least one first message identifier is determined in the message to be selected according to the target field information and the field information corresponding to the message identifier to be selected.

[0160] In a possible design, the first acquisition module 13 is specifically used to:

[0161] For any message identifier to be selected, determining whether the field information corresponding to the message identifier to be selected includes the target field information;

[0162] If so, the to-be-selected message identifier is determined as the first message identifier.

[0163] In a possible design, the first acquisition module 13 is specifically used to:

[0164] Determining message attribute information corresponding to each first message;

[0165] According to the message attribute information, the at least one first message is sorted and formatted to obtain a message list, wherein the message list includes the at least one first message;

[0166] The message list is sent to the terminal device.

[0167] Figure 8 A structural diagram of another message query device provided in an embodiment of the present application, in Figure 7 Based on the examples shown, see Figure 8 The device further comprises: a third acquisition module 15, an extraction processing module 16 and a storage module 17, wherein:

[0168] The third acquisition module 15 is used to acquire a message sending record within a preset time period before the current moment, wherein the message sending record includes the second message, the sending time of the second message, the receiving device of the second message, and the attribute information of the second message;

[0169] The extraction processing module 16 is used to perform information extraction processing on the message sending record to obtain the second message, the identifier of the second message, and the field information of the second message;

[0170] The storage module 17 is used to store the field information and message identifier of the second message in the first database, and to store the second message in the second database.

[0171] In a possible design, the storage module 17 is specifically used for:

[0172] Calling a preset interface through the gateway component to send the second message, the identifier of the second message, and the field information of the second message to the gateway background service;

[0173] Through the gateway background service, the field information and message identifier of the second message are stored in the first database, and the second message is stored in the second database.

[0174] Fig. 9 A structural diagram of another message query device provided in an embodiment of the present application, in Figure 8 Based on the examples shown, see Fig. 9 The device further comprises: a second receiving module 18 and an updating module 19, wherein:

[0175] The second receiving module 18 is used to receive a message receipt sent by a receiving device of the second message, wherein the message receipt is used to indicate that the status of the second message is a read status;

[0176] The updating module 19 is used for updating the field information of the second message in the first database according to the message receipt.

[0177] Fig.10 A structural diagram of another message query device provided in an embodiment of the present application, in Fig. 9 Based on the examples shown, see Fig.10 The device further comprises: a first determining module 20 and a second determining module 21, wherein:

[0178] The first determination module 20 is used to determine the storage time of each message identifier in the first database, and if the time difference between the storage time of the second message identifier in the first database and the current time is greater than or equal to the first preset duration, then delete the second message identifier and the field information corresponding to the second message identifier in the first database;

[0179] The second determination module 21 is used to determine the storage time of each message in the second database. If the time difference between the storage time of the third message in the second database and the current time is greater than or equal to the second preset duration, the third message is deleted from the second database.

[0180] A message query device provided in an embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0181] Fig.11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.11 As shown, the electronic device may include: a transceiver 111 , a processor 112 , and a memory 113 .

[0182] The processor 112 executes the computer-executable instructions stored in the memory, so that the processor 112 executes the scheme in the above embodiment. The processor 112 can be a general-purpose processor, including a central processing unit CPU, a network processor (network processor, NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0183] The memory 113 is connected to the processor 112 via a system bus and completes communication between them. The memory 113 is used to store computer program instructions.

[0184] The transceiver 111 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.

[0185] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.

[0186] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.

[0187] An embodiment of the present application also provides a chip for executing instructions, which is used to execute the technical solution of the message query method in the above embodiment.

[0188] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the message query method in the above embodiment.

[0189] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the message query method in the above embodiment.

[0190] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0191] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.

[0192] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0193] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.

[0194] It should be understood that the above processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.

[0195] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0196] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0197] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0198] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.

[0199] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0200] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A message query method, characterized in that: include: Receive a message query request sent by a first terminal device, wherein the message query request includes target field information, and the target field information includes at least one field and a field value corresponding to each field; According to the message query request, determining whether the target field information exists in the first database; If so, obtaining at least one first message identifier corresponding to the target field information in the first database according to the target field information, and obtaining at least one first message corresponding to the at least one first message identifier in the second database according to the at least one first message identifier, and sending the at least one first message to the first terminal device; If not, acquiring the at least one first message from the second database according to the target field information, and sending the at least one first message to the first terminal device.

2. The method according to claim 1, characterized in that Acquiring at least one first message identifier corresponding to the target field information in the first database according to the target field information includes: Determine a matching degree between the target field information and field information corresponding to each message identifier in the first database to obtain a plurality of matching degrees; According to the multiple matching degrees, determining multiple candidate message identifiers from the message identifiers in the first database, wherein the matching degree between the field information corresponding to the candidate message identifiers and the target field information is greater than or equal to a preset threshold; The at least one first message identifier is determined in the message to be selected according to the target field information and the field information corresponding to the message identifier to be selected.

3. The method according to claim 2, characterized in that Acquiring at least one first message identifier corresponding to the target field information in the first database according to the target field information includes: For any message identifier to be selected, determining whether the field information corresponding to the message identifier to be selected includes the target field information; If so, the to-be-selected message identifier is determined as the first message identifier.

4. The method according to any one of claims 1 to 3, characterized in that: Sending the at least one first message to the first terminal device includes: Determining message attribute information corresponding to each first message; According to the message attribute information, the at least one first message is sorted and formatted to obtain a message list, wherein the message list includes the at least one first message; The message list is sent to the terminal device.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Acquire a message sending record within a preset time period before the current moment, wherein the message sending record includes the second message, the sending time of the second message, the receiving device of the second message, and the attribute information of the second message; performing information extraction processing on the message sending record to obtain the second message, an identifier of the second message, and field information of the second message; The field information and the message identifier of the second message are stored in the first database, and the second message is stored in the second database.

6. The method according to claim 5, characterized in that The method is applied to a gateway, the gateway including a gateway component and a gateway background service; storing field information and a message identifier of the second message in the first data, and storing the second message in the second database, including: Calling a preset interface through the gateway component to send the second message, the identifier of the second message, and the field information of the second message to the gateway background service; Through the gateway background service, the field information and message identifier of the second message are stored in the first database, and the second message is stored in the second database.

7. The method according to claim 6, characterized in that The method further comprises: a message receipt sent by a receiving device that receives the second message, wherein the message receipt is used to indicate that the status of the second message is a read status; According to the message receipt, the field information of the second message is updated in the first database.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Determine the storage time of each message identifier in the first database, and if the time difference between the storage time of a second message identifier in the first database and the current time is greater than or equal to a first preset duration, delete the second message identifier and the field information corresponding to the second message identifier in the first database; Determine the storage time of each message in the second database, and if the time difference between the storage time of the third message in the second database and the current time is greater than or equal to the second preset duration, delete the third message in the second database.

9. A message query device, characterized in that: It includes a first receiving module, a judging module, a first acquiring module, and a second acquiring module, wherein: The first receiving module is used to receive a message query request sent by the first terminal device, the message query request includes target field information, the target field information includes at least one field and field values ​​corresponding to each field; The judging module is used to judge whether the target field information exists in the first database according to the message query request; The first acquisition module is used to, if yes, acquire at least one first message identifier corresponding to the target field information in the first database according to the target field information, acquire at least one first message corresponding to the at least one first message identifier in the second database according to the at least one first message identifier, and send the at least one first message to the first terminal device; The second acquisition module is used to, if not, acquire the at least one first message from a second database according to the target field information, and send the at least one first message to the first terminal device.

10. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.

12. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when being executed by a processor.