CN116089123A - Message touch method and system - Google Patents

Message touch method and system Download PDF

Info

Publication number
CN116089123A
CN116089123A CN202310067138.2A CN202310067138A CN116089123A CN 116089123 A CN116089123 A CN 116089123A CN 202310067138 A CN202310067138 A CN 202310067138A CN 116089123 A CN116089123 A CN 116089123A
Authority
CN
China
Prior art keywords
message
sent
service
sending
record
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310067138.2A
Other languages
Chinese (zh)
Inventor
林晓辉
丁明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Xuanwu Wireless Technology Co Ltd
Original Assignee
Guangzhou Xuanwu Wireless Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Xuanwu Wireless Technology Co Ltd filed Critical Guangzhou Xuanwu Wireless Technology Co Ltd
Priority to CN202310067138.2A priority Critical patent/CN116089123A/en
Publication of CN116089123A publication Critical patent/CN116089123A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Signal Processing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Game Theory and Decision Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a message touch method and a system, comprising the following steps: checking the acquired service information according to the service message processing interface, inquiring a variable name corresponding to the digital code by taking the digital code as an inquiry condition for service content, and acquiring a message body of the checked service information; packaging the triggering message content of the message body, and storing the message body and the triggering message content into a database according to a preset format; monitoring the number of first line records to be sent in a database in real time, and judging whether the number of the first line records to be sent is larger than or equal to a first threshold value; and if the first line record is greater than or equal to the first threshold value, packaging the first line record to be sent according to the message sending interface provided by the message service provider corresponding to the first line record to be sent, and transmitting the first line record to the corresponding message service provider for sending. The invention can enrich the media of the message service, promote the interactive perception of store staff on the media of the message channel, and improve the conversion rate of the message body entering the service scene.

Description

