CN108494832B - Method, readable medium and device for uniformly packaging full-screen and half-screen messages in live broadcast room - Google Patents

Method, readable medium and device for uniformly packaging full-screen and half-screen messages in live broadcast room Download PDF

Info

Publication number
CN108494832B
CN108494832B CN201810164422.0A CN201810164422A CN108494832B CN 108494832 B CN108494832 B CN 108494832B CN 201810164422 A CN201810164422 A CN 201810164422A CN 108494832 B CN108494832 B CN 108494832B
Authority
CN
China
Prior art keywords
message
screen
message channel
messages
live broadcast
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.)
Active
Application number
CN201810164422.0A
Other languages
Chinese (zh)
Other versions
CN108494832A (en
Inventor
张磊
陈少杰
张文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810164422.0A priority Critical patent/CN108494832B/en
Publication of CN108494832A publication Critical patent/CN108494832A/en
Application granted granted Critical
Publication of CN108494832B publication Critical patent/CN108494832B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/75Indicating network or usage conditions on the user display

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a method for uniformly packaging full-screen and half-screen messages in a live broadcast room, which comprises the steps of respectively transmitting messages from a message source to a full-screen live broadcast room and a half-screen live broadcast room, transmitting the messages in the full-screen live broadcast room through a first message channel, and transmitting the messages in the half-screen live broadcast room through a second message channel; adding a message channel merging service layer on the upper layers of the first message channel and the second message channel, wherein the message channel merging service layer transmits the messages of the first message channel and the second message channel to a service logic layer after processing the messages; and the service logic layer processes the message and then transmits the processed message to the user interface layer. Related computer-readable storage media and related electronic devices are also described.

Description

Method, readable medium and device for uniformly packaging full-screen and half-screen messages in live broadcast room
Technical Field
The invention relates to the field of message transmission, in particular to a method for uniformly packaging full-screen and half-screen messages in a live broadcast room, a related computer readable storage medium and electronic equipment.
Background
Due to historical iteration, the message systems of the full-screen live room and the half-screen live room are different. Therefore, when a later developer of the live broadcast software develops a new function, the same function needs to be developed differently for different message systems, so that the same work is repeated, the development efficiency is greatly influenced, and the quality of the software is reduced.
The traditional mode of message transmission between a full-screen live broadcast room and a half-screen live broadcast room is shown in fig. 1, wherein a message source respectively transmits messages to the full-screen live broadcast room and the half-screen live broadcast room, the full-screen live broadcast room transmits the messages to a first service logic through a first message channel, and the messages are transmitted to a UI (user interface) layer after being processed by the first service logic; similarly, the half-screen live broadcast room transmits the message to the second service logic through the second message channel, and the message is transmitted to the UI layer after the second service logic processes the message.
If a function needs to be owned in both the full-screen live broadcast room and the half-screen live broadcast room, at this time, because two independent channels exist in the full-screen live broadcast room and the half-screen live broadcast room, the completely same message sent from the message source needs to go through two completely different message channels, and finally the service is updated on the UI layer. Because the workload of the first service logic and the second service logic is very large, the same message processing mode is very similar, so that a great number of redundant messages exist, and errors are easy to generate.
Therefore, a new way of message encapsulation is needed to solve the above problems.
Disclosure of Invention
In order to overcome at least one aspect of the above problem, an embodiment of the present invention provides a method for uniformly encapsulating full-screen and half-screen messages in a live broadcast room.
According to one aspect of the invention, a method for uniformly encapsulating full-screen and half-screen messages in a live broadcast room is provided, which comprises the following steps:
step S1, respectively transmitting the message from the message source to a full screen live broadcast room and a half screen live broadcast room, wherein the full screen live broadcast room transmits the message through a first message channel, and the half screen live broadcast room transmits the message through a second message channel;
step S2, adding a message channel merging service layer on the upper layer of the first message channel and the second message channel, wherein the message channel merging service layer transmits the processed messages of the first message channel and the second message channel to a service logic layer;
step S3, the service logic layer processes the message and transmits it to the user interface layer.
According to some embodiments, in step S2, the message channel merge service layer converts, merges, and filters the messages in the first message channel and the second message channel, and then outputs them together.
According to some embodiments, the message channel merge service layer is designed as a factory class in step S2, so as to implement the function of uniformly outputting the message after being converted, merged and filtered.
According to some embodiments, the conversion of each message in the message channel merging service layer into a separate sub-flow in step S2.
According to some embodiments, the factory class and individual sub-processes are joined in step S2 using the interface definition indirection protocol in Java.
According to some embodiments, the interface in step S2 includes a getMessage interface method for receiving any type of message.
According to another aspect of the present invention, there is provided a computer readable storage medium having stored thereon executable instructions that, when executed by a processor, may implement the steps of the method for unified encapsulation of full-screen and half-screen messages in a live room according to any of the above-described embodiments.
According to still another aspect of the present invention, there is provided an electronic apparatus including:
a memory for storing executable instructions; and
a processor, configured to execute executable instructions stored in the memory to implement the steps of the method for uniformly encapsulating full-screen and half-screen messages in a live broadcast room according to any one of the above embodiments.
Compared with the prior art, the invention has the following advantages: the invention adds the message channel merging service layer on the upper layer of the message channel and merges the service logic layer, thereby solving the problem of service processing redundancy in the traditional scheme.
Drawings
Other objects and advantages of the present invention will become apparent from the following description of the invention which refers to the accompanying drawings, and may assist in a comprehensive understanding of the invention.
FIG. 1 is a flow diagram of existing full screen live room and half screen live room message transfer;
FIG. 2 is a flow chart of an improved full screen live room and half screen live room message transfer in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of a method for uniformly encapsulating full-screen and half-screen messages in a live broadcast room according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a computer-readable storage medium of an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs.
The invention provides a method for uniformly packaging full-screen and half-screen messages in a live broadcast room, which comprises the following steps:
respectively transmitting messages from a message source to a full-screen live broadcast room and a half-screen live broadcast room, wherein the full-screen live broadcast room transmits the messages through a first message channel, and the half-screen live broadcast room transmits the messages through a second message channel;
adding a message channel merging service layer on the upper layers of the first message channel and the second message channel, wherein the message channel merging service layer transmits the messages of the first message channel and the second message channel to a service logic layer after processing the messages;
and the service logic layer processes the message and transmits the processed message to the user interface layer.
Optionally, the redundant part of the conventional transmission scheme is redesigned. For example, both the message channel and the service logic are merged into one channel. Of course, it is also possible to add a message channel merging layer to the upper layer of the message channel by merging only the service logic without merging the message channels.
Fig. 2 is a flow chart of a message transmission mode after improvement of a full screen live broadcast room and a half screen live broadcast room. The message source respectively transmits messages to the full-screen live broadcast room and the half-screen live broadcast room, the full-screen live broadcast room still transmits the messages through the first message channel, the difference is that a message channel merging service layer is added on the upper layers of the first message channel and the second message channel, the message channel merging service layer can transmit the same messages transmitted by the first message channel and the second message channel to the service logic layer in a unified structure, and therefore the service logic layer does not need to pay attention to the sources of the messages. And the message channel merging service layer merges the differences of the message channels, so that the messages transmitted by the first message channel and the second message channel can multiplex the codes of the service logic layer, and the problem of code redundancy is perfectly solved.
The method for uniformly encapsulating full-screen and half-screen messages in a live broadcast room is described in detail below with reference to fig. 3.
Step S1, respectively transmitting the message from the message source to a full screen live broadcast room and a half screen live broadcast room, wherein the full screen live broadcast room transmits the message through a first message channel, and the half screen live broadcast room transmits the message through a second message channel;
step S2, adding a message channel merging service layer on the upper layer of the first message channel and the second message channel, wherein the message channel merging service layer transmits the processed messages of the first message channel and the second message channel to a service logic layer;
step S3, the service logic layer processes the message and transmits it to the user interface layer.
In step S2, the message channel merge service layer needs to process two paths of message sources, and output them together after conversion, merging and screening.
In order to make the message channel merge service layer have a certain expansion capability, the core function of the message channel merge service layer may be designed as a factory class, which is defined as handler factory, and the conversion of each message is defined as a service flow in the factory class, that is, an individual sub-flow. Thus, when new messages need to be processed later, a sub-process is added in the factory to complete the business function target.
An indirect protocol is defined by an interface in Java on a software level to link the factory classes and the individual sub-processes, and the indirect protocol is as follows:
Public Interface newHandler{
Public Object getMessage(Object srcMessage);
}
the name of the protocol interface is newHandler, which comprises a getMessage interface method, and the interface method receives a message of an Object type, namely the message transmitted by the first message channel and the second message channel, and returns a content of the Object type, namely the message processed by the sub-process. Object is a top-level class in Java and can be used to receive any type of message, and all messages are defined as Object type in this embodiment, so that the purpose of receiving any message is achieved.
Each individual sub-flow defines a class, e.g., as class A. Then, let A realize the getMessage interface method in the interface newHandler, and complete the function of specific message service conversion in the realization method class. When a type message a corresponding to the type A comes, the factory class screens the corresponding sub-flow A to process the message a, and then transmits a processing result to the service logic layer for unified processing, so that the conversion process of the message is completed.
The steps can dynamically expand the processing of various messages, and different messages have different processing implementation classes, so that the expansibility of a message channel merging service layer is greatly improved, and a certain guarantee effect is played on the subsequent expansion.
According to the embodiment, two independent message channels of the full-screen live broadcast room and the half-screen live broadcast room are combined into one message channel, so that the problem of code redundancy in a traditional message transmission mode is solved, the software development efficiency is greatly improved, the error rate of software is reduced, and the software quality is improved.
Based on the same inventive concept, as illustrated with reference to fig. 4, the present invention further provides a computer-readable storage medium 401 having stored thereon executable instructions 402, which executable instructions 402, when executed by one or more processors, may cause the one or more processors to perform the steps of the method for implementing the unified encapsulation of full-screen and half-screen messages in a live room according to any of the above-described embodiments.
Based on the same inventive concept, referring to fig. 5, the present invention further provides an electronic device 501, where the electronic device 501 includes:
a memory 510 for storing executable instructions 511; and
a processor 520 configured to execute executable instructions 511 stored in the memory 510 to implement the steps of the method for unified encapsulation of full-screen and half-screen messages in a live broadcast room as described in any of the above embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (7)

1. A method for uniformly packaging full-screen and half-screen messages in a live broadcast room comprises the following steps:
step S1, respectively transmitting the message from the message source to a full screen live broadcast room and a half screen live broadcast room, wherein the full screen live broadcast room transmits the message through a first message channel, and the half screen live broadcast room transmits the message through a second message channel;
step S2, adding a message channel merging service layer on the upper layers of the first message channel and the second message channel, where the message channel merging service layer processes the messages of the first message channel and the second message channel and transmits them to a service logic layer; designing the message channel merging service layer into a factory class to realize the function of uniformly outputting the messages;
step S3, the service logic layer processes the message and transmits it to the user interface layer.
2. The method according to claim 1, wherein in step S2, the message channel merge service layer converts, merges and filters the messages of the first message channel and the second message channel, and then outputs them together.
3. The method of claim 1, wherein the message channel merges the conversion of each message in the service layer into a separate sub-flow in step S2.
4. The method according to claim 3, wherein in step S2, the factory class and the separate sub-process are linked by using an interface definition indirection protocol in Java.
5. The method of claim 4, wherein the interface in step S2 comprises a getMessage interface method for receiving any type of message.
6. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, implement the steps of the method of uniform encapsulation of full-screen and half-screen messages of a live room of any of claims 1-5.
7. An electronic device, comprising:
a memory for storing executable instructions; and
a processor for executing executable instructions stored in the memory to implement the steps of the method for unified encapsulation of full-screen and half-screen messages of a live room of any of claims 1-5.
CN201810164422.0A 2018-02-26 2018-02-26 Method, readable medium and device for uniformly packaging full-screen and half-screen messages in live broadcast room Active CN108494832B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810164422.0A CN108494832B (en) 2018-02-26 2018-02-26 Method, readable medium and device for uniformly packaging full-screen and half-screen messages in live broadcast room

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810164422.0A CN108494832B (en) 2018-02-26 2018-02-26 Method, readable medium and device for uniformly packaging full-screen and half-screen messages in live broadcast room

Publications (2)

Publication Number Publication Date
CN108494832A CN108494832A (en) 2018-09-04
CN108494832B true CN108494832B (en) 2021-04-09

Family

ID=63340761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810164422.0A Active CN108494832B (en) 2018-02-26 2018-02-26 Method, readable medium and device for uniformly packaging full-screen and half-screen messages in live broadcast room

Country Status (1)

Country Link
CN (1) CN108494832B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043616A (en) * 2009-10-22 2011-05-04 上海杉达学院 Factory pattern-based information system architecture and architecture method
CN102087615A (en) * 2009-12-03 2011-06-08 国际商业机器公司 Automated merger of logically associated messages in a message queue
CN102819590A (en) * 2012-08-06 2012-12-12 厦门市美亚柏科信息股份有限公司 C#-based quick data access layer implementation method
CN103618732A (en) * 2013-12-05 2014-03-05 用友软件股份有限公司 Execution flow of App engine structure of PaaS and Erlang
CN105306497A (en) * 2014-06-05 2016-02-03 北京畅游天下网络技术有限公司 Method and device for interaction between user interface (UI) and model layer data in application program
CN106775699A (en) * 2016-12-09 2017-05-31 武汉斗鱼网络科技有限公司 The method that UI is updated in asynchronous thread
CN106843901A (en) * 2017-02-10 2017-06-13 广州优视网络科技有限公司 A kind of page rendering and the method and apparatus of checking
CN107085540A (en) * 2017-03-22 2017-08-22 北京潘达互娱科技有限公司 virtual gift display method and device
CN107273278A (en) * 2017-06-02 2017-10-20 广东欧珀移动通信有限公司 Interim card determines method, device and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7076204B2 (en) * 2001-10-30 2006-07-11 Unwired Technology Llc Multiple channel wireless communication system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043616A (en) * 2009-10-22 2011-05-04 上海杉达学院 Factory pattern-based information system architecture and architecture method
CN102087615A (en) * 2009-12-03 2011-06-08 国际商业机器公司 Automated merger of logically associated messages in a message queue
CN102819590A (en) * 2012-08-06 2012-12-12 厦门市美亚柏科信息股份有限公司 C#-based quick data access layer implementation method
CN103618732A (en) * 2013-12-05 2014-03-05 用友软件股份有限公司 Execution flow of App engine structure of PaaS and Erlang
CN105306497A (en) * 2014-06-05 2016-02-03 北京畅游天下网络技术有限公司 Method and device for interaction between user interface (UI) and model layer data in application program
CN106775699A (en) * 2016-12-09 2017-05-31 武汉斗鱼网络科技有限公司 The method that UI is updated in asynchronous thread
CN106843901A (en) * 2017-02-10 2017-06-13 广州优视网络科技有限公司 A kind of page rendering and the method and apparatus of checking
CN107085540A (en) * 2017-03-22 2017-08-22 北京潘达互娱科技有限公司 virtual gift display method and device
CN107273278A (en) * 2017-06-02 2017-10-20 广东欧珀移动通信有限公司 Interim card determines method, device and terminal

Also Published As

Publication number Publication date
CN108494832A (en) 2018-09-04

Similar Documents

Publication Publication Date Title
US11948021B2 (en) Method for inter-core communication, processor, inter-core communication system and computer readable storage medium
CN102714607A (en) Connectivity fault management timeout period control
CN102866925A (en) Communication method and system for middleware and user interface
CN113486629A (en) Application method and system for enterprise service bus of docking third-party system
CN114448802B (en) Gateway configuration method, device, electronic equipment and storage medium
CN108494832B (en) Method, readable medium and device for uniformly packaging full-screen and half-screen messages in live broadcast room
CN101036344B (en) Communications system
CN101499031A (en) Software bug feedback system and method
CN103634229A (en) Inter-chip communication method and control device
US10454715B1 (en) Virtual private wire service interworking
KR20170093562A (en) Smart factory connection module and operating method thereof
CN104993906A (en) Message transmission method and system
WO2015165280A1 (en) Method, device, and system for determining intermediate routing node
CN115333943A (en) Deterministic network resource configuration system, method, device and storage medium
CN113923258A (en) Data processing method and data processing system
KR101508914B1 (en) DEVICE AND METHOD OF REDUCING AN OVERHEAD OF MESSAGE AND DELAY IN openADR
WO2021035791A1 (en) Method for controlling other systems on the basis of single-point execution contract
CN112148324A (en) Method, apparatus and computer-readable storage medium for upgrading electronic device
JP2001168874A (en) Atm ring network system and simultaneous multiple address control system used therefor
CN116700956B (en) Request processing method, apparatus, electronic device and computer readable medium
KR101656416B1 (en) Apparatus and method of generating message automatically in real-time data transmission processing system
CN115102992B (en) Data publishing method and device, electronic equipment and computer readable medium
CN112395114B (en) Method, computing device, and computer-readable storage medium for processing messages
JP2004029916A (en) Interface conversion system and interface conversion method and its program
CN116506509A (en) Data stream task processing method, device, system, equipment and storage medium

Legal Events

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