Message pushing method and device, electronic equipment and storage medium

By obtaining the main table data and subtable data, registering timing tasks, running timing tasks, obtaining historical push execution logs, generating push content, and calling the office software group robot interface or message sending interface according to the push object type for push, the traditional solution is solved The high cost of development of the message push system and the lack of flexibility have achieved efficient and flexible message push, which has improved user satisfaction.

CN118900261APending Publication Date: 2024-11-05GUANGZHOU XITAO INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410887656.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

Traditional message push systems are costly and lack flexibility, so they cannot flexibly push messages, and cannot meet the needs of personalization and targeting.

Method used

By obtaining the main table data and subtable data, registering timing tasks, running timing tasks, obtaining historical push execution logs, generating push content, and calling the office software group robot interface or message sending interface according to the push object type for push, synchronous call is realized and cross-end development.

Benefits of technology

It reduces the development cost of message push, improves the efficiency and accuracy of message push, enhances push coverage, covers a wider range of user groups and usage scenarios, and improves user response rate and satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118900261A_ABST
    Figure CN118900261A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a message pushing method and device, electronic equipment and a storage medium, and belongs to the technical field of Internet. The method comprises the following steps: acquiring main table data and sub-table data; registering a timed task according to the main table data, running the timed task, and obtaining a running result; obtaining a historical push execution log, and determining to-be-pushed data according to the operation result and the historical push execution log; generating push content through the to-be-pushed data, and determining and executing a push task according to the timed task and the sub-table data; if the push object type is a discussion group type, calling an office software swarm robot interface to push the push content to the push object; and if the push object type is a personal type, calling an office software message issuing interface to push the push content to the push object through the office software self-built application. According to the embodiment of the invention, the message can be flexibly pushed, the development cost of the pushed message is reduced, and the message pushing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a message push method and device, an electronic device, and a storage medium. Background Art

[0002] In the company's CRM (Customer Relationship Management) and ERP (Enterprise Resource Planning) management systems, push messaging is an important function used to send notifications, updates, reminders and other information to users. However, traditional push messaging systems may have some problems:

[0003] 1. High development cost: In many cases, when there are new push requirements or adjustments to push content, R&D personnel are required to modify the code and upgrade the system, which consumes a lot of time and resources and has high development costs.

[0004] 2. Lack of flexibility: Traditional push methods lack personalization and targeting, and cannot push messages flexibly.

[0005] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention

[0006] The main purpose of the embodiments of the present application is to propose a message push method and device, an electronic device and a storage medium, aiming to flexibly push messages, reduce the development cost of push messages, and improve the efficiency of message push.

[0007] Example: The main purpose of the embodiments of the present application is to propose a business data processing method, device, equipment and medium for an application, which can implement synchronous calls on an application developed by a cross-end application framework using an asynchronous application programming interface, facilitate cross-end development of the application, and help improve the operating stability of the application.

[0008] To achieve the above purpose, an embodiment of the present application provides a message push method, which includes the following steps:

[0009] Obtaining main table data and sub-table data, wherein the main table data includes a push time strategy;

[0010] Registering a scheduled task according to the master table data, running the scheduled task, and obtaining the running result, wherein the execution frequency of the scheduled task is determined by the push time strategy;

[0011] Obtaining a historical push execution log, and determining the data to be pushed according to the operation result and the historical push execution log;

[0012] Generate push content through the data to be pushed, determine and execute a push task according to the scheduled task and sub-table data, the push task including a push object type and a push object;

[0013] If the push object type is a discussion group type, call the office software group robot interface to push the push content to the push object;

[0014] If the push object type is a personal type, the office software message sending interface is called to push the push content to the push object through the office software self-built application.

[0015] In some embodiments, the method further comprises:

[0016] Create views by writing SQL based on push requirements.

[0017] In some embodiments, the method further comprises:

[0018] A main table is created, and main table data is added to the main table. The main table data includes associated view data, and the associated view data is used to determine a view associated with the main table data.

[0019] In some embodiments, registering a scheduled task according to the master table data, running the scheduled task, and obtaining the running result includes:

[0020] Determine the view associated with the main table data according to the associated view data;

[0021] If the execution time point of the scheduled task is reached, SQL is run to obtain the data of the view associated with the main table data and obtain the running result.

[0022] In some embodiments, the obtaining of the historical push execution log and determining the data to be pushed according to the operation result and the historical push execution log include:

[0023] Get the running result data;