Message touch method and system
Technical Field
The present invention relates to the field of computer information processing, and in particular, to a method and system for message access.
Background
In the existing quick-elimination marketing management system, the business scene that the system message is touched to store personnel is realized through the channel medium of text short messages. However, as the demands of the management side of the quick-elimination marketing management system for the message service are gradually enriched, the management side expects that the system message service can promote the interactive perception requirements of store personnel on the medium of the message channel, can promote the conversion rate of entering the business scene through the message body, and can optimize the structural robustness of the message service under the request of a large data volume, so that the improvement and optimization of the business and technology of the existing system message are required.
Therefore, in order to meet the above scenario and the back significance, a quick-elimination marketing management system is needed to improve the interactive perception of store staff on the media of the message channel and the conversion rate of the message body into the business scenario, enrich the media of the message service and optimize the message service architecture.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a message touch method and a message touch system, which aim to enrich media of message service, promote interactive perception of store staff on media of message channels, and further improve the conversion rate of a message body entering a service scene.
In a first aspect, the present invention provides a method of message touchdown, the method comprising:
acquiring service information, checking the service information according to a service message processing interface, and inquiring a variable name corresponding to a digital code by taking the digital code as an inquiry condition according to service content of an application message template to acquire a message body of the checked service information;
packaging the triggering message content of the message body, and storing the message body and the triggering message content into a database as a first line record to be sent according to a preset format;
monitoring the number of first line records to be sent in a database in real time, and judging whether the number of the first line records to be sent is larger than or equal to a first threshold value;
and if the number of the first line records to be sent is greater than or equal to a first threshold value, sequentially packaging the first line records to be sent according to the message sending interfaces provided by the message service providers corresponding to the first line records to be sent, and transmitting the first line records to the corresponding message service providers for sending.
The invention adopts the verification of the business information, and obtains the checked message body by taking the digital code as the query condition, thus being capable of improving the integrity of the obtained business information, so that after the business record is sent and touched to the store staff, the store staff can execute the task according to the complete business information, thereby improving the efficiency of the store staff to execute the business and further improving the conversion rate of the message body entering the business scene; and the message body and the trigger message content are packaged into a database according to a preset format, so that the procedure of manually changing the message body and the trigger message content into a standard format to the database can be reduced, the efficiency of acquiring records to be sent to store staff from the database is improved, and the conversion rate of entering the message body into a service scene is further improved; in addition, according to the message service provider of the record to be sent, the corresponding message sending interface is used, so that messages in various different forms can be conveniently sent to store staff by the corresponding message service provider, media of the message service can be enriched, interactive perception of the store staff on media of the message channel is improved, and the conversion rate of business scenes is further improved.
Further, according to the service content of the application message template, the variable name corresponding to the digital code is queried by taking the digital code as a query condition, and the message body of the checked service information is obtained, specifically:
inquiring a corresponding application message template from a database according to the application message template code to obtain the basic message content of the checked service information;
and according to the service content in the application message template, inquiring a variable name corresponding to the digital code by taking the digital code as an inquiry condition, performing double-cycle variable character value matching on the variable name and parameters of the service message processing interface, and replacing the variable value of the matchable variable in the application message template to obtain a message body text body of the service information.
The invention adopts the double-circulation variable character value matching of the variable name and the parameters of the business message processing interface, replaces the variable value of the matchable variable in the application message template to obtain the message body text body of the business information, can accurately match the message body of the business information, and extracts the accurate message body so as to package the message body and the triggering message content into the database, thereby reducing the procedures of manually changing the manual operation into the standard format to the database, improving the efficiency of acquiring records to be sent to store staff from the database, and further improving the conversion rate of the message body entering the business scene.
Further, the verifying the service information according to the service message processing interface specifically includes:
acquiring the service content in the corresponding service according to the service information, including: title, summary, details, send object, receive object, apply message template encoding; wherein the sending object, the receiving object and the application message template code are long integer values generated by a snowflake algorithm model;
verifying the service content, including: non-null determination, strong type determination, verification of whether a transmission object or a reception object exists.
The invention adopts operations such as non-empty judgment, strong type judgment, verification of whether the sending object or the receiving object exists or not and the like to acquire the complete business information of the information, so that after the information is touched by the store staff, the store staff can execute tasks according to the complete business information, thereby improving the efficiency of executing the business by the store staff and further improving the conversion rate of entering the business scene by the information body.
Further, after obtaining the message body of the checked service information, the method further includes:
and generating a unique identifier corresponding to the message body according to the identification algorithm model, and storing the unique identifier and the corresponding message body in a database according to a one-to-one relationship.
Further, according to a preset format, the message body and the trigger message content are stored in a database as a first line record to be sent, specifically:
and according to the preset formats of the sending object, the touch medium, the triggering time and condition, the unique identification of the message body, the single receiving object, whether the message is sent or not and whether the receiving object is read or not, the message is used as the record information to be sent and is stored in a database.
The invention adopts the preset format of sending object-touch medium-triggering time and condition-unique identification of message body-single receiving object-whether the message is sent-whether the receiving object is read, packages the message body and the content of the triggering message into a database, optimizes the message service architecture, directly stores the packaged data into the database, and can reduce the procedure of manually changing the data into the standard format to the database, thereby improving the efficiency of acquiring records to be sent from the database to store staff and further improving the conversion rate of the message body entering the service scene.
Further, the packaging the first line record to be sent according to the message sending interface provided by the message service provider corresponding to the first line record to be sent in turn, and transmitting the first line record to the corresponding message service provider for sending, including:
Sending the first line record to be sent into a message queue middleware, and presetting a first-in first-out consumption acquisition mechanism according to the message queue middleware according to an acquisition task interface of the message queue middleware to obtain a second line record to be sent;
judging the type of the message service provider according to the message service provider corresponding to the second to-be-sent record, and acquiring a message sending interface corresponding to the message service provider;
acquiring information of a receiving object in a second to-be-transmitted line record, and packaging the second to-be-transmitted line record and the information of a corresponding receiving store staff according to a data format of the message transmitting interface to obtain a corresponding parameter content body;
and transmitting the parameter content body to a corresponding message service provider for sending.
Further, after transmitting the parameter content body to the corresponding message service provider for sending, the method further comprises:
acquiring a first sending result of a corresponding message service provider;
respectively updating the second to-be-transmitted records in the message queue of the batch into a database according to the corresponding first transmission result;
and continuously monitoring the number of the first line records to be sent in the database, wherein the first line records to be sent are used for judging whether the number of the first line records to be sent is smaller than a first threshold value.
Further, the determining the type of the message service provider according to the message service provider corresponding to the second to-be-sent record, and obtaining the message sending interface corresponding to the message service provider includes:
obtaining a corresponding message service provider according to the touch medium corresponding to the second to-be-sent line record, specifically:
if the touch medium is a text message or a 5G message, the message service provider is a mobile communication service provider;
if the touch medium is a WeChat applet, the message service provider serves a notification interface for the corresponding WeChat applet;
if the touch medium is a WeChat public number, the message service provider is a message notification interface corresponding to the WeChat public number.
The invention adopts different touch media to be sent and recorded, and uses the corresponding message service provider, thereby being capable of conveniently sending the message content to store staff in various different forms by the corresponding message service provider, enriching the media of the message service, improving the interactive perception of the store staff on the media of the message channel and further improving the conversion rate of the service scene.
Further, the method for message arrival further comprises the following steps: and carrying out compensation transmission on the record to be transmitted, which is failed to be transmitted, specifically:
According to the sequence of the creation time, a first to-be-sent line record with a first sending result of sending failure in a database is obtained in batches according to batches, and a third to-be-sent line record is obtained;
acquiring a second transmission result of the corresponding message service provider, updating a transmission flag bit in a database, and if the second transmission result is still transmission failure, not performing compensation transmission;
and continuously monitoring the third row record to be transmitted, wherein the first transmission result in the database is the transmission failure, until the number of the first row records to be transmitted, the first transmission result in the database is the transmission failure, is smaller than a second threshold value.
The invention adopts the transmission mechanism of distributed task scheduling to sequentially carry out compensation transmission on the third record to be transmitted by the corresponding message service provider, optimizes the message service architecture, can carry out the compensation transmission on the record to be transmitted with failed transmission, and only carries out the compensation transmission once, thereby avoiding the resource consumption caused by that the repeated compensation transmission still cannot reach store staff.
In a second aspect, the present invention also provides a system for message touch, including:
the message body acquisition module is used for acquiring service information, checking the service information according to a service message processing interface, and inquiring a variable name corresponding to the digital code by taking the digital code as an inquiry condition according to service content of an application message template to acquire a message body of the checked service information;
The message verification module is used for verifying the service information according to the service message processing interface and obtaining a message body of the verified service information according to the application message template;
the message encapsulation model engine module is used for encapsulating the trigger message content of the message body, and storing the message body and the trigger message content into a database as a first line record to be sent according to a preset format;
the monitoring module is used for monitoring the number of the first line records to be sent in the database in real time and judging whether the number of the first line records to be sent is larger than or equal to a first threshold value;
and the message sending engine module is used for packaging the first line record to be sent according to the message sending interface provided by the message service provider corresponding to the first line record to be sent in sequence and transmitting the first line record to the corresponding message service provider for sending if the number of the first line record to be sent is greater than or equal to a first threshold value.
Drawings
FIG. 1 is a schematic diagram of a message arrival process according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a comparison of a message touch media architecture according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a snowflake algorithm model provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of an optimized messaging service link provided by an embodiment of the present invention;
FIG. 5 is a schematic architecture diagram of an XXL-JOB distributed task scheduling platform provided by an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a messaging system according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a schematic flow chart of message touch provided by the embodiment of the invention includes steps S11 to S14, and the embodiment uses a marketing business management system product as a verification test of a demand scene of a fast-eliminating customer, namely product capability verification (PoC for short), provides a set of message touch technical scheme applied to the fast-eliminating industry based on original system optimization, so as to solve the two core demands that the customer expects a display activity message which can be recorded in a background by the marketing system, and has more than 2 message channels which touch a store personnel role in a business system and comprehensively reaches more than 95% message touch rate. The steps will be specifically described with reference to the drawings. The method comprises the following steps:
And S11, acquiring service information, checking the service information according to a service message processing interface, and inquiring a variable name corresponding to the digital code by taking the digital code as an inquiry condition according to service content of an application message template to acquire a message body of the checked service information.
It should be noted that, the message triggering method provided by the embodiment of the invention is applied to receiving messages by store staff, so that the interactive perception of the store staff on the message channel medium is improved according to various channel media, and the conversion rate of the message body entering the service scene is improved.
The invention adopts to check the business information, and the digital code is used as the query condition to obtain the checked message text body, thus being capable of improving the integrity of the obtained business information, so that after the business record is sent and touched to the store staff, the store staff can execute the task according to the complete business information, and the click rate of the store staff on the message and the access rate of the corresponding message business are improved, thereby improving the business execution efficiency of the store staff and increasing the business value of the business, and the invention comprises the following steps: and the income of the product order and the redemption of the gold coin are completed, so that the conversion rate of the message body into the business scene is improved.
The method comprises the steps of inquiring variable names corresponding to digital codes by taking the digital codes as inquiry conditions according to service contents of an application message template, and acquiring message bodies of checked service information, wherein the message bodies specifically comprise:
inquiring a corresponding application message template from a database according to the application message template code to obtain the basic message content of the checked service information; and according to the service content in the application message template, inquiring a variable name corresponding to the digital code by taking the digital code as an inquiry condition, matching the variable name with a variable character value of double circulation of parameters of the service message processing interface (API), and replacing the variable value of a variable matched in the application message template to obtain a message body text body of service information.
In addition, the checking the service information according to the service message processing interface specifically includes:
acquiring the service content in the corresponding service according to the service information, including: title, summary, details, send object, receive object, apply message template encoding; the sending object, the receiving object and the application message template code are long integer values generated by a snowflake algorithm model, see fig. 3, which is a schematic diagram of the snowflake algorithm model provided by the embodiment of the invention, and in the diagram, the method includes: 41-bit millisecond time stamp, 10 machine code, 12-bit serial number; verifying the service content, including: non-null determination, strong type determination, verification of whether a transmission object or a reception object exists.
The invention adopts snowflake algorithm to generate the identification of the sending object, the receiving object and the application message template code, can ensure the uniqueness of the sending object, the receiving object and the application message template code identification, can accommodate the 64-bit identification through the long-integer identification type, and comprises the following steps: the most significant bit is 0, is a fixed value, is a 41-bit millisecond time stamp, a 10-bit machine code and a 12-bit serial number, can accommodate enough records to be transmitted in a high concurrence distributed environment, and can ensure that the automatic generation of the identification of a transmitting object, a receiving object and an application message template code is not repeated; moreover, the snowflake algorithm generates the identifiers based on the time stamp, so that the identifiers of the sending object, the receiving object and the application message template code are ensured to be basically and orderly increased, and batch data can be conveniently inquired; in addition, in the process of generating the identifiers, the method is not dependent on a third party library or middleware, is easy to realize, can quickly generate the corresponding identifiers when the records to be transmitted are more, can improve the efficiency of generating the records to be transmitted in the standard format, can quickly store the records in the database, can reduce the procedures of manually changing the records to be transmitted into the standard format to the database, thereby improving the efficiency of acquiring the records to be transmitted to store staff from the database, and further improving the conversion rate of entering the message body into the service scene.
After the message body of the checked service information is obtained, the method further comprises the following steps: and generating a unique identifier corresponding to the message body according to the identification algorithm model, and storing the unique identifier and the corresponding message body in a database according to a one-to-one relationship.
And step S12, packaging the trigger message content of the message body, and storing the message body and the trigger message content into a database as a first line record to be sent according to a preset format.
Specifically, the storing the message body and the trigger message content as a first line record to be sent in a database according to a preset format includes: and according to the preset formats of the sending object, the touch medium, the triggering time and condition, the unique identification of the message body, the single receiving object, whether the message is sent or not and whether the receiving object is read or not, the message is used as the record information to be sent and is stored in a database.
Wherein the trigger message content is a message content other than the message body, comprising: the method comprises the steps of sending an object, touching a medium, triggering condition time and conditions and receiving the object. Wherein, the sending object is the manager information of the show activity, and the touch medium comprises: the triggering condition time and condition include the sending time of the record to be sent, the receiving object includes the received store staff label information, and the receiving object in the receiving object triggering message content may be a single receiving object or a receiving object group of multiple receiving objects, which is not limited herein.
The invention encapsulates the triggering message content according to the preset format, and stores the message body and the encapsulated data in the database, so that the procedure of manually changing the manual mode into the standard format to the database can be reduced, the efficiency of acquiring records to be sent from the database to store staff is improved, and the conversion rate of the message body entering the service scene is further improved.
And step S13, monitoring the number of the first line records to be sent in the database in real time, and judging whether the number of the first line records to be sent is larger than or equal to a first threshold value.
Preferably, the first threshold is 1.
Step S14, if the number of the first line records to be sent is greater than or equal to the first threshold, the first line records to be sent are packaged sequentially according to the message sending interfaces provided by the message service providers corresponding to the first line records to be sent, and are transmitted to the corresponding message service providers for sending.
It should be noted that, when the number of the first line records to be sent is detected to be greater than or equal to the first threshold, an asynchronous multipath thread processing mode is built according to a CPU intensive algorithm formula, each thread obtains the line record information to be sent from the database in a batch mode according to a preset fixed value and in an ascending order of the line record information creation time, and the batch information is identified as "in process".
Preferably, the CPU-intensive algorithm formula may be expressed as:
Count CPU core thread count =Count CPU core thread count +1,
Wherein Count CPU core number Representing the number of physical cores, count, of a CPU of a computer, known from system and program parameters CPU core thread count Representing the number of multithreaded configuration core threads calculated by the formula.
Preferably, the preset fixed value is set to 10000.
Specifically, the packaging the first line record to be sent according to the message sending interface provided by the message service provider corresponding to the first line record to be sent, and transmitting the first line record to the corresponding message service provider for sending, including:
step S141, sending the first line record to be sent to a message queue middleware, and according to the acquisition task interface of the message queue middleware, presetting a first-in first-out consumption acquisition mechanism according to the message queue middleware, thereby obtaining a second line record to be sent.
Specifically, the obtained information of the batch of the row records to be sent is sequentially transferred into the message queue middleware by using the circulation logic of the computer program language, and the row records to be sent are waiting to be sent. When the record to be sent in the message queue middleware is monitored, a thread is randomly pulled from the thread pool. The thread obtains the specific record to be sent as the second record to be sent through the task obtaining interface of the message queue middleware according to a default consumption obtaining mechanism of first-in first-out preset by the message queue middleware.
Step S142, judging the type of the message service provider according to the message service provider corresponding to the second to-be-transmitted record, and acquiring a message transmission interface corresponding to the message service provider.
Specifically, the type of message service provider is determined and the messaging interface provided by the corresponding software development kit (Software Development Kit, SDK) is evoked.
And step S143, acquiring information of a receiving object in the second record to be sent, and packaging the second record to be sent and the information of the corresponding receiving store staff according to the data format of the message sending interface to obtain a corresponding parameter content body.
Specifically, according to the specific receiving parameters of the API, obtaining the information of the receiving object in the second to-be-sent line message record includes: the administrator name, the message sending time, the message title, the message details, the mobile phone number of the store staff receiving the message or the unique WeChat identifier, wherein the unique WeChat identifier comprises: user information in the applet or user information in the WeChat public number; the description of the second to-be-sent line record may further include a message summary, which is not limited herein. And then the information of the second to-be-sent message record and the received object is packaged into a parameter content body of the network request according to the API requirement format in the SDK.
The invention adopts the message service provider according to the record to be sent and uses the corresponding message sending interface, thereby being capable of conveniently sending the message content of a plurality of different forms to store staff by the corresponding message service provider, enriching the media of the message service, improving the interactive perception of the store staff on the media of the message channel and further improving the conversion rate of the service scene.
And step S144, transmitting the parameter content body to a corresponding message service provider for transmission.
Specifically, after receiving and transmitting the encapsulated parameter content body, the message service provider receives a first transmission result returned by the message service provider as a transmission flag bit corresponding to the database, and the method includes: successful and failed transmission.
Wherein after transmitting the parameter content body to the corresponding message service provider for sending, the method further comprises:
acquiring a first sending result of a corresponding message service provider; respectively updating the second to-be-transmitted records in the message queue of the batch into a database according to the corresponding first transmission result; and continuously monitoring the number of the first line records to be sent in the database, wherein the first line records to be sent are used for judging whether the number of the first line records to be sent is smaller than a first threshold value.
In addition, the determining the type of the message service provider according to the message service provider corresponding to the second to-be-sent record, and obtaining the message sending interface corresponding to the message service provider includes:
obtaining a corresponding message service provider according to the touch medium corresponding to the second to-be-sent line record, specifically:
if the touch medium is a text message or a 5G message, the message service provider is a mobile communication service provider;
if the touch medium is a WeChat applet, the message service provider serves a notification interface for the corresponding WeChat applet;
if the touch medium is a WeChat public number, the message service provider is a message notification interface corresponding to the WeChat public number.
Referring to fig. 2, a schematic diagram of comparison of a messaging media architecture provided by an embodiment of the present invention is shown in fig. 2 (a) which is a messaging media architecture in the prior art, and fig. 2 (b) which is a messaging media architecture of the present invention, by adding public number messaging service and applet messaging service to optimize the messaging service architecture, it is convenient for a plurality of different forms of messaging to send the message content to store staff with corresponding messaging service providers, and the media of the messaging service can be enriched, so that interactive perception of store staff on the media of a messaging channel is improved, and the conversion rate of a service scenario is further improved.
Wherein, still include: and carrying out compensation transmission on the record to be transmitted, which is failed to be transmitted, specifically:
according to the sequence of the creation time, a first to-be-sent line record with a first sending result of sending failure in a database is obtained in batches according to batches, and a third to-be-sent line record is obtained; acquiring a second transmission result of the corresponding message service provider, updating a transmission flag bit in a database, and if the second transmission result is still transmission failure, not performing compensation transmission; and continuously monitoring the third row record to be transmitted, wherein the first transmission result in the database is the transmission failure, until the number of the first row records to be transmitted, the first transmission result in the database is the transmission failure, is smaller than a second threshold value.
Specifically, the transmission mechanism of the distributed task scheduling acquires a scheduled task configuration formula (CORN expression formula) running mechanism to start a scheduling thread, the scheduling thread acquires a third to-be-transmitted line record with a transmission identification bit of "transmission failure" from a database in batches in ascending order of creation time of the to-be-transmitted line record, writes the batch information identification into "compensation processing", and performs compensation transmission. Acquiring a second transmission result of the corresponding message service provider, updating a transmission flag bit in a database, and if the second transmission result is still transmission failure, updating the message identification bit into 'compensation transmission failure', and not performing compensation transmission; and continuously monitoring the third row record to be transmitted, wherein the first transmission result in the database is the transmission failure, until the number of the first row records to be transmitted, the first transmission result in the database is the transmission failure, is smaller than a second threshold value.
Preferably, the second threshold is 1.
Preferably, the batch has a value of 5000.
Preferably, the sending mechanism of the distributed task scheduling is an XXL-JOB distributed task scheduling platform, and referring to fig. 5, an architecture diagram of the XXL-JOB distributed task scheduling platform provided by the embodiment of the present invention is shown.
The invention increases message queue middleware and compensation sending operation, further optimizes message service architecture, can improve the reliability and message reaching rate of message reaching store staff, and can carry out secondary compensation sending to enable the message to reach the store staff even if the system is abnormal or individual message sending fails, thereby reducing the risk of important business message missing, and carrying out compensation sending only once, thereby avoiding resource consumption caused by that the repeated compensation sending still cannot reach the store staff.
The invention also provides an optimized message touch frame, and referring to fig. 4, a schematic diagram of an optimized message sending service link provided by the embodiment of the invention is provided.
The invention also provides a message touch system, referring to fig. 6, which is a schematic structural diagram of the message touch system provided by the embodiment of the invention, where the message touch system includes: a message body acquisition module 61, a message encapsulation model engine module 62, a monitoring module 63 and a message sending engine module 64. The embodiment provides a set of message arrival system which is applied to the quick-elimination industry after being optimized based on the original system by taking the marketing business management system product as a verification test of a demand scene of a certain quick-elimination customer.
The message body obtaining module 61 is configured to obtain service information, verify the service information according to a service message processing interface, and query a variable name corresponding to a digital code with the digital code as a query condition according to service content of an application message template, thereby obtaining a message body of the verified service information.
It should be noted that, when all program services of the system are successfully started, all system modules are simultaneously pulled up, and after the service information is logically processed by the computer program language according to the service information input by the system administrator in the management background interface, the service information is input and processed according to the interface information exposed by the message encapsulation model engine module 62.
The message encapsulation model engine module 62 is configured to encapsulate the trigger message content of the message body, and store the message body and the trigger message content as a first to-be-sent line record in a database according to a preset format.
After the listening thread of the message encapsulation model engine module 62 obtains that a service message enters, encapsulation processing is performed according to the logic of the message encapsulation model engine module according to the service information processing-replacement message variable-encapsulation message flow.
Specifically, after receiving the processing request, the service message processing API of the message encapsulation model engine module 62 transfers the service information, and checks the service information according to the use requirement of the API logic; replacing the application message template, the variable library and the same name of API service information; the method comprises the steps of inquiring a corresponding application message template from a database according to an application message template code to obtain the basic content of a message body of a message sending task, inquiring from a variable library to obtain English variable names corresponding to digital codes by taking the digital codes as inquiry conditions respectively because titles, summaries and the like in the message template exist in digital code placeholders, carrying out double-cycle variable character value identical matching on the English variable names and parameters of an API, and finally replacing variable values of all the matchable variables in the message template to obtain a message body; generating a unique identification of the message body by using an identification algorithm model, and storing the unique identification and the message problem in a database according to a one-to-one relationship; if the full necessary condition that the non-empty variable of the message template is completely replaced is met, packaging is carried out, otherwise, the sending condition is not reached, and the flow of the message variable is ended; when the packaging is carried out, a record to be sent in a database is formed according to the sequence of the contents to be packaged in a format of 'sending object-touch medium-triggering condition time and condition-message body unique identification-single receiving object-whether the message is sent-whether the receiving object is read', and the record to be sent is stored in the database.
The monitoring module 63 is configured to monitor, in real time, the number of first line records to be sent in the database, and determine whether the number of first line records to be sent is greater than or equal to a first threshold.
Specifically, the monitoring module 63 is in an operation state when the service is started, the monitoring thread of the monitoring module 63 monitors, and when the number of record information to be sent in the database is greater than or equal to a first threshold, the message sending engine 64 is triggered.
The message sending engine module 64 is configured to, if the number of the first to-be-sent line records is greater than or equal to the first threshold, sequentially encapsulate the first to-be-sent line records according to the message sending interfaces provided by the message service providers corresponding to the first to-be-sent line records, and transmit the first to-be-sent line records to the corresponding message service providers for sending.
Wherein the system further comprises: the compensation sending engine module 65 is configured to perform compensation sending on a record to be sent, where the record to be sent fails to be sent, specifically:
according to the sequence of the creation time, a first to-be-sent line record with a first sending result of sending failure in a database is obtained in batches according to batches, and a third to-be-sent line record is obtained; acquiring a second transmission result of the corresponding message service provider, updating a transmission flag bit in a database, and if the second transmission result is still transmission failure, not performing compensation transmission; and continuously monitoring the third row record to be transmitted, wherein the first transmission result in the database is the transmission failure, until the number of the first row records to be transmitted, the first transmission result in the database is the transmission failure, is smaller than a second threshold value.
The sending mechanism of the distributed task scheduling starts a scheduling thread according to a planning task configuration formula acquired from a management system interface, and the sending mechanism comprises the following steps: according to the timing configuration information comprising time, month, day, minute and second obtained from the management system interface, a scheduling thread is started to carry out compensation transmission; the scheduling thread acquires record information with a transmission identification bit of 'transmission failure' from a database in batches in an ascending order of the creation time of the row record to be transmitted, and marks the batch information as 'in compensation processing'; the dispatch thread will call the sending engine and send, if the second sending result returned by the message service provider is sending failure after the dispatch thread again performs compensation sending, the message identification bit is updated to 'compensation sending failure', and compensation sending is not performed any more; after the circulation is completed, the batch messages corresponding to the circulation are respectively updated to the transmission identification bits of the database row records according to the transmission result identification of each message; the scheduling thread continues to monitor until the number of the transmission line record information to be compensated in the database is queried to be not more than a second threshold value.
The invention optimizes the message service architecture so as to completely realize the PoC system product solution and service function; in addition, the system can achieve higher success rate and store personnel acceptance rate through text short message transmission, weChat applet service notification message transmission and WeChat public number target message transmission of the show activity.
It will be appreciated by those skilled in the art that embodiments of the present application may also provide a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and variations could be made by those skilled in the art without departing from the technical principles of the present invention, and such modifications and variations should also be regarded as being within the scope of the invention.

