Message pushing method and device, electronic equipment and storage medium
By identifying keyword groups on the user's terminal and querying matching information in the database to generate a second message push, the problem of inaccurate message pushes to private domain users is solved, achieving more targeted information pushes and better operational results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING WUJI INFORMATION TECH CO LTD
- Filing Date
- 2023-03-17
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, the accuracy of push notifications received by private domain users is not high, resulting in disturbance and poor operational effectiveness.
By obtaining the first message from the user's terminal, determining the keyword group, querying the information database for target information matching the keyword group, and generating a second message based on the target information and a preset message structure for push notification.
It improved the accuracy of message push notifications, enhanced operational effectiveness, reduced labor costs, and increased operational efficiency.
Smart Images

Figure CN116383489B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer application technology, and in particular to a message push method, device, electronic device and storage medium. Background Technology
[0002] With the rapid development of computer and network technologies, the number of private domain users is increasing. Private domain users refer to users acquired through social media operations, such as users in social media operation groups, and users who add each other as friends with operation personnel through social media.
[0003] Currently, most of the messages are proactively pushed to private domain users by operations staff based on the popularity of the information. Private domain users passively receive various messages pushed by operations staff, which may include many messages that are useless to them. This will cause disturbance to private domain users, and the accuracy of message push is not high, so it cannot achieve good operational results. Summary of the Invention
[0004] This application provides a message push method, apparatus, electronic device, and storage medium to improve message push accuracy and achieve better operational results.
[0005] To solve the above-mentioned technical problems, this application provides the following technical solution:
[0006] Firstly, a message push method is provided, including:
[0007] Receive the first message from the user terminal;
[0008] Based on the first message, determine the keyword group;
[0009] Search the database for target information that matches the keyword group;
[0010] Based on the target information and the preset message structure, a second message is generated;
[0011] The second message is pushed to the user terminal.
[0012] Optionally, determining the keyword group based on the first message includes:
[0013] Identify the target keywords contained in the first message;
[0014] Based on the target keywords, keyword groups are determined.
[0015] Optionally, determining the target keywords contained in the first message includes:
[0016] For each target word contained in the first message, determine the category of the target word;
[0017] If the category of the target word is the target category, then the target word is determined as the target keyword.
[0018] Optionally, determining the keyword group based on the target keyword includes:
[0019] Determine whether the target keyword meets the target conditions, where the target conditions are the conditions for the keywords required to perform the target information query;
[0020] If the target keywords meet the target conditions, then the combination of the target keywords is determined as a keyword group.
[0021] Optionally, if the target keyword does not meet the target condition, the method further includes:
[0022] Determine whether the cached keyword corresponding to the user terminal exists in the database;
[0023] If the database contains cached keywords corresponding to the user terminal, then determine whether the target keyword and the cached keyword satisfy the target condition;
[0024] If the target keyword and the cached keyword satisfy the target condition, then a keyword group is determined based on the target keyword and the cached keyword.
[0025] Optionally, determining the keyword group based on the target keyword and the cached keyword includes:
[0026] The target keyword and the cached keyword are combined to determine one or more keyword groups, and different keywords in the same keyword group belong to different categories.
[0027] Optionally, the method further includes:
[0028] The target keywords are cached in the database.
[0029] Optionally, determining the keyword group based on the first message includes:
[0030] If the number of message pushes to the user terminal within the first time period is less than or equal to the first threshold, a keyword group is determined based on the first message;
[0031] And / or, if the number of message pushes to the group where the user terminal is located is less than or equal to the second threshold during the second time period, a keyword group is determined based on the first message.
[0032] Optionally, before querying the target information matching the keyword group in the information database, the method further includes:
[0033] Remove keyword groups that are identical to historical keyword groups used during the third time period.
[0034] Optionally, querying the information database for target information matching the keyword group includes:
[0035] If the feedback time corresponding to the first message is reached, query the information database for target information that matches the keyword group.
[0036] Secondly, a message push device is provided, comprising:
[0037] The acquisition unit is used to acquire the first message from the user terminal;
[0038] A determining unit is configured to determine a keyword group based on the first message;
[0039] The query unit is used to query target information that matches the keyword group in the information database;
[0040] The generation unit is used to generate a second message based on the target information and a preset message structure;
[0041] The push unit is used to push the second message to the user terminal.
[0042] Thirdly, an electronic device is provided, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the message push method as described in the first aspect.
[0043] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the message push method as described in the first aspect.
[0044] Fifthly, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium and adapted to be read and executed by a processor to cause an electronic device having the processor to perform the steps of the message push method as described in the first aspect.
[0045] By applying the technical solution provided in the embodiments of this application, after obtaining a first message from a user terminal, a keyword group is first determined based on the first message. Then, target information matching the keyword group is queried in the information database. Finally, a second message is generated based on the target information and a preset message structure and pushed to the user terminal. In other words, the second message pushed to the user terminal is generated based on the first message from the user terminal, making the second message pushed to the user terminal more targeted and more likely to meet the information acquisition needs of the user terminal, improving the accuracy of message push and achieving better operational results.
[0046] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating the implementation of a message push method in an embodiment of this application.
[0048] Figure 2 This is a schematic diagram illustrating the message processing procedure in an embodiment of this application;
[0049] Figure 3 This is a schematic diagram illustrating the data retrieval process from the delay queue in an embodiment of this application;
[0050] Figure 4 This is a schematic diagram illustrating the processing of data in the consumable queue in an embodiment of this application;
[0051] Figure 5 This is a schematic diagram illustrating the message verification process in an embodiment of this application;
[0052] Figure 6 This is a schematic diagram of the structure of a message push device according to an embodiment of this application;
[0053] Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0055] The core of this application is to provide a message push method that can be applied to application scenarios such as product promotion, job recommendation, housing recommendation, and car recommendation. Taking the job recommendation scenario as an example, a first message is received from the user's terminal. This first message reveals the user's job information acquisition needs. Based on the first message, a keyword group is determined. Then, target information matching the keyword group is queried in the information database. This target information can be job information that matches the user's job information acquisition needs. According to the target information and a preset message structure, a second message is generated that may include the job information. Finally, the second message is pushed to the user's terminal, so that the user's terminal can obtain job information that matches their job information acquisition needs.
[0056] The second message pushed to the user's terminal is generated based on the first message on the user's terminal, making the second message more targeted and more likely to meet the user's information acquisition needs, thus improving the accuracy of message push and achieving better operational results.
[0057] In addition, the technical solutions provided in this application can be completed automatically through message push services, which helps to reduce labor costs and improve operational efficiency.
[0058] See Figure 1 The diagram shown is an implementation flowchart of a message push method provided in this application embodiment. The method may include the following steps:
[0059] S110: Receive the first message from the user terminal.
[0060] In this embodiment of the application, the user corresponding to the user terminal can be a private domain user, that is, a user acquired through social software operation, such as a user in a social software operation group, a user who adds friends with the operation personnel, etc. Private domain users can send messages in the social software operation group, or send messages in private chat with the operation personnel through social software.
[0061] When a user has an information retrieval need, they can send a first message through their user terminal. This first message reveals the user's information retrieval need. For example, if the user's information retrieval need is for job information, the first message sent by the user through their user terminal could include job information, such as "looking for general worker positions in City X". This first message reveals that the user's job information retrieval need is "looking for general worker positions in City X".
[0062] After receiving the first message from the user terminal, you can continue with the subsequent steps.
[0063] S120: Determine the keyword group based on the first message.
[0064] After receiving the first message from the user's terminal, a keyword group can be determined based on the first message. The keyword group can include one or more keywords. For example, if the first message is "looking for general worker positions in City X", the keyword group determined based on the first message could be [City X; general worker].
[0065] S130: Query the database for target information that matches the keyword group.
[0066] Once the keyword groups are identified based on the initial message from the user terminal, a query can be performed in the information database using these keyword groups. The information database can be pre-built or accessed through a corresponding interface. In product promotion applications, the information database can contain product information; in job recommendation applications, it can contain job information.
[0067] By searching a database using keyword groups, you can obtain target information that matches the keyword groups. For example, you can obtain job information that matches the keyword group [City X; General Worker].
[0068] Optionally, if a search of the database based on all keywords contained in the keyword group fails to retrieve target information matching the keyword group, the search can be repeated after reducing the number of keywords in the keyword group. One keyword can be removed from the keyword group each time until the keyword group contains only essential keywords. Essential keywords can be considered as those that are necessary for retrieving the target information.
[0069] Optionally, if no target information matching the keyword group can be found in the information database, the subsequent step S140 can be skipped, and the keywords contained in the keyword group can be stored in the database for use when determining the keyword group again later.
[0070] S140: Generate a second message based on the target information and the preset message structure.
[0071] In this embodiment of the application, a message structure can be preset, such as a keyword group, information content, etc.
[0072] After retrieving target information matching the keyword group from the information database, a second message can be generated based on the target information and the preset message structure.
[0073] It should be noted that, based on the first message, there can be one or more identified keyword groups. If there are multiple identified keyword groups, there may also be multiple target information items matching the keyword groups retrieved from the information database. Furthermore, based on the target information and the preset message structure, there can be one or more generated second messages. Optionally, if there are multiple target information items, the generated second message can be a single second message containing multiple target information items; or, multiple second messages can be generated, with each second message containing its corresponding target information item based on each target information item and the preset message structure.
[0074] The second message can be in the form of a mini-program card or a link.
[0075] S150: Push the second message to the user terminal.
[0076] Based on the target information matching the keyword group retrieved from the database and the preset message structure, a second message is generated and pushed to the user terminal. In this way, the user terminal receives the target information obtained from the keyword group query determined by the first message it sent.
[0077] By applying the method provided in this application, after obtaining a first message from a user terminal, a keyword group is first determined based on the first message. Then, target information matching the keyword group is queried in the information database. Finally, a second message is generated based on the target information and a preset message structure and pushed to the user terminal. In other words, the second message pushed to the user terminal is generated based on the first message from the user terminal, making the second message pushed to the user terminal more targeted and more likely to meet the information acquisition needs of the user terminal, improving the accuracy of message push and achieving better operational results.
[0078] In some embodiments of this application, determining the keyword group based on the first message may include the following steps:
[0079] Step 1: Identify the target keywords contained in the first message;
[0080] Step 2: Determine keyword groups based on target keywords.
[0081] For ease of description, the two steps above will be explained together.
[0082] In this embodiment of the application, after obtaining the first message from the user terminal, the target keywords contained in the first message can be determined first.
[0083] Optionally, for each target word contained in the first message, the category of the target word can be determined first. If the category of the target word is the target category, then the target word is determined as the target keyword.
[0084] The target word can be any word contained in the first message.
[0085] Alternatively, the first message can be segmented and words without actual meaning, such as prepositions, auxiliary words, conjunctions, and modal particles, can be removed to obtain the words with actual meaning contained in the first message. That is, the target word contained in the first message is any word with actual meaning in the first message, such as place names, job titles, etc.
[0086] For each target word contained in the first message, its category can be determined first. For example, the category could be job title, region, salary, or name. If the category of the target word is a target category, then that target word can be designated as a target keyword. Target categories are pre-defined based on the actual situation. For instance, if target categories include job title, region, and salary, then for each target word contained in the first message, if its category is job title, region, or salary, then that target word can be designated as a target keyword.
[0087] Based on the category of each target word contained in the first message, the target keywords contained in the first message can be accurately determined.
[0088] After identifying the target keywords contained in the first message, keyword groups can be further determined based on these target keywords. Keyword groups determined based on the target keywords contained in the first message are more likely to meet the information acquisition needs of user terminals.
[0089] Optionally, the combination of target keywords contained in the first message can be defined as a keyword group.
[0090] However, if the first message contains insufficient number of target keywords or insufficient categories of target keywords, it may result in a large number of retrieved target information, which lacks specificity. Therefore, in some embodiments of this application, target conditions can be preset. These target conditions can be set and adjusted according to actual conditions. The target conditions are the conditions for keywords required to retrieve target information. The target conditions can be flexibly set according to specific needs.
[0091] When determining keyword groups based on target keywords, first determine if the target keywords meet the target conditions. If they do, the combination of target keywords is defined as a keyword group, which can then be used to query target information. For example, if the target condition is to include at least keywords related to a geographical category and a job category, and the first message contains multiple target keywords, with one belonging to a geographical category and another to a job category, then the target keywords meet the target conditions. If no target keywords belonging to either a geographical or job category are present, then the target keywords do not meet the target conditions. Similarly, if the target condition is to include at least a price range category and a vehicle category, and the first message contains multiple target keywords, with one belonging to a price range category and another to a vehicle category, then the target keywords meet the target conditions. If no target keywords belonging to either a price range or vehicle category are present, then the target keywords do not meet the target conditions. For example, if the target condition is that it must include at least a geographic category and a price category, then if the target keywords in the first message include keywords belonging to both geographic and price categories, then the target keywords can be determined to meet the target condition. If the first message does not contain target keywords belonging to either geographic or price categories, then the target keywords cannot meet the target condition.
[0092] When the target keywords meet the target conditions, the combination of target keywords is determined as a keyword group. This ensures that the keywords contained in the determined keyword group are sufficient for querying the target information and are more likely to meet the information acquisition needs of the user terminal.
[0093] In some embodiments of this application, when the target keyword does not meet the target conditions, the method may further include the following steps:
[0094] The first step: Determine if the corresponding cached keywords for the user's terminal exist in the database;
[0095] The second step: If the database contains cached keywords corresponding to the user terminal, then determine whether the target keyword and the cached keyword meet the target conditions;
[0096] The third step: If the target keyword and the cached keyword meet the target conditions, then determine the keyword group based on the target keyword and the cached keyword.
[0097] For ease of description, the three steps above will be explained together.
[0098] In this embodiment, after obtaining the first message from the user terminal and determining the target keywords contained in the first message, if it is determined that the target keywords do not meet the target conditions, it is considered that the combination of target keywords is insufficient to form a keyword group. It can then be determined whether there are cached keywords corresponding to the user terminal in the database. The cached keywords corresponding to the user terminal in the database can be keywords contained in messages previously sent by the user terminal. It can be considered that the cached keywords have a strong correlation with the user terminal's information retrieval needs.
[0099] If the database contains cached keywords corresponding to the user terminal, it can be further determined whether the target keyword and the cached keyword meet the target conditions. That is, it can be determined whether the combination of the target keyword and the cached keyword satisfies the conditions for querying the target information. If the database does not contain cached keywords corresponding to the user terminal, the target keyword can be cached in the database. After caching, the target keyword is called the cached keyword and can be used when receiving messages from the user terminal later.
[0100] If the target keyword and the cached keyword meet the target criteria, a keyword group can be determined based on the target keyword and the cached keyword. If the target keyword and the cached keyword do not meet the target criteria, and the cached keyword is different from the target keyword, the target keyword can be cached in the database. After caching, the target keyword also becomes a cached keyword, and the database includes the target keyword and the previously existing cached keyword.
[0101] Optionally, when caching target keywords in the database, the target keyword can be used to replace cached keywords in the same category as the target keyword. Between cached keywords and target keywords of the same category, the target keyword is more likely to meet the user's recent information retrieval needs.
[0102] When the target keywords and cached keywords meet the target conditions, determining keyword groups based on the target keywords and cached keywords can ensure that the keywords contained in the determined keyword groups are sufficient for querying the target information and are more likely to meet the information acquisition needs of user terminals.
[0103] In some embodiments of this application, determining keyword groups based on target keywords and cached keywords may include the following steps:
[0104] Combine target keywords and cached keywords to determine one or more keyword groups, with different keywords in the same keyword group belonging to different categories.
[0105] In this embodiment, if the target keyword in the first message does not meet the target conditions, but the target keyword and the cached keyword in the database do, the target keyword and the cached keyword can be combined to determine one or more keyword groups. Each keyword group can contain multiple keywords, and different keywords in the same keyword group have different categories. This allows multiple target information to be retrieved based on different keyword groups, making it easier to meet the information acquisition needs of user terminals.
[0106] In some embodiments of this application, after determining the target keywords contained in the first message, the method may further include the following steps:
[0107] Cache target keywords in the database.
[0108] In this embodiment of the application, after obtaining the first message from the user terminal and determining the target keywords contained in the first message, the target keywords can be cached in the database.
[0109] Alternatively, if the target keywords do not meet the target conditions, it can be considered that the keyword group cannot be determined based solely on the target keywords. In this case, the target keywords can be cached in the database.
[0110] Optionally, if the target keyword does not meet the target conditions and the target keyword does not exist in the database, the target keyword can be cached in the database.
[0111] After a target keyword is cached in the database, that target keyword is called a cached keyword. If a cached keyword previously existed in the database, then after caching the target keyword, the current database includes both the target keyword and the previously existing cached keyword. If a cached keyword did not previously exist in the database, then after caching the target keyword, the current database includes the target keyword.
[0112] Optionally, if a cached keyword that already exists in the database is the same as the target keyword, the target keyword can be used to override the cached keyword.
[0113] Optionally, if a cached keyword that already exists in the database belongs to the same category as the target keyword, the target keyword can be used to override the cached keyword.
[0114] Cache target keywords in the database, which helps to determine keyword groups more effectively later.
[0115] For example, in job recommendation applications, the target criteria must include keywords that at least cover geographical and job categories. This can take several forms:
[0116] 1) The first message is "Looking for general worker positions in City X". The target keywords in the first message are "City X" and "general worker". "City X" belongs to the geographical category and "general worker" belongs to the job category. The target keywords meet the target conditions. The combination of target keywords is determined as the keyword group, namely [City X; general worker];
[0117] 2) The first message is "Looking for general worker positions". The target keyword in the first message is "general worker". "General worker" belongs to the job category. There is no target keyword for the region category. Therefore, the target keyword does not meet the target conditions. If the database contains the cached keyword "City Y" corresponding to the user terminal, "City Y" belongs to the region category. Then the target keyword and the cached keyword meet the target conditions. The combination of the target keyword and the cached keyword can be determined as the keyword group, i.e., [City Y; General worker];
[0118] 3) The first message is "Looking for general worker positions". The target keyword in the first message is "general worker". "General worker" belongs to the job category, but there is no target keyword for the geographical category. Therefore, the target keyword does not meet the target conditions. If the database contains cached keywords "City X" and "City Y" corresponding to the user terminal, and "City X" and "City Y" belong to the geographical category, then the target keyword and the cached keyword meet the target conditions. The target keyword and the cached keyword can be combined to determine two keyword groups, namely [City X; General Worker] and [City Y; General Worker].
[0119] 4) The first message is "Looking for general worker positions". The target keyword in the first message is "general worker". "General worker" belongs to the job category. There is no target keyword for the regional category. Therefore, the target keyword does not meet the target conditions. If the corresponding cached keyword for the user terminal does not exist in the database, or the cached keyword is different from the target keyword, the target keyword can be cached in the database.
[0120] In some embodiments of this application, after caching target keywords in the database, it can be determined whether the currently cached keywords in the database meet the target conditions. If they do, a keyword group can be determined based on the currently cached keywords in the database. This allows for timely message push notifications to user terminals.
[0121] In some embodiments of this application, a valid duration can be set for each cached keyword in the database.
[0122] For any cached keyword, when the cached keyword has been in the database for the required duration, it is either deleted from the database or set as an invalid word. This effectively ensures that the cached keywords used when determining keyword groups are highly relevant to the user's recent information retrieval needs. The effective duration can be set or adjusted according to actual needs, such as x1 day or x2 weeks.
[0123] In some embodiments of this application, a reset time can be set for the database. When the reset time is reached, all cached keywords in the database become invalid. For example, if the reset time is midnight every day, the cached keywords in the database are only valid for that day. At midnight, the cached keywords in the database are either deleted or set to invalid. This effectively ensures that the cached keywords used when determining keyword groups are highly relevant to the user's recent information retrieval needs.
[0124] In some embodiments of this application, determining the keyword group based on the first message may include the following steps:
[0125] If the number of message pushes to the user terminal within the first time period is less than or equal to the first threshold, the keyword group is determined based on the first message.
[0126] And / or, if the number of message pushes to the user terminal's group during the second time period is less than or equal to the second threshold, the keyword group is determined based on the first message.
[0127] In this application embodiment, a first threshold can be set to limit the number of message pushes to the user terminal, or a second threshold can be set to limit the number of message pushes to the group to which the user terminal belongs.
[0128] Upon receiving the first message from the user's terminal, we can first determine the relationship between the number of message pushes to the user's terminal within the first time period and a first threshold. If the number of message pushes to the user's terminal within the first time period exceeds the first threshold, it can be considered that too many messages are being pushed to the user's terminal, which may prevent timely message pushes to other user terminals or trigger the protection function of social software. In this case, the first message can be discarded or ignored. If the number of message pushes to the user's terminal within the first time period is less than or equal to the first threshold, we can determine keyword groups based on the first message, and then query the information database for target information matching the keyword groups to generate a second message, which is then pushed to the user's terminal.
[0129] Alternatively, after receiving the first message from the user's terminal, we can first determine the relationship between the number of message pushes to the user's group within the second time period and the second threshold. If the number of message pushes to the user's group within the second time period is greater than the second threshold, it can be considered that too many messages are being pushed to the user's group, which may disturb other users in the group or trigger the social media software's protection features. In this case, the first message can be discarded or ignored. If the number of message pushes to the user's group within the second time period is less than or equal to the second threshold, we can determine keyword groups based on the first message, then query the information database for target information matching the keyword groups, generate a second message, and push it to the user's terminal.
[0130] Alternatively, the two schemes can be combined: if the number of message pushes to the user terminal in the first time period is less than or equal to the first threshold, and the number of message pushes to the user terminal's group in the second time period is less than or equal to the second threshold, then the keyword group can be determined based on the first message.
[0131] The first time period, the second time period, the first threshold, and the second threshold can be set and adjusted according to the actual situation. For example, the first time period and the second time period can be set to 0:00 to 24:00 of a day, the first threshold can be set to x3, and the second threshold can be set to x4.
[0132] After receiving the first message from the user terminal, based on the relationship between the number of message pushes to the user terminal within the first time period and the first threshold, it is determined whether to continue to determine keyword groups and query target information. This can effectively control the number of message pushes to each user terminal within the first time period, avoid message congestion caused by a user terminal frequently sending the first message, and prevent message pushes to other user terminals. At the same time, it can effectively avoid triggering the protection functions of social software.
[0133] In addition, after receiving the first message from the user's terminal, the system determines whether to continue identifying keyword groups and querying target information based on the relationship between the number of message pushes to the user's terminal's group during the second time period and the second threshold. This effectively controls the number of message pushes to the user's terminal's group during the second time period, preventing excessive message pushes from disturbing the user and effectively avoiding triggering the social software's protection functions.
[0134] It should be noted that user terminals can be identified by their identifiers, or by combining the identifiers of user terminals with the identifiers of operators, or by combining the identifiers of user terminals with group identifiers.
[0135] In some embodiments of this application, before querying target information matching the keyword group in the information database, the method may further include the following steps:
[0136] Remove keyword groups that are identical to historical keyword groups used in the third time period.
[0137] In this embodiment, after receiving the first message from the user terminal and determining the keyword group based on the first message, it can be determined whether each keyword group is the same as a historical keyword group used within the third time period. For each keyword group, if the keyword group is the same as a historical keyword group used within the third time period, the keyword group can be removed; if the keyword group is not the same as a historical keyword group used within the third time period, the step of querying the target information matching the keyword group in the information database can continue.
[0138] If the keyword group determined based on the first information is the same as the historical keyword group used in the third time period, then the target information retrieved based on the keyword group will also be the same. There is no need to push the same message to the user terminal in the third time period. Therefore, if it is determined that the keyword group is different from the historical keyword group used in the third time period, then the target information matching the keyword group is retrieved from the information database and the message is pushed. This can effectively avoid repeatedly pushing the same message to the user terminal in the third time period.
[0139] The third time period can be set and adjusted according to the actual situation, such as setting it to 00:00 to 24:00 every day, or setting it to Monday to Sunday every week.
[0140] In some embodiments of this application, querying target information that matches keyword groups in an information database may include the following steps:
[0141] Upon reaching the feedback time corresponding to the first message, query the information database for target information that matches the keyword group.
[0142] In this embodiment, each message may have its own corresponding feedback time. For any given message, the feedback time can be the message's sending time plus the corresponding delay duration. Different types of messages may correspond to different delay durations. For example, the delay duration for private chat messages is x5 minutes, and the delay duration for group chat messages is x6 minutes.
[0143] After receiving the first message from the user terminal and determining the keyword group based on the first message, the data corresponding to the first message, such as the keyword group and session identifier, can be stored in the delayed queue. After the feedback time corresponding to the first message is reached, it is transferred from the delayed queue to the consumable queue, and the target information matching the keyword group can be queried in the information database.
[0144] Setting a response time for each message simulates the reaction time of operations staff, which allows users to feel as if they are communicating with operations staff, thus improving the user experience.
[0145] For ease of understanding, the technical solution provided in this application embodiment will be explained again below using a job recommendation application scenario as an example.
[0146] Users can send messages on social media platforms through their respective devices, and the platform can obtain these messages through the social media platform's interface. For example... Figure 2 As shown, for the first message obtained from the user terminal, pre-processing can be performed on the first message. The user terminal can be any user terminal, and the first message can be any message sent by the user terminal.
[0147] The pre-message processing may include determining whether the first message is any of the following types of messages; if it is, the message is discarded, and a failure message may be sent to the platform:
[0148] 1) Messages that are not automatically replied to;
[0149] 2) Messages that are not client-related;
[0150] 3) Empty message;
[0151] 4) Friend request message.
[0152] If the first message does not fall into any of the above categories, the graph interface can be called to parse it and determine if the target keyword is found. If the target keyword is not found, the first message is considered invalid, and a message record can be inserted into the log system (Elasticsearch, ES). If the target keyword is found, message validation can be performed. If the message validation fails, a message record can be inserted into the log system. If the message validation passes, the target keyword can be cached in the Remote Dictionary Server (Redis) database, and the target keyword can be set as the latest data in the Redis database, valid for the current day.
[0153] If the cached keyword corresponding to the user terminal exists in the Redis database, the target keyword can be replaced with the cached keyword of the same category when caching the target keyword in the Redis database. If the cached keyword corresponding to the user terminal does not exist in the Redis database, new data such as the target keyword corresponding to the user terminal will be inserted into the Redis database.
[0154] When inserting new data or updating keywords in the Redis database, further determine whether the user terminal possesses keywords for at least the job category and region category. If it does, store the data corresponding to the first message in a delayed queue. The data in the delayed queue corresponding to the first message has a score and a value, where the score is the sending time plus the delay duration, and the value is the session identifier (SessionId). The session identifier can identify the user terminal, operations personnel, the group the user terminal belongs to, the message, and the keyword group. If storing in the delayed queue fails, a failure message can be sent to the platform.
[0155] If no new data is inserted into the Redis database and no keywords are updated, the first message can be ignored. Additionally, if the user terminal does not have keywords for at least the job category and the region category, the first message can be ignored.
[0156] Redis's complex operations are all implemented using Lua scripts to ensure data security in a distributed environment and prevent security issues caused by concurrent modifications.
[0157] like Figure 3 As shown, data can be retrieved from the delayed queue using a timer, with a maximum of ten expired data items retrieved at a time. The expiration date of data can be determined based on its corresponding score. If expired data can be retrieved, it is moved to the consumable queue. If not, the most recently expired data is retrieved, and its expiration time is obtained.
[0158] Determine whether blocking is necessary. If expired data is retrieved and moved to the consumable queue, no blocking is needed, and a new retrieval request will be sent to Redis immediately. If no expired data is retrieved, the most recently expired data is retrieved, and its expiration time is returned. This expiration time is the blocking time. The polling thread is then blocked for the specified time before another retrieval request is sent to Redis. If no recently expired data is retrieved, the blocking time is set to a fixed duration, such as 3 minutes. The polling thread is blocked for 3 minutes before another retrieval request is sent to Redis. This polling process repeats continuously.
[0159] like Figure 4As shown, data in the consumable queue can be retrieved using a timer-based blocking polling method. For example, when retrieving data corresponding to the first message, this data can include keyword groups determined based on the first message. Target information matching these keyword groups can be queried in the information database. When querying target information, minimum condition optimization can be performed. That is, if target information cannot be found based on the keyword group, the keywords in the keyword group can be reduced before querying again, until the keyword group only contains job category and region category keywords. The system then determines whether the target information was found. If not, a record indicating no job was found can be inserted into the MySQL database, and a failure message can be sent to the platform, updating the message record in the log system. If the target information was found, further message verification can be performed. If message verification fails, a failure message is sent to the platform, and the message record is updated in the log system. If message verification passes, the message count is incremented, valid for the day. The message type is determined, such as a mini-program card or link (the first N1 messages of the day can be mini-program card messages, and subsequent messages can be link messages). Based on the target information and the preset message structure, a second message can be generated and pushed to the user's terminal through the platform. A message sending record is then inserted into the MySQL database. If generating the second message fails, a failure message is sent to the platform, and the message record is updated in the log system.
[0160] For the platform, if the second message is a mini-program card type message, the mini-program's main site push status can be updated in the MySQL database, and the message record can be updated in the log system after the second message is successfully pushed. Additionally, the mini-program's platform push status can also be updated in both the MySQL database and the log system.
[0161] in addition, Figure 2 and Figure 4 The message verification operation is mentioned in both. The message verification process can be described as follows: Figure 5 As shown. Taking the first message as an example, we can first determine whether the first message is a group message.
[0162] If the first message is a group message, you can query the message push count (num1) for that group, valid for the current day. If the message push count (num1) for that group is greater than or equal to x7, the verification fails. If the message push count (num1) for that group is less than x7, you can query the message push count (num2) for user terminals within that group, valid for the current day. If the message push count (num2) for user terminals within that group is greater than or equal to x8, the verification fails. If the message push count (num2) for user terminals within that group is less than x8, the verification passes.
[0163] If the first message is not a group message, then you can check if the number of message pushes to the user terminal (num3) is greater than or equal to x9. If the number of message pushes to the user terminal (num3) is greater than or equal to x9, then the verification fails. If the number of message pushes to the user terminal (num3) is less than x9, then the verification passes.
[0164] The above Figure 2-5 This is an example description of an embodiment of the present application. The keyword types, specific values, etc., can be adjusted according to the actual situation, and the embodiments of the present application do not limit this.
[0165] It should be noted that discarding or ignoring a message in this application embodiment means that the technical solution provided in this application embodiment is not executed for the message, and the message can be manually replied to or processed through other technical solutions.
[0166] The technical solution provided in this application embodiment can automatically identify keywords in messages sent by user terminals and automatically recommend messages. It can effectively solve the problem of low efficiency in manual matching by operators, enable one person to manage multiple city management groups, improve operational efficiency, and achieve automatic operation.
[0167] Corresponding to the above method embodiments, this application also provides a message push device, and the message push device described below can be referred to in correspondence with the message push method described above.
[0168] See Figure 6 As shown, the message push device 600 may include the following units:
[0169] The acquisition unit 610 is used to acquire the first message from the user terminal;
[0170] The determining unit 620 is used to determine the keyword group based on the first message;
[0171] The query unit 630 is used to query target information that matches the keyword group in the information database;
[0172] The generation unit 640 is used to generate a second message based on the target information and a preset message structure;
[0173] The push unit 650 is used to push the second message to the user terminal.
[0174] Using the apparatus provided in this application embodiment, after obtaining a first message from a user terminal, a keyword group is first determined based on the first message. Then, target information matching the keyword group is queried in the information database. Finally, a second message is generated based on the target information and a preset message structure and pushed to the user terminal. In other words, the second message pushed to the user terminal is generated based on the first message from the user terminal, making the second message pushed to the user terminal more targeted and more likely to meet the information acquisition needs of the user terminal, improving the accuracy of message push and achieving better operational results.
[0175] In some embodiments of this application, the determining unit 620 is used for:
[0176] Identify the target keywords contained in the first message;
[0177] Based on the target keywords, determine the keyword group.
[0178] In some embodiments of this application, the determining unit 620 is used for:
[0179] For each target word contained in the first message, determine the category of the target word;
[0180] If the category of the target word is the target category, then the target word is determined as the target keyword.
[0181] In some embodiments of this application, the determining unit 620 is used for:
[0182] Determine whether the target keywords meet the target conditions, which are the conditions for using the keywords required to search for the target information;
[0183] If the target keywords meet the target conditions, then the combination of target keywords is determined as a keyword group.
[0184] In some embodiments of this application, the determining unit 620 is further configured to:
[0185] If the target keyword does not meet the target conditions, determine whether there are cached keywords corresponding to the user terminal in the database;
[0186] If the database contains cached keywords corresponding to the user terminal, then determine whether the target keyword and the cached keyword meet the target conditions;
[0187] If the target keyword and cached keyword meet the target conditions, then the keyword group is determined based on the target keyword and cached keyword.
[0188] In some embodiments of this application, the determining unit 620 is used for:
[0189] Combine target keywords and cached keywords to determine one or more keyword groups, with different keywords in the same keyword group belonging to different categories.
[0190] In some embodiments of this application, the message push device 600 further includes a cache unit for:
[0191] Cache target keywords in the database.
[0192] In some embodiments of this application, the determining unit 620 is used for:
[0193] If the number of message pushes to the user terminal within the first time period is less than or equal to the first threshold, the keyword group is determined based on the first message.
[0194] And / or, if the number of message pushes to the user terminal's group during the second time period is less than or equal to the second threshold, the keyword group is determined based on the first message.
[0195] In some embodiments of this application, the message push device 600 further includes a rejection unit, used for:
[0196] Before querying the database for target information that matches the keyword group, remove keyword groups that are the same as historical keyword groups used in the third time period.
[0197] In some embodiments of this application, the query unit is used for:
[0198] Upon reaching the feedback time corresponding to the first message, query the information database for target information that matches the keyword group.
[0199] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0200] Corresponding to the above method embodiments, this application also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above message push method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0201] like Figure 7 The diagram shows a possible structure of an electronic device, which may include a processor 710, a memory 711, a communication interface 712, and a communication bus 713. The processor 710, memory 711, and communication interface 712 all communicate with each other through the communication bus 713.
[0202] In this embodiment, the processor 710 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic devices.
[0203] The processor 710 can call the computer program stored in the memory 711. Specifically, the processor 710 can execute the operations in the message push method embodiment.
[0204] The memory 711 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment, the memory 711 stores at least a program for implementing the following functions:
[0205] Receive the first message from the user terminal;
[0206] Based on the first message, determine the keyword group;
[0207] Search the database for target information that matches the keyword group;
[0208] Generate a second message based on the target information and the preset message structure;
[0209] The second message is pushed to the user's terminal.
[0210] In one possible implementation, the memory 711 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.
[0211] In addition, memory 711 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0212] The communication interface 712 can be an interface for the communication module, used to connect with other devices or systems.
[0213] Of course, it should be noted that, Figure 7 The structure shown does not constitute a limitation on the electronic device in the embodiments of this application. In practical applications, the electronic device may include more than Figure 7 More or fewer components as shown, or combinations of certain components.
[0214] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described message push method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may include read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0215] Furthermore, this application also provides a computer program product or computer program, which may include computer instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes them, causing the electronic device to perform the message push method described in the preceding embodiments; therefore, this will not be repeated here. Additionally, the beneficial effects of using the same method will not be repeated here either. For technical details not disclosed in the embodiments of the computer program product or computer program involved in this application, please refer to the description of the method embodiments of this application.
[0216] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0217] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0218] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0219] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0220] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0221] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0222] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0223] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0224] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0225] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A message pushing method, characterized by, include: Receive the first message sent from the user's terminal on social media; The first message is used to reflect the user's information acquisition needs; The user terminal corresponds to a private domain user; If the first message does not belong to any of the following categories: automatic reply type, non-customer type message, empty message, or friend request message, then based on the first message, determine the keyword group, including: determining the target keywords contained in the first message; and determining the keyword group based on the target keywords. Querying target information matching the keyword group in the information database includes: querying target information matching the keyword group in the information database when the feedback time corresponding to the first message is reached; the feedback time is the sending time of the first message plus the corresponding delay time, and different types of first messages correspond to different delay times; the types include private chat type and group chat type; Based on the target information and the preset message structure, a second message is generated; The second message is pushed to the user terminal; The step of determining the keyword group based on the target keyword includes: Determine whether the target keyword meets the target conditions, where the target conditions are the conditions for the keywords required to perform the target information query; If the target keyword does not meet the target condition, determine whether there is a cached keyword corresponding to the user terminal in the database; If the database contains cached keywords corresponding to the user terminal, then determine whether the target keyword and the cached keyword satisfy the target condition; If the target keyword and the cached keyword satisfy the target condition, then a keyword group is determined based on the target keyword and the cached keyword, including: combining the target keyword and the cached keyword to determine one or more keyword groups, wherein different keywords in the same keyword group belong to different categories.
2. The method of claim 1, wherein, Determining the target keywords contained in the first message includes: For each target word contained in the first message, determine the category of the target word; If the category of the target word is the target category, then the target word is determined as the target keyword.
3. The method of claim 1, wherein, The step of determining keyword groups based on the target keywords includes: If the target keywords meet the target conditions, then the combination of the target keywords is determined as a keyword group.
4. The method of claim 1, wherein, The method further includes: The target keywords are cached in the database.
5. The method of claim 1, wherein, The step of determining the keyword group based on the first message includes: If the number of message pushes to the user terminal within the first time period is less than or equal to the first threshold, a keyword group is determined based on the first message; And / or, if the number of message pushes to the group where the user terminal is located is less than or equal to the second threshold during the second time period, a keyword group is determined based on the first message.
6. The method of claim 1, wherein, Before querying the information database for target information matching the keyword group, the method further includes: Remove keyword groups that are identical to historical keyword groups used during the third time period.
7. A message pushing apparatus characterized by comprising: include: The acquisition unit is used to acquire the first message sent from the user terminal on the social software; The first message is used to reflect the user's information acquisition needs; The user terminal corresponds to a private domain user; The determining unit is configured to determine a keyword group based on the first message when the first message does not belong to any of the following types: automatic reply type, non-customer type, empty message, or friend request message. The determination unit includes: determining the target keywords contained in the first message; and determining the keyword group based on the target keywords. The query unit is used to query target information matching the keyword group in the information database, including: querying target information matching the keyword group in the information database when the feedback time corresponding to the first message is reached; the feedback time is the sending time of the first message plus the corresponding delay time, and different types of first messages correspond to different delay times; the types include private chat type and group chat type; The generation unit is used to generate a second message based on the target information and a preset message structure; A push unit is used to push the second message to the user terminal; The determining unit is further configured to: determine whether the target keyword meets the target conditions, wherein the target conditions are the conditions for the keywords required to perform the target information query; if the target keyword does not meet the target conditions, determine whether there is a cached keyword corresponding to the user terminal in the database; if there is a cached keyword corresponding to the user terminal in the database, determine whether the target keyword and the cached keyword meet the target conditions; if the target keyword and the cached keyword meet the target conditions, determine a keyword group based on the target keyword and the cached keyword, including: combining the target keyword and the cached keyword to determine one or more keyword groups, wherein different keywords in the same keyword group have different categories.
8. An electronic device, comprising: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the message push method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the message push method as described in any one of claims 1 to 6.