WO2019134306A1 - Message processing method, device, terminal apparatus, and readable storage medium - Google Patents
Message processing method, device, terminal apparatus, and readable storage medium Download PDFInfo
- Publication number
- WO2019134306A1 WO2019134306A1 PCT/CN2018/084252 CN2018084252W WO2019134306A1 WO 2019134306 A1 WO2019134306 A1 WO 2019134306A1 CN 2018084252 W CN2018084252 W CN 2018084252W WO 2019134306 A1 WO2019134306 A1 WO 2019134306A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- message
- socket server
- interface address
- user terminal
- interaction
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Definitions
- the present application relates to the field of computer technologies, and in particular, to a message processing method, apparatus, terminal device, and readable storage medium.
- some interactive functions are supported by the interaction between the user terminal and the Socket server.
- the APP installed on the user terminal sends a message interaction to the Socket server.
- the request is implemented to implement data reporting and request, and the Socket server feeds back the message to the user terminal to implement the message delivery.
- the development of APP often needs to rely on the message returned by the Socket server. For example, when the APP of the user terminal sends a request to the Socket server, if the development task of the developer of the Socket server has not been completed, then the APP will Without the message sent by the desired server, the corresponding logical processing cannot be performed. It is necessary to wait for the development of the server-side developer before proceeding to the next step, which greatly affects the efficiency.
- the object of the present application includes providing a message processing method, apparatus, terminal device and readable storage medium to effectively improve work efficiency.
- the embodiment of the present invention provides a message processing method, which is applied to an analog Socket server, where the simulated Socket server is respectively connected to a user terminal and a real Socket server, and the method includes:
- the corresponding simulated interaction message is obtained from the pre-configured simulated message list, and the simulated message is sent to the user terminal;
- the message interaction request is forwarded to the real Socket server, so that the real Socket server generates a corresponding interaction message according to the message interaction request;
- the method before receiving the message interaction request sent by the user terminal, the method further includes:
- connection success information is sent to the user terminal.
- the method before receiving the message interaction request sent by the user terminal, the method further includes:
- the gateway service connection request After receiving the gateway service connection request sent by the user terminal, initiating a connection request to the corresponding real Socket server according to the gateway service connection request, and receiving the return that the real Socket server returns based on the connection request Establishing a communication connection with the real Socket server after the connection information of the real Socket server, wherein the connection information of the real Socket server includes an interface address and a port of the real Socket server;
- connection information After successfully connecting with the real Socket server, sending connection success information to the user terminal, and transmitting connection information of the simulated Socket server to the user terminal, so that the user terminal is based on the simulated Socket server
- the connection information establishes a communication connection with the analog Socket server to simulate a communication connection between the user terminal and the real Socket server, wherein the connection information of the simulated Socket server includes an interface address of the analog Socket server and port.
- the determining, according to the message interaction request, whether an analog interaction message is required includes:
- the interface address list includes an interface address of a real Socket server that has not completed the development task
- the method before receiving the message interaction request sent by the user terminal, the method further includes:
- configuring the interface address list includes:
- the interface address list is obtained according to the received interface address configuration.
- the method before receiving the message interaction request sent by the user terminal, the method further includes:
- the message configuration gets a list of simulated messages.
- the embodiment of the present application further provides a message processing method, which is applied to a message processing system, where the message processing system includes a user terminal, an analog socket server communicably connected to the user terminal, and a real socket connected to the analog socket server. Server, the method includes:
- the user terminal sends a message interaction request to the analog Socket server in response to a user operation
- the analog Socket server receives a message interaction request sent by the user terminal, and determines, according to the message interaction request, whether an analog interaction message is needed;
- the corresponding simulated interaction message is obtained from the pre-configured simulated message list, and the simulated message is sent to the user terminal;
- the real Socket server generates a corresponding interaction message according to the message interaction request, and sends the interaction message to the analog Socket server;
- the analog Socket server receives the interaction message sent by the real Socket server, and forwards the interaction message to the user terminal.
- the real Socket server generates a corresponding interaction message according to the message interaction request, and sends the interaction message to the simulated Socket server, including:
- the embodiment of the present application further provides a message processing apparatus, which is applied to an analog Socket server, and the analog Socket server is respectively connected to a user terminal and a real Socket server, and the device includes:
- the receiving module is configured to receive a message interaction request sent by the user terminal.
- the determining module is configured to determine, according to the message interaction request, whether an analog interactive message is needed.
- the obtaining module is configured to: when the determination result is yes, obtain a corresponding simulated interaction message from the pre-configured simulated message list, and send the simulated message to the user terminal.
- the request forwarding module is configured to: when the determination result is no, forward the message interaction request to the real Socket server, so that the real Socket server generates a corresponding interaction message according to the message interaction request.
- the message forwarding module is configured to receive the interaction message sent by the real Socket server, and forward the interaction message to the user terminal.
- the manner of determining whether to simulate an interactive message according to the message interaction request includes:
- the interface address list includes an interface address of a real Socket server that has not completed the development task
- the message processing apparatus further includes:
- the requesting connection module is configured to, after receiving the gateway service connection request sent by the user terminal, initiate a connection request to the corresponding real Socket server according to the gateway service connection request, and receive the real Socket server based on the Establishing a communication connection with the real Socket server after the connection information of the real Socket server returned by the request, wherein the connection information of the real Socket server includes an interface address and a port of the real Socket server;
- connection information sending module configured to send connection success information to the user terminal after the connection with the real Socket server is successful, and send connection information of the simulated Socket server to the user terminal, so that the user
- the terminal establishes a communication connection with the simulated Socket server based on the connection information of the simulated Socket server to simulate a communication connection between the user terminal and the real Socket server, where the connection information of the simulated Socket server includes the Simulate the interface address and port of the Socket server.
- the message processing apparatus further includes:
- the interface address receiving module is configured to receive an interface address input on the management interface, where the interface address is an interface address of a real Socket server that has not completed the development task;
- the address list configuration module is configured to respond to the configuration request of the interface address list, and obtain an interface address list according to the received interface address configuration.
- the message processing apparatus further includes:
- the query module is configured to respond to the configuration request of the simulated message list, and query the pre-configured interface document, where the interface document includes an interface address and a pre-configured analog message of the interface address;
- a message list configuration module configured to find an interface address that is consistent with an interface address included in the interface address list, and an analog message corresponding to the interface address, in the multiple interface addresses included in the interface document, according to the found
- the interface address and its corresponding analog message configuration get a list of simulated messages.
- the embodiment of the present application further provides a terminal device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the foregoing method when the program is executed.
- the embodiment of the present application further provides a readable storage medium, where the readable storage medium stores a computer program, and when the computer program is executed, the message processing method described above is implemented.
- An embodiment of the present application provides a message processing method, apparatus, terminal device, and readable storage medium, which are determined according to a message interaction request sent by a user terminal, whether to simulate an interaction message, and when the determination result is yes, from a pre-configured simulation
- the corresponding simulated interactive message is obtained in the message list, and the simulated message is sent to the user terminal.
- the message interaction request is forwarded to the real Socket server, so that the real Socket server generates a corresponding interaction message according to the message interaction request, and receives the interaction message sent by the real Socket server, to forward the interaction message to User terminal.
- the user may send an analog message to the user terminal or forward the real Socket server according to the message interaction request sent by the user terminal.
- the real interactive message can be adapted to various business scenarios and effectively improve work efficiency.
- FIG. 1 is a schematic diagram of interaction of a message processing system according to an embodiment of the present application
- FIG. 2 is a schematic structural block diagram of a terminal device according to an embodiment of the present application.
- FIG. 3 is a schematic flowchart of a message processing method according to an embodiment of the present disclosure
- step S220 shown in FIG. 3;
- FIG. 5 is another schematic flowchart of a message processing method according to an embodiment of the present disclosure.
- FIG. 6 is another schematic flowchart of a message processing method according to an embodiment of the present disclosure.
- FIG. 7 is a functional block diagram of a message processing apparatus according to an embodiment of the present disclosure.
- FIG. 8 is another functional block diagram of a message processing apparatus according to an embodiment of the present application.
- FIG. 9 is another functional block diagram of a message processing apparatus according to an embodiment of the present application.
- FIG. 10 is another functional block diagram of a message processing apparatus according to an embodiment of the present application.
- Icon 10-message processing system; 100-user terminal; 200-analog Socket server; 201-processor; 202-memory; 300-real Socket server; 400-message processing device; 410-receiving module; 420-judging module; 430-acquisition module; 440-request forwarding module; 450-message forwarding module; 460-requesting connection module; 470-connection information sending module; 480-interface address receiving module; 490-address list configuration module; 4010-query module; - Message list configuration module.
- the client simulates a Socket message, that is, an input box is provided on the client, allowing the developer to input any message, and then passing the message into the client Socket message processing logic to implement simulation of the Socket message.
- This scheme needs to provide additional debugging entry in the client, and needs to manually input the Socket message, and the Socket message is a specially encoded string, which has high complexity and needs manual input, which affects efficiency even if it is not manually input.
- By copying and pasting it is also necessary to send a Socket message to the test device by means of some file transfer tool or instant chat tool, which is complicated and affects efficiency.
- Another solution is to build a Socket server locally and customize the processing logic of the message so that any customized message can be sent to the client.
- the client needs to provide the corresponding Socket server logic, which is inconsistent with the real Socket server connection logic; in addition, because the amount of Socket messages in the normal live broadcast is huge, and the interaction logic is complicated, if the logic is relatively deep. For example, if you need to process 20 different messages, you need to perform the required message processing logic. In this scenario, you need to simulate the existing 20 different messages, and then simulate the new message delivery, which affects the work efficiency.
- the message processing system 10 includes at least one user terminal 100 (only one shown in FIG. 1), an analog Socket server 200, and a real Socket server 300, and the simulated Socket server 200 and the user terminal 100, respectively. Connected to the real socket server 300.
- the user terminal 100 may transmit or receive signals by means such as a wired or wireless network, or may process or store signals in a physical storage state, such as in a memory.
- Each user terminal 100 can be an electronic device that includes hardware, software, or embedded logic elements or a combination of two or more such elements, and can perform suitable functions implemented or supported by the user terminal 100.
- the user terminal 100 may be a device having a wireless transceiving function, including indoor or outdoor, handheld, wearable or in-vehicle devices.
- the user terminal 100 may be a mobile phone, a tablet, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, Wireless terminal in industrial control, wireless terminal in self driving, wireless terminal in remote medical, wireless terminal in smart grid, transportation safety A wireless terminal in a wireless terminal, a wireless terminal in a smart city, a wireless terminal in a smart home, and the like.
- the embodiment of the present application does not limit the application scenario.
- the user terminal 100 may include: a processing device including an application processing portion and a radio frequency/digital signal processor; a display screen; may include a physical key, a touch key overlaid on the display screen, or a combination thereof Pocket keyboard; user identification module card; memory device that can contain ROM, RAM, flash memory, or any combination thereof; Wi-Fi and/or Bluetooth interface; wireless telephone interface; power management circuit with associated battery; USB Interfaces and connectors; audio management systems with associated microphones, speakers, and headphone jacks; and a variety of optional accessory components such as cameras, global positioning systems, accelerators, and more.
- various client applications can be installed on the user terminal 100, and the client application can be used to allow the user terminal 100 to be used to transmit commands suitable for operation with other devices.
- Such an application can be downloaded from the server and installed into the memory of the user terminal 100, or can be installed on the user terminal 100 in advance.
- a live application (for example, a betta live broadcast APP) is installed on the user terminal 100, and the live application can send a message interaction request to the Socket server to implement data reporting and request, and receive a message fed back by the Socket server. .
- the preferred embodiment of the present application further provides a terminal device.
- the terminal device may be the analog socket server 200.
- the terminal device includes a memory 202, a processor 201, and a message processing device 400.
- the memory 202 and the processor 201 are electrically connected directly or indirectly to implement data transmission or interaction.
- the components can be electrically connected to one another via one or more communication buses or signal lines.
- the message processing device 400 includes at least one software function module that can be stored in the memory 202 in the form of software or firmware.
- the processor 201 is configured to execute an executable computer program stored in the memory 202, for example, a software function module and a computer program included in the message processing device 400, to implement a message processing method.
- FIG. 2 is merely illustrative, and the terminal device may further include more or less components than those shown in FIG. 2 or have a different configuration from that shown in FIG. 2.
- the components shown in Figure 2 can be implemented in hardware, software, or a combination thereof.
- FIG. 3 is a schematic flowchart of a message processing method according to a preferred embodiment of the present application, which is performed by the simulated Socket server 200 shown in FIG. 1 .
- the message processing method provided by the embodiment of the present application is not limited to the specific order described in FIG. 3 and the following.
- the specific process of the method is as follows:
- Step S110 Receive a message interaction request sent by the user terminal 100.
- the simulated Socket server 200 may receive the gateway service connection sent by the user terminal 100.
- the address and port of the broadcast server are sent to the user terminal 100 according to the gateway service connection request.
- the user terminal 100 establishes a connection with the analog Socket server 200 based on the address and port after receiving the address and port to simulate a connection between the user terminal 100 and the real Socket server 300.
- the address and port of the broadcast server are the address and port of the real Socket server 300, respectively.
- the connection success information is transmitted to the user terminal 100.
- the simulated Socket server 200 after receiving the gateway service connection request sent by the user terminal 100, the simulated Socket server 200 initiates a connection request to the corresponding real Socket server 300 according to the gateway service connection request. And establishing a communication connection with the real Socket server 300 after receiving the connection information of the real Socket server 300 returned by the real Socket server 300 based on the connection request.
- the connection information of the real socket server 300 includes an interface address and a port of the real socket server 300.
- the simulated Socket server 200 maintains communication with the real Socket server 300 through the connection information of the real Socket server 300.
- the simulated Socket server 200 After the connection with the real Socket server 300 is successful, the simulated Socket server 200 sends connection success information to the user terminal 100, and sends the connection information of the simulated Socket server 200 itself to the user terminal 100.
- the user terminal 100 is caused to establish a communication connection with the analog socket server 200 based on the connection information of the analog socket server 200 to simulate a communication connection between the user terminal 100 and the real socket server 300.
- the connection information of the simulated Socket server 200 includes an interface address and a port of the analog Socket server 200. As such, the user terminal 100 can maintain communication with the analog Socket server 200 by simulating the connection information of the Socket server 200.
- the logic of connecting the user terminal 100 to the analog socket server 200 is consistent with the connection logic of the real socket server 300. Therefore, the user terminal 100 does not need to perform additional logic processing to implement the analog socket.
- the connection of the server 200, while the conventional solution requires the user terminal 100 to provide additional connection logic.
- the message interaction request may be a barrage sending request, a notification/broadcasting request, a gifting request, etc., which is not specifically limited in this embodiment.
- the message interaction request includes an interface address of the required service.
- Step S120 Determine, according to the message interaction request, whether an analog interaction message is needed.
- step S120 can be implemented by the following sub-steps:
- Sub-step S121 parsing the message interaction request to obtain a corresponding interface address.
- Sub-step S122 determining whether the interface address is in a preset interface address list, where the interface address list includes an interface address of the real socket server 300 that has not completed the development task.
- the sub-step S123 is performed to determine that the simulation interaction message is required
- the sub-step S124 is executed to determine that the analog interactive message is not required.
- step S130 is executed to acquire a corresponding analog interaction message from the pre-configured analog message list, and send the simulation message to the user terminal 100.
- the simulated Socket server 200 is pre-configured with the analog message list, where the simulated message list includes an interface address and an analog message corresponding to the interface address.
- the simulated Socket server 200 obtains a corresponding analog message from the simulated message list and sends the corresponding analog message to the user terminal 100.
- the method before the step of receiving the message interaction request sent by the user terminal 100, the method further includes the step of configuring the interface address list in response to the configuration request of the interface address list.
- this step can be performed by the following substeps:
- Step S101 Receive an interface address input on the management interface, where the interface address is an interface address of the real Socket server 300 that has not completed the development task.
- Step S102 in response to the configuration request of the interface address list, obtain an interface address list according to the received interface address configuration.
- the developer monitors the development progress of the real Socket server 300 in real time to obtain the interface address of the real Socket server 300 that has not completed the development task and the interface address of the real Socket server 300 that has completed the development task. And inputting the interface address of the real socket server 300 that has not completed the development task in the management interface of the simulated Socket server 200, indicating that the real socket service 300 is currently unable to provide the required service data to the user terminal 100.
- the interface address may be one or more.
- the analog Socket server 200 obtains the interface address list according to the interface address received on the management interface.
- the front-end and back-end developers negotiate to obtain an interface document before or during development.
- the interface document includes an analog message with an interface address and an interface address. It can be known that the development task corresponding to the interface address included in the interface address list is not completed yet, and the message required by the user terminal cannot be provided. Therefore, the fake socket server 200 needs to send some fake messages to the user terminal 100 to protect the user. The terminal 100 subsequently works normally. The fake message required therein can be obtained according to the interface document.
- the simulated Socket server 200 queries the pre-configured interface document. Finding, by the interface address included in the interface document, an interface address that is consistent with the interface address included in the interface address list, and an analog message corresponding to the interface address, according to the found interface address and the corresponding simulation
- the message configuration gets a list of simulated messages. In this way, an analog message corresponding to the interface address of the real Socket server 300 that has not completed the development task can be obtained. If the interface address in the message exchange request sent by the user terminal 100 is in the interface address list, the analog message corresponding to the interface address in the simulated message list may be fed back to the user terminal 100, so that The user terminal 100 continues the subsequent work to avoid affecting the development progress.
- step S140 is performed to forward the message interaction request to the real
- the Socket server 300 is configured to cause the real socket server 300 to generate a corresponding interaction message according to the message interaction request.
- the real Socket server 300 parses the message interaction request, obtains a corresponding interface address, and then generates a corresponding interaction message according to the interface address, and sends the interaction message to the simulated Socket server 200. .
- Step S150 Receive the interaction message sent by the real Socket server 300, and forward the interaction message to the user terminal 100.
- the embodiment implements the simulation between the Socket server 200 and the real Socket server 300.
- the connection can not only implement the message simulation, but also initiate the real request and deliver the real interactive message, which can cope with various business scenarios.
- the real interactive message for transmitting the simulation message to the user terminal 100 or forwarding the real Socket server 300 can be selected according to the message interaction request sent by the user terminal 100, thereby being able to be adapted.
- the preferred embodiment of the present application further provides a message processing method, which is performed by the message processing system 10 shown in FIG. 1, and the method includes:
- Step S210 the user terminal 100 sends a message interaction request to the simulated Socket server 200 in response to a user operation.
- Step S220 the simulated Socket server 200 receives the message interaction request sent by the user terminal 100, and determines whether an analog interaction message is needed according to the message interaction request.
- step S230 when the determination result is yes, the corresponding simulated interaction message is obtained from the pre-configured simulated message list, and the simulated message is sent to the user terminal 100.
- Step S240 When the determination result is no, the message interaction request is forwarded to the real Socket server 300.
- Step S250 The real Socket server 300 generates a corresponding interaction message according to the message interaction request, and sends the interaction message to the analog Socket server 200.
- the real Socket server 300 parses the message interaction request, obtains a corresponding interface address, generates a corresponding interaction message according to the interface address, and sends the interaction message to the Simulate the Socket server 200.
- the analog Socket server 200 receives the interaction message sent by the real Socket server 300, and forwards the interaction message to the user terminal 100.
- a preferred embodiment of the present application further provides a message processing apparatus 400, where the apparatus may include:
- the receiving module 410 is configured to receive a message interaction request sent by the user terminal 100.
- the determining module 420 is configured to determine, according to the message interaction request, whether an analog interactive message is needed.
- the obtaining module 430 is configured to obtain a corresponding simulated interactive message from the pre-configured simulated message list, and send the simulated message to the user terminal 100.
- the request forwarding module 440 is configured to forward the message interaction request to the real socket server 300, so that the real socket server 300 generates a corresponding interaction message according to the message interaction request.
- the message forwarding module 450 is configured to receive the interaction message sent by the real socket server 300, and forward the interaction message to the user terminal 100.
- determining, according to the message interaction request, a manner of simulating an interaction message includes:
- the interface address list includes an interface address of a real Socket server that has not completed the development task
- the message processing apparatus 400 provided in this embodiment may further include:
- the request connection module 460 is configured to, after receiving the gateway service connection request sent by the user terminal 100, initiate a connection request to the corresponding real Socket server 300 according to the gateway service connection request, and receive the real Socket server. 300 establishing a communication connection with the real Socket server 300 based on the connection information of the real socket server 300 returned by the connection request, wherein the connection information of the real socket server 300 includes an interface of the real socket server 300 Address and port.
- the connection information sending module 470 is configured to, after being successfully connected to the real Socket server 300, send connection success information to the user terminal 100, and send connection information of the simulated Socket server to the user terminal, so that The user terminal establishes a communication connection with the analog socket server 200 based on the connection information of the analog socket server 200 to simulate a communication connection between the user terminal 100 and the real socket server 300, wherein the analog socket
- the connection information of the server 200 includes the interface address and port of the analog Socket server 200.
- the message processing apparatus 400 provided in this embodiment may further include:
- the interface address receiving module 480 is configured to receive an interface address input on the management interface, where the interface address is an interface address of the real socket server 300 that has not completed the development task.
- the address list configuration module 490 is configured to respond to the configuration request of the interface address list and obtain an interface address list according to the received interface address configuration.
- the message processing apparatus 400 may further include:
- the query module 4010 is configured to query the pre-configured interface document in response to the configuration request of the simulated message list, where the interface document includes an interface address and a pre-configured analog message of the interface address.
- the message list configuration module 4011 is configured to find an interface address that is consistent with an interface address included in the interface address list, and an analog message corresponding to the interface address, among the multiple interface addresses included in the interface document, according to the The interface address and its corresponding analog message configuration get a list of simulated messages.
- the preferred embodiment of the present application further provides a readable storage medium, where the readable storage medium stores a computer program, and when the computer program is executed, the message processing method described above is implemented.
- the embodiment of the present application provides a message processing method, apparatus, terminal device, and readable storage medium, and determines whether an interactive message needs to be simulated according to a message interaction request sent by the user terminal 100, and when the judgment result is yes, And acquiring a corresponding analog interaction message from the pre-configured analog message list, and sending the simulation message to the user terminal 100. Or, when the determination result is no, the message interaction request is forwarded to the real Socket server 300, so that the real Socket server 300 generates a corresponding interaction message according to the message interaction request, and receives the interaction message sent by the real Socket server 300 to use the interaction message. Forwarded to the user terminal 100.
- each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings.
- each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
- each functional module in each embodiment of the present application may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
- the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
- the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
- the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as an electronic device, server, data center, or the like that includes one or more available media.
- the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
相关申请的交叉引用Cross-reference to related applications
本申请要求于2018年01月02日提交中国专利局的申请号为2018100008919、名称为“消息处理方法、装置及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201 810 0008 919 filed on Jan. 2, 2018, the entire disclosure of which is incorporated herein by reference. In the application.
本申请涉及计算机技术领域,具体而言,涉及一种消息处理方法、装置、终端设备及可读存储介质。The present application relates to the field of computer technologies, and in particular, to a message processing method, apparatus, terminal device, and readable storage medium.
在目前的直播行业中,一些互动功能(例如弹幕、通知/广播、送礼、互动等),都是通过用户终端和Socket服务器进行交互来支持,用户终端上安装的APP给Socket服务器发送消息互动请求从而实现数据上报和请求,Socket服务器给用户终端反馈消息从而实现消息的下发。然而在日常开发中,APP的开发往往需要依赖Socket服务器返回的消息,例如,当用户终端的APP给Socket服务器发送了某个请求后,若Socket服务器的开发人员的开发任务尚未完成,那么APP将得不到想要的服务器下发的消息,也就无法进行相应的逻辑处理,需要等待服务器端开发人员开发完成之后才能进行下一步工作,十分影响效率。In the current live broadcast industry, some interactive functions (such as barrage, notification/broadcast, gifting, interaction, etc.) are supported by the interaction between the user terminal and the Socket server. The APP installed on the user terminal sends a message interaction to the Socket server. The request is implemented to implement data reporting and request, and the Socket server feeds back the message to the user terminal to implement the message delivery. However, in daily development, the development of APP often needs to rely on the message returned by the Socket server. For example, when the APP of the user terminal sends a request to the Socket server, if the development task of the developer of the Socket server has not been completed, then the APP will Without the message sent by the desired server, the corresponding logical processing cannot be performed. It is necessary to wait for the development of the server-side developer before proceeding to the next step, which greatly affects the efficiency.
发明内容Summary of the invention
为了克服现有技术中的上述不足,本申请的目的包括提供一种消息处理方法、装置、终端设备及可读存储介质,以有效提高工作效率。In order to overcome the above-mentioned deficiencies in the prior art, the object of the present application includes providing a message processing method, apparatus, terminal device and readable storage medium to effectively improve work efficiency.
为了实现上述目的,本申请实施例采用的技术方案如下:In order to achieve the above object, the technical solution adopted by the embodiment of the present application is as follows:
本申请实施例提供一种消息处理方法,应用于模拟Socket服务器,所述模拟Socket服务器分别与用户终端和真实Socket服务器通信连接,所述方法包括:The embodiment of the present invention provides a message processing method, which is applied to an analog Socket server, where the simulated Socket server is respectively connected to a user terminal and a real Socket server, and the method includes:
接收用户终端发送的消息交互请求;Receiving a message interaction request sent by the user terminal;
根据所述消息交互请求判断是否需要模拟交互消息;Determining whether an analog interaction message needs to be needed according to the message interaction request;
在判断结果为是时,从预先配置的模拟消息列表中获取对应的模拟交互消息,并将所述模拟消息发送给所述用户终端;When the judgment result is yes, the corresponding simulated interaction message is obtained from the pre-configured simulated message list, and the simulated message is sent to the user terminal;
在判断结果为否时,将所述消息交互请求转发给所述真实Socket服务器,以使所述真实Socket服务器根据所述消息交互请求生成对应的交互消息;When the judgment result is no, the message interaction request is forwarded to the real Socket server, so that the real Socket server generates a corresponding interaction message according to the message interaction request;
接收所述真实Socket服务器发送的所述交互消息,并将所述交互消息转发给所述用户终端。Receiving the interaction message sent by the real Socket server, and forwarding the interaction message to the user terminal.
可选地,在本申请实施例中,在接收用户终端发送的消息交互请求之前,所述方法还包括:Optionally, in the embodiment of the present application, before receiving the message interaction request sent by the user terminal, the method further includes:
接收所述用户终端发送的网关服务连接请求;Receiving a gateway service connection request sent by the user terminal;
根据所述网关服务连接请求向所述用户终端发送广播服务器的地址和端口,以使所述用户终端在接收到所述地址和端口后基于所述地址和端口与所述模拟Socket服务器建立连接,以模拟所述用户终端与真实Socket服务器之间的连接,其中,所述广播服务器的地址和端口分别为所述真实Socket服务器的地址和端口;And sending, by the gateway service connection request, an address and a port of the broadcast server to the user terminal, so that the user terminal establishes a connection with the analog Socket server based on the address and the port after receiving the address and the port, The connection between the user terminal and the real Socket server is simulated, where the address and port of the broadcast server are respectively the address and port of the real Socket server;
在连接成功后,向所述用户终端发送连接成功信息。After the connection is successful, the connection success information is sent to the user terminal.
可选地,在本申请实施例中,在接收用户终端发送的消息交互请求之前,所述方法还包括:Optionally, in the embodiment of the present application, before receiving the message interaction request sent by the user terminal, the method further includes:
在接收到所述用户终端发送的网关服务连接请求后,根据所述网关服务连接请求向对应的真实Socket服务器发起连接请求,并在接收到所述真实Socket服务器基于所述连接请求返回的所述真实Socket服务器的连接信息后建立与所述真实Socket服务器的通信连接,其中,所述真实Socket服务器的连接信息包括所述真实Socket服务器的接口地址和端口;After receiving the gateway service connection request sent by the user terminal, initiating a connection request to the corresponding real Socket server according to the gateway service connection request, and receiving the return that the real Socket server returns based on the connection request Establishing a communication connection with the real Socket server after the connection information of the real Socket server, wherein the connection information of the real Socket server includes an interface address and a port of the real Socket server;
在与所述真实Socket服务器连接成功后,向所述用户终端发送连接成功信息,并将所述模拟Socket服务器的连接信息发送至所述用户终端,以使所述用户终端基于所述模拟Socket服务器的连接信息建立与所述模拟Socket服务器的通信连接,以模拟所述用户终端与真实Socket服务器之间的通信连接,其中,所述模拟Socket服务器的连接信息包括所述模拟Socket服务器的接口地址和端口。After successfully connecting with the real Socket server, sending connection success information to the user terminal, and transmitting connection information of the simulated Socket server to the user terminal, so that the user terminal is based on the simulated Socket server The connection information establishes a communication connection with the analog Socket server to simulate a communication connection between the user terminal and the real Socket server, wherein the connection information of the simulated Socket server includes an interface address of the analog Socket server and port.
可选地,在本申请实施例中,所述根据所述消息交互请求判断是否需要模拟交互消息,包括:Optionally, in the embodiment of the present application, the determining, according to the message interaction request, whether an analog interaction message is required, includes:
对所述消息交互请求进行解析,获得对应的接口地址;Parsing the message interaction request to obtain a corresponding interface address;
判断所述接口地址是否处于预设的接口地址列表中,其中,所述接口地址列表中包含当前未完成开发任务的真实Socket服务器的接口地址;Determining whether the interface address is in a preset interface address list, where the interface address list includes an interface address of a real Socket server that has not completed the development task;
在判断结果为是时,判定需要模拟交互消息;When the judgment result is YES, it is determined that an analog interactive message is required;
在判断结果为否时,判定不需要模拟交互消息。When the judgment result is no, it is determined that the simulation interactive message is not required.
可选地,在本申请实施例中,在接收用户终端发送的消息交互请求之前,所述方法还包括:Optionally, in the embodiment of the present application, before receiving the message interaction request sent by the user terminal, the method further includes:
响应接口地址列表的配置请求,配置接口地址列表。Configure the interface address list in response to the configuration request of the interface address list.
可选地,在本申请实施例中,响应接口地址列表的配置请求,配置接口地址列表,包括:Optionally, in the embodiment of the present application, in response to the configuration request of the interface address list, configuring the interface address list includes:
接收在管理界面输入的接口地址,该接口地址为当前未完成开发任务的真实Socket服务器的接口地址;Receiving an interface address input on the management interface, where the interface address is an interface address of a real Socket server that has not completed the development task;
响应接口地址列表的配置请求,根据接收到的接口地址配置得到接口地址列表。In response to the configuration request of the interface address list, the interface address list is obtained according to the received interface address configuration.
可选地,在本申请实施例中,在接收用户终端发送的消息交互请求之前,所述方法还包括:Optionally, in the embodiment of the present application, before receiving the message interaction request sent by the user terminal, the method further includes:
响应模拟消息列表的配置请求,查询预先配置的接口文档,所述接口文档中包含接口地址以及预先配置的该接口地址的模拟消息;Responsive to the configuration request of the simulated message list, querying the pre-configured interface document, where the interface document includes an interface address and a pre-configured analog message of the interface address;
在所述接口文档包含的多个接口地址中找到与所述接口地址列表中包含的接口地址一致的接口 地址,以及与该接口地址对应的模拟消息,根据查找到的接口地址以及与其对应的模拟消息配置得到模拟消息列表。Finding, by the interface address included in the interface document, an interface address that is consistent with the interface address included in the interface address list, and an analog message corresponding to the interface address, according to the found interface address and the corresponding simulation The message configuration gets a list of simulated messages.
本申请实施例还提供一种消息处理方法,应用于消息处理系统,所述消息处理系统包括用户终端、与所述用户终端通信连接的模拟Socket服务器以及与所述模拟Socket服务器通信连接的真实Socket服务器,所述方法包括:The embodiment of the present application further provides a message processing method, which is applied to a message processing system, where the message processing system includes a user terminal, an analog socket server communicably connected to the user terminal, and a real socket connected to the analog socket server. Server, the method includes:
所述用户终端响应用户操作,向所述模拟Socket服务器发送消息交互请求;The user terminal sends a message interaction request to the analog Socket server in response to a user operation;
所述模拟Socket服务器接收用户终端发送的消息交互请求,并根据所述消息交互请求判断是否需要模拟交互消息;The analog Socket server receives a message interaction request sent by the user terminal, and determines, according to the message interaction request, whether an analog interaction message is needed;
在判断结果为是时,从预先配置的模拟消息列表中获取对应的模拟交互消息,并将所述模拟消息发送给所述用户终端;When the judgment result is yes, the corresponding simulated interaction message is obtained from the pre-configured simulated message list, and the simulated message is sent to the user terminal;
在判断结果为否时,将所述消息交互请求转发给所述真实Socket服务器;When the judgment result is no, the message interaction request is forwarded to the real Socket server;
所述真实Socket服务器根据所述消息交互请求生成对应的交互消息,并将所述交互消息发送给所述模拟Socket服务器;The real Socket server generates a corresponding interaction message according to the message interaction request, and sends the interaction message to the analog Socket server;
所述模拟Socket服务器接收所述真实Socket服务器发送的所述交互消息,并将所述交互消息转发给所述用户终端。The analog Socket server receives the interaction message sent by the real Socket server, and forwards the interaction message to the user terminal.
可选地,在本申请实施例中,所述真实Socket服务器根据所述消息交互请求生成对应的交互消息,并将所述交互消息发送给所述模拟Socket服务器,包括:Optionally, in the embodiment of the present application, the real Socket server generates a corresponding interaction message according to the message interaction request, and sends the interaction message to the simulated Socket server, including:
对所述消息交互请求进行解析,获得对应的接口地址;Parsing the message interaction request to obtain a corresponding interface address;
根据所述接口地址生成对应的交互消息,并将所述交互消息发送给所述模拟Socket服务器。Generating a corresponding interaction message according to the interface address, and sending the interaction message to the analog Socket server.
本申请实施例还提供一种消息处理装置,应用于模拟Socket服务器,所述模拟Socket服务器分别与用户终端和真实Socket服务器通信连接,所述装置包括:The embodiment of the present application further provides a message processing apparatus, which is applied to an analog Socket server, and the analog Socket server is respectively connected to a user terminal and a real Socket server, and the device includes:
接收模块,配置成接收用户终端发送的消息交互请求。The receiving module is configured to receive a message interaction request sent by the user terminal.
判断模块,配置成根据所述消息交互请求判断是否需要模拟交互消息。The determining module is configured to determine, according to the message interaction request, whether an analog interactive message is needed.
获取模块,配置成在判断结果为是时,从预先配置的模拟消息列表中获取对应的模拟交互消息,并将所述模拟消息发送给所述用户终端。The obtaining module is configured to: when the determination result is yes, obtain a corresponding simulated interaction message from the pre-configured simulated message list, and send the simulated message to the user terminal.
请求转发模块,配置成在判断结果为否时,将所述消息交互请求转发给所述真实Socket服务器,以使所述真实Socket服务器根据所述消息交互请求生成对应的交互消息。The request forwarding module is configured to: when the determination result is no, forward the message interaction request to the real Socket server, so that the real Socket server generates a corresponding interaction message according to the message interaction request.
消息转发模块,配置成接收所述真实Socket服务器发送的所述交互消息,并将所述交互消息转发给所述用户终端。可选地,在本申请实施例中,所述根据所述消息交互请求判断是否需要模拟交互消息的方式,包括:The message forwarding module is configured to receive the interaction message sent by the real Socket server, and forward the interaction message to the user terminal. Optionally, in the embodiment of the present application, the manner of determining whether to simulate an interactive message according to the message interaction request includes:
对所述消息交互请求进行解析,获得对应的接口地址;Parsing the message interaction request to obtain a corresponding interface address;
判断所述接口地址是否处于预设的接口地址列表中,其中,所述接口地址列表中包含当前未完成开发任务的真实Socket服务器的接口地址;Determining whether the interface address is in a preset interface address list, where the interface address list includes an interface address of a real Socket server that has not completed the development task;
在判断结果为是时,判定需要模拟交互消息;When the judgment result is YES, it is determined that an analog interactive message is required;
在判断结果为否时,判定不需要模拟交互消息。When the judgment result is no, it is determined that the simulation interactive message is not required.
可选地,在本申请实施例中,所述消息处理装置还包括:Optionally, in the embodiment of the present application, the message processing apparatus further includes:
请求连接模块,配置成在接收到所述用户终端发送的网关服务连接请求后,根据所述网关服务连接请求向对应的真实Socket服务器发起连接请求,并在接收到所述真实Socket服务器基于所述连接请求返回的所述真实Socket服务器的连接信息后建立与所述真实Socket服务器的通信连接,其中,所述真实Socket服务器的连接信息包括所述真实Socket服务器的接口地址和端口;The requesting connection module is configured to, after receiving the gateway service connection request sent by the user terminal, initiate a connection request to the corresponding real Socket server according to the gateway service connection request, and receive the real Socket server based on the Establishing a communication connection with the real Socket server after the connection information of the real Socket server returned by the request, wherein the connection information of the real Socket server includes an interface address and a port of the real Socket server;
连接信息发送模块,配置成在与所述真实Socket服务器连接成功后,向所述用户终端发送连接成功信息,并将所述模拟Socket服务器的连接信息发送至所述用户终端,以使所述用户终端基于所述模拟Socket服务器的连接信息建立与所述模拟Socket服务器的通信连接,以模拟所述用户终端与真实Socket服务器之间的通信连接,其中,所述模拟Socket服务器的连接信息包括所述模拟Socket服务器的接口地址和端口。a connection information sending module, configured to send connection success information to the user terminal after the connection with the real Socket server is successful, and send connection information of the simulated Socket server to the user terminal, so that the user The terminal establishes a communication connection with the simulated Socket server based on the connection information of the simulated Socket server to simulate a communication connection between the user terminal and the real Socket server, where the connection information of the simulated Socket server includes the Simulate the interface address and port of the Socket server.
可选地,在本申请实施例中,所述消息处理装置还包括:Optionally, in the embodiment of the present application, the message processing apparatus further includes:
接口地址接收模块,配置成接收在管理界面输入的接口地址,该接口地址为当前未完成开发任务的真实Socket服务器的接口地址;The interface address receiving module is configured to receive an interface address input on the management interface, where the interface address is an interface address of a real Socket server that has not completed the development task;
地址列表配置模块,配置成响应接口地址列表的配置请求,根据接收到的接口地址配置得到接口地址列表。The address list configuration module is configured to respond to the configuration request of the interface address list, and obtain an interface address list according to the received interface address configuration.
可选地,在本申请实施例中,所述消息处理装置还包括:Optionally, in the embodiment of the present application, the message processing apparatus further includes:
查询模块,配置成响应模拟消息列表的配置请求,查询预先配置的接口文档,所述接口文档中包含接口地址以及预先配置的该接口地址的模拟消息;The query module is configured to respond to the configuration request of the simulated message list, and query the pre-configured interface document, where the interface document includes an interface address and a pre-configured analog message of the interface address;
消息列表配置模块,配置成在所述接口文档包含的多个接口地址中找到与所述接口地址列表中包含的接口地址一致的接口地址,以及与该接口地址对应的模拟消息,根据查找到的接口地址以及与其对应的模拟消息配置得到模拟消息列表。a message list configuration module, configured to find an interface address that is consistent with an interface address included in the interface address list, and an analog message corresponding to the interface address, in the multiple interface addresses included in the interface document, according to the found The interface address and its corresponding analog message configuration get a list of simulated messages.
本申请实施例还提供一种终端设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述的方法。本申请实施例还提供一种可读存储介质,所述可读存储介质中存储有计算机程序,所述计算机程序被执行时实现上述的消息处理方法。The embodiment of the present application further provides a terminal device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the foregoing method when the program is executed. The embodiment of the present application further provides a readable storage medium, where the readable storage medium stores a computer program, and when the computer program is executed, the message processing method described above is implemented.
相对于现有技术而言,本申请至少具有以下有益效果:Compared with the prior art, the present application has at least the following beneficial effects:
本申请实施例提供一种消息处理方法、装置、终端设备及可读存储介质,通过根据用户终端发送的消息交互请求判断是否需要模拟交互消息,并在判断结果为是时,从预先配置的模拟消息列表 中获取对应的模拟交互消息,并将模拟消息发送给用户终端。或者,在判断结果为否时,将消息交互请求转发给真实Socket服务器,以使真实Socket服务器根据消息交互请求生成对应的交互消息,并接收真实Socket服务器发送的交互消息,以将交互消息转发给用户终端。由此,通过在真实Socket服务器与用户终端之间新建模拟Socket服务器,能够在真实Socket服务器的开发任务未完成时,根据用户终端发送的消息交互请求选择向用户终端发送模拟消息或者转发真实Socket服务器的真实交互消息,从而能够适合各种业务场景,有效提高工作效率。An embodiment of the present application provides a message processing method, apparatus, terminal device, and readable storage medium, which are determined according to a message interaction request sent by a user terminal, whether to simulate an interaction message, and when the determination result is yes, from a pre-configured simulation The corresponding simulated interactive message is obtained in the message list, and the simulated message is sent to the user terminal. Or, when the judgment result is no, the message interaction request is forwarded to the real Socket server, so that the real Socket server generates a corresponding interaction message according to the message interaction request, and receives the interaction message sent by the real Socket server, to forward the interaction message to User terminal. Therefore, by creating a new analog Socket server between the real Socket server and the user terminal, when the development task of the real Socket server is not completed, the user may send an analog message to the user terminal or forward the real Socket server according to the message interaction request sent by the user terminal. The real interactive message can be adapted to various business scenarios and effectively improve work efficiency.
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings to be used in the embodiments will be briefly described below. It should be understood that the following drawings show only certain embodiments of the present application, and therefore It should be seen as a limitation on the scope, and those skilled in the art can obtain other related drawings according to the drawings without any creative work.
图1为本申请实施例提供的消息处理系统的一种交互示意图;FIG. 1 is a schematic diagram of interaction of a message processing system according to an embodiment of the present application;
图2为本申请实施例提供的终端设备的示意性结构框图;2 is a schematic structural block diagram of a terminal device according to an embodiment of the present application;
图3为本申请实施例提供的消息处理方法的一种流程示意图;FIG. 3 is a schematic flowchart of a message processing method according to an embodiment of the present disclosure;
图4为图3中所示的步骤S220包括的各个子步骤的一种流程示意图;4 is a schematic flow chart of each sub-step included in step S220 shown in FIG. 3;
图5为本申请实施例提供的消息处理方法的另一种流程示意图;FIG. 5 is another schematic flowchart of a message processing method according to an embodiment of the present disclosure;
图6为本申请实施例提供的消息处理方法的另一种流程示意图;FIG. 6 is another schematic flowchart of a message processing method according to an embodiment of the present disclosure;
图7为本申请实施例提供的消息处理装置的一种功能模块图;FIG. 7 is a functional block diagram of a message processing apparatus according to an embodiment of the present disclosure;
图8为本申请实施例提供的消息处理装置的另一种功能模块图;FIG. 8 is another functional block diagram of a message processing apparatus according to an embodiment of the present application;
图9为本申请实施例提供的消息处理装置的另一种功能模块图;FIG. 9 is another functional block diagram of a message processing apparatus according to an embodiment of the present application;
图10为本申请实施例提供的消息处理装置的另一种功能模块图。FIG. 10 is another functional block diagram of a message processing apparatus according to an embodiment of the present application.
图标:10-消息处理系统;100-用户终端;200-模拟Socket服务器;201-处理器;202-存储器;300-真实Socket服务器;400-消息处理装置;410-接收模块;420-判断模块;430-获取模块;440-请求转发模块;450-消息转发模块;460-请求连接模块;470-连接信息发送模块;480-接口地址接收模块;490-地址列表配置模块;4010-查询模块;4011-消息列表配置模块。Icon: 10-message processing system; 100-user terminal; 200-analog Socket server; 201-processor; 202-memory; 300-real Socket server; 400-message processing device; 410-receiving module; 420-judging module; 430-acquisition module; 440-request forwarding module; 450-message forwarding module; 460-requesting connection module; 470-connection information sending module; 480-interface address receiving module; 490-address list configuration module; 4010-query module; - Message list configuration module.
发明人在实现本申请技术方案的过程中,发现用于解决背景技术所存在的问题的方案可以有下述两种:In the process of implementing the technical solution of the present application, the inventor has found that the solution for solving the problems existing in the background art can be as follows:
一种是客户端模拟Socket消息,即在客户端提供一个输入框,让开发人员输入任意消息,再将此消息传入客户端Socket消息处理逻辑中来实现对Socket消息的模拟。此方案需要在客户端中提供额外的调试入口,并且需要手动输入Socket消息,而Socket消息都是经过特殊编码的字符串,复杂度较高,需要手工输入,影响效率,即便不通过手动输入,通过复制粘贴,也需要借助一些文件传输工具或即时聊天工具将Socket消息发送到测试设备上,过程较复杂,影响效率。One is that the client simulates a Socket message, that is, an input box is provided on the client, allowing the developer to input any message, and then passing the message into the client Socket message processing logic to implement simulation of the Socket message. This scheme needs to provide additional debugging entry in the client, and needs to manually input the Socket message, and the Socket message is a specially encoded string, which has high complexity and needs manual input, which affects efficiency even if it is not manually input. By copying and pasting, it is also necessary to send a Socket message to the test device by means of some file transfer tool or instant chat tool, which is complicated and affects efficiency.
另一种方案是在本地搭建一个Socket服务器,自定义消息的处理逻辑,从而可以下发任何自定 义的消息给客户端。针对此方案,需要客户端提供对应的Socket服务器逻辑,与真实的Socket服务器连接逻辑不一致;,此外,由于一般直播间的Socket消息量巨大,且交互逻辑复杂,如果处理逻辑比较深的场景。例如,需要处理完已有20个不同消息后才进行真正需要的消息处理逻辑,通过此方案则需要模拟已有的20个不同消息,然后再模拟新增的消息下发,影响工作效率。Another solution is to build a Socket server locally and customize the processing logic of the message so that any customized message can be sent to the client. For this solution, the client needs to provide the corresponding Socket server logic, which is inconsistent with the real Socket server connection logic; in addition, because the amount of Socket messages in the normal live broadcast is huge, and the interaction logic is complicated, if the logic is relatively deep. For example, if you need to process 20 different messages, you need to perform the required message processing logic. In this scenario, you need to simulate the existing 20 different messages, and then simulate the new message delivery, which affects the work efficiency.
经本申请发明人长期研究探索,提出优选实施例,以解决或者改善上述问题中的至少一个问题。下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。Through the long-term research and exploration of the inventors of the present application, preferred embodiments are proposed to solve or ameliorate at least one of the above problems. The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in various different configurations.
因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。The detailed description of the embodiments of the present application, which is set forth in the claims All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。It should be noted that similar reference numerals and letters indicate similar items in the following figures, and therefore, once an item is defined in a drawing, it is not necessary to further define and explain it in the subsequent drawings.
请参阅图1,为本申请较佳实施例提供的消息处理系统10的一种交互示意图。本实施例中,所述消息处理系统10包括至少一个用户终端100(图1中仅示出一个)、模拟Socket服务器200以及真实Socket服务器300,所述模拟Socket服务器200分别与所述用户终端100和所述真实Socket服务器300通信连接。所述用户终端100可以通过诸如有线或无线网络等方式发送或接收信号,或可以在诸如存储器中将信号处理或存储为物理存储状态。每个用户终端100可以是包括硬体、软体或内嵌逻辑元件或者两个或多个此类元件的组合的电子装置,并能够执行由用户终端100实施或支援的合适的功能。可选地,所述用户终端100可以是一种具有无线收发功能的设备,包括室内或室外、手持、穿戴或车载设备。例如,所述用户终端100可以是手机(mobile phone)、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(Virtual Reality,VR)终端设备、增强现实(Augmented Reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等。本申请的实施例对应用场景不做限定。Please refer to FIG. 1 , which is a schematic diagram of interaction of the
根据本申请的一些实施例,用户终端100可以包括:包含应用处理部和射频/数位讯号处理器的处理装置;显示屏;可包含物理键、覆盖在显示屏上的触摸键或它们的组合的袖珍键盘;用户识别模组卡;可以包含ROM、RAM、快闪存储器或它们的任意组合的存储器装置;Wi-Fi和/或蓝牙接口;无线电话接口;带有关联电池的电源管理电路;USB接口和连接器;带有关联麦克风、扬声器和耳机插孔的音讯管理系统;以及各种诸如照相机、全球定位系统、加速器等的可选择的附属部件。此 外,在用户终端100上可以安装各种用户端应用,用户端应用可以用于允许使用用户终端100来传送适合于和其他设备操作的命令。这类应用可以从服务器上下载并安装到用户终端100的存储器中,也可以预先已被安装在用户终端100上。在本申请实施例中,用户终端100上安装有直播应用(例如斗鱼直播APP),通过所述直播应用可以向Socket服务器发送消息互动请求从而实现数据上报和请求,并接收Socket服务器反馈的消息。According to some embodiments of the present application, the user terminal 100 may include: a processing device including an application processing portion and a radio frequency/digital signal processor; a display screen; may include a physical key, a touch key overlaid on the display screen, or a combination thereof Pocket keyboard; user identification module card; memory device that can contain ROM, RAM, flash memory, or any combination thereof; Wi-Fi and/or Bluetooth interface; wireless telephone interface; power management circuit with associated battery; USB Interfaces and connectors; audio management systems with associated microphones, speakers, and headphone jacks; and a variety of optional accessory components such as cameras, global positioning systems, accelerators, and more. In addition, various client applications can be installed on the user terminal 100, and the client application can be used to allow the user terminal 100 to be used to transmit commands suitable for operation with other devices. Such an application can be downloaded from the server and installed into the memory of the user terminal 100, or can be installed on the user terminal 100 in advance. In the embodiment of the present application, a live application (for example, a betta live broadcast APP) is installed on the user terminal 100, and the live application can send a message interaction request to the Socket server to implement data reporting and request, and receive a message fed back by the Socket server. .
本申请较佳实施例还提供一种终端设备,所述终端设备可以为上述的模拟Socket服务器200,请参阅图2,所述终端设备包括存储器202、处理器201和消息处理装置400。The preferred embodiment of the present application further provides a terminal device. The terminal device may be the
所述存储器202和处理器201之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。所述消息处理装置400包括至少一个可以软件或固件(firmware)的形式存储于所述存储器202中的软件功能模块。所述处理器201用于执行所述存储器202中存储的可执行的计算机程序,例如,所述消息处理装置400所包括的软件功能模块及计算机程序等,以实现消息处理方法。The
可以理解,图2所示的结构仅为示意,所述终端设备还可包括比图2中所示更多或者更少的组件,或者具有与图2所示不同的配置。图2中所示的各组件可以采用硬件、软件或其组合实现。It will be understood that the structure shown in FIG. 2 is merely illustrative, and the terminal device may further include more or less components than those shown in FIG. 2 or have a different configuration from that shown in FIG. 2. The components shown in Figure 2 can be implemented in hardware, software, or a combination thereof.
请参阅图3,为本申请较佳实施例提供的消息处理方法的一种流程示意图,所述方法由图1中所示的模拟Socket服务器200执行。所应说明的是,本申请实施例提供的消息处理方法不以图3及以下所述的具体顺序为限制。所述方法的具体流程如下:Please refer to FIG. 3 , which is a schematic flowchart of a message processing method according to a preferred embodiment of the present application, which is performed by the
步骤S110,接收用户终端100发送的消息交互请求。Step S110: Receive a message interaction request sent by the user terminal 100.
作为一种实施方式,在所述步骤S110之前,为了模拟实现真实的Socket服务器与所述用户终端100的连接逻辑,所述模拟Socket服务器200可以在接收到所述用户终端100发送的网关服务连接请求后,根据所述网关服务连接请求向所述用户终端100发送广播服务器的地址和端口。所述用户终端100在接收到所述地址和端口后基于所述地址和端口与所述模拟Socket服务器200建立连接,以模拟所述用户终端100与真实Socket服务器300之间的连接。应注意的是,所述广播服务器的地址和端口分别为所述真实Socket服务器300的地址和端口。并且,在连接成功后,向所述用户终端100发送连接成功信息。As an implementation manner, before the step S110, in order to simulate the connection logic between the real Socket server and the user terminal 100, the
可选地,作为另一种实施例方式,模拟Socket服务器200在接收到所述用户终端100发送的网关服务连接请求后,根据所述网关服务连接请求向对应的真实Socket服务器300发起连接请求。并在接收到所述真实Socket服务器300基于所述连接请求返回的所述真实Socket服务器300的连接信息后建立与所述真实Socket服务器300的通信连接。其中,所述真实Socket服务器300的连接信息包括所述真实Socket服务器300的接口地址和端口。如此,模拟Socket服务器200通过真实Socket服务器300的连接信息以保持与真实Socket服务器300之间的通信。Optionally, as another embodiment manner, after receiving the gateway service connection request sent by the user terminal 100, the
所述模拟Socket服务器200在与所述真实Socket服务器300连接成功后,向所述用户终端100发送连接成功信息,并将所述模拟Socket服务器200自身的连接信息发送至所述用户终端100,以使所述用户终端100基于所述模拟Socket服务器200的连接信息建立与所述模拟Socket服务器200的通信连接,以模拟所述用户终端100与真实Socket服务器300之间的通信连接。其中,所述模拟Socket服务器200的连接信息包括所述模拟Socket服务器200的接口地址和端口。如此,用户终端100可以通过模拟Socket服务器200的连接信息保持与模拟Socket服务器200的通信。After the connection with the real Socket server 300 is successful, the
由此,使得所述用户终端100连接所述模拟Socket服务器200的逻辑与连接真实Socket服务器300的连接逻辑一致,因此所述用户终端100不需要进行额外的逻辑处理即可实现与所述模拟Socket服务器200的连接,而传统方案需要所述用户终端100提供额外的连接逻辑。Therefore, the logic of connecting the user terminal 100 to the
本实施例中,所述消息交互请求可以是弹幕发送请求、通知/广播请求、送礼请求等,本实施例不作具体限制。其中,所述消息交互请求中包括有所需服务的接口地址。In this embodiment, the message interaction request may be a barrage sending request, a notification/broadcasting request, a gifting request, etc., which is not specifically limited in this embodiment. The message interaction request includes an interface address of the required service.
步骤S120,根据所述消息交互请求判断是否需要模拟交互消息。Step S120: Determine, according to the message interaction request, whether an analog interaction message is needed.
具体地,请参阅图4,所述步骤S120可以通过如下子步骤实现:Specifically, referring to FIG. 4, the step S120 can be implemented by the following sub-steps:
子步骤S121,对所述消息交互请求进行解析,获得对应的接口地址。Sub-step S121, parsing the message interaction request to obtain a corresponding interface address.
子步骤S122,判断所述接口地址是否处于预设的接口地址列表中,其中,所述接口地址列表中包含当前未完成开发任务的真实Socket服务器300的接口地址。Sub-step S122, determining whether the interface address is in a preset interface address list, where the interface address list includes an interface address of the real socket server 300 that has not completed the development task.
在判断结果为是时,执行子步骤S123,判定需要模拟交互消息;When the determination result is YES, the sub-step S123 is performed to determine that the simulation interaction message is required;
在判断结果为否时,执行子步骤S124,判定不需要模拟交互消息。When the result of the determination is NO, the sub-step S124 is executed to determine that the analog interactive message is not required.
在上述基础上,在判断结果为是时,执行步骤S130,从预先配置的模拟消息列表中获取对应的模拟交互消息,并将所述模拟消息发送给所述用户终端100。On the basis of the above, when the determination result is YES, step S130 is executed to acquire a corresponding analog interaction message from the pre-configured analog message list, and send the simulation message to the user terminal 100.
本实施例中,所述模拟Socket服务器200预先配置有所述模拟消息列表,其中,所述模拟消息列表中包括有接口地址和所述接口地址对应的模拟消息。当所述接口地址处于预设的接口地址列表中时,所述模拟Socket服务器200从所述模拟消息列表中获取对应的模拟消息发送给所述用户终端100。In this embodiment, the
在本实施例中,在执行步骤接收用户终端100发送的消息交互请求之前,所述方法还包括响应接口地址列表的配置请求,配置接口地址列表的步骤。请参阅图5,该步骤可通过以下子步骤执行:In this embodiment, before the step of receiving the message interaction request sent by the user terminal 100, the method further includes the step of configuring the interface address list in response to the configuration request of the interface address list. Referring to Figure 5, this step can be performed by the following substeps:
步骤S101,接收在管理界面输入的接口地址,该接口地址为当前未完成开发任务的真实Socket服务器300的接口地址。Step S101: Receive an interface address input on the management interface, where the interface address is an interface address of the real Socket server 300 that has not completed the development task.
步骤S102,响应接口地址列表的配置请求,根据接收到的接口地址配置得到接口地址列表。Step S102, in response to the configuration request of the interface address list, obtain an interface address list according to the received interface address configuration.
开发人员在开发过程中,实时监测真实Socket服务器300的开发进度以获得未完成开发任务的真实Socket服务器300的接口地址以及已完成开发任务的真实Socket服务器300的接口地址。并在 模拟Socket服务器200的管理界面中输入当前未完成开发任务的真实Socket服务器300的接口地址,表明该真实Socket服务300器当前无法向用户终端100提供所需的服务数据。其中,该接口地址可以为一个或者多个。所述模拟Socket服务器200在接收到接口地址列表的配置请求时,则根据在管理界面所接收到的接口地址配置得到接口地址列表。During the development process, the developer monitors the development progress of the real Socket server 300 in real time to obtain the interface address of the real Socket server 300 that has not completed the development task and the interface address of the real Socket server 300 that has completed the development task. And inputting the interface address of the real socket server 300 that has not completed the development task in the management interface of the
前后端开发人员在开发之前或开发过程中会协商以得到接口文档,该接口文档中包括有接口地址以及接口地址的模拟消息。由上述可知,所述接口地址列表中包含的接口地址对应的开发任务尚未完成而无法提供用户终端所需的消息,因此,需通过模拟Socket服务器200发送一些假消息至用户终端100,以保障用户终端100后续正常工作。而其中所需的假消息则可根据所述接口文档获得。The front-end and back-end developers negotiate to obtain an interface document before or during development. The interface document includes an analog message with an interface address and an interface address. It can be known that the development task corresponding to the interface address included in the interface address list is not completed yet, and the message required by the user terminal cannot be provided. Therefore, the
可选地,模拟Socket服务器200在接收到模拟消息列表的配置请求后,查询预先配置的接口文档。在所述接口文档包含的多个接口地址中找到与所述接口地址列表中包含的接口地址一致的接口地址,以及与该接口地址对应的模拟消息,根据查找到的接口地址以及与其对应的模拟消息配置得到模拟消息列表。如此,则可以得到当前未完成开发任务的真实Socket服务器300的接口地址对应的模拟消息。若接收到的用户终端100所发送的消息交互请求中的接口地址处于所述接口地址列表中,则可将所述模拟消息列表中与该接口地址对应的模拟消息反馈至用户终端100,以使用户终端100继续后续的工作,以避免影响开发进度。或者,在判断结果为否时,即所述用户终端100发送的消息交互请求中的接口地址未处于所述接口地址列表中时,则执行步骤S140,将所述消息交互请求转发给所述真实Socket服务器300,以使所述真实Socket服务器300根据所述消息交互请求生成对应的交互消息。具体地,所述真实Socket服务器300对所述消息交互请求进行解析,获得对应的接口地址,然后根据所述接口地址生成对应的交互消息,并将所述交互消息发送给所述模拟Socket服务器200。Optionally, after receiving the configuration request of the simulated message list, the
步骤S150,接收所述真实Socket服务器300发送的所述交互消息,并将所述交互消息转发给所述用户终端100。Step S150: Receive the interaction message sent by the real Socket server 300, and forward the interaction message to the user terminal 100.
基于上述设计,由于传统方案只能下发虚拟消息,对于业务场景非常复杂的场景需要逐个模拟,工作效率低,稳定性差,而本实施例实现了模拟Socket服务器200与真实Socket服务器300之间的连接,不仅可以实现消息模拟下发,还可以发起真实请求和下发真实交互消息,能够应对各种业务场景。由此,能够在真实Socket服务器300的开发人员的开发任务未完成时,根据用户终端100发送的消息交互请求选择向用户终端100发送模拟消息或者转发真实Socket服务器300的真实交互消息,从而能够适合各种业务场景,有效提高工作效率。Based on the above design, since the traditional solution can only deliver virtual messages, the scenario with very complicated business scenarios needs to be simulated one by one, the work efficiency is low, and the stability is poor, and the embodiment implements the simulation between the
进一步地,请参阅图6,本申请较佳实施例还提供一种消息处理方法,所述方法由图1中所示的消息处理系统10执行,所述方法包括:Further, referring to FIG. 6, the preferred embodiment of the present application further provides a message processing method, which is performed by the
步骤S210,所述用户终端100响应用户操作,向所述模拟Socket服务器200发送消息交互请求。Step S210, the user terminal 100 sends a message interaction request to the
步骤S220,所述模拟Socket服务器200接收用户终端100发送的消息交互请求,并根据所述消息交互请求判断是否需要模拟交互消息。Step S220, the
步骤S230,在判断结果为是时,从预先配置的模拟消息列表中获取对应的模拟交互消息,并将所述模拟消息发送给所述用户终端100。In step S230, when the determination result is yes, the corresponding simulated interaction message is obtained from the pre-configured simulated message list, and the simulated message is sent to the user terminal 100.
步骤S240,在判断结果为否时,将所述消息交互请求转发给所述真实Socket服务器300。Step S240: When the determination result is no, the message interaction request is forwarded to the real Socket server 300.
步骤S250,所述真实Socket服务器300根据所述消息交互请求生成对应的交互消息,并将所述交互消息发送给所述模拟Socket服务器200。Step S250: The real Socket server 300 generates a corresponding interaction message according to the message interaction request, and sends the interaction message to the
在一种实施方式中,所述真实Socket服务器300对所述消息交互请求进行解析,获得对应的接口地址,并根据所述接口地址生成对应的交互消息,并将所述交互消息发送给所述模拟Socket服务器200。In an implementation manner, the real Socket server 300 parses the message interaction request, obtains a corresponding interface address, generates a corresponding interaction message according to the interface address, and sends the interaction message to the Simulate the
所述模拟Socket服务器200接收所述真实Socket服务器300发送的所述交互消息,并将所述交互消息转发给所述用户终端100。The
进一步地,请参阅图7,本申请较佳实施例还提供一种消息处理装置400,所述装置可以包括:Further, referring to FIG. 7, a preferred embodiment of the present application further provides a
接收模块410,配置成接收用户终端100发送的消息交互请求。The receiving
判断模块420,配置成根据所述消息交互请求判断是否需要模拟交互消息。The determining
获取模块430,配置成判断结果为是时,从预先配置的模拟消息列表中获取对应的模拟交互消息,并将所述模拟消息发送给所述用户终端100。The obtaining
请求转发模块440,配置成判断结果为否时,将所述消息交互请求转发给所述真实Socket服务器300,以使所述真实Socket服务器300根据所述消息交互请求生成对应的交互消息。The
消息转发模块450,配置成接收所述真实Socket服务器300发送的所述交互消息,并将所述交互消息转发给所述用户终端100。The
在一种实施方式中,根据所述消息交互请求判断是否需要模拟交互消息的方式,包括:In an implementation manner, determining, according to the message interaction request, a manner of simulating an interaction message, includes:
对所述消息交互请求进行解析,获得对应的接口地址;Parsing the message interaction request to obtain a corresponding interface address;
判断所述接口地址是否处于预设的接口地址列表中,其中,所述接口地址列表中包含当前未完成开发任务的真实Socket服务器的接口地址;Determining whether the interface address is in a preset interface address list, where the interface address list includes an interface address of a real Socket server that has not completed the development task;
在判断结果为是时,判定需要模拟交互消息;When the judgment result is YES, it is determined that an analog interactive message is required;
在判断结果为否时,判定不需要模拟交互消息。When the judgment result is no, it is determined that the simulation interactive message is not required.
进一步地,请参阅图8,本实施例提供的消息处理装置400还可以包括:Further, referring to FIG. 8, the
请求连接模块460,配置成在接收到所述用户终端100发送的网关服务连接请求后,根据所述网关服务连接请求向对应的真实Socket服务器300发起连接请求,并在接收到所述真实Socket服务器300基于所述连接请求返回的所述真实Socket服务器300的连接信息后建立与所述真实Socket服务 器300的通信连接,其中,所述真实Socket服务器300的连接信息包括所述真实Socket服务器300的接口地址和端口。The
连接信息发送模块470,配置成在与所述真实Socket服务器300连接成功后,向所述用户终端100发送连接成功信息,并将所述模拟Socket服务器的连接信息发送至所述用户终端,以使所述用户终端基于所述模拟Socket服务器200的连接信息建立与所述模拟Socket服务器200的通信连接,以模拟所述用户终端100与真实Socket服务器300之间的通信连接,其中,所述模拟Socket服务器200的连接信息包括所述模拟Socket服务器200的接口地址和端口。The connection
进一步地,请参阅图9,本实施例提供的消息处理装置400还可以包括:Further, referring to FIG. 9, the
接口地址接收模块480,配置成接收在管理界面输入的接口地址,该接口地址为当前未完成开发任务的真实Socket服务器300的接口地址。The interface
地址列表配置模块490,配置成响应接口地址列表的配置请求,根据接收到的接口地址配置得到接口地址列表。The address
进一步地,请参阅图10,在上述基础上,本实施例提供的消息处理装置400还可以包括:Further, referring to FIG. 10, on the basis of the above, the
查询模块4010,配置成响应模拟消息列表的配置请求,查询预先配置的接口文档,所述接口文档中包含接口地址以及预先配置的该接口地址的模拟消息。The
消息列表配置模块4011,配置成在所述接口文档包含的多个接口地址中找到与所述接口地址列表中包含的接口地址一致的接口地址,以及与该接口地址对应的模拟消息,根据查找到的接口地址以及与其对应的模拟消息配置得到模拟消息列表。The message
可以理解的是,本实施例中的各功能模块的具体操作方法可参照上述方法实施例中相应步骤的详细描述,在此不再重复赘述。It is to be understood that the specific operation method of each function module in this embodiment may refer to the detailed description of the corresponding steps in the foregoing method embodiments, and details are not repeatedly described herein.
进一步地,本申请较佳实施例还提供一种可读存储介质,所述可读存储介质中存储有计算机程序,所述计算机程序被执行时实现上述的消息处理方法。Further, the preferred embodiment of the present application further provides a readable storage medium, where the readable storage medium stores a computer program, and when the computer program is executed, the message processing method described above is implemented.
综上所述,本申请实施例提供一种消息处理方法、装置、终端设备及可读存储介质,通过根据用户终端100发送的消息交互请求判断是否需要模拟交互消息,并在判断结果为是时,从预先配置的模拟消息列表中获取对应的模拟交互消息,并将模拟消息发送给用户终端100。或者在判断结果为否时,将消息交互请求转发给真实Socket服务器300,以使真实Socket服务器300根据消息交互请求生成对应的交互消息,并接收真实Socket服务器300发送的交互消息,以将交互消息转发给用户终端100。由此,通过在真实Socket服务器300和用户终端100之间新建一模拟Socket服务器200,能够在真实Socket服务器300的开发任务未完成时,根据用户终端100发送的消息交互请求选择向用户终端100发送模拟消息或者转发真实Socket服务器300的真实交互消息,从而能够适合各种业务场景,有效提高工作效率。In summary, the embodiment of the present application provides a message processing method, apparatus, terminal device, and readable storage medium, and determines whether an interactive message needs to be simulated according to a message interaction request sent by the user terminal 100, and when the judgment result is yes, And acquiring a corresponding analog interaction message from the pre-configured analog message list, and sending the simulation message to the user terminal 100. Or, when the determination result is no, the message interaction request is forwarded to the real Socket server 300, so that the real Socket server 300 generates a corresponding interaction message according to the message interaction request, and receives the interaction message sent by the real Socket server 300 to use the interaction message. Forwarded to the user terminal 100. Thus, by creating a new
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置和方法实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本申请的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the embodiments provided by the present application, it should be understood that the disclosed apparatus and method may also be implemented in other manners. The above described apparatus and method embodiments are merely illustrative, for example, the flowcharts and block diagrams in the figures illustrate the architecture of possible implementations of systems, methods, and computer program products according to various embodiments of the present application, Features and operations. In this regard, each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings. For example, two consecutive blocks may be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present application may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
可以替换的,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其它可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的电子设备、服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。Alternatively, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.). The computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as an electronic device, server, data center, or the like that includes one or more available media. The usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
需要说明的是,在本文中,术语"包括"、"包含"或者其任何其它变体意在涵盖非排它性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其它要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句"包括一个……"限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It is to be understood that the term "comprising", "including" or any other variants thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a Elements, but also other elements not explicitly listed, or elements that are inherent to such a process, method, item, or device. An element defined by the phrase "comprising a ..." does not exclude the presence of additional elements in the process, method, item, or device that comprises the element.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其它的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化囊括在本申请内。不应将权利要求 中的任何附图标记视为限制所涉及的权利要求。It is apparent to those skilled in the art that the present application is not limited to the details of the above-described exemplary embodiments, and the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the application. Therefore, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the invention is defined by the appended claims instead All changes in the meaning and scope of equivalent elements are included in this application. Any reference signs in the claims should not be construed as limiting the claim.
通过在真实Socket服务器和用户终端之间新建一模拟Socket服务器,以在真实Socket服务器的开发任务未完成时,根据用户终端发送的消息交互请求选择向用户终端发送模拟消息或者转发真实Socket服务器的真实交互消息,从而能够适合各种业务场景,有效提高工作效率。By creating a new analog Socket server between the real Socket server and the user terminal, when the development task of the real Socket server is not completed, the user sends an analog message to the user terminal or forwards the real Socket server according to the message interaction request sent by the user terminal. Interactive messages, which can be adapted to various business scenarios and effectively improve work efficiency.
Claims (16)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810000891.9 | 2018-01-02 | ||
| CN201810000891.9A CN108200170B (en) | 2018-01-02 | 2018-01-02 | Message processing method and device and readable storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019134306A1 true WO2019134306A1 (en) | 2019-07-11 |
Family
ID=62588140
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/084252 Ceased WO2019134306A1 (en) | 2018-01-02 | 2018-04-24 | Message processing method, device, terminal apparatus, and readable storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108200170B (en) |
| WO (1) | WO2019134306A1 (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110347380A (en) * | 2019-07-18 | 2019-10-18 | 中国联合网络通信集团有限公司 | Front and back end development approach and equipment |
| CN110609786A (en) * | 2019-08-16 | 2019-12-24 | 平安科技(深圳)有限公司 | Software testing method and device, computer equipment and storage medium |
| CN111010289A (en) * | 2019-11-22 | 2020-04-14 | 国网江西省电力有限公司电力科学研究院 | Panoramic network configuration detection method for in-situ substation |
| CN111385361A (en) * | 2020-03-10 | 2020-07-07 | 创新奇智(广州)科技有限公司 | Cloth inspecting machine communication method and device, electronic equipment and storage medium |
| CN112286700A (en) * | 2020-10-22 | 2021-01-29 | 中国人民解放军海军工程大学 | Method and device for remote information interaction |
| CN114422487A (en) * | 2021-12-08 | 2022-04-29 | 联动优势电子商务有限公司 | Application response simulation method and device |
| CN114650276A (en) * | 2022-02-24 | 2022-06-21 | 北京健康之家科技有限公司 | Service request processing method, electronic equipment terminal and storage medium |
| CN115309450A (en) * | 2021-05-06 | 2022-11-08 | 京东科技控股股份有限公司 | Interactive abnormity identification method and device |
| CN115396831A (en) * | 2021-05-08 | 2022-11-25 | 中国移动通信集团浙江有限公司 | Interaction model generation method, device, equipment and storage medium |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110896493B (en) * | 2018-09-13 | 2022-02-08 | 武汉斗鱼网络科技有限公司 | Bullet screen linking method and mobile terminal |
| CN109057771B (en) * | 2018-09-21 | 2020-09-29 | 中国地质大学(武汉) | A remote monitoring device and method for a trenchless drilling rig |
| CN110888800A (en) * | 2019-10-18 | 2020-03-17 | 平安普惠企业管理有限公司 | Test method, device, storage medium and test system for service interaction function |
| CN113722020B (en) * | 2020-05-26 | 2024-06-11 | 腾讯科技(深圳)有限公司 | Interface calling method, device and computer readable storage medium |
| CN111865679B (en) * | 2020-07-14 | 2021-02-23 | 北京自如信息科技有限公司 | Data simulation method, device, equipment and readable storage medium |
| CN111953775A (en) * | 2020-08-12 | 2020-11-17 | 吉林亿联银行股份有限公司 | Data transmission method and device |
| CN112486037B (en) * | 2020-12-09 | 2023-08-18 | 友道科技有限公司 | Communication matching method and system for train and regional controller in CBTC simulation system |
| CN112527656A (en) * | 2020-12-17 | 2021-03-19 | 杭州安恒信息技术股份有限公司 | Websocket interface test method, device and equipment |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8230214B2 (en) * | 2006-08-21 | 2012-07-24 | Citrix Systems, Inc. | Systems and methods for optimizing SSL handshake processing |
| CN105049507A (en) * | 2015-07-15 | 2015-11-11 | 贵阳朗玛信息技术股份有限公司 | Method for pushing contents to client side and pushing server |
| CN107257345A (en) * | 2017-07-06 | 2017-10-17 | 浙江华创视讯科技有限公司 | A kind of data communication method based on intranet and extranet, apparatus and system |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB0013180D0 (en) * | 2000-06-01 | 2000-07-19 | Ibm | Testing voice message applications |
| CN101800910B (en) * | 2010-01-25 | 2014-04-09 | 中兴通讯股份有限公司 | Simulation system, PC side simulator and mobile phone side agent client |
| CN103580942B (en) * | 2012-08-02 | 2016-12-21 | 重庆重邮信科通信技术有限公司 | A kind of simulative serial port method of testing and device |
| CN104199780A (en) * | 2014-09-24 | 2014-12-10 | 福建联迪商用设备有限公司 | Method and system testing POS application program |
| CN106301865B (en) * | 2015-06-11 | 2020-08-04 | 阿里巴巴集团控股有限公司 | Data processing method and device applied to service providing device |
| CN106375139B (en) * | 2015-07-23 | 2021-04-06 | 腾讯科技(北京)有限公司 | Method, device and system for copying request |
-
2018
- 2018-01-02 CN CN201810000891.9A patent/CN108200170B/en active Active
- 2018-04-24 WO PCT/CN2018/084252 patent/WO2019134306A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8230214B2 (en) * | 2006-08-21 | 2012-07-24 | Citrix Systems, Inc. | Systems and methods for optimizing SSL handshake processing |
| CN105049507A (en) * | 2015-07-15 | 2015-11-11 | 贵阳朗玛信息技术股份有限公司 | Method for pushing contents to client side and pushing server |
| CN107257345A (en) * | 2017-07-06 | 2017-10-17 | 浙江华创视讯科技有限公司 | A kind of data communication method based on intranet and extranet, apparatus and system |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110347380A (en) * | 2019-07-18 | 2019-10-18 | 中国联合网络通信集团有限公司 | Front and back end development approach and equipment |
| CN110347380B (en) * | 2019-07-18 | 2023-08-29 | 中国联合网络通信集团有限公司 | Front-end and back-end development method and device |
| CN110609786A (en) * | 2019-08-16 | 2019-12-24 | 平安科技(深圳)有限公司 | Software testing method and device, computer equipment and storage medium |
| CN111010289A (en) * | 2019-11-22 | 2020-04-14 | 国网江西省电力有限公司电力科学研究院 | Panoramic network configuration detection method for in-situ substation |
| CN111385361A (en) * | 2020-03-10 | 2020-07-07 | 创新奇智(广州)科技有限公司 | Cloth inspecting machine communication method and device, electronic equipment and storage medium |
| CN112286700A (en) * | 2020-10-22 | 2021-01-29 | 中国人民解放军海军工程大学 | Method and device for remote information interaction |
| CN115309450A (en) * | 2021-05-06 | 2022-11-08 | 京东科技控股股份有限公司 | Interactive abnormity identification method and device |
| CN115396831A (en) * | 2021-05-08 | 2022-11-25 | 中国移动通信集团浙江有限公司 | Interaction model generation method, device, equipment and storage medium |
| CN114422487A (en) * | 2021-12-08 | 2022-04-29 | 联动优势电子商务有限公司 | Application response simulation method and device |
| CN114650276A (en) * | 2022-02-24 | 2022-06-21 | 北京健康之家科技有限公司 | Service request processing method, electronic equipment terminal and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108200170A (en) | 2018-06-22 |
| CN108200170B (en) | 2020-01-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019134306A1 (en) | Message processing method, device, terminal apparatus, and readable storage medium | |
| CN107517438B (en) | Method for requesting sharing of Bluetooth device, electronic device and computer storage medium | |
| CN111028839B (en) | Smart home control method and device and electronic equipment | |
| US20150215579A1 (en) | Method, apparatus, system, and storage medium for video call and video call control | |
| US10908889B2 (en) | Method, user equipment, and application server for downloading application | |
| CN110990482A (en) | Data synchronization method and device between asynchronous databases | |
| WO2017219609A1 (en) | Parking stall reservation method, related terminal, server, and device | |
| CN104216787A (en) | Method, device and system for synchronizing clipboards between terminal equipment | |
| WO2018103405A1 (en) | Method for identifying access point and hotspot, and related product | |
| CN104092815A (en) | A method and device for information interaction between applications based on Android system | |
| CN111970676A (en) | WiFi hotspot access method, device, equipment and storage medium | |
| WO2017166508A1 (en) | Data processing method and device | |
| CN109522131A (en) | Resource allocation method, device and equipment | |
| CN104967646B (en) | Document down loading method and device | |
| WO2021098643A1 (en) | Method and device for configuring prop in live streaming room, readable medium, and electronic device | |
| WO2016150191A1 (en) | Data sharing method and device | |
| CN108540947A (en) | Red envelope sharing method, first terminal, second terminal and server | |
| US20160100021A1 (en) | Information processing device, destination information updating method, and record medium | |
| CN106302093B (en) | Communication method, system and server | |
| CN116208796A (en) | Screen projection control method, screen projection control device, processor and screen projection system | |
| CN114584615A (en) | Cloud service collaborative interaction method, apparatus and device | |
| CN104391576A (en) | Remote input method and device based on wireless Ethernet | |
| CN107708183B (en) | Decoding algorithm determination method, device, terminal and storage medium | |
| CN107395493B (en) | Method and device for sharing message based on intention | |
| CN103873682B (en) | A kind of information processing method and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18898169 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18898169 Country of ref document: EP Kind code of ref document: A1 |