Claims (10)

1. A method of message touchdown, the method comprising:
acquiring service information, checking the service information according to a service message processing interface, and inquiring a variable name corresponding to a digital code by taking the digital code as an inquiry condition according to service content of an application message template to acquire a message body of the checked service information;
packaging the triggering message content of the message body, and storing the message body and the triggering message content into a database as a first line record to be sent according to a preset format;
monitoring the number of first line records to be sent in a database in real time, and judging whether the number of the first line records to be sent is larger than or equal to a first threshold value;
and if the number of the first line records to be sent is greater than or equal to a first threshold value, sequentially packaging the first line records to be sent according to the message sending interfaces provided by the message service providers corresponding to the first line records to be sent, and transmitting the first line records to the corresponding message service providers for sending.
2. The method for message access according to claim 1, wherein the step of inquiring the variable name corresponding to the digital code by using the digital code as an inquiry condition according to the service content of the application message template to obtain the message body of the checked service information comprises the following steps:
Inquiring a corresponding application message template from a database according to the application message template code to obtain the basic message content of the checked service information;
and according to the service content in the application message template, inquiring a variable name corresponding to the digital code by taking the digital code as an inquiry condition, performing double-cycle variable character value matching on the variable name and parameters of the service message processing interface, and replacing the variable value of the matchable variable in the application message template to obtain a message body text body of the service information.
3. The method for message access according to claim 1, wherein the verifying the service information according to the service message processing interface specifically comprises:
acquiring the service content in the corresponding service according to the service information, including: title, summary, details, send object, receive object, apply message template encoding; wherein the sending object, the receiving object and the application message template code are long integer values generated by a snowflake algorithm model;
verifying the service content, including: non-null determination, strong type determination, verification of whether a transmission object or a reception object exists.
4. The method of message access according to claim 1, further comprising, after obtaining the message body of the verified service information:
and generating a unique identifier corresponding to the message body according to the identification algorithm model, and storing the unique identifier and the corresponding message body in a database according to a one-to-one relationship.
5. The method of claim 1, wherein the storing the message body and the trigger message content as a first to-be-transmitted line record in a database according to a preset format is specifically:
and according to the preset formats of the sending object, the touch medium, the triggering time and condition, the unique identification of the message body, the single receiving object, whether the message is sent or not and whether the receiving object is read or not, the message is used as the record information to be sent and is stored in a database.
6. The method for message arrival as set forth in claim 1, wherein said sequentially encapsulating the first line record to be sent according to the message sending interface provided by the message service provider corresponding to the first line record to be sent, and transmitting the encapsulated first line record to the corresponding message service provider for sending, includes:
Sending the first line record to be sent into a message queue middleware, and presetting a first-in first-out consumption acquisition mechanism according to the message queue middleware according to an acquisition task interface of the message queue middleware to obtain a second line record to be sent;
judging the type of the message service provider according to the message service provider corresponding to the second to-be-sent record, and acquiring a message sending interface corresponding to the message service provider;
acquiring information of a receiving object in a second to-be-transmitted line record, and packaging the second to-be-transmitted line record and the information of a corresponding receiving store staff according to a data format of the message transmitting interface to obtain a corresponding parameter content body;
and transmitting the parameter content body to a corresponding message service provider for sending.
7. The method of message touchdown of claim 6, further comprising, after transmitting the parameter content body to a corresponding message facilitator for transmission:
acquiring a first sending result of a corresponding message service provider;
respectively updating the second to-be-transmitted records in the message queue of the batch into a database according to the corresponding first transmission result;
And continuously monitoring the number of the first line records to be sent in the database, wherein the first line records to be sent are used for judging whether the number of the first line records to be sent is smaller than a first threshold value.
8. The method of claim 7, wherein the determining the type of the message service provider according to the message service provider corresponding to the second record to be sent, and obtaining the message sending interface corresponding to the message service provider, includes:
obtaining a corresponding message service provider according to the touch medium corresponding to the second to-be-sent line record, specifically:
if the touch medium is a text message or a 5G message, the message service provider is a mobile communication service provider;
if the touch medium is a WeChat applet, the message service provider serves a notification interface for the corresponding WeChat applet;
if the touch medium is a WeChat public number, the message service provider is a message notification interface corresponding to the WeChat public number.
9. The method of message touchdown of claim 1, further comprising: and carrying out compensation transmission on the record to be transmitted, which is failed to be transmitted, specifically:
according to the sequence of the creation time, a first to-be-sent line record with a first sending result of sending failure in a database is obtained in batches according to batches, and a third to-be-sent line record is obtained;
Sequentially carrying out compensation transmission on the third to-be-transmitted records by a corresponding message service provider by using a transmission mechanism of distributed task scheduling;
acquiring a second transmission result of the corresponding message service provider, updating a transmission flag bit in a database, and if the second transmission result is still transmission failure, not performing compensation transmission;
and continuously monitoring the third row record to be transmitted, wherein the first transmission result in the database is the transmission failure, until the number of the first row records to be transmitted, the first transmission result in the database is the transmission failure, is smaller than a second threshold value.
10. A system for message touchdown, comprising:
the message body acquisition module is used for acquiring service information, checking the service information according to a service message processing interface, and inquiring a variable name corresponding to the digital code by taking the digital code as an inquiry condition according to service content of an application message template to acquire a message body of the checked service information;
the message encapsulation model engine module is used for encapsulating the trigger message content of the message body, and storing the message body and the trigger message content into a database as a first line record to be sent according to a preset format;
The monitoring module is used for monitoring the number of the first line records to be sent in the database in real time and judging whether the number of the first line records to be sent is larger than or equal to a first threshold value;
and the message sending engine module is used for packaging the first line record to be sent according to the message sending interface provided by the message service provider corresponding to the first line record to be sent in sequence and transmitting the first line record to the corresponding message service provider for sending if the number of the first line record to be sent is greater than or equal to a first threshold value.
CN202310067138.2A 2023-01-29 2023-01-29 Message touch method and system Pending CN116089123A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310067138.2A CN116089123A (en) 2023-01-29 2023-01-29 Message touch method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310067138.2A CN116089123A (en) 2023-01-29 2023-01-29 Message touch method and system