[0024] The operation result data that has not been pushed is screened out according to the historical push execution log, and the operation result data that has not been pushed is determined as the data to be pushed.

[0025] In some embodiments, the scheduled task includes a main table ID, the sub-table data includes an associated main table ID, and determining and executing a push task according to the scheduled task and the sub-table data includes:

[0026] Querying the data associated with the scheduled task in the sub-table data to obtain a query result, wherein the scheduled task is associated with the sub-table data through the main table ID and the associated main table ID;

[0027] If there is data in the query result, a push task is obtained according to the query result, and the push task is executed.

[0028] In some embodiments, the push task includes a push type and a push template, and the generating of push content by using the data to be pushed includes:

[0029] If the push type is a text type, fill the push template according to the data to be pushed to generate push content;

[0030] If the push type is a file type, determine the declaration address and the declaration file name according to the data to be pushed, obtain the first file through the declaration address, and rename the first file according to the declaration file name to obtain the push content.

[0031] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides a message push device, the device comprising:

[0032] A data acquisition module, used to acquire main table data and sub-table data, wherein the main table data includes a push time strategy;

[0033] A scheduled execution module, used to register a scheduled task according to the master table data, run the scheduled task, and obtain the running result. The execution frequency of the scheduled task is determined by the push time strategy;

[0034] The module to be pushed is used to obtain the historical push execution log and determine the data to be pushed according to the operation result and the historical push execution log;

[0035] A content generation module, used for generating push content through the data to be pushed, determining and executing a push task according to the scheduled task and the sub-table data, wherein the push task includes a push object type and a push object;

[0036] A discussion group push module, for calling the office software group robot interface to push the push content to the push object if the push object type is a discussion group type;

[0037] The personal push module is used to call the office software to send a message interface to push the push content to the push object through the office software's self-built application if the push object type is a personal type.

[0038] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned method when executing the computer program.

[0039] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0040] The embodiments of the present application include at least the following beneficial effects: The present application provides a message push method and device, an electronic device and a storage medium, which obtains main table data and sub-table data; registers scheduled tasks according to the main table data, runs the scheduled tasks, obtains the running results, reduces manual intervention, improves the efficiency and accuracy of message push, and is conducive to flexible management and scheduling of push tasks; obtains historical push execution logs, and determines the data to be pushed according to the running results and historical push execution logs; generates push content through the data to be pushed, determines and executes the push task according to the scheduled tasks and sub-table data, which is conducive to improving the accuracy and timeliness of the push content, reducing the development cost of push messages, and improving user response rate and satisfaction; if the push object type is a discussion group type, calls the office software group robot interface to push the push content to the push object; if the push object type is an individual type, calls the office software message sending interface to push the push content to the push object through the office software self-built application, which is conducive to flexible message push, improves message push efficiency, enhances push coverage, and covers a wider range of user groups and usage scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a flowchart of the message push method provided by an embodiment of the present application;

[0042] Figure 2 yes Figure 1 A flowchart of step S104 of determining and executing a push task step according to a scheduled task and sub-table data;

[0043] Figure 3 yes Figure 1 A flowchart of the step of generating push content by using the data to be pushed in step S104;

[0044] Figure 4 It is a flowchart of the steps for setting a custom push operation of the message push method provided in the application embodiment;

[0045] Figure 5 This is a flow chart of the message push method provided in the embodiment of the present application applied to enterprise WeChat;

[0046] Figure 6 It is a structural diagram of a message push device provided in an embodiment of the present application;

[0047] Figure 7 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0049] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0050] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0052] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.

[0053] 1) Group robots, which are used to automatically send messages, reply to greetings, or perform other tasks in group chats.

[0054] 2) A view is a virtual table whose contents are defined by a query. A view does not exist in the database as stored data values. Instead, it contains an SQL query that retrieves data from one or more tables in the database. When a user queries a view, the database system executes the query and returns the results.

[0055] In the company's CRM (Customer Relationship Management) and ERP (Enterprise Resource Planning) management systems, push messaging is an important function used to send notifications, updates, reminders and other information to users. However, traditional push messaging systems may have some problems:

[0056] 1. High development cost: In many cases, when there are new push requirements or adjustments to push content, R&D personnel are required to modify the code and upgrade the system, which consumes a lot of time and resources and has high development costs.

[0057] 2. Lack of flexibility: Traditional push methods lack personalization and targeting, and cannot push messages flexibly.

[0058] In summary, the technical problems existing in the relevant technologies need to be improved.

