Message notification method, computing device and computer readable storage medium
By detecting the effective status of the message notification task and obtaining notification configuration information, matching language and time zones, generating and sending appropriate messages, the problem of language and time zone differences in global business is solved, and differentiated message notifications in multiple languages and multiple regions are realized , simplifies notification management and improves efficiency.
Patent Information
- Application Number
- CN202411384812.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2024-12-06
AI Technical Summary
In a global business environment, when message publishers need to notify users in different countries and regions of the same business message, they face problems of language and time zone differences, resulting in complexity and inefficiency in notification management.
By detecting the valid status of the message notification task, obtaining notification configuration information, including the recipient's location code and language code, matching the corresponding message template, and determining the sending time according to the time zone configuration table, generating and sending appropriate messages to be sent, supporting multiple messages Differentiated notifications in language and multiple regions.
It realizes differentiated message notifications in multiple languages and multiple regions, simplifies global notification management, and improves the efficiency and accuracy of message notifications.
Smart Images

Figure CN119094490A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a message notification method, a computing device and a computer-readable storage medium. Background Art
[0002] With the development of global business of enterprises, message publishers may need to notify users in different countries and regions of the same business message at a specific time. However, users in different countries and regions have different applicable language types and language habits. Therefore, when sending the same business message to users in different regions, it is necessary to manually create different message notification tasks, convert the business message to be sent into different language types and language formats, and send them to users in different countries respectively, which leads to problems such as high complexity of notification management. Summary of the invention
[0003] The purpose of this application is to provide a message notification method, a computing device and a computer-readable storage medium, which can realize differentiated message notifications in multiple languages and regions through a message notification task, thereby simplifying the complexity of global notification management.
[0004] To achieve the above objectives:
[0005] In a first aspect, an embodiment of the present application provides a message notification method, including:
[0006] In response to detecting that the message notification task is in a valid state, acquiring basic message data and message content according to notification configuration information in the message notification task; the basic message data includes at least one recipient and a position code and / or language code corresponding to each of the recipients;
[0007] Determining message templates that match each of the receivers according to the correspondence between different position codes or language codes and message templates of different language types;
[0008] Based on the basic message data, the message content and the message template, generating a to-be-sent message corresponding to each of the recipients;
[0009] Send the message to be sent to the corresponding receiver.
[0010] In one embodiment, the basic message data further includes a time zone code and a scheduled sending time corresponding to each of the recipients; and sending the message to be sent to the corresponding recipient includes:
[0011] According to the position code or time zone code corresponding to the target receiver, query the time zone configuration table to obtain the target time zone; the time zone configuration table includes the correspondence between different position codes or time zone codes and time zones;
[0012] Determining a sending execution time of the message to be sent according to the target time zone and the scheduled sending time;
[0013] When the time difference between the sending execution time of the message to be sent and the current time is less than a preset time threshold, the corresponding message to be sent is sent to the target recipient.
[0014] In one implementation, determining the sending execution time of the message to be sent according to the target time zone and the scheduled sending time includes:
[0015] Construct a cron expression according to the scheduled sending time;
[0016] Acquire the local time of the target time zone in real time according to the target time zone;
[0017] Based on the cron expression and the local time of the target time zone, a sending execution time of the message to be sent is determined.
[0018] In one embodiment, the message notification method further includes:
[0019] Based on the template name selected by the message publisher, matching the template content corresponding to the template name, the template content including template variables;
[0020] Based on the data acquisition method of the template variable set by the message publisher, template variable information is acquired to generate the message content; the data acquisition method includes at least one of database query, interface query, and static data assignment.
[0021] In one embodiment, the basic message data also includes: the message notification type corresponding to each of the recipients, and the contact information corresponding to the message notification type; wherein the message notification type includes at least one of email notification, SMS notification, office automation system notification, and application system site message notification.
[0022] In one implementation, sending the message to be sent to the corresponding recipient includes:
[0023] A sending request calling interface is configured for the message notification type, wherein the sending request calling interface includes a sending mode corresponding to each message notification type;
[0024] The message to be sent is sent to the corresponding recipient based on the sending mode corresponding to the message notification type through the sending request calling interface.
[0025] In one embodiment, the message notification method further includes:
[0026] Detecting the configuration state of the message notification task based on a preset timing polling rule, the configuration state including: draft state, start state, pause state and cancel state;
[0027] When it is detected that the configuration state is the startup state, it is determined that the message notification task is in the valid state.
[0028] In one embodiment, the message notification method further includes:
[0029] After sending the message to be sent to the target recipient, determining whether the message to be sent needs to be sent again;
[0030] If it does not need to be sent again, the basic data of the message is marked as sent.
[0031] In a second aspect, an embodiment of the present application provides a computing device, comprising: a processor and a memory storing a computer program, wherein when the processor runs the computer program, the message notification method as described above is implemented.
[0032] In a third aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the message notification method as described above.
[0033] The message notification method, computing device and computer-readable storage medium provided by the embodiment of the present application include: in response to detecting that the message notification task is in an effective state, obtaining the basic data of the message and the message content according to the notification configuration information in the message notification task; the basic data of the message includes at least one recipient and the position code and / or language code corresponding to each recipient; according to the correspondence between different position codes or language codes and message templates of different language types, determining the message templates that match each recipient respectively; based on the basic data of the message, the message content and the message template, generating the to-be-sent message corresponding to each recipient respectively; sending the to-be-sent message to the corresponding recipient. In this way, differentiated message notifications in multiple languages and regions can be realized through one message notification task, simplifying the complexity of global notification management and improving the efficiency of message notifications. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A flowchart of a message notification method provided by an embodiment of the present invention.
[0035] Figure 2 A schematic diagram of the structure of a message notification management system provided by an embodiment of the present invention.
[0036] Figure 3 A schematic diagram of the structure of a computing device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0037] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0038] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0039] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, 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 word "if" as used herein can be interpreted as "at the time of..." or "when..." or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising", "including" indicate that there are described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Thus, “A, B, or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A, B, and C.” An exception to this definition will occur only when a combination of elements, functions, steps, or operations are inherently mutually exclusive in some manner.
[0040] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0041] It should be noted that, in this article, step codes such as S101, S102, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S102 first and then S101, etc., but these should all be within the scope of protection of this application.
[0042] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0043] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0044] The following is an explanation of the terms that may be involved in this application, as follows:
[0045] Scheduled tasks: are tasks that have a pre-set execution time and frequency in an operating system or application. These tasks can be one-time or periodic and are used to automate the execution of specific programs or scripts.
[0046] Cron expression: a string used to configure the execution time of a scheduled task. A cron expression consists of a series of fields, each of which represents a time unit and is used to define the specific time for task execution.
[0047] See also Figure 1 , is a message notification method provided in an embodiment of the present application. The method can be executed by a message notification management system provided in an embodiment of the present application. The message notification management system can be implemented in software and / or hardware. In this embodiment, the execution subject of the method is a computing device such as a computer or a server. The message notification method provided in this embodiment includes:
[0048] Step S101: in response to detecting that the message notification task is in a valid state, obtaining basic message data and message content according to notification configuration information in the message notification task; the basic message data includes at least one recipient and a position code and / or language code corresponding to each recipient.
[0049] In one application scenario, when the message publisher needs to notify users in different countries or regions of the same business message, it is necessary to first configure the message notification task in the message notification management system according to the content of the business message. After the message notification task is configured, the message notification management system will detect the configuration status of the message notification task based on the preset timing polling rules, where the configuration status includes: draft status, start status, pause status and cancel status. When the configuration status is detected to be the start status, the message notification task is determined to be in the valid state.
[0050] Specifically, after the message notification task is created, the notification configuration of the message notification task defaults to the draft state. In response to the start operation of the message publisher, the notification configuration enters the start state from the draft state, indicating that the message notification task can be parsed and the sending action can be executed; during this period, if the message publisher performs a pause operation, the execution process of the message notification task will be paused, and if the message publisher performs a cancel operation, the message notification task will be canceled. In a specific embodiment, the inspection task can be periodically executed by using a timed task scheduler (such as Quartz), and the notification configuration of all message notification tasks in the message notification management system can be polled regularly, for example, every 10 minutes. When it is detected that the notification configuration of the message notification task is in the start state, the message notification task corresponding to the notification configuration is judged to be in a valid state.
[0051] In one embodiment, when configuring a message notification task, the message notification management system will match the template content corresponding to the template name based on the template name selected by the message publisher, and the template content includes template variables; based on the data acquisition method of the template variables set by the message publisher, the template variable information is obtained to generate the message content; wherein the data acquisition method includes at least one of database query, interface query, and static data assignment.
[0052] Specifically, in order to meet the daily interaction needs of users, the message notification management system has message templates of different functional types according to different usage scenarios, such as meeting notifications, welcome notifications, emergency notifications, process reminder notifications, etc. The message publisher can select the template name of the corresponding function according to the purpose of the message notification. After the template name is selected, the message notification management system will match the template content corresponding to the template name for the message publisher. Among them, the template content includes static text content and dynamic template variables. Users can set the data acquisition method of the template variable according to their needs to obtain the template variable information. By matching the template variable information with the template variable, the message content to be sent is formed. For example, when the message publisher needs to notify different employees to attend an online meeting, they can select a template name related to the meeting notification, such as an online meeting notification. The corresponding template content can include: Dear {name}, we sincerely invite you to attend the upcoming online meeting. Meeting topic: {subject}; Meeting time: {time}; Join meeting link: [Click here to join the meeting]({meeting_link}). In this message template, {name}, {subject}, {time}, and {meeting_link} are template variables. Users can set the data corresponding to these template variables or the corresponding data acquisition method to complete the template content and form a complete message content. For example, when all participants of a project are required to attend this online meeting, for the variable {name}, the data records in the corresponding project personnel list in the database can be accessed. For example, by accessing the field value corresponding to "name" in the list, the names of all project personnel can be mapped to the variable {name}. For the variables {subject}, {time}, and {meeting_link}, these fixed variable data can be manually input through static data assignment.
[0053] In one embodiment, the basic message data also includes: the message notification type corresponding to each recipient, and the contact information corresponding to the message notification type; wherein the message notification type includes at least one of email notification, SMS notification, office automation system notification, and application system in-site message notification.
[0054] Specifically, the in-site message notifications of the application system include but are not limited to notifications through various office social software such as Feishu, Enterprise WeChat, DingTalk, etc. The contact information corresponding to the message notification type can be an email address required for email notification, a mobile phone number required for SMS notification, etc. The message notification type corresponding to the recipient can be one or more specified by the message publisher. The corresponding contact information can be obtained directly from the corresponding database, or the data returned can be queried from the preset query interface, or directly by importing an Excel spreadsheet and parsing the data in the spreadsheet to obtain the contact information corresponding to the message notification type.
[0055] In a specific embodiment, the message publisher can also specify different notification types for different recipients. For example, the query interface is configured through the function management module to query user information including the mail code and Feishu ID, and the notification type attribute is set through the groovy or js script. When the recipient's corresponding country is the United States, the notification type is set to mail, and when the recipient's corresponding country is China, the notification type is set to Feishu. When configuring the message notification task, the notification type is specified as the notification type variable returned by the function management module. When assembling the message, according to the query results, according to the data difference, the notification is sent to user A in the form of mail, and the notification is sent to user B in the form of Feishu.
[0056] Step S102: Determine the message templates that match each receiver according to the correspondence between different position codes or language codes and message templates of different language types.
[0057] Specifically, when the basic message data obtained according to the notification configuration information only includes the location code corresponding to the recipient, the location code may be a country or region code, the default language of the region is obtained according to the location code, and the corresponding message template is obtained according to the default language. When the basic message data also includes the language code corresponding to the recipient, the language corresponding to the language code and the default language corresponding to the location code may be the same or different. For example, when the country code of the recipient corresponds to China, but the language code corresponds to English, the corresponding message template is matched to the recipient according to the language corresponding to the language code, that is, the English template is matched to the recipient first.
[0058] Step S103: Generate a to-be-sent message corresponding to each recipient based on the basic message data, message content and message template.
[0059] In a specific embodiment, as described in the above embodiment, when the message template matched for the recipient according to the language code is an English template, still taking the online meeting notification as an example, the English template may be: Dear {name}, You are cordially invited to attend the upcoming online meeting. Meeting Subject: {subject}; Date and Time: {date} at {time} ({time_zone}); Join Meeting Link: <a href="{meeting_link}">{meeting_link}.According to the data acquisition method of the template variables in the Chinese template, the corresponding variable data is obtained, and the variable data is filled into the English template to generate the message content in the message to be sent.
[0060] Step S104: Send the message to be sent to the corresponding recipient.
[0061] In one embodiment, the message notification type is configured with a corresponding sending request calling interface, and the sending request calling interface includes a sending method corresponding to each message notification type; through the sending request calling interface, based on the sending method corresponding to the message notification type, the message to be sent is sent to the corresponding recipient. Specifically, when the message notification task is an instant message notification, after the message to be sent is generated, the parameters required for the message notification type can be extracted according to the sending method corresponding to the message notification type, and the message to be sent can be immediately sent to the corresponding recipient.
[0062] In one embodiment, the basic message data also includes the time zone code and scheduled sending time corresponding to each recipient. Sending the message to be sent to the corresponding recipient also includes: querying the time zone configuration table to obtain the target time zone according to the position code or time zone code corresponding to the target recipient; the time zone configuration table includes the correspondence between different position codes or time zone codes and time zones; determining the sending execution time of the message to be sent according to the target time zone and the scheduled sending time; when the time difference between the sending execution time of the message to be sent and the current time is less than a preset time threshold, sending the corresponding message to be sent to the target recipient.
[0063] Specifically, when the basic message data obtained according to the notification configuration information only includes the location code corresponding to the recipient, such as the country or region code, the default time zone corresponding to the region in the time zone configuration table is queried according to the country or region code, and the sending execution time of the message to be sent is determined according to the default time zone and the scheduled sending time. When the basic message data also includes the time zone code corresponding to the recipient, the time zone corresponding to the time zone code and the default time zone corresponding to the location code may be the same or different. For example, if the region code of the recipient is US, the corresponding country is the United States, the default time zone code is New_York, and the time zone code corresponding to the recipient queried in the basic message data is Shanghai, then the sending execution time of the message to be sent is calculated based on the time zone code, that is, the time zone corresponding to Shanghai.
[0064] In one embodiment, the sending execution time of the message to be sent is determined according to the target time zone and the scheduled sending time, including: constructing a cron expression according to the scheduled sending time; obtaining the local time of the target time zone in real time according to the target time zone; and determining the sending execution time of the message to be sent based on the cron expression and the local time of the target time zone.
[0065] Specifically, a cron expression consists of a series of fields, each of which represents a time unit and is used to define the specific time for task execution. For example, if you need to execute a scheduled task at 3 p.m. on Monday, you can set the cron expression to "0 015**MOM". If the target time zone is the default time zone corresponding to the United States, you also need to obtain the time zone code "America / New_York" to obtain the local time in the United States. When the local time in the United States is 3 p.m. on Monday, the scheduled message notification task is triggered to send the message to be sent.
[0066] In a specific embodiment, when the message notification task is polled every 10 minutes, the local time in the time zone where the receiver is located is obtained through the time zone code corresponding to the receiver. When it is detected that the local time in the time zone where the receiver is located is less than 10 minutes different from the scheduled sending time set by the cron expression, the message to be sent is sent to the receiver in this time zone.
[0067] In one implementation, after the message to be sent is sent to the target recipient, it is determined whether the message to be sent needs to be sent again; if it does not need to be sent again, the basic data of the message is marked as sent.
[0068] Specifically, when the message notification task needs to send messages to be sent to multiple recipients respectively, the message basic data contains message data records corresponding to multiple messages to be sent. After each message to be sent is sent and does not need to be sent again, the basic data corresponding to the sent message to be sent needs to be marked as sent, or the corresponding message basic data needs to be cleared directly to avoid the message basic data being regenerated into a message to be sent and sent repeatedly.
[0069] In one embodiment, after the message is sent, the business primary key of the basic data of the message can also be passed to the business system through the business receipt interface so that the business system can perform subsequent logical processing. Specifically, in some application scenarios, the business system integrated with the message notification management system needs to perform the next step of processing based on the result of the message notification task execution, such as whether it is necessary to send a collection overdue notice to the salesperson. Therefore, the message notification management system is configured with a business receipt interface, and the business primary key of the basic data of the message is passed through the callback function in the receipt interface. The business primary key is given by the query interface provided by the business system, for example, it can uniquely identify whether the salesperson has sent a notification to a specific customer and product model. The business system connected to the business primary key can splice the customer ID number, product model, and contract number according to certain rules as a unique identification number, so that the business receipt interface can parse the message sending record according to the specified rules and associate the message sending status with the corresponding business event.
[0070] In summary, the message notification method provided in the above embodiment can determine the message template that matches each recipient according to the correspondence between different position codes or language codes in the message basic data and message templates of different language types, and generate the to-be-sent messages corresponding to each recipient based on the message basic data, message content and message template. By converting the message content in the message notification task into to-be-sent messages of different language types and language formats and sending them to different recipients, differentiated message notifications in multiple languages and regions can be achieved. The target time zone is obtained through the position code or time zone code corresponding to each recipient in the message basic data, and the sending execution time of the to-be-sent message is determined according to the target time zone and the scheduled sending time, so that the to-be-sent message can be delivered on time according to the local time in the time zone where the recipient is located, thereby realizing the cross-time zone message notification function, simplifying the complexity of global notification management, and improving work efficiency.
[0071] Based on the same inventive concept as the above embodiments, the above embodiments are described in detail below through a specific application scenario.
[0072] For example, suppose you need to send a lock notification to different customers around the world at 10 o'clock. The notification methods include SMS and email. The notification content needs to be customized according to the local laws and regulations and local languages of each country. In the implementation process, the basic message data required for the notification can be obtained through the query interface provided by the message notification management system. The basic message data can specifically include the customer's contact information corresponding to the SMS, the contact information corresponding to the email, the name, and the data required for each message template. The obtained basic message data is processed through the groovy conversion script. Configure message templates that meet local specifications according to different countries and local languages, and match the template variable information in the basic message data with the template variables in the message template to generate the message content in the message to be sent. When configuring the message notification task, you can specify the sending method of the message notification type as SMS notification and email notification, set it as scheduled notification, set the corn expression to [0 0 10**? ] according to the scheduled sending time, set the target time zone to the local time zone of the recipient's location, and set the name, country, mobile phone number, international area code, and email address in the recipient's information to the specified variables in the basic message data. After the message notification configuration is completed, start the message notification task. When the message notification management system receives a message notification task at regular polling, it obtains the basic message data according to the notification configuration information, generates multiple messages to be sent according to the configuration, and sends SMS and email notifications to the recipients at 10 o'clock local time in the recipient's time zone. If you set the requirement to write back the notification result to the associated business system when configuring the message notification task, you also need to call the corresponding write-back interface after sending the message to be sent to associate the notification result with the corresponding business event. After the message to be sent is sent, you can also monitor the content of the sent notification through the message sending log.
[0073] See also Figure 2 Based on the same inventive concept as the aforementioned embodiments, an embodiment of the present application provides a message notification management system, which specifically includes a message notification module 210, a time zone configuration module 220, a data configuration module 230, a template configuration module 240, a notification configuration module 250, a message to be sent module 260, and a scheduled task module 270.
[0074] The notification type configuration module 210 is used to integrate different types of message sending methods, including email notification, SMS notification, office automation system notification, and application system in-site message notification. Specifically, the notification type can be selected through the notification type configuration module, and after the parameters required for the message to be sent are packaged, the message to be sent can be immediately sent to the corresponding recipient according to the sending method corresponding to the message notification type.
[0075] The time zone configuration module 220 is used to maintain the location code, including the correspondence between the country or region code and the default time zone, and match the target time zone according to the time zone code.
[0076] The data configuration module 230 is used to configure data interface parameters and data acquisition methods, including configuration of template variable information acquisition methods, contact information acquisition methods, etc., and convert the data format of the data queried through the data interface through a conversion script.
[0077] The template configuration module 240 is used to manage the names and classification types of message templates in the system according to the purpose and language type, and configure the template code and template parameters for the message template.
[0078] Notification configuration module 250 is used to set the corn expression according to the scheduled sending time; pull the basic message data according to the data configuration code; match the message template according to the template configuration code; map and match the template variable information in the basic message data with the template variables in the message template; configure the message notification type to specify the sending method of the message to be sent; configure the contact method corresponding to the notification type.
[0079] The message module 260 to be sent stores the generated messages to be sent; records the content to be sent, the sending method, the sending time, the sending time zone, and the contact information; and supports the functions of canceling sending, modifying sending information, and pausing sending.
[0080] The scheduled task management module 270 manages the scheduled message notification task; regularly polls the status of the message notification task; and executes the message notification task when the message notification task is in a valid state.
[0081] Based on the same inventive concept as the above embodiments, an embodiment of the present invention provides a computing device, such as Figure 3 As shown, the device includes: a processor 310 and a memory 311 storing a computer program; wherein, Figure 3 The processor 310 shown in the figure is not used to indicate that the number of the processor 310 is one, but is only used to indicate the positional relationship of the processor 310 relative to other devices. In actual applications, the number of the processor 310 may be one or more; similarly, Figure 3 The memory 311 shown in the figure has the same meaning, that is, it is only used to refer to the position relationship of the memory 311 relative to other devices. In practical applications, the number of memories 311 can be one or more. When the processor 310 runs the computer program, the message notification method applied to the above computing device is implemented.
[0082] The device may also include: at least one network interface 312. The various components in the device are coupled together via a bus system 313. It is understood that the bus system 313 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 313 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 3 Various buses are labeled as bus system 313.
[0083] The memory 311 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. The nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory may be a disk memory or a tape memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 311 described in the embodiments of the present invention is intended to include but is not limited to these and any other suitable types of memories.
[0084] The memory 311 in the embodiment of the present invention is used to store various types of data to support the operation of the device. Examples of these data include: any computer program used to operate on the device, such as an operating system and an application; contact data; phone book data; messages; pictures; videos, etc. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application program may include various applications, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. Here, the program that implements the message notification method of the embodiment of the present invention may be included in the application program.
[0085] Based on the same inventive concept as the above-mentioned embodiment, this embodiment further provides a computer-readable storage medium, in which a computer program is stored. The computer-readable storage medium may be a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); it may also be various devices including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc. When the computer program stored in the computer-readable storage medium is executed by the processor, the above-mentioned message notification method is implemented. For the specific steps implemented when the computer program is executed by the processor, please refer to Figure 1 The description of the illustrated embodiment will not be repeated here.
[0086] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0087] In this document, the terms "comprises," "comprising," or any other variations thereof, are intended to cover a non-exclusive inclusion of elements other than those listed and may also include additional elements not expressly listed.
[0088] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A message notification method, It is characterized in that include: In response to detecting that the message notification task is in a valid state, acquiring message basic data and message content according to notification configuration information in the message notification task; The basic message data includes at least one recipient and a position code and / or a language code corresponding to each of the recipients; Determining message templates that match each of the receivers according to the correspondence between different position codes or language codes and message templates of different language types; Based on the basic message data, the message content and the message template, generating a to-be-sent message corresponding to each of the recipients; Send the message to be sent to the corresponding receiver.
2. The message notification method according to claim 1, It is characterized in that The basic message data also includes the time zone code and the scheduled sending time corresponding to each of the recipients; sending the message to be sent to the corresponding recipient includes: According to the position code or time zone code corresponding to the target receiver, query the time zone configuration table to obtain the target time zone; the time zone configuration table includes the correspondence between different position codes or time zone codes and time zones; Determining a sending execution time of the message to be sent according to the target time zone and the scheduled sending time; When the time difference between the sending execution time of the message to be sent and the current time is less than a preset time threshold, the corresponding message to be sent is sent to the target recipient.
3. The message notification method according to claim 2, It is characterized in that The step of determining the sending execution time of the message to be sent according to the target time zone and the scheduled sending time includes: Construct a cron expression according to the scheduled sending time; Acquire the local time of the target time zone in real time according to the target time zone; Based on the cron expression and the local time of the target time zone, a sending execution time of the message to be sent is determined.
4. The message notification method according to claim 1, It is characterized in that The method further comprises: Based on the template name selected by the message publisher, matching the template content corresponding to the template name, the template content including template variables; Based on the data acquisition method of the template variable set by the message publisher, template variable information is acquired to generate the message content; the data acquisition method includes at least one of database query, interface query, and static data assignment.
5. The message notification method according to claim 1, It is characterized in that The basic message data also includes: the message notification type corresponding to each of the recipients, and the contact information corresponding to the message notification type; wherein the message notification type includes at least one of email notification, SMS notification, office automation system notification, and application system in-site message notification.
6. The message notification method according to claim 5, It is characterized in that The sending of the message to be sent to the corresponding receiver includes: A sending request calling interface is configured for the message notification type, wherein the sending request calling interface includes a sending mode corresponding to each message notification type; The message to be sent is sent to the corresponding recipient based on the sending mode corresponding to the message notification type through the sending request calling interface.
7. The message notification method according to claim 1, It is characterized in that The method further comprises: Detecting the configuration state of the message notification task based on a preset timing polling rule, the configuration state including: draft state, start state, pause state and cancel state; When it is detected that the configuration state is the startup state, the message notification task is determined to be in the valid state.
8. The message notification method according to claim 2, It is characterized in that The method further comprises: After sending the message to be sent to the target recipient, determining whether the message to be sent needs to be sent again; If it does not need to be sent again, the basic data of the message is marked as sent.
9. A computing device, It is characterized in that include: A processor and a memory storing a computer program, wherein when the processor runs the computer program, the message notification method according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium, It is characterized in that A computer program is stored, and when the computer program is executed by a processor, the message notification method according to any one of claims 1 to 8 is implemented.