Publications (1)

Publication Number Publication Date
CN116089123A true CN116089123A (en) 2023-05-09

Family

ID=86200572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310067138.2A Pending CN116089123A (en) 2023-01-29 2023-01-29 Message touch method and system

Country Status (1)

Country Link
CN (1) CN116089123A (en)

Similar Documents

Publication Publication Date Title
WO2022088804A1 (en) Message pushing method and apparatus, and electronic device, and storage medium
CN110569298B (en) Data docking and visualization method and system
CN111694840A (en) Data synchronization method, device, server and storage medium
CN111831748B (en) Data synchronization method, device and storage medium
CN112015815B (en) Data synchronization method, device and computer readable storage medium
CN112631806B (en) Asynchronous message arrangement and scheduling method and device, electronic equipment and storage medium
CN111381940B (en) Distributed data processing method and device
CN112422588A (en) Internet of things equipment information processing method and system
CN114092252A (en) Block chain transaction execution method, device, equipment and readable storage medium
CN111881209A (en) Data synchronization method and device for heterogeneous database, electronic equipment and medium
CN112131002A (en) Data management method and device
CN113867732A (en) Message information processing method, system and storage medium
CN112131087A (en) Decoupling system of simulation software communication layer and service application layer and implementation method
CN111831954B (en) Content data updating method, device, computer equipment and storage medium
CN115623019B (en) Distributed operation flow scheduling execution method and system
CN116089123A (en) Message touch method and system
CN115344633A (en) Data processing method, device, equipment and storage medium
CN112527497B (en) Serialized multithreaded data processing system
CN115269220A (en) Business processing method and rule service interface
CN113742099A (en) Message consumption method, production method, system and storage medium based on set
CN108805741B (en) Fusion method, device and system of power quality data
CN113242357A (en) Logistics information processing method, device and medium based on intelligent voice call
CN110187981B (en) Data circulation and analysis method and device, storage medium and terminal
CN113487340A (en) Service decoupling processing method, device, equipment and storage medium
CN115237869A (en) Data synchronization method and device and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination