CN115190091A - Method and device for pushing service message - Google Patents

Method and device for pushing service message Download PDF

Info

Publication number
CN115190091A
CN115190091A CN202210541504.9A CN202210541504A CN115190091A CN 115190091 A CN115190091 A CN 115190091A CN 202210541504 A CN202210541504 A CN 202210541504A CN 115190091 A CN115190091 A CN 115190091A
Authority
CN
China
Prior art keywords
service
message
distributed
communication
browser
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
CN202210541504.9A
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.)
Seashell Housing Beijing Technology Co Ltd
Original Assignee
Seashell Housing Beijing 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 Seashell Housing Beijing Technology Co Ltd filed Critical Seashell Housing Beijing Technology Co Ltd
Priority to CN202210541504.9A priority Critical patent/CN115190091A/en
Publication of CN115190091A publication Critical patent/CN115190091A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements
    • H04L51/066Format adaptation, e.g. format conversion or compression
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a device for pushing a business message, which are used for instant messaging service, and the method comprises the following steps: acquiring a distributed service message of a first target service sent by a service server; verifying the distributed service message, and performing format conversion on the verified distributed service message to generate a first communication message; and sending the first communication message to a browser so that the browser analyzes the first communication message to obtain the service message, and consuming the service message through a corresponding service. The instant messaging service is established between the service server and the browser, an independent communication protocol does not need to be customized for realizing each service in the service server, and the service server and the browser can keep real-time communication in application scenes of different services through the structure of the server, the instant messaging service and the browser, so that resource waste is avoided.

Description

