CN116847300A - Webpage version 5G message fallback system and method based on H5 technology - Google Patents
Webpage version 5G message fallback system and method based on H5 technology Download PDFInfo
- Publication number
- CN116847300A CN116847300A CN202310632349.6A CN202310632349A CN116847300A CN 116847300 A CN116847300 A CN 116847300A CN 202310632349 A CN202310632349 A CN 202310632349A CN 116847300 A CN116847300 A CN 116847300A
- Authority
- CN
- China
- Prior art keywords
- message
- user
- fallback
- chatbot
- module
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000005516 engineering process Methods 0.000 title claims abstract description 29
- 238000009877 rendering Methods 0.000 claims abstract description 23
- 238000012545 processing Methods 0.000 claims abstract description 22
- 230000003993 interaction Effects 0.000 claims abstract description 15
- 238000012795 verification Methods 0.000 claims abstract description 5
- 238000007726 management method Methods 0.000 claims description 41
- 238000006243 chemical reaction Methods 0.000 claims description 18
- 230000005540 biological transmission Effects 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 9
- 230000000694 effects Effects 0.000 claims description 7
- 230000002045 lasting effect Effects 0.000 claims description 6
- 238000013507 mapping Methods 0.000 claims description 6
- 230000007246 mechanism Effects 0.000 claims description 5
- 102000010954 Link domains Human genes 0.000 claims description 3
- 108050001157 Link domains Proteins 0.000 claims description 3
- 238000004458 analytical method Methods 0.000 claims description 3
- 238000013475 authorization Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 4
- 230000008447 perception Effects 0.000 description 3
- 238000012550 audit Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002688 persistence Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000012384 transportation and delivery Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/12—Messaging; Mailboxes; Announcements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/07—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
- H04L51/10—Multimedia information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/07—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
- H04L51/18—Commands or executable codes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/58—Message adaptation for wireless communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
- H04W12/068—Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Multimedia (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a system and a method for web page version 5G message fallback based on H5 technology, wherein a number cache pool is created in a redis cluster through a channel selection module, and if a query result in the number cache pool shows that the number does not support 5G messages, a task processing module sends a short link pointing to the web page version 5G message to a user number; after the user opens the short link, the page is in a read-only state, and the message rendering module initiates the operator password-free login or the short message verification code login authentication; initializing websocket links by a mobile phone browser of a user, pulling up the latest session record stored in the information storage module, and acquiring page operation permission; the user interacts with the chatbot; the message rendering module sends an uplink message to the chatbot management platform; the chatbot management platform stores the uplink message in a warehouse and issues the corresponding downlink message through the message storage module. The method realizes 5G message interaction in the terminal which does not support the native 5G message.
Description
Technical Field
The invention relates to the technical field of data processing, in particular to a webpage version 5G message fallback system and method based on an H5 technology.
Background
With the formal commercial use of 5G, a new set of telecommunications services such as 5G messages emerge. The 5G message is a unified evolution direction of the 5G short message service, is one of the most convenient applications of the mobile Internet under the new technical condition, is also a core service for a telecom operator to advance to the Internet and drive ecological circle construction, and brings brand new comprehensive information service experience for government enterprise clients and personal users.
At present, domestic 5G message receiving and sending depends on the built-in SDK of each mobile phone brand terminal to support, and because the support degree and the integration progress of each mobile phone manufacturer are inconsistent, partial terminals do not support receiving and sending 5G messages, and some traditional mobile phone terminals do not have the capability of upgrading 5G messages. Therefore, the problem of realizing the same user experience as the supported terminal and improving the enterprise 5G message delivery effect on the unsupported terminal in the popularization process of the 5G message is to be solved.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a webpage version 5G message fallback system and method based on the H5 technology, which realize 5G message interaction in a terminal which does not support the original 5G message and promote the 5G message throwing effect and user interaction experience of enterprises.
In order to achieve the technical purpose, the invention adopts the following technical scheme: a webpage version 5G message fallback system based on an H5 technology comprises a task processing module, a channel selection module, a protocol conversion module, a message rendering module, a message storage module and a query feedback module which are connected in sequence;
the task processing module decomposes the task into work orders, and the number sorting is carried out through the work orders;
the channel selection module selects a sending channel for sending the number through the number cache pool data;
the protocol conversion module converts the simplified standardized 5G message JSON format into a map channel format or a web page version 5G message format of each operator;
the message rendering module utilizes H5 technology to construct front-end text message, rich media card wheel message and file message components and supports primary rendering of user text, video, pictures and voice uplink messages;
the message storage module stores the uplink and downlink messages and interaction information of the user and the chatbot in a clickhouse;
the inquiry feedback module is used for inquiring the result returned by the message storage module, searching a number cache pool established in advance, and obtaining the effect of the mass sending of the 5G message; and feeding the queried result back to the merchant through the web page and the report file.
Further, the invention also provides a webpage version 5G message falling method of the webpage version 5G message falling system based on the H5 technology, which specifically comprises the following steps:
step 1, a channel selection module creates a number cache pool in a redis cluster and establishes a number cache mechanism; if the query result in the number cache pool shows that the number does not support the 5G message, the task processing module sends a short link pointing to a webpage version 5G message appointed chat page to the user number;
step 2, after the user opens the short link, the page is in a read-only state, and the operator password-free login or short message verification code login authentication is initiated through the message rendering module;
step 3, initializing websocket links by a user mobile phone browser, pulling up the latest session record stored in the information storage module, and acquiring page operation permission;
step 4, the user initiates interaction with the chatbot in a typing, voice, photographing, video shooting or clicking mode;
step 5, the message rendering module sends an uplink message to the chatbot management platform through a websocket channel;
and 6, the chatbot management platform stores the uplink message in a warehouse through the message storage module and transmits a corresponding downlink message to the websocket channel.
Further, step 1 comprises the following sub-steps:
step 1.1, a channel selection module creates a number cache pool in a redis cluster, wherein one cache record in the number cache pool comprises: user mobile phone number, user UUID, buffer effective time and 5G message support identifier;
step 1.2, a merchant logs in a chatbot platform to submit 5G message batch group sending tasks, and a task sending module divides the group sending tasks into a plurality of work orders according to the number of the batch group sending tasks;
step 1.3, the channel selection module traverses the number list on each work order, inquires whether the number cache pool has a corresponding mobile phone number record, and if not, selects a 5G message channel to send a 5G message through the chatbot management platform; if the corresponding mobile phone number record exists, judging whether the record is out of date according to the cached effective time, if so, deleting the out-of-date record, and selecting a 5G message channel to send a 5G message through a chatbot management platform; otherwise, judging whether the record supports the 5G message or not through the 5G message support identifier, and if so, selecting a 5G message channel to send the 5G message through the chatbot management platform; otherwise, selecting a webpage version 5G message channel through the chatbot management platform to send a short link of a chat page of the designated chatbot of the 5G message.
Further, the process of selecting a 5G message channel to send a 5G message through the chatbot management platform in step 1.3 is as follows: the protocol conversion module converts the standard simplified 5G message json into an operator map appointed format, and calls the operator map platform to send the message api through the chatbot management platform, and sends a 5G message to the corresponding mobile phone number.
Further, in step 1.3, the process of selecting the web page version 5G message channel to send the 5G message through the chatbot management platform is as follows: the protocol conversion module converts the standard simplified 5G message json into a webpage version 5G message appointed format, establishes websocket connection between the netty server and the user, and realizes that the 5G message falls back into the webpage version 5G message to be sent.
Further, the condition for inserting a cache record in the number cache pool is as follows: the number cache pool does not have cache data of unexpired user numbers, and the chatbot management platform acquires a call back of successful 5G message transmission, a call back of failed 5G message transmission, a call back of uplink message of a user or a message push of websocket 5G message.
Further, the condition for updating a cache record in the number cache pool is as follows: the effective time of the number cache record is before the current time, and the record state is updated to be invalid; the chatbot management platform acquires a callback that the 5G message of the operator map platform is successfully sent or a callback of the user uplink message, and updates a record supporting state to be supporting; and the chatbot management platform updates the record supporting state to be not supported when acquiring a callback of failure of sending the 5G message of the operator map platform or pushing the websocket message of the webpage version 5G message.
Further, the short link generation and use process in the step 1 is as follows:
A. after creating a sending task, the merchant selects a webpage version 5G message channel to send, and initiates a short link creating request to a short link server, wherein the parameters of the request include: unique identification chatbotId of chatbot and unique identification userId of merchant;
B. after receiving a short link creation request from a sending task, a short link random code is generated by a short link server, the mapping relation between the short link random code and a long link is synchronously stored in a redis and mysql database, and the short link random code is returned to a task processing module to be spliced with a pre-configured short link domain name to form a complete short link;
C. the task processing module sends the spliced short chain to a mobile phone of a user in a short message mode;
D. the user opens the short link to access the short link server by using the mobile phone browser, and the short link server inquires the long and short link mapping table in redis to inquire the corresponding long link, and then initiates 302 redirection to the long link address to the browser;
E. the mobile phone browser accesses the redirected long-chain address, and the user normally uses the webpage version 5G message service after the user initiates authorization authentication through the message rendering module.
Further, step 6 comprises the following sub-steps:
step 6.1, after a fallback module in the chatbot management platform reads the content of the uplink message of the user, the message format is adaptively converted and then is put into the message fallback content kafka, and the message fallback content kafka is stored in a clickhouse in a lasting mode;
step 6.2, after the flink message processing module in the chatbot management platform reads the message from the message fallback content kafka, distributing the message to the corresponding privately-owned message fallback gateway according to the chatbot source;
step 6.3, the privately owned message fallback gateway puts the message into the session fallback kafka, and after the fallback message analysis module reads the user message from the session fallback kafka, the chatbot rule engine configuration and the user intention cache are inquired to obtain a standardized json message of the downlink reply message;
step 6.4, carrying out protocol conversion on the standardized json message of the downlink reply message, converting the standardized json message into a webpage version 5G message format and calling a webpage session sending interface;
step 6.5, after the webpage session sending interface receives the downlink reply message, the downlink reply message is put into the webpage message content kafka and is stored in the clickhouse in a lasting mode;
step 6.6, the netty server reads the downlink reply message from the webpage message content kafka and sends the downlink reply message to the H5 client through the websocket channel.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention is realized based on the B/S architecture, and a user does not need to additionally install additional APP on the mobile phone to realize the 5G message fallback function;
2. according to the webpage version 5G message fallback system and method based on the H5 technology, through establishing the number cache pool to record the 5G message supporting condition of the user terminal, channel selection logic can be effectively simplified, message sending processing time delay is reduced, and the overall consistency of user interaction is improved;
3. the webpage version 5G message fallback system and method based on the H5 technology support typing, voice, photographing, video shooting, clicking and other modes to realize interaction with the chatbot, and completely cover the interaction experience of the original 5G message; the real-name authentication of the original 5G message is realized through the secret-free login or short message verification code login authentication of the operator, so that the experience of a fallback user is ensured;
4. according to the system and the method for webpage version 5G message fallback based on the H5 technology, through simplifying and standardizing 5G message JSON format of each operator 5G message, the network overhead is reduced, the webpage rendering speed of the webpage version 5G message is improved, and the webpage rendering logic is simplified;
5. according to the webpage version 5G message fallback system and method based on the H5 technology, the 5G message channels and the uplink and downlink messages of the webpage version 5G message channels are sequentially stored in the clickhouse, and when the 5G message support condition of the user terminal is changed, the user can still acquire session record data of all channels, so that the switching of the non-perception message channels is realized.
Drawings
FIG. 1 is a schematic diagram of a web page version 5G message fallback system based on the H5 technology of the present invention;
FIG. 2 is a flow chart of a web page version 5G message fallback method based on the H5 technology of the invention;
FIG. 3 is a schematic diagram of a short link generation process of a web page version 5G message according to the present invention;
fig. 4 is a schematic diagram of an interaction flow between a mobile phone user and a chatbot in the web page version 5G message fallback method based on the H5 technology.
Detailed Description
The technical scheme of the invention is further explained below with reference to the accompanying drawings.
FIG. 1 is a schematic diagram of a web page version 5G message fallback system based on H5 technology, wherein the web page version 5G message fallback system comprises a task processing module, a channel selection module, a protocol conversion module, a message rendering module, a message storage module and a query feedback module which are connected in sequence;
the task processing module decomposes the task into work orders, and the number sorting is carried out through the work orders;
the channel selection module selects a transmission channel for transmitting the number through the number cache pool data;
the protocol conversion module converts the simplified standardized 5G message JSON format into a map channel format or a web page version 5G message format of each operator; in order to ensure the perception of the business merchant on the transmission of the webpage version 5G message on the chatbot management platform, the invention realizes the callback processing of the map message read event, the button click event and the uplink message event transmission in the webpage version message gateway simulation, and the events are all incorporated into a task transmission result feedback list and fed back to the business merchant as the original 5G message map callback event;
the message rendering module utilizes the H5 technology to construct front-end text message, rich media card wheel message and file message components, supports native rendering of user text, video, pictures and voice uplink messages, ensures that the user experience of webpage version 5G message on the mobile phone end is consistent with that of native 5G message, and thus avoids bringing bad experience to users;
the message storage module stores uplink and downlink messages and interaction information of the user and the chatbot in a clickhouse so as to support high concurrency data access;
the query feedback module is used for querying the result returned by the message storage module, searching a number cache pool established in advance, and obtaining the effect of the mass sending of the 5G message; and feeding the queried result back to the merchant through the web page and the report file.
Fig. 2 and 4 show that the web page version 5G message fallback method based on the H5 technology specifically includes the following steps:
step 1, a channel selection module creates a number cache pool in a redis cluster, establishes a number cache mechanism, caches 5G message support conditions of a user terminal in a certain period of time by using a mode of the number cache pool, and provides a corresponding invalidation and refreshing mechanism, when a chatbot needs to send the 5G message to a user mobile phone, the channel selection module can preferentially inquire from the number cache pool, so that the effect of quickly selecting a sending channel and reducing sending delay is achieved; if the query result in the number cache pool shows that the number does not support the 5G message, the task processing module sends a short link pointing to a webpage version 5G message appointed chat page to the user number; the method specifically comprises the following substeps:
step 1.1, a channel selection module creates a number cache pool in a redis cluster, wherein one cache record in the number cache pool comprises: user mobile phone number, user UUID, buffer effective time and 5G message support identifier;
the condition for inserting a buffer record in the number buffer pool is as follows: the number cache pool does not have cache data of unexpired user numbers, and the chatbot management platform acquires a callback of success of 5G message transmission, a callback of failure of 5G message transmission, a callback of user uplink message, or a pushing of websocket message of 5G message of a webpage version;
the condition for updating a cache record in the number cache pool is as follows: the effective time of the number cache record is before the current time, and the record state is updated to be invalid; the chatbot management platform acquires a callback that the 5G message of the operator map platform is successfully sent or a callback of the user uplink message, and updates a record supporting state to be supporting; and the chatbot management platform updates the record supporting state to be not supported when acquiring a callback of failure of sending the 5G message of the operator map platform or pushing the websocket message of the webpage version 5G message.
Step 1.2, a merchant logs in a chatbot platform to submit 5G message batch group sending tasks, and a task sending module divides the group sending tasks into a plurality of work orders according to the number of the batch group sending tasks;
step 1.3, the channel selection module traverses the number list on each work order, inquires whether the number cache pool has a corresponding mobile phone number record, and if not, selects a 5G message channel to send a 5G message through the chatbot management platform; if a corresponding mobile phone number record exists, judging whether the record is out of date according to the cached effective time, if so, deleting the out-of-date record, selecting a 5G message channel to send a 5G message through a chatbot management platform, specifically, converting a standard simplified 5G message json into an operator map appointed format by a protocol conversion module, calling the operator map platform to send a message api through the chatbot management platform, and sending a 5G message to the corresponding mobile phone number; otherwise, judging whether the record supports the 5G message or not through the 5G message support identifier, and if so, selecting a 5G message channel to send the 5G message through the chatbot management platform; otherwise, a short link of a 5G message appointed chat page is sent through a webpage version 5G message channel through the chatbot management platform, specifically, a protocol conversion module carries out protocol conversion on a standard simplified 5G message json, the standard simplified 5G message json is converted into a webpage version 5G message appointed format, a websocket connection is established between a netty server and a user, and the 5G message is returned to be sent as the webpage version 5G message.
As shown in fig. 3, the short link generation and use process in the present invention is:
A. after creating a sending task, the merchant selects a webpage version 5G message channel to send, and initiates a short link creating request to a short link server, wherein the parameters of the request include: unique identification chatbotId of chatbot and unique identification userId of merchant;
B. after receiving a short link creation request from a sending task, the short link server generates a short link random code such as Msx12, synchronously stores the mapping relation between the short link random code and a long link into a redis and mysql database, and simultaneously returns the short link random code to a task processing module to be spliced with a pre-configured short link domain name to form a complete short link;
C. the task processing module sends the spliced short link https of/(5 g.js118114.com/api/sl/jw/Msx12 to a mobile phone of a user in a short message mode;
D. the user opens a short link https by using a mobile phone browser, namely// 5g.js118114.com/api/sl/jw/Msx12 accesses a short link server, and after inquiring a long-short link mapping table in rediss to inquire a corresponding long link, the short link server initiates 302 redirection to a long link address to the browser;
E. the mobile phone browser accesses the redirected long-chain address, and the user normally uses the webpage version 5G message service after the user initiates authorization authentication through the message rendering module.
The invention uses the short link to replace the long link, which can effectively hide sensitive information such as userId and shortens the link length to reduce the sending cost of the short message. Meanwhile, the short link has buried point capability and an expiration mechanism, can monitor the click rate of the current 5G message transmission, and controls the link access time.
Step 2, after the user opens the short link, the page is in a read-only state, and the message rendering module initiates the operator password-free login or short message verification code login authentication, so that the real-name authentication of the original 5G message is realized, and the experience of the fallback user is ensured; the user accesses the front-end page jump of the webpage version 5G message, firstly, whether the current user is authenticated and authorized is judged, if the current user is not authenticated and authorized, the current user identity is a tourist, only the latest webpage version 5G message limited by the browsing system is allowed, and the message transmission with the chatbot is not allowed, and the click interaction of the bottom menu and the card button is not allowed.
Step 3, initializing websocket links by a user mobile phone browser, pulling up the latest session record stored in the information storage module, and acquiring page operation permission;
step 4, the user initiates interaction with the chatbot in a typing, voice, photographing, video shooting or clicking mode, so that the interaction experience of the original 5G message is completely covered;
step 5, the message rendering module sends an uplink message to the chatbot management platform through a websocket channel to complete rendering of the first screen of the chat page;
and 6, the chatbot management platform stores the uplink message in a warehouse through the message storage module and transmits the corresponding downlink message to the websocket channel, specifically, when a user interacts with the chatbot, the H5 client transmits the message to the netty server through the websocket channel, firstly, whether the message is transmitted over-frequently is judged, and if the message is over-frequently, the failure of transmitting the over-frequently message is returned. And then, calling an intelligent AI content audit to audit the text, picture, video and audio content submitted by the user, and transmitting the audited uplink message content to a fallback module. The method specifically comprises the following substeps:
step 6.1, after a fallback module in the chatbot management platform reads the content of the uplink message of the user, the message format is adaptively converted and then is put into the message fallback content kafka, and the message fallback content kafka is stored in a clickhouse in a lasting mode;
step 6.2, after the flink message processing module in the chatbot management platform reads the message from the message fallback content kafka, distributing the message to the corresponding privately-owned message fallback gateway according to the chatbot source;
step 6.3, the privately owned message fallback gateway puts the message into the session fallback kafka, and after the fallback message analysis module reads the user message from the session fallback kafka, the chatbot rule engine configuration and the user intention cache are inquired to obtain a standardized json message of the downlink reply message;
step 6.4, carrying out protocol conversion on the standardized json message of the downlink reply message, converting the standardized json message into a webpage version 5G message format and calling a webpage session sending interface;
step 6.5, after the web page session sending interface receives the downlink reply message, the downlink reply message is put into the web page message content kafka and is stored in the clickhouse in a lasting mode, and when the 5G message supporting condition of the user terminal is changed, the user can still acquire session record data of all channels, so that the channel switching without perception information is realized;
step 6.6, the netty server reads the downlink reply message from the webpage message content kafka and sends the downlink reply message to the H5 client through the websocket channel.
The webpage version 5G message fallback method based on the H5 technology can greatly improve the terminal coverage rate of the 5G message in the current environment on the premise of keeping the interactive experience of the original 5G message, and provides guarantee for the effect of sending the 5G message of the commercial tenant.
Examples
An effective buffer record format is shown as "3F2504E0-4F89-11D3-9A0C-0305E82, 18966666666, 1664583732693, true" indicates that the UUID of the user with the mobile phone number 18966666666 is 3F2504E0-4F89-11D3-9A0C-0305E82, and the mobile phone terminal currently supports receiving and sending 5G messages, and the buffer validity time is up to the timestamp 1664583732693;
when a merchant logs in the chatbot platform to submit a batch group sending task containing 1000 user number 5G messages, the task number list is divided into a plurality of work orders according to the number of the work orders, and the task is decomposed into 10 work orders according to the number of the work orders as 100. Traversing the list of numbers for each work order, and when traversing the mobile phone number 18966666666, querying the redis number cache pool whether records of the number exist. The inquiry records are '3F 2504E0-4F89-11D3-9A0C-0305E82, 18966666666, 1664583732693, true', the current timestamp is 1664568749162, less than the buffer timestamp 1664583732693, and the 5G message support identifier is true, which indicates that the user terminal supports 5G messages. And carrying out H code inquiry and number portability inquiry on the number 18966666666, and if the number operator is determined to be China telecom, carrying out protocol conversion on the standard simplified 5G message json, and converting the standard simplified 5G message json into a telecom map appointed format. The chatbot platform calls the telecom map platform to send the message api and sends a 5G message to the mobile phone number 18966666666. In the timestamp 1664568749162, the chatbot platform receives a 5G message sending failure callback of the telecom map platform, and the reason of the failure is that the mobile phone terminal does not support the 5G message after message parsing. At this time, the record "3F2504E0-4F89-11D3-9A0C-0305E82, 18966666666, 1664583732693, true" in the redis number cache pool should be updated to "3F2504E0-4F89-11D3-9A0C-0305E82, 18966666666, 1664568749162, false". Meanwhile, protocol conversion is carried out on the standard simplified 5G message json, the standard simplified 5G message json is converted into a webpage version 5G message appointed format, whether the user of the netty server has established websocket connection or not is checked, the websocket connection is not established through the query user number 18966666666, and converted json data is written into a clickhouse database for persistence, so that the 5G message is returned to be sent as the webpage version 5G message.
The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above examples, and all technical solutions belonging to the concept of the present invention belong to the protection scope of the present invention. It should be noted that modifications and adaptations to the invention without departing from the principles thereof are intended to be within the scope of the invention as set forth in the following claims.
Claims (9)
1. The webpage version 5G message fallback system based on the H5 technology is characterized by comprising a task processing module, a channel selection module, a protocol conversion module, a message rendering module, a message storage module and a query feedback module which are connected in sequence;
the task processing module decomposes the task into work orders, and the number sorting is carried out through the work orders;
the channel selection module selects a sending channel for sending the number through the number cache pool data;
the protocol conversion module converts the simplified standardized 5G message JSON format into a map channel format or a web page version 5G message format of each operator;
the message rendering module utilizes H5 technology to construct front-end text message, rich media card wheel message and file message components and supports primary rendering of user text, video, pictures and voice uplink messages;
the message storage module stores the uplink and downlink messages and interaction information of the user and the chatbot in a clickhouse;
the inquiry feedback module is used for inquiring the result returned by the message storage module, searching a number cache pool established in advance, and obtaining the effect of the mass sending of the 5G message; and feeding the queried result back to the merchant through the web page and the report file.
2. The web page version 5G message fallback method of the web page version 5G message fallback system based on the H5 technology as claimed in claim 1, which is characterized by comprising the following steps:
step 1, a channel selection module creates a number cache pool in a redis cluster and establishes a number cache mechanism; if the query result in the number cache pool shows that the number does not support the 5G message, the task processing module sends a short link pointing to a webpage version 5G message appointed chat page to the user number;
step 2, after the user opens the short link, the page is in a read-only state, and the operator password-free login or short message verification code login authentication is initiated through the message rendering module;
step 3, initializing websocket links by a user mobile phone browser, pulling up the latest session record stored in the information storage module, and acquiring page operation permission;
step 4, the user initiates interaction with the chatbot in a typing, voice, photographing, video shooting or clicking mode;
step 5, the message rendering module sends an uplink message to the chatbot management platform through a websocket channel;
and 6, the chatbot management platform stores the uplink message in a warehouse through the message storage module and transmits a corresponding downlink message to the websocket channel.
3. The web page version 5G message fallback method of the web page version 5G message fallback system based on the H5 technology according to claim 2, wherein the step 1 comprises the following sub-steps:
step 1.1, a channel selection module creates a number cache pool in a redis cluster, wherein one cache record in the number cache pool comprises: user mobile phone number, user UUID, buffer effective time and 5G message support identifier;
step 1.2, a merchant logs in a chatbot platform to submit 5G message batch group sending tasks, and a task sending module divides the group sending tasks into a plurality of work orders according to the number of the batch group sending tasks;
step 1.3, the channel selection module traverses the number list on each work order, inquires whether the number cache pool has a corresponding mobile phone number record, and if not, selects a 5G message channel to send a 5G message through the chatbot management platform; if the corresponding mobile phone number record exists, judging whether the record is out of date according to the cached effective time, if so, deleting the out-of-date record, and selecting a 5G message channel to send a 5G message through a chatbot management platform; otherwise, judging whether the record supports the 5G message or not through the 5G message support identifier, and if so, selecting a 5G message channel to send the 5G message through the chatbot management platform; otherwise, selecting a webpage version 5G message channel through the chatbot management platform to send a short link of a chat page of the designated chatbot of the 5G message.
4. The web page version 5G message fallback method of the web page version 5G message fallback system based on the H5 technology according to claim 3, wherein the process of selecting the 5G message channel to send the 5G message through the chatbot management platform in step 1.3 is as follows: the protocol conversion module converts the standard simplified 5G message json into an operator map appointed format, and calls the operator map platform to send the message api through the chatbot management platform, and sends a 5G message to the corresponding mobile phone number.
5. The web page version 5G message fallback method of the web page version 5G message fallback system based on the H5 technology according to claim 3, wherein the process of selecting the web page version 5G message channel to send the 5G message through the chatbot management platform in step 1.3 is as follows: the protocol conversion module converts the standard simplified 5G message json into a webpage version 5G message appointed format, establishes websocket connection between the netty server and the user, and realizes that the 5G message falls back into the webpage version 5G message to be sent.
6. The web page version 5G message fallback method of the web page version 5G message fallback system based on the H5 technology according to claim 3, wherein the condition for inserting a cache record in the number cache pool is as follows: the number cache pool does not have cache data of unexpired user numbers, and the chatbot management platform acquires a call back of successful 5G message transmission, a call back of failed 5G message transmission, a call back of uplink message of a user or a message push of websocket 5G message.
7. The web page version 5G message fallback method of the web page version 5G message fallback system based on the H5 technology according to claim 3, wherein the condition for updating a cache record in the number cache pool is: the effective time of the number cache record is before the current time, and the record state is updated to be invalid; the chatbot management platform acquires a callback that the 5G message of the operator map platform is successfully sent or a callback of the user uplink message, and updates a record supporting state to be supporting; and the chatbot management platform updates the record supporting state to be not supported when acquiring a callback of failure of sending the 5G message of the operator map platform or pushing the websocket message of the webpage version 5G message.
8. The web page version 5G message fallback method of the web page version 5G message fallback system based on the H5 technology according to claim 1, wherein the short link generation and use process in step 1 is as follows:
A. after creating a sending task, the merchant selects a webpage version 5G message channel to send, and initiates a short link creating request to a short link server, wherein the parameters of the request include: unique identification chatbotId of chatbot and unique identification userId of merchant;
B. after receiving a short link creation request from a sending task, a short link random code is generated by a short link server, the mapping relation between the short link random code and a long link is synchronously stored in a redis and mysql database, and the short link random code is returned to a task processing module to be spliced with a pre-configured short link domain name to form a complete short link;
C. the task processing module sends the spliced short chain to a mobile phone of a user in a short message mode;
D. the user opens the short link to access the short link server by using the mobile phone browser, and the short link server inquires the long and short link mapping table in redis to inquire the corresponding long link, and then initiates 302 redirection to the long link address to the browser;
E. the mobile phone browser accesses the redirected long-chain address, and the user normally uses the webpage version 5G message service after the user initiates authorization authentication through the message rendering module.
9. The web page version 5G message fallback method of the web page version 5G message fallback system based on the H5 technology according to claim 2, wherein the step 6 comprises the following sub-steps:
step 6.1, after a fallback module in the chatbot management platform reads the content of the uplink message of the user, the message format is adaptively converted and then is put into the message fallback content kafka, and the message fallback content kafka is stored in a clickhouse in a lasting mode;
step 6.2, after the flink message processing module in the chatbot management platform reads the message from the message fallback content kafka, distributing the message to the corresponding privately-owned message fallback gateway according to the chatbot source;
step 6.3, the privately owned message fallback gateway puts the message into the session fallback kafka, and after the fallback message analysis module reads the user message from the session fallback kafka, the chatbot rule engine configuration and the user intention cache are inquired to obtain a standardized json message of the downlink reply message;
step 6.4, carrying out protocol conversion on the standardized json message of the downlink reply message, converting the standardized json message into a webpage version 5G message format and calling a webpage session sending interface;
step 6.5, after the webpage session sending interface receives the downlink reply message, the downlink reply message is put into the webpage message content kafka and is stored in the clickhouse in a lasting mode;
step 6.6, the netty server reads the downlink reply message from the webpage message content kafka and sends the downlink reply message to the H5 client through the websocket channel.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310632349.6A CN116847300A (en) | 2023-05-31 | 2023-05-31 | Webpage version 5G message fallback system and method based on H5 technology |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310632349.6A CN116847300A (en) | 2023-05-31 | 2023-05-31 | Webpage version 5G message fallback system and method based on H5 technology |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116847300A true CN116847300A (en) | 2023-10-03 |
Family
ID=88173362
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310632349.6A Pending CN116847300A (en) | 2023-05-31 | 2023-05-31 | Webpage version 5G message fallback system and method based on H5 technology |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116847300A (en) |
-
2023
- 2023-05-31 CN CN202310632349.6A patent/CN116847300A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20110038470A1 (en) | Centrally Located Server Delivery Of Personalized Content To Telecommunications Devices | |
CN104333599A (en) | Application sharing method and system and application service platform | |
CN113453175B (en) | 5G message processing method and device, computer equipment and storage medium | |
US20150149556A1 (en) | Communication method and system, and computer storage medium | |
CN203206476U (en) | Data content generating and sharing system based on dual-network | |
CN1901576A (en) | Device, storage medium storing program and method for registrating/retrieving of information to/from electronic bulletin board | |
US8719357B2 (en) | Method and apparatus for managing message | |
CN101827085B (en) | Method for converting IT application system on PC into system accessible by mobile phone terminal | |
US7493374B2 (en) | System periodically retrieving and processing information from multiple network accounts and presenting to user through a common account | |
EP2974159B1 (en) | Method, device and system for voice communication | |
US20130047092A1 (en) | Communication client and a method for initiating a communication service | |
KR101896573B1 (en) | Push server and mobile unit | |
CA2389474A1 (en) | Establishing data connections | |
CN108279924A (en) | Program dissemination method and device | |
CN113645127B (en) | Message routing method, message routing device, electronic equipment and computer-readable storage medium | |
US20040193601A1 (en) | Method and contact list server for modifying the entry names in a contact list | |
RU2502225C2 (en) | Service processing method, communication system and corresponding devices | |
KR100257563B1 (en) | Method for processing sms service of pcs | |
KR20100112979A (en) | Method and apparatus for providing mobile advertising service in mobile advertising system | |
CN116847300A (en) | Webpage version 5G message fallback system and method based on H5 technology | |
RU2596588C2 (en) | System and method for activation of mobile device for communication initiating | |
CN114189502A (en) | Information sending method, device, storage medium and equipment | |
US20150065103A1 (en) | Device and Method for Enhancing a Call | |
CN102170619A (en) | Parent-school interactive cellphone client system | |
CN102387026B (en) | Management method and device for user data in system based on universal relation link model |
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 |