Message sending method and device, equipment and storage medium
By analyzing task information and selecting matching control rule groups, the problem of insufficient flexibility in message reminders in existing technologies is solved, enabling flexible message sending and multi-dimensional control of different control objects.
Patent Information
- Application Number
- CN202110864106.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-29
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2041-07-29
AI Technical Summary
Existing software systems lack flexibility in sending messages to users and cannot be flexibly controlled according to different control objects.
By analyzing task information, a first set of control objects is determined, and a target rule group matching it is selected from a number of preset alternative control rules. The target message is then sent according to the target rule group.
It enables flexibility in sending messages to different controlled objects, supports message control of multi-dimensional information, and avoids the need to code and develop for each message.
Smart Images

Figure CN115688723B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the technical field of computer, and particularly, to a message sending method and device, an apparatus, and a storage medium. BACKGROUND
[0002] Most software systems tend to send various system messages to users. When sending messages to users, the messages are generally sent to users based on fixed scripts. More flexible message reminders and message controls depend on developers to code themselves or on upgrades of services. The flexibility of message reminders is poor. SUMMARY
[0003] The present disclosure provides a message sending method, device, apparatus, and storage medium, so that messages can be sent more flexibly for various control objects.
[0004] In a first aspect, a message sending method is provided, including: analyzing obtained task information to determine a first control object set corresponding to the task information; determining, from a plurality of preset alternative control rules, a target rule group that matches the first control object set; and sending, in dependence on the first control object set and the target rule group, a target message corresponding to the task information.
[0005] In a second aspect, a message sending device is provided, including: an analysis module configured to analyze obtained task information to determine a first control object set corresponding to the task information; a determination module configured to determine, from a plurality of preset alternative control rules, a target rule group that matches the first control object set; and a sending module configured to send, in dependence on the first control object set and the target rule group, a target message corresponding to the task information.
[0006] In a third aspect, an electronic device is provided, including a processor and a memory. The memory is configured to store a computer program. The processor is configured to invoke and run the computer program stored in the memory to execute the method in the first aspect or any implementation manner thereof.
[0007] In a fourth aspect, a computer-readable storage medium is provided, configured to store a computer program. The computer program causes a computer to execute the method in the first aspect or any implementation manner thereof.
[0008] In a fifth aspect, a computer program product is provided, including computer program instructions. The computer program instructions cause a computer to execute the method in the first aspect or any implementation manner thereof.
[0009] In a sixth aspect, a computer program is provided. The computer program causes a computer to execute the method in the first aspect or any implementation manner thereof.
[0010] In conclusion, by the technical solution of the present disclosure, a plurality of control rules can be preset to adapt to a corresponding target rule group according to the obtained task information, and different control rules can correspond to different control objects, thereby more flexibly realizing message sending for a plurality of control objects. BRIEF DESCRIPTION OF DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative effort based on these drawings.
[0012] Figure 1 A structural schematic diagram of a message sending system provided by an embodiment of the present disclosure is shown in FIG. 1.
[0013] Figure 2 A flowchart of a message sending method provided by an embodiment of the present disclosure is shown in FIG. 2.
[0014] Figure 3 A flowchart of a message sending method provided by another embodiment of the present disclosure is shown in FIG. 3.
[0015] Figure 4 A structural schematic diagram of a message sending device provided by an embodiment of the present disclosure is shown in FIG. 4.
[0016] Figure 5 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure is shown in FIG. 5. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only some embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative effort fall within the scope of the present disclosure.
[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0019] Currently, when various software systems send messages to users, the sending of these messages can be controlled. For example, it's possible to control that a certain message is sent to a specific user a maximum of three times per hour. The applicant's research has revealed that, generally, the message text is fixed, and the message control dimensions are very limited, restricting the number of messages a user can receive based solely on user-level information, resulting in poor flexibility.
[0020] To address the aforementioned technical problems, this disclosure provides a method that can be based on Figure 1 The system implementation shown is as follows: Figure 1 This is a schematic diagram of the structure of a message sending system provided in an embodiment of this disclosure, as shown below. Figure 1 As shown, the system may include: a task reporting device 11, a server 12, and a target device 13; wherein: the task reporting device 11 is used to obtain task status information and upload the task status information to the server 12; the server 12 is used to obtain task status information and generate task information according to the task status information and preset rules; analyze the task information to determine the first set of control objects corresponding to the task information; determine the target rule group that matches the first set of control objects from a plurality of preset alternative control rules; send the target message corresponding to the task information to the target device 13 based on the first set of control objects and the target rule group; the target device 13 is used to receive the target message.
[0021] It should be noted that the aforementioned task reporting device 11 can obtain the user's current task status information through user input or its camera device; the task status information can include the user's work content information, etc.
[0022] Furthermore, the aforementioned target device 13 can be a device corresponding to the administrator, used to monitor the task completion status of the user corresponding to the task reporting device.
[0023] Optionally, the task reporting device 11 can include various types of devices such as a smart mobile terminal, a PC, etc., and the present disclosure is not limited thereto.
[0024] The execution principles and interaction processes of the constituent units in the system embodiments, such as the task reporting device 11, the server 12, and the target device 13, can be referred to the descriptions of the following method embodiments.
[0025] Figure 2 A flowchart of a message sending method provided by the present disclosure is provided, wherein the method can be applied to the server 12 described above, and the method can include at least the following steps:
[0026] S201, analyzing the obtained task information to determine a first control object set corresponding to the task information;
[0027] S202, determining a target rule group matching the first control object set from a plurality of preset alternative control rules;
[0028] S203, sending a target message corresponding to the task information in dependence on the first control object set and the target rule group.
[0029] Specifically, the task information can be determined according to the task status information received from the task reporting device, and correspondingly, the method further includes: receiving task status information sent from the sender device, i.e., the task reporting device; and generating task information according to the task status information and a preset rule. The task status information can be user input data information, picture information captured by the task reporting device through its camera function, or analysis results obtained by the task reporting device after analyzing the picture information captured by it.
[0030] In some optional embodiments, the task status information can include one or more information such as user identification information and task name information, and the task information can be information obtained by image recognition or keyword recognition on the task status information. The preset rule is used to limit the format of the task information. Specifically, the task information generated according to the task status information and the preset rule can include a template identifier and a key field information set, wherein the template identifier and the key field information set can be determined based on the analysis of the task status information. Specifically, the task information can have the following format:
[0031]
[0032]
[0033] The "id": 1 is a template identifier, the "place_holder" is used to indicate a set of key field information in the task information, the set of key field information can include one or more key field information, each key field information includes a key field and a key value corresponding to the key field; for example, "user_id": 111 and "program_name": "task 1" are two key field information, "user_id" and "program_name" are key fields; 111 and "task 1" are key values corresponding to "user_id" and "program_name", respectively.
[0034] Further, in the foregoing step S201, analyzing the obtained task information to determine the first control object set corresponding to the task information can specifically include the following steps:
[0035] S2011, identifying the key field information contained in the task information;
[0036] S2012, determining the first control object set according to the key field information.
[0037] Specifically, the first control object set is a set composed of first control objects, and determining the first control object set according to the key field information can specifically include: obtaining the key field in the key field information, taking the key field as the first control object, and accordingly, when the task information contains multiple key field information, each key field information in the multiple key field information contains a key field, and the first control object set determined according to the multiple key field information also includes multiple first control objects; the key field and the first control object are one-to-one corresponding, and the key field and the first control object can be the same.
[0038] For example, when the task information is the foregoing JSON, the identified key field information in the task information is "user_id": 111 and "program_name": "task 1", and the two key fields corresponding to the two key field information are "user_id" and "program_name", respectively, then the first control object set is composed of "user_id" and "program_name".
[0039] Further, the plurality of alternative control rules preset in the foregoing S202 can be contained in a preset control rule set, each alternative control rule contained in the control rule set can specifically include: control dimension information, a control period corresponding to the control dimension information, and the maximum number of messages sent for the control dimension information within the control period. Wherein, the control dimension information can include one or more second control objects.
[0040] Further, the step S202 of determining the target rule set matched with the first control object set from the plurality of preset alternative control rules comprises:
[0041] The plurality of alternative control rules are traversed, and the alternative control rule corresponding to the control dimension information containing the subset of the first control object set is taken as the target rule, and the combination of the one or more determined target rules is taken as the target rule set.
[0042] Further, the step S203 of sending the target message corresponding to the task information according to the first control object set and the target rule set can comprise the following steps:
[0043] S2031, determining the to-be-checked field set corresponding to the first control object set by using the target rule set;
[0044] S2032, determining the count value corresponding to the to-be-checked field set;
[0045] S2033, determining the target message template corresponding to the task information when the count value meets the numerical requirement of the target rule set;
[0046] S2034, sending the target message by using the target message template and the first control object set.
[0047] Specifically, each message template in the plurality of preset message templates can correspond to a unique template identifier, and the manner of determining the target message template corresponding to the task information can specifically be: obtaining the template identifier carried in the task information; determining the target message template according to the template identifier, specifically, the message template corresponding to the same template identifier as the template identifier carried in the task information is the target message template.
[0048] In some optional embodiments of the present disclosure, the control rule set and the target message template can be contained in the same configuration group, and a plurality of configuration groups can be preset accordingly, and after the first control object set corresponding to the obtained task information is determined, the above method further comprises:
[0049] determining the target configuration group corresponding to the task information from the plurality of configuration groups according to the task information; and obtaining the plurality of alternative control rules in the target configuration group. Each configuration group in the plurality of configuration groups corresponds to a configuration group identifier, which is used to distinguish the configuration groups, and each message template corresponds to a configuration group. When the configuration group identifier corresponding to the configuration group where the message template is located is the same as the template identifier in the task information, the message template is the target message template.
[0050] In some optional embodiments of the present disclosure, the target configuration group corresponding to the task information can be as follows:
[0051]
[0052]
[0053] The field descriptions in the foregoing target configuration group can refer to Table 1:
[0054] Table 1: Field descriptions of the corresponding configuration group 1
[0055]
[0056] In the foregoing example, the frequency in the foregoing target configuration group includes two alternative control rules, each keys corresponds to an alternative control rule, the control dimension information corresponding to the first alternative control rule includes the second control object user_id and program_name, that is, it includes a subset of the first control object set {user_id, program_name}, therefore, the alternative control rule is the target rule, the control dimension information corresponding to the second alternative control rule includes user_id, and also includes a subset of the first control object set {user_id, program_name}, therefore, the alternative control rule is also the target rule, that is, the target rule group is:
[0057]
[0058] Further, in the foregoing step S2031, the target rule group is used to determine the to-be-checked field group corresponding to the first control object set, which can include:
[0059] Obtaining a control dimension information set corresponding to the target rule group;
[0060] Using the control dimension information set to determine the to-be-checked field group.
[0061] In the target rule group, each target rule corresponds to a dimension information, and each control dimension information corresponds to a to-be-checked field;
[0062] For example: for the target rule group obtained from the foregoing target configuration group, the control dimension information set includes two control dimension information: control dimension information 1: program_name, user_id; and control dimension information 2: user_id; the control dimension information corresponds to the to-be-checked field one by one, and accordingly, the to-be-checked field group corresponding to the control dimension information set includes: to-be-checked field 1: program_name, user_id; and to-be-checked field 2: user_id.
[0063] Correspondingly, in the foregoing step S2032, determining the count value corresponding to the to-be-checked field group includes: determining the count value corresponding to each to-be-checked field included in the to-be-checked field group;
[0064] When the count value corresponding to each to-be-checked field in the to-be-checked field group satisfies the respective corresponding numerical value requirement, a step of triggering determination of the target message template corresponding to the task information is performed.
[0065] For any to-be-checked field, if the count value corresponding to the to-be-checked field is less than the maximum number of message sending times for the control dimension information within the control period corresponding to the control dimension information, the count value corresponding to the to-be-checked field is considered to satisfy the corresponding numerical value requirement.
[0066] Specifically, the count value corresponding to each to-be-checked field in the to-be-checked field group is determined as follows:
[0067] In the key-value pair database, the target value corresponding to the key-value pair with the to-be-checked field in the to-be-checked field group as the key, or the to-be-checked field corresponding key value as the key is queried.
[0068] The target value is used to determine the count value. Specifically, the target value is the count value.
[0069] The to-be-checked field and the target value corresponding thereto are in one-to-one correspondence. The key value corresponding to the to-be-checked field can be determined according to the to-be-checked field and the key value information in the task information. Specifically, the to-be-checked field can include one or more subfields. For example, the to-be-checked field 1: program_name, user_id includes two subfields, namely program_name and user_id. The key value corresponding to the to-be-checked field can be determined based on the key values corresponding to the subfields. The key values corresponding to the subfields can be determined according to the task information. The key value corresponding to the key field in the task information that is the same as the subfield is the key value corresponding to the subfield. When the to-be-checked field includes multiple subfields, the key value corresponding to the to-be-checked field is the splicing result of the key values corresponding to the subfields included in the to-be-checked field. For example, the key value corresponding to the to-be-checked field program_name, user_id is task 1111.
[0070] Further, the key of the key-value pair can include a template identifier and a configuration group identifier in addition to the to-be-checked field and the key value corresponding to the to-be-checked field. That is, the key of the key-value pair corresponding to the to-be-checked field is task 1111.
[0071] It should be noted that when the server does not send a message corresponding to the to-be-checked field to the target device, the corresponding key-value pair may not be stored in the key-value pair database. At this time, the key determined according to the to-be-checked field can be directly stored in the key-value pair database, and the corresponding target value can be preset to 0, and after sending the message to the target device, the target value corresponding to the to-be-checked field is increased by 1; wherein, when the key corresponding to the to-be-checked field is stored in the key-value pair database for the first time, the timing time corresponding to the to-be-checked field can be controlled to be reset to 0.
[0072] Correspondingly, for the management of each key-value pair in the key-value pair database, the above method further comprises:
[0073] detecting time information;
[0074] If the time information meets the zero-clearing requirement of the target rule in the target rule group, the key-value pair corresponding to the target rule is controlled to be zero cleared. When the key-value pair is zero cleared, only the value can be zero cleared, or the key and the value can be deleted. The target rule, the control dimension information corresponding to the target rule, the control period, the maximum message sending number and the to-be-checked field corresponding to the control dimension information correspond to each other; specifically, when the time point corresponding to the time information reaches the reset time point corresponding to the control period in the target rule, the time information meets the zero-clearing requirement of the target rule in the target rule group.
[0075] Further, in the foregoing step S2033, sending the target message by using the target message template and the first control object set comprises:
[0076] S01, determining a determination manner of to-be-filled content for the first control object set by using the target message template;
[0077] S02, determining the to-be-filled content according to the determination manner;
[0078] S03, sending the target message according to the to-be-filled content.
[0079] Optionally, in step S01, determining the determination manner of the to-be-filled content for the first control object set by using the target message template can comprise:
[0080] finding, from the target message template, filling identification information matched with the first control object set;
[0081] determining the determination manner of the to-be-filled content corresponding to the first control object set according to the filling identification information; wherein, when the identification parameter set corresponding to the filling identification information contains a subset of the first control object set, it is considered that the filling identification information corresponds to the first control object set, and specifically, the filling identification information corresponds to the subset in the first control object set.
[0082] According to the filling identification information, the determination manner of the first control object set corresponding to the to-be-filled content includes: when the filling identification information is the first identification information, determining that the to-be-filled content is obtained based on a query; and when the filling identification information is the second identification information, determining that the to-be-filled content is obtained based on an assignment. Specifically, the first identification information can be $$ in the target configuration group, and the second identification information can be $ in the configuration group.
[0083] Further, in the step S02, the to-be-filled content is determined according to the determination manner, which can include:
[0084] If the determination manner indicates that the to-be-filled content is obtained based on a query, the following steps can be included:
[0085] Obtaining a query identification corresponding to the filling identification information;
[0086] Determining a corresponding query range according to the query identification;
[0087] Determining the to-be-filled content in the query range.
[0088] Specifically, the first identification information can correspond to three identification parameters: a to-be-matched object, a query identification, and a query object, and the second identification information can correspond to one identification parameter: the to-be-matched object.
[0089] The query identification can be the name of a structure, and correspondingly, the query range corresponding to the query identification can be a data set (for example, a structure member set) corresponding to the query identification.
[0090] Further, determining the to-be-filled content in the query range includes: taking a parameter value corresponding to the query object in the query range and in the filling identification information as the to-be-filled content, for example, taking a parameter value corresponding to a member name identical to the query object in a structure member as the to-be-filled content.
[0091] Correspondingly, determining the to-be-filled content according to the determination manner further includes:
[0092] If the determination manner indicates that the to-be-filled content is obtained based on an assignment, the following steps can be included:
[0093] Obtaining a to-be-matched object corresponding to the filling identification information;
[0094] Determining the to-be-filled content by using the to-be-matched object and the task information, specifically, taking a key value corresponding to the to-be-matched object in the task information as the to-be-filled content.
[0095] Further, sending the target message according to the to-be-filled content can include: replacing a filling field corresponding to the filling identification information in a target message template with the to-be-filled content to obtain a target message; and sending the target message. The filling field can be the filling identification information itself and an identification parameter set corresponding thereto.
[0096] In a specific scenario, for example: when the target message template is: "Congratulations ${user_id, user.name} on completing the task ${program_name} today",
[0097] In the foregoing example, the subset user_id of the first control object set corresponds to the first identification information to be filled in, and the query identification corresponding to the to-be-filled-in identification is user. The query range is the structure member set of the structure named user, and the query object name is found in the structure member set corresponding to the structure named user. The parameter value (for example, Xiaoming) corresponding to user.name is taken as the to-be-filled-in content corresponding to user_id.
[0098] The to-be-filled-in identification $ corresponding to the subset program_name of the first control object set is the second identification information, and the to-be-matched object corresponding to the to-be-filled-in identification is program_name. Therefore, the key value corresponding to program_name in the task information is taken as the to-be-filled-in content corresponding to program_name.
[0099] It is determined that the to-be-filled-in content corresponding to the first control object set includes the to-be-filled-in content corresponding to each subset of the first control object set. The filling field corresponding to the filling identification information $$ is ${user_id, user.name}, and the filling field corresponding to the filling identification information $ is ${program_name}.
[0100] After the to-be-filled-in content corresponding to the first control object set is replaced in the filling field corresponding to the filling identification information in the target message template, the target message "Congratulations Xiaoming on completing the task Task 1 today" is obtained.
[0101] It should be noted that when the to-be-filled-in content corresponding to the first control object set is replaced in the filling field corresponding to the filling identification information in the target message template, the filling needs to be performed according to the subset of the first control object set, the to-be-filled-in content corresponding to the subset, and the principle of the filling field corresponding to the subset.
[0102] In some other optional embodiments of the present disclosure, the foregoing task information can also not contain program_name, but contain program_id. For example, the task information contains the key field information: "program_id": 222. At this time, the corresponding data processing process can be similar to that corresponding to user_id, which is not described here.
[0103] Secondly, the foregoing method can also be applied to the task reporting party device, and the present disclosure does not limit this.
[0104] The above scheme is further described below in combination with a specific optional embodiment, Figure 3 For the corresponding drawings of this embodiment, the scheme of the present disclosure can include the following steps after obtaining the task information:
[0105] 301. Determine the target configuration group according to the template identifier;
[0106] Specifically, according to the template identifier "id": 1 contained in the task information, the target configuration group with the configuration group identifier 1 is determined from the plurality of configuration groups;
[0107] 302. Determine the target rule from the plurality of alternative control rules in the target configuration group;
[0108] Specifically, the rule in the plurality of alternative control rules corresponding to the control dimension information containing the subset of the first control object set is determined as the target rule;
[0109] 303. Analyze the first control object set according to the target rule to determine the to-be-checked field;
[0110] Specifically, the control dimension information contained in the target rule determined in 302 can be used as the to-be-checked field;
[0111] 304. Count and check the to-be-checked field, and confirm whether the check is passed, if yes, execute step 305, if not, end;
[0112] When the count value corresponding to the to-be-checked field is less than the maximum sending number corresponding to the target rule corresponding to the to-be-checked field, it is confirmed that the check is passed, if it is equal to or greater than the maximum sending number corresponding to the target rule, the check is not passed;
[0113] 305. Determine the target message template, and determine the determination method of the to-be-filled content corresponding to each subset in the first control object set according to the target message template;
[0114] 306. Determine the to-be-filled content corresponding to each subset according to the determination method of the to-be-filled content corresponding to each subset;
[0115] 307. Fill the to-be-filled content corresponding to each subset into the target message template to obtain a target message;
[0116] 308. Send the target message;
[0117] 309. Increase the target value corresponding to the to-be-checked field by 1;
[0118] 310. End.
[0119] By the technical solutions of the present disclosure, a plurality of message control rules can be preset to adapt to corresponding target rules according to the obtained task information, different message control rules can correspond to different control object sets, and message sending for a plurality of control object sets can be more flexibly implemented.
[0120] In addition, the technical solutions of the present disclosure realize the configuration of messages, can customize dynamic message content through configuration, support message control of multi-dimensional information, and avoid encoding and development for each different message.
[0121] The method embodiments of the present disclosure are described in detail above Figures 1 to 3 The device embodiments of the present disclosure are described in detail below Figure 4 It should be understood that the device embodiments correspond to the method embodiments, and similar descriptions can be referred to the method embodiments. The present disclosure further provides a message sending device, which comprises an analysis module 41, a determination module 42, and a sending module 43; wherein:
[0122] The analysis module 41 is configured to analyze the obtained task information and determine a first control object set corresponding to the task information.
[0123] The determination module 42 is configured to determine a target rule group matched with the first control object set from a plurality of preset alternative control rules.
[0124] The sending module 43 is configured to send a target message corresponding to the task information by relying on the first control object set and the target rule group.
[0125] In some optional embodiments, when the sending module 43 is configured to send the target message corresponding to the task information by relying on the first control object set and the target rule group, the sending module 43 is specifically configured to:
[0126] Determine a to-be-checked field group corresponding to the first control object set by using the target rule group.
[0127] Determine a count value corresponding to the to-be-checked field group.
[0128] When the count value meets a numerical requirement of the target rule group, determine a target message template corresponding to the task information.
[0129] Send the target message by using the target message template and the first control object set.
[0130] In some optional embodiments, when the sending module 43 is configured to send the target message by using the target message template and the first control object set, the sending module 43 is specifically configured to:
[0131] Determine a determination manner of to-be-filled content for the first control object set by using the target message template.
[0132] determine the to-be-filled content according to the determination manner;
[0133] send the target message according to the to-be-filled content.
[0134] In some optional embodiments, the sending module 43 comprises a searching unit and a determining unit. The searching unit is configured to search, from the target message template, the filling identification information matching the first control object set.
[0135] The determining unit is configured to determine the determination manner of the to-be-filled content corresponding to the first control object set according to the filling identification information.
[0136] In some optional embodiments, when the sending module 43 is used to determine the to-be-filled content according to the determination manner, the sending module 43 is specifically configured to:
[0137] If the determination manner indicates that the to-be-filled content is obtained based on a query, then
[0138] obtain a query identification corresponding to the filling identification information;
[0139] determine a corresponding query range according to the query identification;
[0140] determine the to-be-filled content in the query range.
[0141] In some optional embodiments, when the sending module 43 is used to determine the to-be-filled content according to the determination manner, the sending module 43 is further specifically configured to:
[0142] If the determination manner indicates that the to-be-filled content is obtained based on an assignment, then
[0143] obtain a to-be-matched object corresponding to the filling identification information;
[0144] determine the to-be-filled content by using the to-be-matched object and the task information.
[0145] In some optional embodiments, when the analyzing module 41 is used to analyze the obtained task information to determine the first control object set corresponding to the task information, the analyzing module 41 is specifically configured to:
[0146] recognize key field information contained in the task information;
[0147] determine the first control object set according to the key field information.
[0148] In some optional embodiments, when the sending module 43 is used to determine the target message template corresponding to the task information, the sending module 43 is specifically configured to:
[0149] recognize a template identification carried in the task information;
[0150] determine the target message template according to the template identification.
[0151] In some optional embodiments, the sending module 43 is specifically configured to:
[0152] In the key-value pair database, the query corresponds to the target value of the key-value pair with the key being the to-be-checked field in the to-be-checked field group;
[0153] The target value is used to determine the count value.
[0154] In some optional embodiments, the apparatus is further configured to:
[0155] Receive the task state information from the sender device;
[0156] Generate the task information according to the task state information and the preset rule.
[0157] In some optional embodiments, the sending module 43 is specifically configured to:
[0158] Replace the to-be-filled content with the filling field corresponding to the filling identification information in the target message template to obtain the target message;
[0159] Send the target message.
[0160] In some optional embodiments, the apparatus is further configured to: detect time information; and if the time information satisfies the clearing requirement of a target rule in the target rule group, control the key-value pair corresponding to the target rule to be cleared.
[0161] The apparatus provided by the embodiments of the present disclosure can execute the method embodiments, and the specific implementation principles and technical effects can be referred to the method embodiments, which will not be described here again.
[0162] It should be understood that the apparatus embodiments and the method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, it will not be described here again. Specifically, the foregoing message sending apparatus can execute the foregoing method embodiments, and the foregoing and other operations and / or functions of each module in the message sending apparatus are respectively for the corresponding processes in each method in the foregoing method embodiments. For the sake of brevity, it will not be described here again.
[0163] The message sending apparatus of the embodiments of the present disclosure is described above from the perspective of functional modules in combination with the drawings. It should be understood that the functional modules can be implemented in the form of hardware, or in the form of instructions of software, or in the form of a combination of hardware and software modules. Specifically, the steps of the method embodiments in the embodiments of the present disclosure can be completed by the integrated logic circuit of hardware in the processor and / or instructions of software. The steps of the method disclosed in the embodiments of the present disclosure can be directly embodied as hardware code processing for execution by the processor, or can be executed by a combination of hardware and software modules in the processor. Alternatively, the software module can be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, and the like. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method embodiments in combination with the hardware thereof.
[0164] Figure 5 is a schematic block diagram of an electronic device provided by the embodiments of the present disclosure, which can include:
[0165] The memory 51 is configured to store a computer program and transmit the program code to the processor 52. In other words, the processor 52 can call and run the computer program from the memory 51 to implement the method in the embodiments of the present disclosure.
[0166] For example, the processor 52 can be configured to execute the above method embodiments according to the instructions in the computer program.
[0167] In some embodiments of the present disclosure, the processor 52 can include but is not limited to:
[0168] A general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and the like.
[0169] In some embodiments of the present disclosure, the memory 51 includes but is not limited to:
[0170] The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0171] In some embodiments of the present disclosure, the computer program can be divided into one or more modules, which are stored in the memory 51 and executed by the processor 52 to complete the method provided by the present disclosure. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the electronic device.
[0172] As shown in Figure 5 The electronic device can further include a transceiver 53, which can be connected to the processor 52 or the memory 51.
[0173] The processor 52 can control the transceiver 53 to communicate with other devices, specifically, to send information or data to other devices or receive information or data sent by other devices. The transceiver 53 can include a transmitter and a receiver. The transceiver 53 can further include an antenna, and the number of antennas can be one or more.
[0174] It should be understood that various components in the electronic device are connected through a bus system, wherein the bus system includes a data bus, a power supply bus, a control bus, and a state signal bus in addition to a data bus.
[0175] The present disclosure also provides a computer readable storage medium, which stores computer execution instructions, and when the computer execution instructions are run on a computer, the computer is caused to execute the message sending method of the above embodiment.
[0176] The present disclosure also provides a computer program product, which comprises a computer program, and when the computer program is executed by a processor, the message sending method of the above embodiment is implemented.
[0177] The computer program product comprises one or more computer instructions. When the computer instructions are loaded and executed on a computer, the flow or function according to the embodiment of the present disclosure is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as digital video disc (DVD)), or semiconductor media (such as solid state disk (SSD)) and the like.
[0178] According to one or more embodiments of the present disclosure, a message sending method is provided, comprising: analyzing obtained task information to determine a first control object set corresponding to the task information; determining a target rule group matching the first control object set from a plurality of preset alternative control rules; and sending a target message corresponding to the task information in dependence on the first control object set and the target rule group.
[0179] According to one or more embodiments of the present disclosure, sending a target message corresponding to the task information in dependence on the first control object set and the target rule group comprises: determining a to-be-checked field group corresponding to the first control object set by using the target rule group; determining a count value corresponding to the to-be-checked field group; determining a target message template corresponding to the task information when the count value meets a numerical requirement of the target rule group; and sending the target message by using the target message template and the first control object set.
[0180] According to one or more embodiments of the present disclosure, the sending the target message by using the target message template and the first control object set comprises: determining a determination manner of the to-be-filled content for the first control object set by using the target message template; determining the to-be-filled content according to the determination manner; and sending the target message according to the to-be-filled content.
[0181] According to one or more embodiments of the present disclosure, the determining the determination manner of the to-be-filled content for the first control object set by using the target message template comprises: searching, from the target message template, filling identification information matched with the first control object set; and determining the determination manner of the to-be-filled content corresponding to the first control object set according to the filling identification information.
[0182] According to one or more embodiments of the present disclosure, the determining the to-be-filled content according to the determination manner comprises: if the determination manner indicates that the to-be-filled content is obtained based on a query, obtaining a query identifier corresponding to the filling identification information; determining a corresponding query range according to the query identifier; and determining the to-be-filled content in the query range.
[0183] According to one or more embodiments of the present disclosure, the determining the to-be-filled content according to the determination manner further comprises: if the determination manner indicates that the to-be-filled content is obtained based on an assignment, obtaining a to-be-matched object corresponding to the filling identification information; and determining the to-be-filled content by using the to-be-matched object and the task information.
[0184] According to one or more embodiments of the present disclosure, the analyzing the obtained task information to determine the first control object set corresponding to the task information comprises: identifying key field information contained in the task information; and determining the first control object set according to the key field information.
[0185] According to one or more embodiments of the present disclosure, the determining the target message template corresponding to the task information comprises: identifying a template identifier carried in the task information; and determining the target message template according to the template identifier.
[0186] According to one or more embodiments of the present disclosure, the determining the count value corresponding to the to-be-checked field group comprises: querying, in a key-value pair database, a target value corresponding to a key-value pair with a to-be-checked field in the to-be-checked field group as a key; and determining the count value by using the target value.
[0187] According to one or more embodiments of the present disclosure, the method further comprises: receiving task state information sent by a sender device; and generating the task information according to the task state information and a preset rule.
[0188] According to one or more embodiments of the present disclosure, the sending the target message according to the to-be-filled content comprises: replacing the to-be-filled content in the target message template corresponding to the filling identification information to obtain the target message; and sending the target message.
[0189] According to one or more embodiments of the present disclosure, the method further comprises: detecting time information; and if the time information satisfies a clear requirement corresponding to a target rule in the target rule group, controlling a key-value pair corresponding to the target rule to be cleared.
[0190] According to one or more embodiments of the present disclosure, a message sending device is provided, comprising: an analysis module, a determination module, and a sending module; wherein: the analysis module is configured to analyze obtained task information to determine a first control object set corresponding to the task information; the determination module is configured to determine a target rule group matching the first control object set from a plurality of preset alternative control rules; and the sending module is configured to send a target message corresponding to the task information by relying on the first control object set and the target rule group.
[0191] According to one or more embodiments of the present disclosure, when the sending module is configured to send the target message corresponding to the task information by relying on the first control object set and the target rule group, the sending module is specifically configured to: determine a to-be-checked field group corresponding to the first control object set by using the target rule group; determine a count value corresponding to the to-be-checked field group; determine a target message template corresponding to the task information when the count value meets a numerical requirement of the target rule group; and send the target message by using the target message template and the first control object set.
[0192] According to one or more embodiments of the present disclosure, when the sending module is configured to send the target message by using the target message template and the first control object set, the sending module is specifically configured to: determine a determination manner of to-be-filled content corresponding to the first control object set by using the target message template; determine the to-be-filled content according to the determination manner; and send the target message according to the to-be-filled content.
[0193] According to one or more embodiments of the present disclosure, the sending module comprises a searching unit and a determining unit, the searching unit is configured to search filling identification information matching the first control object set from the target message template; and the determining unit is configured to determine a determination manner of to-be-filled content corresponding to the first control object set according to the filling identification information.
[0194] According to one or more embodiments of the present disclosure, when the sending module is configured to determine the to-be-filled content according to the determination manner, the sending module is specifically configured to: if the determination manner indicates that the to-be-filled content is obtained based on a query, obtain a query identification corresponding to the filling identification information; determine a query range corresponding to the query identification; and determine the to-be-filled content in the query range.
[0195] According to one or more embodiments of the present disclosure, the sending module is further configured to, when determining the content to be filled according to the determination manner, acquire a to-be-matched object corresponding to the filling identification information, and determine the content to be filled by using the to-be-matched object and the task information.
[0196] According to one or more embodiments of the present disclosure, the analyzing module is configured to, when analyzing the acquired task information and determining the first control object set corresponding to the task information, identify key field information contained in the task information, and determine the first control object set according to the key field information.
[0197] According to one or more embodiments of the present disclosure, the sending module is configured to, when determining the target message template corresponding to the task information, identify a template identifier carried in the task information, and determine the target message template according to the template identifier.
[0198] According to one or more embodiments of the present disclosure, the sending module is configured to, when determining the count value corresponding to the to-be-checked field group, query a target value corresponding to a key-value pair with a to-be-checked field in the to-be-checked field group as the key in a key-value database, and determine the count value by using the target value.
[0199] According to one or more embodiments of the present disclosure, the apparatus is further configured to receive task state information from a sending device, and generate the task information according to the task state information and a preset rule.
[0200] According to one or more embodiments of the present disclosure, the sending module is configured to, when sending the target message according to the content to be filled, replace the content to be filled in a filling field corresponding to the filling identification information in the target message template to obtain a target message, and send the target message.
[0201] According to one or more embodiments of the present disclosure, the apparatus is further configured to detect time information, and control a key-value pair corresponding to a target rule in a target rule group to be cleared if the time information satisfies a clearing requirement corresponding to the target rule.
[0202] According to one or more embodiments of the present disclosure, an electronic device is provided, which includes a processor and a memory. The memory is configured to store a computer program, and the processor is configured to invoke and run the computer program stored in the memory to execute the message sending method described above.
[0203] According to one or more embodiments of the present disclosure, a computer readable storage medium is provided, which is configured to store a computer program. The computer program causes a computer to execute the message sending method described above.
[0204] Those skilled in the art can understand that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present disclosure.
[0205] In several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are merely illustrative, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed modules can be indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0206] The modules described as separate components can or can not be physically separated, and the components shown as modules can or can not be physical modules, i.e. they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment according to actual needs. For example, the functional modules in each embodiment of the present disclosure can be integrated in one processing module, or each module can be physically present separately, or two or more modules can be integrated in one module.
[0207] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto, and any skilled person in the art can easily think of changes or replacements within the technical range disclosed in the present disclosure, which should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A message sending method characterized by, The method comprises: analyzing the obtained task information to determine a first control object set corresponding to the task information; the task information is generated according to task state information and a preset rule, wherein the task state information at least includes user identification information and / or task name information; from a plurality of preset alternative control rules, a target rule group matching the first control object set is determined; the alternative control rule includes: control dimension information, control dimension information corresponding control period, and the number of times of sending messages for control dimension information in the control period; sending a target message corresponding to the task information by relying on the first control object set and the target rule group, comprising: determining a to-be-checked field group corresponding to the first control object set by using the target rule group; determining a count value corresponding to the to-be-checked field group; when the count value meets the numerical requirement of the target rule group, determining a target message template corresponding to the task information; sending the target message by using the target message template and the first control object set.
2. The method of claim 1, wherein, sending the target message by using the target message template and the first control object set comprises: determining the determination mode of the to-be-filled content for the first control object set by using the target message template; determining the to-be-filled content according to the determination mode; sending the target message according to the to-be-filled content.
3. The method of claim 2, wherein, determining the determination mode of the to-be-filled content for the first control object set by using the target message template comprises: finding filling identification information matching the first control object set from the target message template; determining the determination mode of the to-be-filled content corresponding to the first control object set according to the filling identification information.
4. The method of claim 3, wherein, determining the to-be-filled content according to the determination mode comprises: if the determination mode indicates that the to-be-filled content is obtained based on query, then obtaining a query identifier corresponding to the filling identification information; determining a corresponding query range according to the query identifier; determining the to-be-filled content in the query range.
5. The method of claim 3, wherein, determining the to-be-filled content according to the determination mode further comprises: if the determination mode indicates that the to-be-filled content is obtained based on assignment, then obtaining a to-be-matched object corresponding to the filling identification information; determining the to-be-filled content by using the to-be-matched object and the task information.
6. The method of claim 1, wherein, analyzing the obtained task information to determine a first control object set corresponding to the task information comprises: identifying key field information contained in the task information; determining the first control object set according to the key field information.
7. The method of claim 2, wherein, determining a target message template corresponding to the task information comprises: identifying a template identifier carried in the task information; determining the target message template according to the template identifier.
8. The method of claim 2, wherein, determining a count value corresponding to the to-be-checked field group comprises: querying a target value corresponding to a key-value pair with a to-be-checked field in the to-be-checked field group as the key in a key-value database; determining the count value by using the target value.
9. The method of claim 1, wherein, The method further comprises: receiving task state information sent from a sender device; generating the task information according to the task state information and a preset rule.
10. The method of claim 3, wherein, The sending of the target message according to the to-be-filled content comprises: replacing the to-be-filled content in the filling field corresponding to the filling identification information in the target message template to obtain the target message; sending the target message.
11. The method of claim 8, wherein, The method further comprises: detecting time information; if the time information meets the zero-clearing requirement corresponding to a target rule in the target rule group, controlling the key-value pair corresponding to the target rule to be zero cleared.
12. A message sending apparatus characterized by comprising: comprise: an analysis module configured to analyze the obtained task information to determine a first control object set corresponding to the task information; the task information is generated according to task state information and a preset rule, wherein the task state information at least comprises user identification information and / or task name information; a determination module configured to determine a target rule group matching the first control object set from a plurality of preset alternative control rules; the alternative control rule comprises control dimension information, a control period corresponding to the control dimension information, and the maximum number of messages sent for the control dimension information within the control period; a sending module configured to send a target message corresponding to the task information according to the first control object set and the target rule group; the sending module is further configured to determine a to-be-checked field group corresponding to the first control object set by using the target rule group, determine a count value corresponding to the to-be-checked field group, determine a target message template corresponding to the task information when the count value meets the numerical requirement of the target rule group, and send the target message by using the target message template and the first control object set.
13. An electronic device, comprising: comprise: a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, a computer program for storing, the computer program enabling a computer to execute the method in any one of claims 1 to 11.
Citation Information
Patent Citations
Data acquisition method and device
CN112486479A