Method and device for pushing service message
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for pushing a service message.
Background
In the prior art, many application scenarios under a B/S (browser/server) architecture require a server side and a user to maintain real-time communication, such as new mail arrival of a web page version mailbox, real-time subtitles, or real-time chat. Each application scenario requires a communication technology to maintain a long connection between the service server and the browser, and different application scenarios require different communication protocols to be customized, including: netty-WebSocket, spring-WebSocket, http, and the like. For example, in the prior art, when a web page has multiple functions of chatting, receiving mails, pushing real-time news, and the like, a set of implementation schemes is customized for each function, each scheme needs to manage links, and customize a communication protocol, which causes the problems of repeated construction and increased maintenance cost.
Disclosure of Invention
The invention provides a method and a device for pushing a real-time message, which aim to overcome the defects of repeated construction and resource waste caused by the need of formulating different communication protocols aiming at different application scenes in the prior art.
In a first aspect, an embodiment of the present invention provides a method for pushing a service message, where the method is used for an instant messaging service, and the method includes:
acquiring a distributed service message of a first target service sent by a service server;
verifying the distributed service message, and performing format conversion on the verified distributed service message to generate a first communication message;
and sending the first communication message to a browser so that the browser analyzes the first communication message to obtain a service message, and consuming the service message through a corresponding service.
According to the method for pushing the service message provided by the invention, the method further comprises the following steps:
receiving a second communication message of a second target service sent by the browser; the second communication message is generated by performing format conversion according to the request message of the browser;
performing distributed conversion on the second communication message to generate a corresponding distributed request message;
and sending the distributed request message to a service server side so that the service server side analyzes the distributed request message to obtain a second target service corresponding to the request message.
According to the pushing method of the business message provided by the invention, the instant communication service comprises the following steps: message management service, protocol management service and service management service;
the verifying the distributed service message includes:
receiving the distributed service message through the message management service, and storing the distributed service message in a cache;
calling a target distributed service message in the cache through the service management service, and inquiring whether the name of the first target service corresponding to the target distributed service message is in a pre-stored authentication list or not;
if the name of the first target service is in the authentication list, verifying the target distributed service message through the protocol management service;
and if the name of the first target service is not in the authentication list, deleting the target distributed service message in the cache through the message management service.
According to the pushing method of the service message provided by the invention, the instant messaging service further comprises: a distributed server;
the acquiring the service message of the first target service sent by the service server includes: requesting the distributed server to acquire the service message of the first target service, wherein the service server side stores the service message of the first target service in the distributed server;
the sending the distributed request message to a service server side includes:
and sending the distributed request message to the distributed server so that the service server side acquires the distributed request message.
According to the method for pushing the service message provided by the invention, the method further comprises the following steps:
receiving a third communication message of a service to be newly added, which is sent by a browser, wherein the third communication message is generated by performing format conversion according to a request message of the service to be newly added of the browser;
adding the name of the service to be newly added corresponding to the third communication message to the authentication list;
performing distributed conversion on the third communication message of the service to be newly added to generate a corresponding distributed request message;
and sending the distributed request message to a service server so that the service server analyzes the distributed request message to obtain a service corresponding to the request message of the service to be newly added.
According to the method for pushing the service message provided by the invention, the method further comprises the following steps:
receiving a fourth communication message of the service to be deleted, which is sent by the browser;
and deleting the name of the service to be deleted corresponding to the fourth communication message in an authentication list.
In a second aspect, an embodiment of the present invention provides a device for pushing a service message, where the device is used for an instant messaging service, and the device includes: the device comprises an acquisition module, a generation module and a sending module. The acquisition module is used for acquiring a distributed service message of a first target service sent by a service server; the generating module is used for verifying the distributed service message and converting the format of the verified distributed service message to generate a first communication message; and the sending module is used for sending the first communication message to a browser so that the browser analyzes the first communication message to obtain a service message, and consumes the service message through a corresponding service.
According to the pushing device of the service message provided by the invention, the device further comprises: the device comprises a receiving module, a conversion module and a resolution module. The receiving module is used for receiving a second communication message of a second target service sent by the browser; the second communication message is generated by performing format conversion according to the request message of the browser; the conversion module is used for performing distributed conversion on the second communication message to generate a corresponding distributed request message; and the analysis module is used for sending the distributed request message to a service server so that the service server analyzes the distributed request message to obtain a second target service corresponding to the request message.
In a third aspect, the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the method for pushing a service message according to any one of the above embodiments.
In a fourth aspect, an embodiment of the present invention is a computer program product, which includes a computer program, and when being executed by a processor, the computer program implements the steps of the service message pushing method according to any one of the above.
The invention provides a method and a device for pushing real-time messages, which are used for receiving distributed service messages of a first target service sent by a service server; verifying the received distributed service message, deleting the distributed service message failed in verification, and performing format conversion on the verified distributed service message to generate a first communication message; and sending the first communication message to the browser so that the browser analyzes the first communication message to obtain a service message, and consuming the service message through the corresponding service. By establishing the instant messaging service between the service server and the browser, an independent communication protocol does not need to be customized for realizing each service in the service server, and the service server and the browser can keep real-time communication under different service application scenes through the architecture of 'server-instant messaging service-browser', so that resource waste is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for pushing a service message according to an embodiment of the present invention;
fig. 2 is a second schematic flowchart of a method for pushing a service message according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a verification process performed on a distributed service message according to an embodiment of the present invention;
fig. 4 is a flowchart of an overall scheme of a pushing method of a service message provided by an embodiment of the present invention;
fig. 5 is a pushing apparatus for service messages according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Referring to fig. 1, which is a schematic flow chart of a method for pushing a service message according to an embodiment of the present invention, the method includes:
and 110, acquiring the distributed service message of the first target service sent by the service server.
In this step, the service server side refers to a high-performance computer that provides a service to the outside by managing resources in the internet. The service server receives the service request from the computer browser or the mobile communication client, and responds and processes the service request, thereby providing various service services for the computer browser or the mobile communication client.
The first target service refers to various services stored in the service server, and may be a real-time caption translation service, a real-time news service, a mail receiving and sending service, a chat service, and the like.
It is understood that the specific transmission carrier for transmitting the distributed service message from the service server to the instant messaging service can be set by those skilled in the art according to actual needs or application scenarios. In this embodiment, the transport bearer is described as the Kafka communication protocol.
The distributed service message is acquired by the service server, the service server realizes the communication with the instant messaging service through the kafka communication protocol, and the service message of the related service acquired from the service server is transmitted to the instant messaging service through the kafka communication protocol. The Kafka communication protocol is equivalent to a transmission carrier between the service server side and the instant messaging service, so that the distributed service message received by the instant messaging service can be represented by the first Kafka message.
And 120, performing verification processing on the distributed service message, and performing format conversion on the verified distributed service message to generate a first communication message.
In this step, format conversion may be performed on the received distributed service message through WebSocket link management, that is, webSocket link management is equivalent to a transmission medium between the instant messaging service and the browser.
Correspondingly, communication between the business server and the instant messaging service is achieved through a kafka communication protocol, the instant messaging service and the browser achieve communication through WebSocket link management, a first kafka message received by the instant messaging service is converted through WebSocket link management to generate a first WebSocket message, and the first communication message can be represented by the first WebSocket message.
And 130, sending the first communication message to the browser so that the browser analyzes the first communication message to obtain a service message, and consuming the service message through the corresponding service.
In the step, the instant messaging service and the browser realize communication through WebSocket link management. WebSocket is a protocol for full duplex communication over a single TCP connection. The WebSocket enables data exchange between the browser and the business server to be simpler, and allows the business server to actively push data to the browser. In the WebSocket API, the browser and the service server only need to complete one handshake, and persistent connection can be directly established between the browser and the service server for bidirectional data transmission.
The analysis refers to directing the obtained first communication message to an IP address or a service interface, so that a user can access the service message corresponding to the browser through the IP address or the service interface.
The service message refers to state information, network service request information and the like corresponding to a service in the service server side.
The consumption refers to accessing or querying the service when the service corresponding to the acquired service message is queried. If the obtained service message is about real-time news, the service corresponding to the service message is the real-time news, when the browser learns the service, the service is correspondingly opened, the page displayed on the browser is the real-time news, and the user can access the content on the page.
The invention provides a method for pushing real-time messages, which comprises the steps of receiving distributed service messages of a first target service sent by a service server, verifying the received distributed service messages, deleting the distributed service messages failed in verification, and converting the format of the verified distributed service messages to generate first communication messages; and sending the first communication message to the browser so that the browser analyzes the first communication message to obtain a service message, and consuming the service message through the corresponding service. By establishing the instant messaging service between the service server and the browser, an independent communication protocol needs to be customized for realizing each service in the service server, and the service server and the browser can keep real-time communication under different service application scenes through the architecture of 'server-instant messaging service-browser', so that resource waste is avoided.
The content is a process of sending a service message from the service server to the browser for consumption and display. Correspondingly, the embodiment further includes a process of sending a request message from the browser to the service server to request the corresponding service message.
Referring to fig. 2, a second flow chart of a method for pushing a service message according to an embodiment of the present invention is shown, where the method further includes:
210, receiving a second communication message of a second target service sent by the browser; and the second communication message is generated by format conversion according to the request message of the browser.
In this step, the request message refers to that the user wants to access a certain service in the service server, and the request message may include a type of the request, a resource to be accessed, a protocol used, and the like.
Correspondingly, when the browser and the instant messaging service realize communication through WebSocket link management, the second communication message can be represented by the second WebSocket message. And receiving a second WebSocket message of a second target service sent by the browser.
And 220, performing distributed conversion on the second communication message to generate a corresponding distributed request message.
In this step, the second WebSocket message is used to represent the second communication message, and the second kafka message is used to represent the distributed request message, which can be correspondingly understood as that the second WebSocket message is converted into the second kafka message through WebSocket link management in the instant communication service.
And 230, sending the distributed request message to the service server, so that the service server analyzes the distributed request message to obtain a second target service corresponding to the request message.
In this step, the instant messaging service and the service server side realize communication through a kafka communication protocol, and correspondingly, it can be understood that the obtained second kafka message is sent to the service server side, and the service server side identifies the second kafka message, and queries a service corresponding to the second kafka message in all services, that is, obtains a second target service.
Based on any of the above embodiments, the instant messaging service provided by the embodiment of the present invention includes: message management services, protocol management services, and traffic management services.
In this step, the instant messaging service refers to a service capable of instantly transmitting and receiving an internet message or the like. The system can integrate the management capabilities of chatting, conversation, group and data, realize the receiving and sending of multimedia messages such as characters, pictures, short voice, short video and the like, support the access and use of small programs and meet the communication requirements. The instant messaging Service is a communication technology based on the Internet, and relates to various technical means such as Sockets, C/S, B/S, multimedia audio and video coding and decoding, web Service and the like.
The message management is responsible for receiving distributed service messages corresponding to various different types of services at the service server side.
And the protocol management is responsible for verifying and analyzing the received verified distributed service message.
The service management is responsible for authenticating the received services of different types, namely receiving the services which are authorized to carry out message pushing.
Specifically, referring to fig. 3, a schematic flow diagram of performing verification processing on a distributed service message provided in the embodiment of the present invention includes:
the distributed service message is received 310 by the message management service and stored in a cache.
In this step, the cache refers to a memory capable of performing high-speed data exchange, and exchanges data with the service server side prior to the instant messaging service. The working principle of the cache is that when the instant messaging service needs to read a piece of data, the data is firstly searched from the cache of the message management service, and the data is immediately read and sent to the instant messaging service for processing when being found; if the data block is not found, the data block is read from the memory with relatively low speed and sent to the instant messaging service for processing, and the data block where the data is located is called into the cache, so that the whole data block can be read from the cache in the future without calling the memory.
Correspondingly, the message management service in the instant messaging service receives the distributed service message sent from the service server side, stores the received distributed service message in a cache, and calls the distributed service message from the message management service cache when the instant messaging service is needed.
And 320, calling the target distributed service message in the cache through the service management service, and inquiring whether the name of the first target service corresponding to the target distributed service message is in a pre-stored authentication list.
In this step, the authentication list is pre-stored in the instant messaging service, and is mainly responsible for verifying the name of the received service.
And 330, if the name of the first target service is in the authentication list, verifying the target distributed service message through the protocol management service.
In this step, the first target service existing in the authentication list is verified through the protocol management service, which may include verification processing on various aspects such as the type, content, integrity, and the like of the first target service.
340, if the name of the first target service is not in the authentication list, deleting the target distributed service message in the cache through the message management service.
In this step, when the name of the first target service is not in the authentication list, the message management service deletes the target distributed service message in the cache, which may include malicious information, hacking information, privacy information, and the like, so that the first target service does not exist in the preset authentication list, and the corresponding required message management service is deleted in the cache.
Based on any of the above embodiments, the instant messaging service provided by the embodiment of the present invention further includes: a distributed server.
In this step, the distributed server may be a Kafka server, which is a high throughput distributed publish-subscribe messaging system that can handle all the action flow data of the consumer in the website. This action (web browsing, searching and other user actions) is a key factor in many social functions on modern networks. These data are typically addressed by handling logs and log aggregations due to throughput requirements. This is a viable solution to the limitations of Hadoop-like log data and offline analysis systems, but which require real-time processing. The purpose of Kafka is to unify online and offline message processing through the parallel loading mechanism of Hadoop, and also to provide real-time messages through clustering.
In step 110, acquiring the distributed service message of the first target service sent by the service server, including: and requesting to obtain the distributed service message of the first target service from the distributed server, wherein the service server stores the distributed service message of the first target service in the distributed server.
Specifically, a first Kafka message of a first target service is acquired from a Kafka server.
In step 230, sending the distributed request message to the service server, including:
and sending the distributed request message to a distributed server so that the service server side acquires the distributed request message.
Correspondingly, the distributed server may be a Kafka server.
Based on any of the above embodiments, the method for pushing a service message provided in the embodiments of the present invention further includes steps S111 to S114:
and step S111, receiving a third communication message of the service to be newly added sent by the browser, wherein the third communication message is generated by format conversion according to the request message of the service to be newly added of the browser.
In this step, when the browser acquires the new service, a third communication message of the new service is received, where the third communication message is generated by performing format conversion according to a request message of the new service of the browser.
Specifically, the browser and the instant messaging service realize communication through WebSocket link management, and then the corresponding third communication message may be represented by a third WebSocket message.
Step S112, adding the name of the service to be newly added corresponding to the third communication message to the authentication list.
In this embodiment, the name of the newly added service corresponding to the third WebSocket message is added to a pre-stored authentication list.
Step S113, performing distributed conversion on the third communication message of the service to be newly added, and generating a corresponding distributed request message.
Correspondingly, the third WebSocket message is subjected to distributed conversion, and a corresponding third kafka message is generated.
Step S114, the distributed request message is sent to the service server side so that the service server side can analyze the distributed request message to obtain the service corresponding to the request message of the service to be newly added.
Correspondingly, the third kafka message is sent to the service server side, and the third kafka message is analyzed to obtain the corresponding service.
Based on any of the above embodiments, the method for pushing a service message provided in the embodiments of the present invention further includes steps S1111 to S1112:
and step S1111, receiving a fourth communication message of the service to be deleted, which is sent by the browser.
In this step, when the browser deletes the service, a fourth communication message of the deleted service is received, and the browser and the instant messaging service realize communication through WebSocket link management, so that the corresponding fourth communication message may be represented by a fourth WebSocket message.
Step S1112, delete the name of the service to be deleted corresponding to the fourth communication message in the authentication list.
Correspondingly, deleting the name of the service corresponding to the fourth WebSocket message in a pre-stored authentication list.
Further, the implementation of the present disclosure is further explained in an additional way: referring specifically to fig. 4, a flowchart showing an overall scheme of a pushing method for a service message is shown, and a process of the pushing method for the service message from a service server, an instant messaging service, and a browser is described.
The service server side: different types of services are stored, in particular the services may be a real-time subtitle translation service and/or a real-time news service.
The instant messaging service comprises the following steps: the instant messaging service and the business service end realize communication through a kafka server, and particularly carry out information transmission through a kafka communication protocol. As can be seen from the figure, the instant messaging service includes: message management, protocol management, and traffic management. The message management is responsible for receiving distributed service messages corresponding to various different types of services at a service server end; the protocol management is responsible for verifying and analyzing the received distributed service message passing the verification; the service management is responsible for authenticating the received services of different types, namely receiving the services which are authorized to carry out message pushing.
And the message management transmits the distributed service message, namely the kafka message, corresponding to the received service to the WebSocket link management, and the WebSocket link management carries out format conversion on the received kafka message and converts the kafka message into the corresponding WebSocket message.
The browser: the browser and the instant messaging service realize communication through WebSocket link management, and specifically carry out information transmission through a WebSocket communication protocol. The browser receives the WebSocket message sent by the instant messaging service, analyzes the WebSocket message, finds out the service corresponding to the WebSocket message and achieves access to the service.
Based on any of the foregoing embodiments, with reference to fig. 5, a service message pushing apparatus provided in an embodiment of the present invention includes: an obtaining module 510, a generating module 520 and a sending module 530. The acquiring module 510 is configured to acquire a service message of a first target service sent by a service server; a generating module 520, configured to verify the distributed service message, and perform format conversion on the verified distributed service message to generate a first communication message; the sending module 530 is configured to send the first communication message to the browser, so that the browser parses the first communication message to obtain a service message, and consumes the service message through a corresponding service.
Based on any embodiment above, the apparatus further comprises: the device comprises a first receiving module, a first conversion module and an analysis module. The first receiving module is used for receiving a second communication message of a second target service sent by the browser; the second communication message is generated by format conversion according to a request message of the browser; the first conversion module is used for performing distributed conversion on the second communication message to generate a corresponding distributed request message; and the analysis module is used for sending the distributed request message to the service server so that the service server analyzes the distributed request message to obtain a second target service corresponding to the request message.
Based on any embodiment, the instant messaging service in the device comprises: message management services, protocol management services, and traffic management services.
The generating module 520 is specifically configured to:
and receiving the distributed service message through the message management service, and storing the distributed service message in a cache.
And calling the target distributed service message in the cache through the service management service, and inquiring whether the name of the first target service corresponding to the target distributed service message is in a pre-stored authentication list.
And if the name of the first target service is in the authentication list, verifying the target distributed service message through the protocol management service.
And if the name of the first target service is not in the authentication list, deleting the target distributed service message in the cache through the message management service.
Based on any of the above embodiments, the instant messaging service further includes: a distributed server.
The obtaining module 510 is specifically configured to: and requesting to acquire the service message of the first target service from the distributed server, wherein the service server stores the service message of the first target service in the distributed server.
The analysis module is specifically configured to:
and sending the distributed request message to a distributed server so that the service server side acquires the distributed request message.
Based on any of the foregoing embodiments, the push device for service messages provided in the embodiments of the present invention further includes a second receiving module, an adding module, and a second converting module:
and the second receiving module is used for receiving a third communication message of the service to be newly added, which is sent by the browser, wherein the third communication message is generated by performing format conversion according to a request message of the service to be newly added of the browser.
And the adding module is used for adding the name of the service to be newly added corresponding to the third communication message into the authentication list.
And the second conversion module is used for performing distributed conversion on the third communication message of the service to be newly added to generate a corresponding distributed request message.
And sending the distributed request message to a service server side so that the service server side analyzes the distributed request message to obtain a service corresponding to the request message of the service to be newly added.
Based on any of the above embodiments, the push device for the service message provided by the embodiments of the present invention further includes a third receiving module and a deleting module. :
and the third receiving module is used for receiving a fourth communication message of the service to be deleted, which is sent by the browser.
And the deleting module is used for deleting the name of the service to be deleted corresponding to the fourth communication message in the authentication list.
The invention provides a device for pushing real-time messages, which receives distributed service messages of a first target service sent by a service server; verifying the received distributed service message, deleting the distributed service message which fails to be verified, and performing format conversion on the verified distributed service message to generate a first communication message; and sending the first communication message to the browser so that the browser analyzes the first communication message to obtain a service message, and consuming the service message through the corresponding service. By establishing the instant messaging service between the service server and the browser, an independent communication protocol does not need to be customized for realizing each service in the service server, and the service server and the browser can keep real-time communication under different service application scenes through the architecture of 'server-instant messaging service-browser', so that resource waste is avoided.
Fig. 6 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 6: a processor (processor) 610, a communication Interface 620, a memory (memory) 630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 complete communication with each other through the communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a push method for a service message, the method comprising: acquiring a distributed service message of a first target service sent by a service server; verifying the distributed service message, and performing format conversion on the verified distributed service message to generate a first communication message; and sending the first communication message to a browser so that the browser analyzes the first communication message to obtain a service message, and consuming the service message through a corresponding service.
In addition, the logic instructions in the memory 630 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, where the computer program product includes a computer program, the computer program may be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, a computer can execute the method for pushing a service message provided by the above methods, where the method includes: acquiring a distributed service message of a first target service sent by a service server; verifying the distributed service message, and performing format conversion on the verified distributed service message to generate a first communication message; and sending the first communication message to a browser so that the browser analyzes the first communication message to obtain a service message, and consuming the service message through a corresponding service.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing a method for pushing a service message provided by the above methods, the method comprising: acquiring a distributed service message of a first target service sent by a service server; verifying the distributed service message, and performing format conversion on the verified distributed service message to generate a first communication message; and sending the first communication message to a browser so that the browser analyzes the first communication message to obtain a service message, and consuming the service message through a corresponding service.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for pushing a service message, which is used for an instant messaging service, the method comprising:
acquiring a distributed service message of a first target service sent by a service server;
verifying the distributed service message, and performing format conversion on the verified distributed service message to generate a first communication message;
and sending the first communication message to a browser so that the browser analyzes the first communication message to obtain a service message, and consuming the service message through a corresponding service.
2. The method for pushing service messages according to claim 1, wherein the method further comprises:
receiving a second communication message of a second target service sent by the browser; the second communication message is generated by performing format conversion according to the request message of the browser;
performing distributed conversion on the second communication message to generate a corresponding distributed request message;
and sending the distributed request message to a service server so that the service server analyzes the distributed request message to obtain a second target service corresponding to the request message.
3. A pushing method of service message according to claim 1, characterized in that said instant communication service comprises: message management service, protocol management service and service management service;
the verifying the distributed service message includes:
receiving the distributed service message through the message management service, and storing the distributed service message in a cache;
calling a target distributed service message in the cache through the service management service, and inquiring whether the name of the first target service corresponding to the target distributed service message is in a pre-stored authentication list or not;
if the name of the first target service is in the authentication list, verifying the target distributed service message through the protocol management service;
and if the name of the first target service is not in the authentication list, deleting the target distributed service message in the cache through the message management service.
4. A pushing method of service message according to claim 2, wherein the instant communication service further comprises: a distributed server;
the acquiring of the distributed service message of the first target service sent by the service server includes: requesting the distributed server to acquire the distributed service message of the first target service, wherein the service server end stores the distributed service message of the first target service in the distributed server;
the sending the distributed request message to a service server side includes:
and sending the distributed request message to the distributed server so that the service server side acquires the distributed request message.
5. The method for pushing service messages according to claim 2, wherein the method further comprises:
receiving a third communication message of a service to be newly added, which is sent by a browser, wherein the third communication message is generated by performing format conversion according to a request message of the service to be newly added of the browser;
adding the name of the service to be newly added corresponding to the third communication message to the authentication list;
performing distributed conversion on the third communication message of the service to be newly added to generate a corresponding distributed request message;
and sending the distributed request message to a service server so that the service server analyzes the distributed request message to obtain a service corresponding to the request message of the service to be newly added.
6. The method for pushing service messages according to claim 2, wherein the method further comprises:
receiving a fourth communication message of the service to be deleted, which is sent by the browser;
and deleting the name of the service to be deleted corresponding to the fourth communication message in an authentication list.
7. A pushing apparatus of service message, which is used for instant communication service, the apparatus comprising:
the acquisition module is used for acquiring a distributed service message of a first target service sent by a service server side;
the generating module is used for verifying the distributed service message and converting the format of the verified distributed service message to generate a first communication message;
and the sending module is used for sending the first communication message to a browser so that the browser analyzes the first communication message to obtain a service message, and consumes the service message through a corresponding service.
8. The apparatus for pushing service message according to claim 7, wherein said apparatus further comprises:
the receiving module is used for receiving a second communication message of a second target service sent by the browser; the second communication message is generated by performing format conversion according to a request message of the browser;
the conversion module is used for performing distributed conversion on the second communication message to generate a corresponding distributed request message;
and the analysis module is used for sending the distributed request message to a service server so that the service server analyzes the distributed request message to obtain a second target service corresponding to the request message.
9. A non-transitory computer readable storage medium, having stored thereon a computer program, wherein the computer program, when being executed by a processor, implements the steps of the method for pushing a service message according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, carries out the steps of the push method of a service message according to any one of claims 1 to 6.
CN202210541504.9A 2022-05-17 2022-05-17 Method and device for pushing service message Pending CN115190091A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210541504.9A CN115190091A (en) 2022-05-17 2022-05-17 Method and device for pushing service message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210541504.9A CN115190091A (en) 2022-05-17 2022-05-17 Method and device for pushing service message