[0059] In view of this, a message push method, device, equipment and medium are provided in the embodiments of the present application. The scheme obtains main table data and sub-table data; registers scheduled tasks according to the main table data, runs the scheduled tasks, obtains the running results, reduces manual intervention, improves the efficiency and accuracy of message push, and is conducive to flexible management and scheduling of push tasks; obtains historical push execution logs, and determines the data to be pushed according to the running results and historical push execution logs; generates push content through the data to be pushed, determines and executes the push task according to the scheduled tasks and sub-table data, which is conducive to improving the accuracy and timeliness of the push content, reducing the development cost of push messages, and improving user response rate and satisfaction; if the push object type is a discussion group type, the office software group robot interface is called to push the push content to the push object; if the push object type is an individual type, the office software message sending interface is called to push the push content to the push object through the office software self-built application, which is conducive to flexible message push, improves message push efficiency, enhances push coverage, and covers a wider range of user groups and usage scenarios.

[0060] The message push method provided in the embodiment of the present application relates to the field of Internet technology. The message push method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. The server can also be a node server in the blockchain network; the software can be an application that implements the message push method, etc., but is not limited to the above forms.

[0061] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0062] Figure 1 is an optional flowchart of the message push method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0063] Step S101, obtaining main table data and sub-table data.

[0064] Specifically, the main table data includes push time strategies and associated view data. The main table data is used to create and store scheduled tasks, and the sub-table data is used to create and store push tasks.

[0065] The main table can be understood as the first database table, and the sub-table can be understood as the second database table.

[0066] In some embodiments, views are created by writing SQL based on push requirements.

[0067] Furthermore, a main table is created, and main table data is added to the main table. The main table data includes associated view data, and the associated view data is used to determine a view associated with the main table data.

[0068] Among them, the push time strategy is used to implement the timed monitoring view to see whether there is data that needs to be pushed.

[0069] This application does not make specific restrictions on the push time strategy, which can be flexibly selected in combination with actual push needs. For example, the push time strategy can adopt daily scheduled detection and push, or can adopt detection and push every x minutes / hours / days / months.

[0070] It should be noted that the main table contains a "deleted" field, and the data row with deleted=0 is determined as the main table data. If deleted=1, the data in this row is not used.

[0071] In this embodiment, the main table data and the sub-table data are obtained to prepare for the subsequent running of scheduled tasks and determining and executing push tasks.

[0072] Step S102, registering a scheduled task according to the master table data, running the scheduled task, and obtaining the running result.

[0073] Specifically, the execution frequency of the scheduled task is determined by the push time strategy.

[0074] In some embodiments, if there is no scheduled task corresponding to the master table data, the scheduled task is registered according to the master table data, the scheduled task is run, and the running result is obtained.

[0075] In some embodiments, a scheduled task is registered according to the main table data, and the scheduled task is used to periodically monitor whether there is data that needs to be pushed in the view.

[0076] In some embodiments, the view associated with the main table data is determined according to the associated view data; if the execution time point of the scheduled task is reached, SQL is run to obtain the data of the view associated with the main table data and obtain the running result.

[0077] It is understandable that registering a scheduled task according to the master table data is an operation to initialize the scheduled task. If a scheduled task corresponding to the master table data already exists, there is no need to register the scheduled task, and the scheduled task can be directly run to obtain the running result.

[0078] In this embodiment, a scheduled task is registered according to the main table data, the scheduled task is run, the running results are obtained, and the push task is automatically executed through the scheduled task, which reduces manual intervention, improves the efficiency and accuracy of message push, and is conducive to flexible management and scheduling of push tasks.

[0079] Step S103, obtaining the historical push execution log, and determining the data to be pushed according to the operation result and the historical push execution log.

[0080] In some embodiments, the operation result data is obtained; the operation result data that has not been pushed is filtered out according to the historical push execution log, and the operation result data that has not been pushed is determined as the data to be pushed.

[0081] Among them, the operation result data rows that are in the same view and under the same push task as the historical push execution log but have not been executed are filtered out, which are the data to be pushed this time.

[0082] In this embodiment, historical push execution logs are obtained, and the data to be pushed is determined according to the operation results and the historical push execution logs, so as to prepare for the subsequent generation of push content and improve the push effect.

[0083] Step S104, generating push content through the data to be pushed, and determining and executing the push task according to the scheduled task and the sub-table data.

[0084] Specifically, the push task includes the push object type, push object, push type and push template. The scheduled task includes the main table id. The sub-table data includes the associated main table id. The scheduled task and the sub-table data are associated with the main table id through the main table id and the associated main table id. The push task is used to push the generated push content, and the push data determines the number of executions of the push task.

[0085] In some embodiments, if the push type is a text type, a push template is filled according to the data to be pushed to generate push content;

[0086] In some embodiments, if the push type is a file type, the declared address and the declared file name are determined according to the data to be pushed, the first file is obtained through the declared address, and the first file is renamed according to the declared file name to obtain the pushed content.

[0087] In some embodiments, the data associated with the scheduled task is queried in the sub-table data to obtain the query result.

[0088] Further, if the query result is empty, the program ends and there is no need to execute the push; otherwise, if there is data in the query result, a push task is obtained according to the query result, and the obtained push task is executed. Wherein, creating a push task includes adding sub-table data corresponding to the push task in the sub-table.

[0089] In this embodiment, push content is generated by the data to be pushed, and the push task is determined and executed according to the scheduled task and sub-table data, which is conducive to flexible message push, improves the accuracy and timeliness of push content, reduces the development cost of push messages, and improves user response rate and satisfaction.

[0090] Step S105, if the push object type is a discussion group type, call the office software group robot interface to push the push content to the push object.

[0091] Specifically, if the push object type is a discussion group type, the push object includes a discussion group, a group or a channel.

[0092] In some embodiments, if the push object type is a discussion group type, the office software group robot interface (such as an enterprise WeChat group robot, a Slack robot, etc.) is called to send the push content to the push object.

[0093] The push object may include a push object address. Further, the office software group robot interface is called to send the push content to the push object address.

[0094] In some embodiments, push content is sent to the swarm robot interface using an HTTP request (typically a POST request).

[0095] Furthermore, after the interface is called, a response will be returned, which may be a response confirming that the message has been received, or a response with error information. The caller needs to confirm whether the push is successful based on the response.

[0096] In this embodiment, if the push object type is a discussion group type, calling the office software group robot interface to push the push content to the push object is conducive to flexible message push, improving message push efficiency, enhancing push coverage, and covering a wider range of user groups and usage scenarios.

[0097] Step S106: If the push target type is a personal type, the office software message delivery interface is called to push the push content to the push target through the office software self-built application.

[0098] Specifically, if the push object type is a personal type, the push object includes a target personal user.

[0099] In some embodiments, if the push object type is personal type, the message sending interface of the office software (such as the enterprise WeChat application interface, the Slack application interface, etc.) is called to push the push content to the target individual user through the self-built application.

[0100] The push object may include a push object address. Optionally, the office software message delivery interface is called to send the push content to the push object address.

[0101] Furthermore, after the interface is called, a response will be returned, which may be a response confirming that the message has been received, or a response with error information. The caller needs to confirm whether the push is successful based on the response.

[0102] In this embodiment, if the push object type is personal type, the office software is called to send a message interface to push the push content to the push object through the office software's self-built application, which is conducive to flexible message push, improving message push efficiency, enhancing push coverage, and covering a wider range of user groups and usage scenarios. Steps S101 to S106 shown in the embodiment of the present application are obtained by obtaining main table data and sub-table data; registering scheduled tasks according to the main table data, running the scheduled tasks, obtaining the running results, reducing manual intervention, improving the efficiency and accuracy of message push, and facilitating flexible management and scheduling of push tasks; obtaining historical push execution logs, and determining the data to be pushed according to the running results and historical push execution logs; generating push content through the data to be pushed, and determining and executing the push task according to the scheduled tasks and sub-table data, which is conducive to improving the accuracy and timeliness of the push content, reducing the development cost of push messages, and improving user response rate and satisfaction; if the push object type is a discussion group type, calling the office software group robot interface to push the push content to the push object; if the push object type is an individual type, calling the office software message sending interface to push the push content to the push object through the office software self-built application, which is conducive to flexible message push, improving message push efficiency, enhancing push coverage, and covering a wider range of user groups and usage scenarios.

[0103] See also Figure 2 In some embodiments, step S104 includes determining and executing a push task step according to the scheduled task and the sub-table data. The step of determining and executing a push task according to the scheduled task and the sub-table data may include but is not limited to steps S201 to S205:

[0104] Step S201, querying the data of the associated scheduled task in the sub-table data to obtain the query result.

[0105] Specifically, the scheduled task is associated with the sub-table data through the main table ID and the associated main table ID, and the sub-table data represents the existing push task.

[0106] In step S201 of some embodiments, a database query operation is performed to obtain query results associated with the scheduled task from the sub-table.

[0107] Step S202: if the query result is empty, the program ends.

[0108] In step S202 of some embodiments, if the query result is empty (ie, no data associated with the scheduled task is found in the sub-table data), the program ends without executing the push.

[0109] Step S203: If there is data in the query result, a push task is obtained according to the query result and the push task is executed.

[0110] In step S203 of some embodiments, if there is data in the query result, it means that there is a push task corresponding to the scheduled task, and the corresponding push task is obtained and executed.

[0111] See also Figure 3 Step S104 also includes the step of generating push content through the data to be pushed. The step of generating push content through the data to be pushed may include but is not limited to steps S301 to S304:

[0112] Step S301: If the push type is a text type, fill in the push template according to the data to be pushed to generate push content.

[0113] In step S301 of some embodiments, a push template is filled according to the data to be pushed, and push content is generated according to the filled push template.

[0114] Optionally, use the string replacement function to fill the field values ​​in the data to be pushed into the predefined push template.

[0115] It is understandable that the push template can be defined by the user, and this embodiment supports multiple push templates.

[0116] In some embodiments, the filled template text is used as the pushed content.

[0117] In this embodiment, if the push type is a text type, the push template is filled in according to the data to be pushed, and the push content is generated. Automatic filling and generation of push content is conducive to improving the efficiency of push content generation and reducing errors and inconsistencies caused by manual operations. The push content can be customized, which enhances the personalization and targeting of the content and is conducive to flexible message push.

[0118] Step S302, if the push type is a file type, determine the declared address and the declared file name according to the data to be pushed, obtain the first file through the declared address, and rename the first file according to the declared file name to obtain the pushed content.

[0119] Optionally, the declaration address and the declaration file name may be extracted from the data to be pushed, or the user may be prompted to input the declaration address and the declaration file name through the data to be pushed.

[0120] In step S302 of some embodiments, the file is obtained through file system operation or HTTP request according to the declared address.

[0121] This application does not make specific restrictions on the declared address, and it can be flexibly selected in combination with actual push needs. For example, the declared address can be an FTP address, a cloud storage service address, or a local address. It should be noted that if the declared address is a network address, a download operation is required.

[0122] Furthermore, the first file is renamed according to the declared file name, and the renamed file is used as the pushed content.

[0123] It is understandable that the declaration address and the declaration file name need to correspond one-to-one. When the declaration address is single, the declaration file name also needs to be single; when the declaration address is multiple, the declaration file name also needs to be multiple.

[0124] In this embodiment, if the push type is a file type, the declared address and the declared file name are determined according to the data to be pushed, the first file is obtained through the declared address, and the first file is renamed according to the declared file name to obtain the pushed content. The declared address and file acquisition and renaming are automatically processed, which reduces the need for manual operations, improves the efficiency of generating pushed content, is conducive to maintaining consistency, reduces human errors or omissions, and enhances the flexibility and scalability of the system.

[0125] See also Figure 4 The message push method provided in the embodiment of the present application further includes setting a custom push operation step, and the setting a custom push operation step may include but is not limited to the following steps:

[0126] Step 1: Create a view using SQL.

[0127] In some embodiments, a view is created in the database by custom-writing SQL, and the result of running the view is the data rows & data fields required for this push (ie, the data to be pushed).

[0128] It is understandable that in the real-time running results of the view, each row of data represents one push. Under the same view, the push time strategy is consistent.

[0129] Among them, each view needs to have a "primary key ID", and the "primary key ID" of each row of data is unique and non-repeated.

[0130] It should be noted that in the database of the existing CRM and ERP systems, views are created by writing SQL according to the push requirements. The SQL must comply with the following rules:

[0131] 1) The first column is the "primary key ID" and must be named "id". This is used as the basis for each push, and the data "id" must be unique and non-repeated in the real-time running results of the view at any time.

[0132] 2) By adding restrictions / filtering conditions when writing SQL, the data in the view running results are all the data that need to be pushed, and each row of data is pushed once.

[0133] 3) When creating a push task in the subsequent steps, the push content supports dynamically inserting fields of the view running results. When writing SQL, you need to consider the dynamic fields that need to be displayed in the push and extract the fields in the SQL.

[0134] 4) In the real-time running results of the view, if the "id" of the data is detected to have been pushed, it will not be pushed again after deduplication.

[0135] For example, after the business department completes the signing of the deposit contract, it sends a push notification of successful signing. The push notification message needs to display: order ID, signatory, signed amount, amount received, etc. The SQL can be written as follows:

[0136]

[0137] Furthermore, save the above SQL as a view and name it view_hotel_contract.

[0138] For example, at 11 a.m. every day, check which orders have been served and which ones have not received the balance, and notify the relevant departments to pay attention to risk control in time and recover the money immediately on the same day (if the order remains in the state of not receiving the balance, repeat the reminder every day). You can write SQL as follows:

[0139]

[0140] Among them, based on the principle that [if the "id" of the data is detected to have been pushed, it will be deduplicated and no longer pushed], if you need to repeatedly push orders for which the balance has not been collected "daily", you can use the concat function to merge the "order id" with the "date of the day" into a new string as the primary key id, so as to ensure that the "id" of an order is different every day, and avoid deduplication and the failure to push.

[0141] Step 2, add view view in the "main table".

[0142] In some embodiments, the "main table" is the key table for push, and the main table data is used to obtain the scheduled tasks for view registration push. When the system executes the push, it must first read the main table data from the "main table" and obtain the scheduled tasks before proceeding to the next step to execute the specific push content.

[0143] It is understandable that after creating the view, the following data needs to be added to the "main table":

[0144] Primary key id (id): Incremental in the order of addition and remain unique;

[0145] View view name (viewName);

[0146] Push time strategy (cron): Use cron expressions to periodically monitor whether there is data that needs to be pushed in the view. Cron expressions can be used to implement: daily scheduled detection and push, detection and push every x minutes / hours / days / months, etc.;

[0147] creation time (createTime);

[0148] Remark: used to mark the task target of the view execution;

[0149] Put on the shelf / deleted: "0" means put on the shelf, "1" means take off the shelf, which is used to control whether the current view needs to be executed.

[0150] It is understandable that the view used for push needs to be added to the main table in order to be used to create a push task.

[0151] It should be noted that when adding a view to the main table, you need to set the task push time strategy at the same time. The push time strategy supports formats such as every x minutes / hours or fixed time points, which are used to detect whether there is new data to be pushed in the view.

[0152] For example, a scheduled task is used every 5 minutes to detect whether there is a newly signed deposit contract. If there is, it is pushed. An example of the main table data is as follows:

[0153] id=1

[0154] viewName="view_hotel_contract"

[0155] Cron = '*0 / 5***?'

[0156] createTime='2024-06-03 16:22:16'

[0157] remark = 'New contract push'

[0158] deleted=0

[0159] Furthermore, the above main table data is added in the "main table".

[0160] Step 3: Create a push task in the "sub-table".

[0161] After adding a view to the "main table", you need to create a specific push task in the "sub-table" to finally implement the push. Creating a push task includes the following:

[0162] 1. Primary key id (id): Increment in the order of addition and keep it unique;

[0163] 2. Associated main table id (pushId): the id of the view used by this push task corresponding to the "main table";

[0164] 3. Push type (msgType): text or file;

[0165] 4. Push template (msgTemplate):

[0166] 1) Push type = "text": enter plain text or a combination of text content and dynamic view fields. The view field can be inserted into the text in the form of {{field name}}. The system will automatically obtain the view running result field content and fill it in before pushing it;

[0167] 2) Push type = "file": enter the declared file address and send name;

[0168] 5. Push target type (msgTargetType): enterprise WeChat group or individual;

[0169] 6. Push object (msgTargetFixed):

[0170] 1) Push target type = "Enterprise WeChat Group": Enter the webhook address of the group robot created by the enterprise WeChat group;

[0171] 2) Push recipient type = "Individual": Enter the recipient's corporate WeChat ID (personal corporate WeChat ID);

[0172] 7. Add / delete: “0” means add, “1” means delete, which is used to control whether the push task is executed.

[0173] It is understandable that a push task is created in the sub-table, the push task is associated with the main table ID, and information such as the push type (text / file), push message template, push object type, and push object address need to be entered.

[0174] Among them, the push message template supports filling dynamic fields, which are limited to the fields in the view view.

[0175] For example, after the business department completes the signing of the deposit contract, it sends a push notification of successful signing. The push message needs to display: order ID, signatory, signed amount, amount received, etc., and is pushed to the sales group for reporting. The following sub-table data can be added to the sub-table:

[0176] id=1

[0177] pushld=1

[0178] msgType = 'text'

[0179] msgTemplate=

[0180] 'Order ID: {{orderid}}

[0181] Signed by: {{sales}}

[0182] Contract amount: {{contractAmount}}

[0183] Amount received: {{income}}'

[0184] msgTargetType = Enterprise WeChat group

[0185] msgTargetFixed='https: / / qyapi.weixin.qq.com / cgi-bin / webhook / send? key=142365c5-98d4-4fb2-a20f-a8d2341a752d'

[0186] deleted=0

[0187] It can be understood that the setting of one push task is completed through the above sub-table data.

[0188] Figure 5 This is an optional flow chart of the message push method provided in the embodiment of the present application applied to enterprise WeChat. Figure 5 The method may include but is not limited to the following steps.

[0189] Step 1: Get the main table data.

[0190] Specifically, the main table data includes the primary key ID (pushld), view view and push time strategy.

[0191] Step 2: Register a scheduled task.

[0192] Among them, each ID of the "main table" is a scheduled task, and the scheduled task is executed according to the time strategy of the current view.

[0193] Step 3: The scheduled task is triggered and executed according to the time strategy.

[0194] Among them, the time strategy refers to the push time strategy.

[0195] Step 4: traverse the real-time running result data rows of the view of the current scheduled task.

[0196] Among them, run the scheduled task and obtain the running result of the view view of the scheduled task.

[0197] Step 5: Compare the executed push history record table based on the view data "primary key ID" and "pushld" to determine whether the data row has been pushed.

[0198] Compare the executed push history table with the view data "primary key ID" and the main table data "pushld" to determine whether the data row has been pushed. Among them, filter out the run result data rows that are in the same view and the same push task as the historical push execution log but have not been executed, which are the data to be pushed this time.

[0199] Step 6: If there is a historical push record, the current data row will not be pushed.

[0200] Step 7: If there is no historical push record, obtain all the data to be pushed for the current scheduled task.

[0201] Step 8, obtain the push task associated with the current scheduled task pushld in the "sub-table".

[0202] Among them, the sub-table data is associated with the scheduled task pushld (ie, the main table id) through the associated main table id.

[0203] It is understandable that the same "main table" (ie the same view) supports push tasks associated with multiple "sub-tables".

[0204] Step 9: Determine whether the push type of the push task is "text" or "file".

[0205] Step 10: If the push type of the push task is "text", obtain the message template of the push task, fill in the dynamic content, and generate the push content.

[0206] Step 11: If the push type of the push task is "file", obtain the declared file address, sending name and other information.

[0207] Step 12, determine whether the push target type of the push task is "corporate WeChat group" or "individual".

[0208] Step 13: If the push object type of the push task is "Enterprise WeChat Group", the "Push Object Address" is the Enterprise WeChat Group Robot Webhook, and the Enterprise WeChat API is called. Through the webhook address, the group robot sends the push to the group.

[0209] Step 14: If the push object type of the push task is an individual, the "Push Object Address" is the individual's corporate WeChat ID. The corporate WeChat API is called to send a push message to the individual through the corporate WeChat ID and the corporate WeChat self-built application.

[0210] See also Figure 6 The embodiment of the present application also provides a message push device, which can implement the above message push method, and the device includes:

[0211] Data acquisition module 601, used to acquire main table data and sub-table data, the main table data includes push time strategy;

[0212] The scheduled execution module 602 is used to register the scheduled task according to the master table data, run the scheduled task, and obtain the running result. The execution frequency of the scheduled task is determined by the push time strategy;

[0213] The module to be pushed 603 is used to obtain the historical push execution log and determine the data to be pushed according to the operation result and the historical push execution log;

[0214] Content generation module 604, used to generate push content through the data to be pushed, determine and execute the push task according to the scheduled task and the sub-table data, and the push task includes the push object type and the push object;

[0215] The discussion group push module 605 is used to call the office software group robot interface to push the push content to the push object if the push object type is a discussion group type;

[0216] The personal push module 606 is used to call the office software message delivery interface to push the push content to the push object through the office software self-built application if the push object type is a personal type.

[0217] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0218] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above message push method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.

[0219] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0220] See also Figure 7 , Figure 7 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0221] The processor 701 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0222] The memory 702 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 702 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 702, and the processor 701 calls and executes the message push method of the embodiment of this application;

[0223] Input / output interface 703, used to implement information input and output;

[0224] Communication interface 704, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0225] A bus 705 that transmits information between the various components of the device (e.g., the processor 701, the memory 702, the input / output interface 703, and the communication interface 704);

[0226] The processor 701 , the memory 702 , the input / output interface 703 and the communication interface 704 are connected to each other in communication within the device via a bus 705 .

