Dynamic configuration method and apparatus for message template, and computer device and storage medium
Patent Information
- Application Number
- PCT/CN2023/128061
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-01-18
- Filing Date
- 2023-10-31
- Publication Date
- 2024-09-19
AI Technical Summary
Existing message push systems require large-scale modifications when external system interfaces or data structures change, resulting in heavy development and debugging workloads and difficulty in dynamically adjusting message templates.
Provides a dynamic configuration method for message templates. The template field configuration module receives configuration instructions, modifies the template field configuration table, updates the message template, reduces the modification workload of the message push system, and realizes dynamic adjustment of message templates.
There is no need for secondary development and joint debugging. The message template is updated directly through configuration instructions, which reduces the workload of modifying the message push system and improves flexibility and efficiency.
Smart Images

Figure CN2023128061_19092024_PF_FP_ABST
Abstract
Description
Dynamic configuration method, device, computer equipment and storage medium of message template
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on January 18, 2023, with application number CN202310100631.X and application name “Dynamic configuration method, device, computer equipment and storage medium for message templates”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of data processing technology, and in particular to a method, apparatus, computer equipment, and storage medium for dynamically configuring a message template. Background Art
[0003] The message push system needs to interact with other external systems for data. Since the interface format and data structure of the connected external systems are the same, the interface data functions of the message push system will be fixed after the development of the message push system is completed.
[0004] However, if the message interface or message push format of the connected external system needs to be changed later, secondary development, joint debugging, and release of the message push system are required. The inventors have realized that in the prior art, when there is a situation where the message template needs to be changed, it is necessary to modify the message push system, which is very labor-intensive. Summary of the Invention
[0005] The embodiments of the present application provide a method, apparatus, computer device, and storage medium for dynamically configuring a message template, which can reduce the workload of modifying the message push system when the message template needs to be changed.
[0006] In a first aspect, an embodiment of the present application provides a method for dynamically configuring a message template, comprising: applying the method to a message push system, wherein the message push system maintains a plurality of constructed message templates, and the message push system is provided with a template field configuration module, wherein the template field configuration module stores a template field configuration table corresponding to each of the message templates, the method comprising:
[0007] receiving a message template configuration instruction of a first message template;
[0008] Based on the message template configuration instruction, modify the first template field configuration table to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template;
[0009] The first message template is updated according to the second template field configuration table to obtain a second message template.
[0010] In a second aspect, an embodiment of the present application further provides a dynamic configuration device for a message template, comprising: the device is arranged in a message push system, wherein a plurality of constructed message templates are maintained in the message push system, and a template field configuration module is provided in the message push system, wherein the template field configuration module includes a transceiver module for receiving a message template configuration instruction of a first message template;
[0011] A processing module is used to modify the first template field configuration table based on the message template configuration instruction to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template; and update the first message template according to the second template field configuration table to obtain a second message template.
[0012] In a third aspect, an embodiment of the present application further provides a computer device, wherein a message push system is deployed in the computer device, wherein the message push system maintains a plurality of constructed message templates, and wherein the message push system is provided with a template field configuration module, wherein the template field configuration module stores a template field configuration table corresponding to each of the message templates, the computer device includes a memory and a processor, wherein a computer program is stored on the memory, and when the processor executes the computer program, the following steps are implemented:
[0013] receiving a message template configuration instruction of a first message template;
[0014] Based on the message template configuration instruction, modify the first template field configuration table to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template;
[0015] The first message template is updated according to the second template field configuration table to obtain a second message template.
[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is stored in a message push system, wherein the message push system maintains a plurality of constructed message templates, and wherein the message push system is provided with a template field configuration module, wherein the template field configuration module stores a template field configuration table corresponding to each of the message templates, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the following operations are performed:
[0017] receiving a message template configuration instruction of a first message template;
[0018] Based on the message template configuration instruction, modify the first template field configuration table to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template;
[0019] The first message template is updated according to the second template field configuration table to obtain a second message template.
[0020] The embodiments of the present application provide a method, apparatus, computer device, and storage medium for dynamically configuring message templates. The message push system in this method configures a template field configuration table for each message template. Modification of the message template can be achieved by simply modifying the template field configuration table of the message template to be modified according to the message template configuration instructions. This eliminates the need for secondary development, joint debugging, and version release of the message push system. This demonstrates that modifying message templates through this solution can reduce the workload of modifying the message push system. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] FIG1 is a flow chart of a method for dynamically configuring a message template according to an embodiment of the present application;
[0023] FIG2 is a schematic diagram of an interface of a template field configuration table provided in an embodiment of the present application;
[0024] FIG3 is another schematic diagram of an interface of a template field configuration table provided in an embodiment of the present application;
[0025] FIG4 is a flow chart of a method for dynamically configuring a message template according to another embodiment of the present application;
[0026] FIG5 is a schematic structural diagram of a message push system provided in an embodiment of the present application;
[0027] FIG6 is a schematic block diagram of a dynamic configuration device for a message template provided in an embodiment of the present application. Implementation Method
[0028] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0029] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0030] It should also be understood that the terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0031] It should be further understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0032] Embodiments of the present application provide a method, apparatus, computer device, and storage medium for dynamically configuring a message template.
[0033] The executor of the dynamic configuration method of the message template can be the dynamic configuration device of the message template provided in the embodiment of the present application, or a message push system configured with the dynamic configuration device of the message template, and the message push system is installed in a computer device, wherein the dynamic configuration device of the message template can be implemented in hardware or software, and the computer device can be a terminal or a server, and the terminal can be a smart phone, a tablet computer, a PDA, or a laptop computer, etc.
[0034] Please refer to Figure 1, which is a flowchart of the method for dynamically configuring a message template provided by an embodiment of the present application. Below, this embodiment takes the message push system as an example to describe the method for dynamically configuring a message template provided by an embodiment of the present application in detail.
[0035] It should be noted that, in some embodiments, the message push system provided in the present application includes a template field configuration module, and the message push system maintains multiple constructed message templates, and the template field configuration module contains template field configuration tables corresponding to each of the message templates.
[0036] Specifically, the method for dynamically configuring the message template includes the following steps S110-S130.
[0037] S110: Receive a message template configuration instruction of a first message template.
[0038] In this embodiment, the user can send a message template configuration instruction of the first message template to the message push system through the user terminal, wherein the first message template is a message template that has been constructed historically and maintained in the system. In this embodiment, the user needs to modify the first message template.
[0039] Specifically, the user sends a message template configuration instruction of the first message template to the message push system through the user terminal. The message template configuration instruction includes at least one of a mapping relationship modification instruction and a message field modification instruction input by the user.
[0040] S120. Based on the message template configuration instruction, modify the first template field configuration table to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template.
[0041] In some embodiments, step S120 specifically includes: modifying the mapping relationship in the first template field configuration table according to the mapping relationship modification instruction; and / or adding or deleting the message field in the first template field configuration table according to the message field modification instruction.
[0042] Among them, the mapping relationship modification instruction carries the first business field to be modified, and the first scenario message field corresponding to the first business field. For example, the first business field is A, and the first scenario message field is B (that is, a mapping relationship between A and B needs to be established). However, the system finds from the first template field configuration table that the first business field A corresponds to the second scenario message field C (that is, A and C correspond in the recorded first message template). At this time, after receiving the mapping relationship modification instruction, the system modifies the mapping relationship AC to the mapping relationship AB according to the mapping relationship modification instruction.
[0043] For example, as shown in Figure 2, Figure 2 is an interface diagram of the first template field configuration table provided in this application. In the mapping relationship of the customer name field, the data format of the business field is: name, and the data format corresponding to the scenario message field is: custName. At this time, a mapping relationship between name-custName is maintained. If the mapping relationship modification instruction requires that the data format corresponding to name be modified to title, then at this time, the custName in the first template field configuration table needs to be modified to title to establish a mapping relationship between name-title.
[0044] The message field modification instruction specifically includes a message field addition instruction or a message field deletion instruction. The message field addition instruction instructs to add one or more message fields. As shown in FIG3 , compared with FIG2 , FIG3 adds two new fields, "Contact Number" and "ID Information". The message field deletion instruction instructs to delete one or more existing message fields in the template.
[0045] S130. Update the first message template according to the second template field configuration table to obtain a second message template.
[0046] In this embodiment, the second message template is the modified first message template. In this embodiment, the second template configuration table can be obtained by modifying the first template field configuration table corresponding to the first message template, wherein the second template configuration table is the modified first template configuration table, and then the first message template is updated through the second template configuration table to obtain the second message template.
[0047] It can be seen that since the message push system in the embodiment of the present application is configured with a template field configuration table for each message template, the present application only needs to modify the template field configuration table of the message template that needs to be modified according to the message template configuration instruction to realize the modification of the message template. There is no need for secondary development, joint debugging and version release of the message push system. Therefore, by changing the message template through this solution, the workload of modifying the message push system can be reduced.
[0048] In this embodiment, after obtaining the second message template, the second message template can be used directly to push the response message, without the need for secondary development, joint debugging and version release of the message push system, thereby reducing the workload of modifying the message push system.
[0049] Figure 4 is a flow chart of a method for dynamically configuring a message template according to another embodiment of the present application. As shown in Figure 4 , the method for dynamically configuring a message template according to this embodiment includes steps S210-S270.
[0050] S210: Receive a message template configuration instruction of a first message template.
[0051] S220. Based on the message template configuration instruction, modify the first template field configuration table to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template.
[0052] S230. Update the first message template according to the second template field configuration table to obtain a second message template.
[0053] Steps S210-S250 are similar to steps S110-S150 in the above embodiment and are not described in detail here. Steps S260-S270 added in this embodiment are described in detail below.
[0054] S240: Obtain a push instruction corresponding to the second message template.
[0055] Among them, the push instruction in this embodiment can be obtained by the user through the user terminal, or it can be automatically triggered according to the message push cycle corresponding to the second message template preset in the system, or it can be a push instruction actively sent when the external system requests a message.
[0056] S250: In response to the push instruction, determine a target service value corresponding to the second message template from a plurality of preset service values.
[0057] In this embodiment, the business data table stores multiple business values, and each business value is provided with a corresponding message field mapping relationship. Specifically, the target business value corresponding to each message field in the second message is determined according to the message field mapping relationship in the business value.
[0058] S260: Assemble the second message template and the target service value to obtain a message to be pushed.
[0059] In this embodiment, after obtaining the target service value corresponding to each message field in the second message template, the target service value is assembled into the corresponding message field in the second message template to obtain the message to be pushed.
[0060] S270: Push the message to be pushed according to a preset message transmission address corresponding to the second message template.
[0061] In this embodiment, the system has preset message transmission addresses for each message template. After the message to be pushed of the second message template is determined, the message to be pushed will be pushed to the target external system according to the message transmission address corresponding to the second message template. The target external system is the external system corresponding to the message transmission address corresponding to the second message template.
[0062] In some embodiments, in order to display the message and facilitate re-pushing the message, after obtaining the message to be pushed, it is also necessary to store the message to be pushed in a preset message log table.
[0063] It can be seen that this solution can realize the display and re-pushing of messages through the message log table.
[0064] In some embodiments, after pushing the message to be pushed, the method further includes: receiving a feedback result of the message to be pushed; and then recording a push status of the message to be pushed according to the feedback result.
[0065] Specifically, the feedback result includes a push success result and a push failure result. When the feedback result is a push success result, the corresponding push status is set to success. When the feedback result is a push failure result, the corresponding push status is set to failure.
[0066] In some embodiments, as shown in FIG5 , FIG5 is a schematic diagram of the structure of a message push system provided in an embodiment of the present application. In FIG5 , the message push system in the present application includes a business data storage unit, a template data storage unit, and a message tool, wherein the template data storage unit includes a scenario definition module, a scenario field storage module, a template type storage module, and a template field configuration module, and the message tool includes a message data assembly module and a message push module, wherein:
[0067] Business data storage unit: includes business data tables for multiple business data, and each business value is set with a corresponding message field mapping relationship. The field data that can be provided during the business development process requires code development to uniformly obtain business data for different message scenarios.
[0068] Scenario definition module: stores a scenario definition table, which is used to define scenarios in which messages can be pushed;
[0069] The scenario field storage module stores a scenario field table, which is used to record the business values that can be provided in the configuration scenario definition;
[0070] The template type storage module stores a template type table, which records the information of various push scenarios. The main fields of the table include message name, message scenario, message description, message transmission address, etc.
[0071] The template field configuration module stores a template field configuration table, which records the mapping relationship between the scenario message field and the business field in each message template;
[0072] The message data assembly module is used to assemble the business values corresponding to the message fields in the message template into the message template to obtain the message to be pushed;
[0073] The message pushing module is used to push the message to be pushed to the corresponding external system according to the message transmission address stored in the template type storage module.
[0074] Based on the corresponding embodiments of Figures 1 and 4, the message push system in the present application also includes message template addition and message template deletion functions. At this time, when a new external system is connected, the corresponding message template can be added through the message push system provided by the present application. When the external system needs to be deleted, the corresponding message template can also be deleted through the message push system provided by the present application. At this time, in the message template addition step, the method specifically includes: receiving a new instruction for a third message template, the new instruction including a target message transmission address, at least one target message field identifier, and a target mapping relationship corresponding to each target message field identifier, the target mapping relationship including a mapping relationship between a scene message field and a business field; determining a target message field corresponding to the target message field identifier from a preset plurality of message fields; constructing the third message template according to the target message field and the target mapping relationship, and constructing a correspondence between the third message template and the target message transmission address, and constructing a third template field configuration table in the template field configuration module, the third template field configuration table storing the target mapping relationship and the target message field.
[0075] In the step of deleting the message template, the method specifically includes: receiving a template deletion instruction for a fourth message template; and deleting the fourth message template according to the template deletion instruction.
[0076] Specifically, the message templates maintained in the message push system are configured with corresponding template identifiers, and the template deletion instruction carries the target template identifier of the template to be deleted (the template identifier of the fourth message template), and then the fourth message template is determined and deleted in the message push system at the target template identifier.
[0077] It can be seen that this embodiment can delete unnecessary message templates to avoid memory waste.
[0078] FIG6 is a schematic block diagram of a dynamic configuration device for a message template provided in an embodiment of the present application. As shown in FIG6 , corresponding to the above dynamic configuration method for a message template, the present application also provides a dynamic configuration device 600 for a message template. The dynamic configuration device 600 for a message template includes a module for executing the above dynamic configuration method for a message template. The device is arranged in a message push system. The message push system maintains a plurality of constructed message templates, and the message push system is provided with a template field configuration module. The template field configuration module stores a template field configuration table corresponding to each of the message templates. The dynamic configuration device 600 for a message template includes a transceiver module 601 and a processing module 602, wherein:
[0079] The transceiver module 601 is configured to receive a message template configuration instruction of a first message template;
[0080] Processing module 602 is used to modify the first template field configuration table based on the message template configuration instruction to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template; and update the first message template according to the second template field configuration table to obtain a second message template.
[0081] In some embodiments, the message template configuration instruction includes at least one of a mapping relationship modification instruction and a message field modification instruction; when the processing module 602 executes the step of modifying the first template field configuration table based on the message template configuration instruction, it is specifically configured to:
[0082] Modify the mapping relationship in the first template field configuration table according to the mapping relationship modification instruction; and / or,
[0083] Add or delete message fields in the first template field configuration table according to the message field modification instruction.
[0084] In some embodiments, the processing module 602 is further configured to:
[0085] Receiving, through the transceiver module 601, a new instruction for a third message template, the new instruction including a target message transmission address, at least one target message field identifier, and target mapping relationships corresponding to the target message field identifiers, the target mapping relationships including mapping relationships between scenario message fields and service fields;
[0086] Determining a target message field corresponding to the target message field identifier among a plurality of preset message fields;
[0087] The third message template is constructed according to the target message field and the target mapping relationship, and a correspondence between the third message template and the target message transmission address is constructed, and a third template field configuration table is constructed in the template field configuration module, and the third template field configuration table stores the target mapping relationship and the target message field.
[0088] In some embodiments, after executing the step of updating the first message template according to the second template field configuration table to obtain the second message template, the processing module 602 is further configured to:
[0089] Obtaining a push instruction corresponding to the second message template through the transceiver module 601;
[0090] In response to the push instruction, determining a target service value corresponding to the second message template from a plurality of preset service values;
[0091] Assembling the second message template and the target service value to obtain a message to be pushed;
[0092] The message to be pushed is pushed according to a preset message transmission address corresponding to the second message template.
[0093] In some embodiments, after executing the step of assembling the second message template and the target service value to obtain the message to be pushed, the processing module 602 is further configured to:
[0094] The message to be pushed is stored in a preset message log table.
[0095] In some embodiments, after executing the step of pushing the message to be pushed according to the preset message transmission address corresponding to the second message template, the processing module 602 is further configured to:
[0096] Receiving the feedback result of the message to be pushed through the transceiver module 601;
[0097] The push status of the message to be pushed is recorded according to the feedback result.
[0098] In some embodiments, the processing module 602 is further configured to:
[0099] Receiving, through the transceiver module 601, a template deletion instruction of the fourth message template;
[0100] Delete the fourth message template according to the template deletion instruction.
[0101] It can be seen that since the message push system in the embodiment of the present application is configured with a template field configuration table for each message template, the dynamic configuration device 600 of the message template only needs to modify the template field configuration table of the message template that needs to be modified according to the message template configuration instruction to realize the modification of the message template. There is no need for secondary development, joint debugging and version release of the message push system. Therefore, by changing the message template through this solution, the workload of modifying the message push system can be reduced.
[0102] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the dynamic configuration device of the above-mentioned message template and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and brevity of the description, it will not be repeated here.
[0103] The above-mentioned dynamic configuration device of the message template can be implemented in the form of a computer program.
[0104] The computer device can be a terminal or a server, wherein the terminal can be an electronic device with communication functions, such as a smartphone, tablet computer, laptop computer, desktop computer, personal digital assistant, and wearable device. The server can be a standalone server or a server cluster consisting of multiple servers. The computer device is integrated with a message push system, which maintains multiple constructed message templates and is provided with a template field configuration module. The template field configuration module stores a template field configuration table corresponding to each of the message templates.
[0105] The computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0106] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute a dynamic configuration method for a message template.
[0107] The processor is used to provide computing and control capabilities to support the operation of the entire computer equipment.
[0108] The internal memory provides an environment for the operation of a computer program in a non-volatile storage medium. When the computer program is executed by a processor, the processor can execute a dynamic configuration method for a message template.
[0109] The network interface is used to communicate with other devices over the network.
[0110] The processor is configured to execute a computer program stored in the memory to implement the following steps:
[0111] receiving a message template configuration instruction of a first message template;
[0112] Based on the message template configuration instruction, modify the first template field configuration table to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template;
[0113] The first message template is updated according to the second template field configuration table to obtain a second message template.
[0114] In some embodiments, the message template configuration instruction includes at least one of a mapping relationship modification instruction and a message field modification instruction; when the processor implements the step of modifying the first template field configuration table based on the message template configuration instruction, the processor specifically implements the following steps:
[0115] Modify the mapping relationship in the first template field configuration table according to the mapping relationship modification instruction; and / or,
[0116] Add or delete message fields in the first template field configuration table according to the message field modification instruction.
[0117] In some embodiments, the processor further implements the following steps:
[0118] Receive a new instruction for a third message template, the new instruction including a target message transmission address, at least one target message field identifier, and target mapping relationships corresponding to the target message field identifiers, the target mapping relationships including mapping relationships between scenario message fields and service fields;
[0119] Determining a target message field corresponding to the target message field identifier among a plurality of preset message fields;
[0120] The third message template is constructed according to the target message field and the target mapping relationship, and a correspondence between the third message template and the target message transmission address is constructed, and a third template field configuration table is constructed in the template field configuration module, and the third template field configuration table stores the target mapping relationship and the target message field.
[0121] In some embodiments, after implementing the step of updating the first message template according to the second template field configuration table to obtain the second message template, the processor further implements the following steps:
[0122] Obtaining a push instruction corresponding to the second message template;
[0123] In response to the push instruction, determining a target service value corresponding to the second message template from a plurality of preset service values;
[0124] Assembling the second message template and the target service value to obtain a message to be pushed;
[0125] The message to be pushed is pushed according to a preset message transmission address corresponding to the second message template.
[0126] In some embodiments, after implementing the step of assembling the second message template and the target service value to obtain the message to be pushed, the processor further implements the following steps:
[0127] The message to be pushed is stored in a preset message log table.
[0128] In some embodiments, after implementing the step of pushing the message to be pushed according to the preset message transmission address corresponding to the second message template, the processor further implements the following steps:
[0129] Receive feedback results of the message to be pushed;
[0130] The push status of the message to be pushed is recorded according to the feedback result.
[0131] In some embodiments, the processor further implements the following steps:
[0132] Receive a template deletion instruction for the fourth message template of the message;
[0133] Delete the fourth message template according to the template deletion instruction.
[0134] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0135] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program includes program instructions, which can be stored in a storage medium that is computer-readable. The program instructions are executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.
[0136] Therefore, the present application also provides a storage medium. The storage medium may be a computer-readable storage medium, which may be non-volatile or volatile. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor performs the following steps:
[0137] receiving a message template configuration instruction of a first message template;
[0138] Based on the message template configuration instruction, modify the first template field configuration table to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template;
[0139] The first message template is updated according to the second template field configuration table to obtain a second message template.
[0140] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0141] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0142] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and other division methods may be used in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not implemented.
[0143] The steps in the method of the embodiment of the present application can be adjusted in order, combined, and deleted according to actual needs. The units in the device of the embodiment of the present application can be combined, divided, and deleted according to actual needs. In addition, the functional units in the various embodiments of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit.
[0144] If this integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this application.
[0145] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A dynamic configuration method for a message template, wherein, The method is applied to a message push system, in which multiple built message templates are maintained, and a template field configuration module is provided in the message push system. A template field configuration table corresponding to each message template is stored in the template field configuration module. The method includes: Receiving a message template configuration instruction for a first message template; Based on the message template configuration instruction, modifying a first template field configuration table to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template; Updating the first message template according to the second template field configuration table to obtain a second message template.
2. The method according to claim 1, wherein The message template configuration instruction includes at least one of a mapping relationship modification instruction and a message field modification instruction; The modifying the first template field configuration table based on the message template configuration instruction includes: Modifying the mapping relationship in the first template field configuration table according to the mapping relationship modification instruction; And / or, Adding or deleting message fields in the first template field configuration table according to the message field modification instruction.
3. The method according to claim 1, wherein The method further includes: Receiving an addition instruction for a third message template, where the addition instruction includes a target message transmission address, at least one target message field identifier, and a target mapping relationship corresponding to each target message field identifier, and the target mapping relationship includes a mapping relationship between a scenario message field and a service field; Determining a target message field corresponding to the target message field identifier from a preset plurality of message fields; Constructing the third message template according to the target message field and the target mapping relationship, constructing a corresponding relationship between the third message template and the target message transmission address, and constructing a third template field configuration table in the template field configuration module, where the third template field configuration table stores the target mapping relationship and the target message field.
4. The method according to any one of claims 1 to 3, wherein After updating the first message template according to the second template field configuration table to obtain a second message template, the method further includes: Obtaining a push instruction corresponding to the second message template; In response to the push instruction, determining a target service value corresponding to the second message template from a preset plurality of service values; Assembling the second message template and the target service value to obtain a message to be pushed; Pushing the message to be pushed according to a preset message transmission address corresponding to the second message template.
5. The method according to claim 4, wherein, After assembling the second message template and the target service value to obtain a message to be pushed, the method further includes: Storing the message to be pushed into a preset message log table.
6. The method according to claim 4, wherein After pushing the message to be pushed according to a preset message transmission address corresponding to the second message template, the method further includes: Receiving a feedback result of the message to be pushed; Recording the push status of the message to be pushed according to the feedback result.
7. The method according to any one of claims 1 to 3, wherein The method further includes: Receiving a template deletion instruction for a fourth message template; Deleting the fourth message template according to the template deletion instruction.
8. A dynamic configuration device for a message template, wherein, The device is arranged in a message push system, in which a plurality of constructed message templates are maintained, and a template field configuration module is provided in the message push system. A template field configuration table corresponding to each message template is stored in the template field configuration module. The device includes: A transceiver module, configured to receive a message template configuration instruction of a first message template; A processing module, configured to modify a first template field configuration table based on the message template configuration instruction to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template; and update the first message template according to the second template field configuration table to obtain a second message template.
9. A computer device, wherein, A message push system is deployed in the computer device, in which a plurality of constructed message templates are maintained, and a template field configuration module is provided in the message push system. A template field configuration table corresponding to each message template is stored in the template field configuration module. The computer device includes a memory and a processor. A computer program is stored on the memory. When the processor executes the computer program, the following steps are implemented: Receive a message template configuration instruction of a first message template; Modify a first template field configuration table based on the message template configuration instruction to obtain a second template field configuration table, where the first template field configuration table is used to record the field configuration of the first message template; Update the first message template according to the second template field configuration table to obtain a second message template.
10. The computer device according to claim 9, wherein, The message template configuration instruction includes at least one of a mapping relationship modification instruction and a message field modification instruction; The modifying the first template field configuration table based on the message template configuration instruction includes: Modifying the mapping relationship in the first template field configuration table according to the mapping relationship modification instruction; And / or Adding or deleting message fields in the first template field configuration table according to the message field modification instruction.
11. The computer device according to claim 9, wherein, The computer device further includes: Receive an addition instruction of a third message template, where the addition instruction includes a target message transmission address, at least one target message field identifier, and a target mapping relationship corresponding to each target message field identifier, and the target mapping relationship includes a mapping relationship between a scenario message field and a service field; Determine a target message field corresponding to the target message field identifier from a preset plurality of message fields; Construct the third message template according to the target message field and the target mapping relationship, construct a corresponding relationship between the third message template and the target message transmission address, and construct a third template field configuration table in the template field configuration module, where the third template field configuration table stores the target mapping relationship and the target message field.
12. The computer device according to any one of claims 9 to 11, wherein, After updating the first message template according to the second template field configuration table to obtain a second message template, the following is further included: Obtain a push instruction corresponding to the second message template; In response to the push instruction, determine a target service value corresponding to the second message template from a plurality of preset service values; Perform an assembly process on the second message template and the target service value to obtain a message to be pushed; Push the message to be pushed according to a preset message transfer address corresponding to the second message template.
13. The computer device according to claim 12, wherein, After performing the assembly process on the second message template and the target service value to obtain a message to be pushed, the computer device further includes: Store the message to be pushed into a preset message log table.
14. The computer device according to claim 12, wherein, After pushing the message to be pushed according to a preset message transfer address corresponding to the second message template, it further includes: Receive a feedback result of the message to be pushed; Record the push status of the message to be pushed according to the feedback result.
15. The computer device according to any one of claims 9 to 11, wherein, The computer device further includes: Receive a template deletion instruction for a fourth message template; Delete the fourth message template according to the template deletion instruction.
16. A computer-readable storage medium, wherein, The computer-readable storage medium is stored in a message push system. In the message push system, a plurality of constructed message templates are maintained. And in the message push system, there is a template field configuration module. In the template field configuration module, there is a template field configuration table corresponding to each of the message templates. The storage medium stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the following operations are performed: Receive a message template configuration instruction for a first message template; Based on the message template configuration instruction, modify a first template field configuration table to obtain a second template field configuration table. The first template field configuration table is used to record the field configuration of the first message template; Update the first message template according to the second template field configuration table to obtain a second message template.
17. The computer-readable storage medium according to claim 16, wherein, The message template configuration instruction includes at least one of a mapping relationship modification instruction and a message field modification instruction; Based on the message template configuration instruction, modifying the first template field configuration table includes: Modify the mapping relationship in the first template field configuration table according to the mapping relationship modification instruction; And / or Add or delete message fields in the first template field configuration table according to the message field modification instruction.
18. The computer-readable storage medium according to claim 16, wherein, The computer-readable storage medium further includes: Receive an addition instruction for a third message template. The addition instruction includes a target message transfer address, at least one target message field identifier, and a target mapping relationship corresponding to each target message field identifier. The target mapping relationship includes a mapping relationship between a scenario message field and a service field; Determine a target message field corresponding to the target message field identifier from a plurality of preset message fields; Construct the third message template according to the target message field and the target mapping relationship, construct a corresponding relationship between the third message template and the target message transfer address, and construct a third template field configuration table in the template field configuration module. The third template field configuration table stores the target mapping relationship and the target message field.
19. The computer-readable storage medium according to any one of claims 16 to 18, wherein After updating the first message template according to the second template field configuration table to obtain a second message template, the method further includes: Obtaining a push instruction corresponding to the second message template; In response to the push instruction, determining a target service value corresponding to the second message template from a plurality of preset service values; Performing an assembly process on the second message template and the target service value to obtain a message to be pushed; Pushing the message to be pushed according to a preset message transfer address corresponding to the second message template.
20. The computer-readable storage medium according to claim 19, wherein, After performing the assembly process on the second message template and the target service value to obtain a message to be pushed, the method further includes: Storing the message to be pushed into a preset message log table.