Publications (1)

Publication Number Publication Date
CN115190091A true CN115190091A (en) 2022-10-14

Family

ID=83512735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210541504.9A Pending CN115190091A (en) 2022-05-17 2022-05-17 Method and device for pushing service message

Country Status (1)

Country Link
CN (1) CN115190091A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120110157A1 (en) * 2010-10-29 2012-05-03 International Business Machines Corporation Web browser-based business process management engine
CN108282514A (en) * 2017-12-12 2018-07-13 北京奇艺世纪科技有限公司 A kind of distributed service method for building up and device
CN111510476A (en) * 2020-04-03 2020-08-07 金蝶软件(中国)有限公司 Communication method, communication apparatus, computer device, and computer-readable storage medium
CN113709166A (en) * 2021-08-31 2021-11-26 广州艾美网络科技有限公司 Distributed service gateway implementation method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120110157A1 (en) * 2010-10-29 2012-05-03 International Business Machines Corporation Web browser-based business process management engine
CN108282514A (en) * 2017-12-12 2018-07-13 北京奇艺世纪科技有限公司 A kind of distributed service method for building up and device
CN111510476A (en) * 2020-04-03 2020-08-07 金蝶软件(中国)有限公司 Communication method, communication apparatus, computer device, and computer-readable storage medium
CN113709166A (en) * 2021-08-31 2021-11-26 广州艾美网络科技有限公司 Distributed service gateway implementation method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103580986B (en) A kind of real-time communication method, terminal unit, real-time communication server and system
US10834031B2 (en) Information exchange method, client, and apparatus
US11064016B2 (en) Universal connectors for cloud data loss prevention (DLP)
CN103535004B (en) Method for promoting anonymity audio and video communication and system based on web
US10887259B2 (en) Communication management system
US9106603B2 (en) Apparatus, method and computer-readable storage mediums for determining application protocol elements as different types of lawful interception content
US11966684B2 (en) Methods, systems, and apparatus for email to persistent messaging
EP2408174A1 (en) Messaging activity feed
US20050243747A1 (en) Systems and methods for sending binary, file contents, and other information, across SIP info and text communication channels
US20200153781A1 (en) Methods, Systems, and Apparatus for Text to Persistent Messaging
WO2016037489A1 (en) Method, device and system for monitoring rcs spam messages
US20080268883A1 (en) Spam short message blocking system using a call back short message and a method thereof
CN115190091A (en) Method and device for pushing service message
CN101425067A (en) Information retrival method and system
CN110545237A (en) Instant messaging method, device, system, computer equipment and storage medium
CN112087369B (en) Mail filtering method, device, equipment and storage medium
CN117459903A (en) Message cloud platform, communication method and computer readable storage medium
CN117424874A (en) Mail processing method, device, computing equipment and storage medium
CN118400427A (en) Log processing method and device, electronic equipment and computer readable medium
CN115086292A (en) Distributed instant server push scheme architecture design method, device and storage medium
CN118101611A (en) Instant messaging method, server and client
CN108289052A (en) Multi-media SMS based on Android manages system
CN101674536A (en) Method, device and system for replacing multimedia messages

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