CN111641693A - Session data processing method and device and electronic equipment - Google Patents

Session data processing method and device and electronic equipment Download PDF

Info

Publication number
CN111641693A
CN111641693A CN202010432530.9A CN202010432530A CN111641693A CN 111641693 A CN111641693 A CN 111641693A CN 202010432530 A CN202010432530 A CN 202010432530A CN 111641693 A CN111641693 A CN 111641693A
Authority
CN
China
Prior art keywords
session
idempotent
client
user
message
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.)
Granted
Application number
CN202010432530.9A
Other languages
Chinese (zh)
Other versions
CN111641693B (en
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010432530.9A priority Critical patent/CN111641693B/en
Publication of CN111641693A publication Critical patent/CN111641693A/en
Application granted granted Critical
Publication of CN111641693B publication Critical patent/CN111641693B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/01Customer relationship services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1813Arrangements for providing special services to substations for broadcast or conference, e.g. multicast for computer conferences, e.g. chat rooms
    • H04L12/1818Conference organisation arrangements, e.g. handling schedules, setting up parameters needed by nodes to attend a conference, booking network resources, notifying involved parties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/185Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with management of multicast group membership
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Abstract

The embodiment of the disclosure provides a session data processing method, a session data processing device and electronic equipment, belonging to the technical field of data processing, wherein the method comprises the following steps: determining an idempotent group chat corresponding to an idempotent ID based on the idempotent ID generated in a client browser; establishing a session channel with the client by utilizing the idempotent chat; acquiring session messages from a client and a server based on the session channel; and processing the session messages acquired in the session channel and sent by the client and the server through a preset communication gateway and a session manager. By the processing scheme, the complexity of session data processing can be reduced.

Description

Session data processing method and device and electronic equipment
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a session data processing method and apparatus, and an electronic device.
Background
The customer service system is a module which is very important for the clue collection of the advertising system. The advertiser touches a real C-end visitor by putting advertisements, and if the visitor is interested in the advertisement content, the visitor can choose to enter a consultation page, so that a message channel with customer service is established, and the consultation of the visitor and the customer service is realized. In the common customer service system in the market, a session is established after a visitor enters a page. It is not flexible enough.
Common customer service systems are all gateway models. The general session flow of the gateway model is as follows: the guest opens page ═ page initiate create session request ═ gateway create session ═ return session ID ═ guest sends messages are all based on session ID. This solution does not enable to adjust the session creation policy. In an advertisement scene, a large number of users can enter a page due to misoperation. Typically, the user enters the advisory page and then immediately returns, exiting the advisory. If the conversation is created when the page is opened, a large number of invalid incoming line conversations can be caused, and precious seat resources are occupied.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a session data processing method, a session data processing apparatus, and an electronic device, so as to at least partially solve the problems in the prior art.
In a first aspect, an embodiment of the present disclosure provides a session data processing method, including:
determining an idempotent group chat corresponding to an idempotent ID based on the idempotent ID generated in a client browser;
establishing a session channel with the client by utilizing the idempotent chat;
acquiring session messages from a client and a server based on the session channel;
and processing the session messages acquired in the session channel and sent by the client and the server through a preset communication gateway and a session manager.
According to a specific implementation manner of the embodiment of the present disclosure, the processing, by using a preset communication gateway and a session manager, session messages sent by a client and a server acquired in a session channel includes:
receiving a group chat joining request from a first user at a service end through the communication gateway;
after a session manager receives a group chat joining request forwarded by the communication gateway, judging the legality of the group chat joining request;
and when the group chat joining request meets the legitimacy requirement, the session manager returns an operation result to the communication gateway, so that the communication gateway forwards the operation result to the browser of the first user for page rendering and display.
According to a specific implementation manner of the embodiment of the present disclosure, the processing, by using a preset communication gateway and a session manager, session messages sent by a client and a server acquired in a session channel includes:
after receiving a visitor message sent by a client through the communication gateway, forwarding the visitor message to a session manager;
judging whether a first user and a second user of a server are in the idempotent chat by utilizing the session manager;
when a first user and a second user of a server are in the idempotent group chat, the session manager is utilized to forward the visitor messages to browsers corresponding to the first user and the second user respectively, so that message rendering and display are conveniently carried out in the browsers.
According to a specific implementation manner of the embodiment of the present disclosure, the processing, by using a preset communication gateway and a session manager, session messages sent by a client and a server acquired in a session channel includes:
acquiring a whisper message sent by a first user to a second user at a server side by using the communication gateway, and sending the whisper message to a session manager;
determining, with the session manager, whether the second user is in the idempotent chat;
if so, sending the whisper message to the second user by using the session manager;
and after the whisper message is successfully sent, informing the first user of the successfully sent message by utilizing the communication gateway.
According to a specific implementation manner of the embodiment of the present disclosure, the processing, by using a preset communication gateway and a session manager, session messages sent by a client and a server acquired in a session channel includes:
acquiring a historical message pulling request sent by a client by using the communication gateway;
searching a history message corresponding to the history message pulling request in the session manager so as to form a history message list;
and sending the history message list to the client through the communication gateway so as to be conveniently rendered and displayed in a browser of the client.
According to a specific implementation manner of the embodiment of the present disclosure, before determining an idempotent group chat corresponding to an idempotent ID based on the idempotent ID generated in a client browser, the method further includes:
injecting a JS code generating an idempotent ID in the browser so as to generate the idempotent ID based on the JS code in the browser when an operation of a visitor opening a page occurs in the browser of the client.
According to a specific implementation manner of the embodiment of the present disclosure, the determining an idempotent group chat corresponding to an idempotent ID based on the idempotent ID generated in a client browser includes:
searching whether an idempotent chat corresponding to the idempotent ID exists or not;
if yes, returning the searched idempotent chat;
and if the ID does not exist, creating the idempotent chat based on the idempotent ID.
According to a specific implementation manner of the embodiment of the present disclosure, the establishing a session channel with the client by using the idempotent group chat includes:
acquiring a message event sent by the client;
judging whether a session corresponding to the message event needs to be established or not through a session manager;
and if so, creating the session channel through a session manager.
In a second aspect, an embodiment of the present disclosure provides a session data processing apparatus, including:
the determining module is used for determining the idempotent group chat corresponding to the idempotent ID based on the idempotent ID generated in the client browser;
the establishing module is used for establishing a session channel with the client by utilizing the idempotent group chat;
the acquisition module is used for acquiring session messages from the client and the server based on the session channel;
and the processing module is used for processing the session messages which are acquired in the session channel and sent by the client and the server through a preset communication gateway and a session manager.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the session data processing method of the first aspect or any implementation manner of the first aspect.
In a fourth aspect, the disclosed embodiments also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the session data processing method in the first aspect or any implementation manner of the first aspect.
In a fifth aspect, the disclosed embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the session data processing method in the first aspect or any implementation manner of the first aspect.
The session data processing scheme in the embodiment of the disclosure comprises determining an idempotent group chat corresponding to an idempotent ID based on the idempotent ID generated in a client browser; establishing a session channel with the client by utilizing the idempotent chat; acquiring session messages from a client and a server based on the session channel; and processing the session messages acquired in the session channel and sent by the client and the server through a preset communication gateway and a session manager. By the processing scheme, the efficiency of processing the session data is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a session data processing method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of another session data processing method provided by the embodiment of the present disclosure;
fig. 3 is a flowchart of another session data processing method provided by the embodiment of the present disclosure;
fig. 4 is a flowchart of another session data processing method provided by the embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a session data processing apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. Additionally, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present disclosure, and the drawings only show the components related to the present disclosure rather than the number, shape and size of the components in actual implementation, and the type, amount and ratio of the components in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The embodiment of the disclosure provides a session data processing method. The session data processing method provided by the embodiment may be executed by a computing device, which may be implemented as software or as a combination of software and hardware, and may be integrally provided in a server, a client, or the like.
Referring to fig. 1, a session data processing method in an embodiment of the present disclosure may include the following steps:
s101, based on the idempotent ID generated in the client browser, determining the idempotent group chat corresponding to the idempotent ID.
Common customer service systems are all gateway models. The general session flow of the gateway model is as follows: the guest opens page ═ page initiate create session request ═ gateway create session ═ return session ID ═ guest sends messages are all based on session ID. This solution does not enable to adjust the session creation policy. In an advertisement scene, a large number of users can enter a page due to misoperation. Typically, the user enters the advisory page and then immediately returns, exiting the advisory. If the conversation is created when the page is opened, a large number of invalid incoming line conversations can be caused, and precious seat resources are occupied.
Therefore, the JS code can be set in an injection mode at the browser end of the client, and the user can generate the idempotent ID of the user in the browser at the same time when the user opens the browser chat interface through the JS code. In the HTTP method, the idempotent ID with idempotent property consumes the same resource when one resource is requested for a plurality of times, namely, the resource occupation effect of one request and N times of transmission is the same for the same user. For example, the HTTP GET method can be used for obtaining a resource for idempotent IDs without changing the state of the resource, and no additional resource occupation is caused whether the resource is called once or N times.
After obtaining the idempotent ID, it is possible to further search whether or not an idempotent chat corresponding to the idempotent ID exists, and if an idempotent chat has been established for the idempotent ID before, the searched idempotent chat is directly returned, and if not, the idempotent chat is created based on the idempotent ID. The setup mode of the idempotent group chat and the setup mode type of the idempotent ID are only required to ensure that the set group chat satisfies the idempotent.
And S102, establishing a session channel with the client by utilizing the idempotent chat.
After the idempotent chat is found, a data connection channel between the client and the session service can be established through the idempotent chat, and a session data interaction channel between the session service and the client can be established based on the data connection channel.
As an embodiment, a group session component may be provided in the session service, and the group session component receives a session request of power chat sent by a client user, and sends information of the determined power chat (for example, a name of the power chat) to the user of the client through a gateway and a client browser of the session service in sequence, so that the user notifies the user that the power chat is successfully created, and the user may perform a session operation through the power chat. Through the mode of the idempotent group chat, the idempotent of data interaction can be ensured, and the occupation of system resources is saved.
After receiving the notification that the idempotent chat can be performed, the user of the client can establish a session channel through different types of operational events to facilitate session interaction.
As a mode, a client visitor sends an incoming line message to form an incoming line event, the incoming line message carries basic service data, and through the service data, a session manager at a session end analyzes and judges the incoming line event to judge whether a session needs to be generated, and when the session needs to be generated, a session channel is established.
Alternatively, when a visitor at the client starts to input a character in a chat box, a pre-known message which is being input by the user is sent to the message channel to form a pre-known message event, the session manager at the session end analyzes and judges the pre-known message event to judge whether a session needs to be generated, and when the session needs to be generated, the session channel is established.
As another way, after completing the content input of the session and clicking to send, the guest point at the client sends the user message of the user to the message channel to form a notification user message event, and the session manager at the session end analyzes and judges the notification user message event to determine whether a session needs to be generated, and when determining that a session needs to be generated, establishes the session channel.
S103, based on the session channel, session messages from the client and the server are obtained.
After the session channel is established, the request messages sent by the client and the server can be further acquired through the session channel, so as to facilitate processing of the request messages.
Specifically, the client user can send a session request to the server by means of a browser or the like, and at this time, the idempotent ID of the client user can be acquired through the session channel, and a message such as the idempotent group ID of the client user can be determined based on the idempotent ID.
In addition, one or more users at the server side can also send a session request for the idempotent through a browser or the like, and at this time, the ID of the user at the server side can be acquired through the session channel, and the user joining operation or the like can be performed on the idempotent based on the ID.
And S104, processing the session messages acquired in the session channel and sent by the client and the server through a preset communication gateway and a session manager.
After the request message from the client or the server is acquired, various request messages can be processed by a communication gateway and a session manager which are arranged at the server. The communication gateway may act as a relay station for message transmission and reception, sending messages to clients, servers or session managers. The session manager is used for processing the received messages of the client and the server.
As a mode, in the process of processing session messages sent by a client and a server acquired in a session channel through a preset communication gateway and a session manager, a group chat join request from a first user at the server can be received through the communication gateway; after a session manager receives a group chat joining request forwarded by the communication gateway, judging the legality of the group chat joining request; and when the group chat joining request meets the legitimacy requirement, the session manager returns an operation result to the communication gateway, so that the communication gateway forwards the operation result to the browser of the first user for page rendering and display.
As a mode, in the process of processing session messages sent by a client and a server acquired in a session channel through a preset communication gateway and a session manager, after receiving a visitor message sent by the client through the communication gateway, forwarding the visitor message to the session manager; judging whether a first user and a second user of a server are in the idempotent chat by utilizing the session manager; when a first user and a second user of a server are in the idempotent group chat, the session manager is utilized to forward the visitor messages to browsers corresponding to the first user and the second user respectively, so that message rendering and display are conveniently carried out in the browsers.
As a mode, in the process of processing session messages sent by a client and a server acquired in a session channel through a preset communication gateway and a session manager, a whispering message sent by a first user at the server to a second user can be acquired by using the communication gateway, and sent to the session manager; determining, with the session manager, whether the second user is in the idempotent chat; if so, sending the whisper message to the second user by using the session manager; and after the whisper message is successfully sent, informing the first user of the successfully sent message by utilizing the communication gateway.
As a mode, in the process of processing session messages sent by a client and a server acquired in a session channel through a preset communication gateway and a session manager, a history message pull request sent by the client can be acquired by using the communication gateway; searching a history message corresponding to the history message pulling request in the session manager so as to form a history message list; and sending the history message list to the client through the communication gateway so as to be conveniently rendered and displayed in a browser of the client.
Through the content of the embodiment, the conversation message can be processed in an idempotent group chat mode, and the complexity of message processing is reduced by setting a conversation processing mechanism.
Referring to fig. 2, according to a specific implementation manner of the embodiment of the present disclosure, processing, by using a preset communication gateway and a session manager, a session message sent by a client and a session message sent by a server acquired in a session channel includes:
s201, receiving a group chat joining request from a first user at a service end through the communication gateway.
The first user may be a user (e.g., a customer service user) whose service needs to temporarily join the idempotent chat, and the first user may send a group chat join request to the communication gateway before joining the idempotent chat.
And S202, after the session manager receives the group chat joining request forwarded by the communication gateway, judging the legality of the group chat joining request.
In the process of judging the legality, whether the first user belongs to a legal user who can join the idempotent chat can be checked.
And S203, after the group chat joining request meets the legitimacy requirement, the session manager returns the operation result to the communication gateway so that the communication gateway can forward the operation result to the browser of the first user for page rendering and display.
Through the contents of the above embodiments, it is possible to manage the user who temporarily joins the idempotent chat.
Referring to fig. 3, according to a specific implementation manner of the embodiment of the present disclosure, processing, by using a preset communication gateway and a session manager, a session message sent by a client and a session message sent by a server acquired in a session channel includes:
s301, after receiving the visitor message sent by the client through the communication gateway, forwarding the visitor message to the session manager.
And S302, judging whether the first user and the second user of the server are in the idempotent group chat by utilizing the session manager.
The first user and the second user can be the same type of user (for example, a customer service person located at a server), so that the visitor message of the client can be directly sent to the first user and the second user, thereby further improving the processing speed of the conversation message
S303, when the first user and the second user at the server are in the idempotent group chat, the session manager is utilized to forward the visitor message to the browsers corresponding to the first user and the second user respectively, so that message rendering and display are conveniently carried out in the browsers.
Through the content of the embodiment, the message can be simultaneously forwarded to the first user and the second user, and the message forwarding efficiency is improved.
Referring to fig. 4, according to a specific implementation manner of the embodiment of the present disclosure, processing, by using a preset communication gateway and a session manager, a session message sent by a client and a session message sent by a server acquired in a session channel includes:
s401, obtaining a whisper message sent by a first user to a second user at a server side by using the communication gateway, and sending the whisper message to a session manager.
The whispering message may be a message that is only communicable between the first user and the second user, which message is only visible to the first user and the second user.
S402, judging whether the second user is in the idempotent group chat by utilizing the session manager;
s403, if yes, the conversation manager is utilized to send the whisper message to the second user;
s404, after the whisper message is successfully sent, the first user is informed of the successfully sent message by using the communication gateway.
Through the embodiment, the transfer of the whispering messages can be directly carried out based on the idempotent groups.
According to a specific implementation manner of the embodiment of the present disclosure, the processing, by using a preset communication gateway and a session manager, session messages sent by a client and a server acquired in a session channel includes: acquiring a historical message pulling request sent by a client by using the communication gateway; searching a history message corresponding to the history message pulling request in the session manager so as to form a history message list; and sending the history message list to the client through the communication gateway so as to be conveniently rendered and displayed in a browser of the client.
According to a specific implementation manner of the embodiment of the present disclosure, before determining an idempotent group chat corresponding to an idempotent ID based on the idempotent ID generated in a client browser, the method further includes: injecting a JS code generating an idempotent ID in the browser so as to generate the idempotent ID based on the JS code in the browser when an operation of a visitor opening a page occurs in the browser of the client.
According to a specific implementation manner of the embodiment of the present disclosure, the determining an idempotent group chat corresponding to an idempotent ID based on the idempotent ID generated in a client browser includes: searching whether an idempotent chat corresponding to the idempotent ID exists or not; if yes, returning the searched idempotent chat; and if the ID does not exist, creating the idempotent chat based on the idempotent ID.
According to a specific implementation manner of the embodiment of the present disclosure, the establishing a session channel with the client by using the idempotent group chat includes: acquiring a message event sent by the client; judging whether a session corresponding to the message event needs to be established or not through a session manager; and if so, creating the session channel through a session manager.
Corresponding to the above method embodiment, referring to fig. 5, an embodiment of the present disclosure further provides a session data processing apparatus 50, including:
a determining module 501, configured to determine an idempotent group chat corresponding to an idempotent ID based on the idempotent ID generated in a client browser;
an establishing module 502, configured to establish a session channel with the client by using the idempotent chat;
an obtaining module 503, configured to obtain session messages from the client and the server based on the session channel;
the processing module 504 is configured to process session messages sent by the client and the server, which are acquired in the session channel, through a preset communication gateway and a session manager.
For parts not described in detail in this embodiment, reference is made to the contents described in the above method embodiments, which are not described again here.
Referring to fig. 6, an embodiment of the present disclosure also provides an electronic device 60, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the session data processing method of the foregoing method embodiments.
The disclosed embodiments also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the session data processing method in the foregoing method embodiments.
The disclosed embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the session data processing method in the aforementioned method embodiments.
Referring now to FIG. 6, a schematic diagram of an electronic device 60 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 60 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 60 are also stored. The processing device 601, the ROM602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. While the figures illustrate an electronic device 60 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present disclosure should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (11)

1. A session data processing method, comprising:
determining an idempotent group chat corresponding to an idempotent ID based on the idempotent ID generated in a client browser;
establishing a session channel with the client by utilizing the idempotent chat;
acquiring session messages from a client and a server based on the session channel;
and processing the session messages acquired in the session channel and sent by the client and the server through a preset communication gateway and a session manager.
2. The method according to claim 1, wherein the processing, through a preset communication gateway and a session manager, session messages sent by the client and the server acquired in the session channel includes:
receiving a group chat joining request from a first user at a service end through the communication gateway;
after a session manager receives a group chat joining request forwarded by the communication gateway, judging the legality of the group chat joining request;
and when the group chat joining request meets the legitimacy requirement, the session manager returns an operation result to the communication gateway, so that the communication gateway forwards the operation result to the browser of the first user for page rendering and display.
3. The method according to claim 1, wherein the processing, through a preset communication gateway and a session manager, session messages sent by the client and the server acquired in the session channel includes:
after receiving a visitor message sent by a client through the communication gateway, forwarding the visitor message to a session manager;
judging whether a first user and a second user of a server are in the idempotent chat by utilizing the session manager;
when a first user and a second user of a server are in the idempotent group chat, the session manager is utilized to forward the visitor messages to browsers corresponding to the first user and the second user respectively, so that message rendering and display are conveniently carried out in the browsers.
4. The method according to claim 1, wherein the processing, through a preset communication gateway and a session manager, session messages sent by the client and the server acquired in the session channel includes:
acquiring a whisper message sent by a first user to a second user at a server side by using the communication gateway, and sending the whisper message to a session manager;
determining, with the session manager, whether the second user is in the idempotent chat;
if so, sending the whisper message to the second user by using the session manager;
and after the whisper message is successfully sent, informing the first user of the successfully sent message by utilizing the communication gateway.
5. The method according to claim 1, wherein the processing, through a preset communication gateway and a session manager, session messages sent by the client and the server acquired in the session channel includes:
acquiring a historical message pulling request sent by a client by using the communication gateway;
searching a history message corresponding to the history message pulling request in the session manager so as to form a history message list;
and sending the history message list to the client through the communication gateway so as to be conveniently rendered and displayed in a browser of the client.
6. The method of claim 1, wherein prior to determining an idempotent group chat corresponding to an idempotent ID based on the idempotent ID generated in a client browser, the method further comprises:
injecting a JS code generating an idempotent ID in the browser so as to generate the idempotent ID based on the JS code in the browser when an operation of a visitor opening a page occurs in the browser of the client.
7. The method of claim 1, wherein determining an idempotent chat corresponding to the idempotent ID based on the idempotent ID generated in the client browser comprises:
searching whether an idempotent chat corresponding to the idempotent ID exists or not;
if yes, returning the searched idempotent chat;
and if the ID does not exist, creating the idempotent chat based on the idempotent ID.
8. The method of claim 1, wherein establishing a session channel with the client using the idempotent chat comprises:
acquiring a message event sent by the client;
judging whether a session corresponding to the message event needs to be established or not through a session manager;
and if so, creating the session channel through a session manager.
9. A session data processing apparatus, comprising:
the determining module is used for determining the idempotent group chat corresponding to the idempotent ID based on the idempotent ID generated in the client browser;
the establishing module is used for establishing a session channel with the client by utilizing the idempotent group chat;
the acquisition module is used for acquiring session messages from the client and the server based on the session channel;
and the processing module is used for processing the session messages which are acquired in the session channel and sent by the client and the server through a preset communication gateway and a session manager.
10. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of session data processing according to any of the preceding claims 1 to 8.
11. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the session data processing method according to any one of the preceding claims 1 to 8.
CN202010432530.9A 2020-05-20 2020-05-20 Session data processing method and device and electronic equipment Active CN111641693B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010432530.9A CN111641693B (en) 2020-05-20 2020-05-20 Session data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010432530.9A CN111641693B (en) 2020-05-20 2020-05-20 Session data processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111641693A true CN111641693A (en) 2020-09-08
CN111641693B CN111641693B (en) 2022-09-23

Family

ID=72332082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010432530.9A Active CN111641693B (en) 2020-05-20 2020-05-20 Session data processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111641693B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112802614A (en) * 2021-01-27 2021-05-14 挂号网(杭州)科技有限公司 Online inquiry method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070233615A1 (en) * 2006-03-30 2007-10-04 Obopay Inc. Member-Supported Mobile Payment System
US20090216901A1 (en) * 2008-02-27 2009-08-27 Schloming Rafael H Three-way communication protocol
US20130066949A1 (en) * 2011-09-09 2013-03-14 Oracle International Corporation Idempotence for database transactions
US20130311525A1 (en) * 2012-05-15 2013-11-21 Microsoft Corporation Idempotent command execution
CN105740258A (en) * 2014-12-09 2016-07-06 阿里巴巴集团控股有限公司 Business processing method and device based on power equal sign check
CN107436767A (en) * 2017-07-31 2017-12-05 杭州安恒信息技术有限公司 The optimization method that idempotent operates in a kind of asynchronous framework
CN110020846A (en) * 2019-03-18 2019-07-16 阿里巴巴集团控股有限公司 A kind of transferred account service processing method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070233615A1 (en) * 2006-03-30 2007-10-04 Obopay Inc. Member-Supported Mobile Payment System
US20090216901A1 (en) * 2008-02-27 2009-08-27 Schloming Rafael H Three-way communication protocol
US20130066949A1 (en) * 2011-09-09 2013-03-14 Oracle International Corporation Idempotence for database transactions
US20130311525A1 (en) * 2012-05-15 2013-11-21 Microsoft Corporation Idempotent command execution
CN105740258A (en) * 2014-12-09 2016-07-06 阿里巴巴集团控股有限公司 Business processing method and device based on power equal sign check
CN107436767A (en) * 2017-07-31 2017-12-05 杭州安恒信息技术有限公司 The optimization method that idempotent operates in a kind of asynchronous framework
CN110020846A (en) * 2019-03-18 2019-07-16 阿里巴巴集团控股有限公司 A kind of transferred account service processing method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112802614A (en) * 2021-01-27 2021-05-14 挂号网(杭州)科技有限公司 Online inquiry method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111641693B (en) 2022-09-23

Similar Documents

Publication Publication Date Title
CN111177617A (en) Web direct operation and maintenance method and device based on operation and maintenance management system and electronic equipment
CN110378743B (en) Application invitation method, terminal device, server and medium
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN110569057A (en) gray scale distribution method and device, electronic equipment and computer readable medium
CN111246228B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN110658960A (en) Message processing method and device and electronic equipment
CN110658961A (en) Information display method and device and electronic equipment
EP4113985A1 (en) Multimedia conference data processing method and apparatus, and electronic device
CN112965673A (en) Content printing method, device, equipment and storage medium
CN110837334B (en) Method, device, terminal and storage medium for interactive control
CN111641693B (en) Session data processing method and device and electronic equipment
CN112367241A (en) Message generation and message transmission method, device, equipment and computer readable medium
CN111147885B (en) Live broadcast room interaction method and device, readable medium and electronic equipment
CN110619101B (en) Method and apparatus for processing information
CN115022106B (en) Group information processing method, device, equipment and medium
CN115562527A (en) Comment information publishing method and device, electronic equipment and storage medium
CN115237291A (en) Information processing method, device, equipment and medium
CN111259287B (en) Page content display method and device, electronic equipment and storage medium
JP2024500300A (en) Information interaction methods, devices, and equipment
CN112688793B (en) Data packet obtaining method and device and electronic equipment
CN111212296B (en) Live broadcast room gift list configuration method, device, medium and electronic equipment
CN114489891A (en) Control method, system, device, readable medium and equipment of cloud application program
CN114595393A (en) Data processing method and device
CN114491098A (en) Comment prompting method and device, electronic equipment, storage medium and program product
CN111641692B (en) Session data processing method and device and electronic equipment

Legal Events

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