[0227] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned message pushing method is implemented.

[0228] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0229] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0230] The message push method, message push device, electronic device and storage medium provided in the embodiments of the present application obtain main table data and sub-table data; register scheduled tasks according to the main table data, run the scheduled tasks, obtain the running results, reduce manual intervention, improve the efficiency and accuracy of message push, and facilitate flexible management and scheduling of push tasks; obtain historical push execution logs, and determine the data to be pushed according to the running results and historical push execution logs; generate push content through the data to be pushed, determine and execute the push task according to the scheduled tasks and sub-table data, which is conducive to improving the accuracy and timeliness of the push content, reducing the development cost of push messages, and improving user response rate and satisfaction; if the push object type is a discussion group type, call the office software group robot interface to push the push content to the push object; if the push object type is an individual type, call the office software message sending interface to push the push content to the push object through the office software self-built application, which is conducive to flexible message push, improve message push efficiency, enhance push coverage, and cover a wider range of user groups and usage scenarios.

[0231] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0232] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0233] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, 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 achieve the purpose of the solution of this embodiment.

[0234] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0235] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0236] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0237] 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 the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0238] The units described above as separate components may or may not be physically separated, and the components shown as units 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

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

[0240] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0241] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A message push method, characterized in that: The method comprises the following steps: Obtaining main table data and sub-table data, wherein the main table data includes a push time strategy; Registering a scheduled task according to the master table data, running the scheduled task, and obtaining the running result, wherein the execution frequency of the scheduled task is determined by the push time strategy; Obtaining a historical push execution log, and determining the data to be pushed according to the operation result and the historical push execution log; Generate push content through the data to be pushed, determine and execute a push task according to the scheduled task and sub-table data, the push task including a push object type and a push object; If the push object type is a discussion group type, call the office software group robot interface to push the push content to the push object; If the push object type is a personal type, the office software message sending interface is called to push the push content to the push object through the office software self-built application.

2. The method according to claim 1, characterized in that The method further comprises: Create views by writing SQL based on push requirements.

3. The method according to claim 2, characterized in that The method further comprises: A main table is created, and main table data is added to the main table. The main table data includes associated view data, and the associated view data is used to determine a view associated with the main table data.

4. The method according to claim 3, characterized in that The registering of the scheduled task according to the master table data, running the scheduled task, and obtaining the running result includes: Determine the view associated with the main table data according to the associated view data; If the execution time point of the scheduled task is reached, SQL is run to obtain the data of the view associated with the main table data and obtain the running result.

5. The method according to claim 3, characterized in that: The obtaining of the historical push execution log and determining the data to be pushed according to the operation result and the historical push execution log include: Get the running result data; The operation result data that has not been pushed is screened out according to the historical push execution log, and the operation result data that has not been pushed is determined as the data to be pushed.

6. The method according to claim 1, characterized in that The scheduled task includes a main table ID, the sub-table data includes an associated main table ID, and the step of determining and executing a push task according to the scheduled task and the sub-table data includes: Querying the data associated with the scheduled task in the sub-table data to obtain a query result, wherein the scheduled task is associated with the sub-table data through the main table ID and the associated main table ID; If there is data in the query result, a push task is obtained according to the query result, and the push task is executed.

7. The method according to any one of claims 1 to 6, characterized in that: The push task includes a push type and a push template, and the generating of push content by using the data to be pushed includes: If the push type is a text type, fill the push template according to the data to be pushed to generate push content; If the push type is a file type, determine the declaration address and the declaration file name according to the data to be pushed, obtain the first file through the declaration address, and rename the first file according to the declaration file name to obtain the push content.

8. A message push device, characterized in that: The device comprises: A data acquisition module, used to acquire main table data and sub-table data, wherein the main table data includes a push time strategy; A scheduled execution module, used to register a scheduled task according to the master table data, run the scheduled task, and obtain the running result. The execution frequency of the scheduled task is determined by the push time strategy; The module to be pushed is used to obtain the historical push execution log and determine the data to be pushed according to the operation result and the historical push execution log; A content generation module, used for generating push content through the data to be pushed, determining and executing a push task according to the scheduled task and the sub-table data, wherein the push task includes a push object type and a push object; A discussion group push module, for calling the office software group robot interface to push the push content to the push object if the push object type is a discussion group type; The personal push module is used to call the office software to send a message interface to push the push content to the push object through the office software's self-built application if the push object type is a personal type.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.