CN117793168A - Data transmission method based on live broadcasting room, related equipment and storage medium - Google Patents

Data transmission method based on live broadcasting room, related equipment and storage medium Download PDF

Info

Publication number
CN117793168A
CN117793168A CN202211154821.1A CN202211154821A CN117793168A CN 117793168 A CN117793168 A CN 117793168A CN 202211154821 A CN202211154821 A CN 202211154821A CN 117793168 A CN117793168 A CN 117793168A
Authority
CN
China
Prior art keywords
client
resource data
server
data
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211154821.1A
Other languages
Chinese (zh)
Inventor
苟亚明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211154821.1A priority Critical patent/CN117793168A/en
Publication of CN117793168A publication Critical patent/CN117793168A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the application relates to the technical field of computers, and discloses a data transmission method based on a live broadcast room, related equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps that a first client receives at least one resource data which is sent by a server and is associated with a preset live broadcasting room through a first session link between the first client and the server; the method comprises the steps that a first client responds to selection operation of a live broadcast interface of a preset live broadcast room, and target resource data are selected from at least one resource data; wherein the live interface comprises at least one resource data; the first client sends the target resource data and the second client identification of the second client to the server through the first session link, so that the server sends the target resource data to the second client indicated by the second client identification through the second session link. By adopting the embodiment of the application, the data transmission efficiency can be improved under the condition of ensuring the data security.

Description

Data transmission method based on live broadcasting room, related equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data transmission method, related device, and storage medium based on a live broadcast room.
Background
With the advent of live broadcast hot flashes, live broadcast functions are added to application programs in various fields such as finance, education and the like, but the security requirements on data pairs displayed and transacted in a live broadcast room are higher in live broadcast rooms in the fields such as banks, insurance and the like. In order to improve the transmission safety of data in a live broadcast room, any client in the live broadcast room encrypts the data before transmitting the data to another client through a server each time, so as to obtain a ciphertext of the data, and sends the ciphertext to the server. After each time the server receives the ciphertext transmitted by any client in the live broadcasting room, the server needs to verify the ciphertext; further, after the server passes the ciphertext verification, the ciphertext is forwarded to another client. Therefore, the server needs to check the data in each transmission process of the data in the live broadcast room, so that the data transmission efficiency is low. Therefore, how to improve the data transmission efficiency while ensuring the data security is a problem to be solved.
Disclosure of Invention
The embodiment of the application provides a data transmission method based on a live broadcasting room, related equipment, a storage medium and a computer product, which can improve the data transmission efficiency under the condition of ensuring the data security.
In one aspect, an embodiment of the present application provides a data transmission method based on a live broadcast room, including:
the method comprises the steps that a first client receives at least one resource data which is sent by a server and is associated with a preset live broadcasting room through a first session link between the first client and the server; wherein the first session link is established by the server after authentication of the first client is passed; the first client interacts with a second client through the preset live broadcasting room;
the first client displays a live broadcast interface of the preset live broadcast room, wherein the live broadcast interface comprises the at least one resource data;
the first client responds to the selection operation of the live interface and selects target resource data from the at least one resource data;
the first client sends the target resource data and a second client identifier of the second client to the server through the first session link, so that the server sends the target resource data to the second client indicated by the second client identifier through a second session link, and the second session link is established after the server passes the authentication of the second client.
In one aspect, an embodiment of the present application provides a data transmission device based on a living broadcast room, where the data transmission device based on the living broadcast room includes a receiving unit, a processing unit, and a sending unit, where:
the receiving unit is used for receiving at least one resource data which is sent by the server and is associated with a preset live broadcasting room through a first session link between the receiving unit and the server; wherein the first session link is established by the server after authentication of the first client is passed; the first client interacts with a second client through the preset live broadcasting room;
the processing unit is used for displaying a live broadcast interface of the preset live broadcast room, and the live broadcast interface comprises the at least one resource data;
the processing unit is further used for responding to the selection operation of the live broadcast interface and selecting target resource data from the at least one resource data;
the sending unit is configured to send, by using the first session link, the target resource data and a second client identifier of the second client to the server, so that the server sends, by using the second session link, the target resource data to the second client indicated by the second client identifier, where the second session link is established by the server after authentication of the second client passes.
In one aspect, an embodiment of the present application provides an electronic device, where the electronic device includes an input interface and an output interface, and further includes:
a processor adapted to implement one or more instructions; the method comprises the steps of,
a computer storage medium storing one or more instructions adapted to be loaded by the processor and to perform the live-room-based data transmission method described above.
In one aspect, embodiments of the present application provide a computer storage medium having stored therein computer program instructions for performing the above-described live-room-based data transmission method when executed by a processor.
In one aspect, embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium; the processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, which when executed by the processor, are configured to perform the live-room-based data transmission method described above.
In this embodiment of the present application, resource data is transmitted between a first client and a server through a first session link, resource data is transmitted between a second client and a server through a second session link, where the first session link is a session link established by the server after passing authentication of the first client, and the second session link is a session link established by the server after passing authentication of the second client, so that both the first session link and the second session link are authenticated session links with higher security. That is, the security of the resource data transmitted through the first session link and the second session link can be ensured. Then, after the server receives the target resource data sent by the first client through the first session link, no additional data verification on the target resource data may be required, and the target resource data may be directly sent to the second client through the second session link. Therefore, the server only needs to forward the target resource data, and does not need to carry out additional data verification, thereby being beneficial to improving the data transmission efficiency under the condition of ensuring the data security.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a data transmission system based on a live broadcast room according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a data transmission method based on a live broadcast room according to an embodiment of the present application;
fig. 3 is a schematic diagram of a procedure for initializing a live component according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a live interface provided by an embodiment of the present application;
fig. 5 is a schematic diagram of another data transmission method based on a live broadcast room according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a communication process provided in an embodiment of the present application;
fig. 7 is an interface schematic diagram of a live component according to an embodiment of the present application;
fig. 8 is a schematic view of an interface of a living room according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of a data transmission device based on a live broadcast room according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Live broadcast, i.e. network real-time interactive live broadcast, is an information network publishing mode with a bidirectional circulation process, and is also a social and commercial mode. The live broadcasting room refers to a network live broadcasting program opened by an individual or an organization, a host for creating the live broadcasting room can synchronously broadcast the content which the host wants to display by using terminal equipment with camera shooting functions such as a computer, a mobile phone and the like, and a viewer joining the live broadcasting room can watch the content displayed by the host through a website or an application program.
In addition, the anchor and the audience can also interact through the live broadcasting room, and the interaction mode comprises that the audience sends bullet comments, the anchor pushes products in the live broadcasting room, the audience purchases or knows the products in the live broadcasting room, the audience generates a sharing poster and the like.
With the advent of live hots, live broadcast functionality has begun to be added to applications in many areas. Data in a live broadcast room (such as gifts, red packets sent by a client) is generally transmitted through an HLS protocol (HTTP Live Streaming, HTTP-based adaptive rate streaming media communication protocol) or an RTMP protocol (Real Time Messaging Protoco, real-time messaging protocol), but the data in a part of the live broadcast room has high security requirements (such as a live broadcast room in a financial field), so that in the process of transmitting the data in the part of the live broadcast room from one client to other clients, additional data verification, such as verification of data integrity, message confirmation, data encryption, etc., needs to be performed by a transit server, which results in low data transmission efficiency. In addition, the data to be subjected to data verification is easy to couple with a business layer in a bottom layer framework, so that the live broadcast function is difficult to be output outwards as a component, and the live broadcast function is convenient and rapid to increase in a mode that the component is difficult to be added by an application program.
Based on the above, the embodiment of the application provides a data transmission scheme based on a live broadcast room, in which a first client interacts with a second client through a preset live broadcast room, and at the same time, the first client receives at least one resource data associated with the preset live broadcast room and sent by a server through a first session link between the first client and the server; the first client may then display a live interface of the preset live room including at least one resource data. After the first client displays the live broadcast interface, the use object of the first client can select resource data which is required to be sent to the second client from at least one resource data displayed by the live broadcast interface, so that the first client can respond to the selection operation of the use object on the live broadcast interface to select target resource data from at least one resource data; finally, the first client can send the target resource data and the second client identifier of the second client to the server through the first session link, so that the server can send the target resource data to the second client indicated by the second client identifier through the second session link.
Wherein the first session link is established by the server after authentication of the first client is passed and the second session link is established by the server after authentication of the second client is passed.
It can be seen that in the scheme, the first client sends the target resource data to the server through the first session link, and the server sends the target resource data to the second client through the second session link, that is, the server in the scheme only plays a role of forwarding the target resource data to the second client; meanwhile, since the first session link and the second session link are session links established after the server authenticates the corresponding client, the first session link and the second session link are session links with high authenticated security, so that the security of data transmitted through the first session link and the second session link can be ensured. Therefore, the resource data is transmitted through the first session link and the second session link, so that the data security can be ensured, the server does not need to carry out additional data verification on the target resource data, only needs to forward the target resource data, and the purpose of improving the data transmission efficiency is achieved.
The preset live broadcasting room refers to a live broadcasting room created by a host. The first client and the second client refer to clients entering a preset live broadcasting room. The first client may be a client using an object as a main cast of the preset live broadcasting room (may be simply referred to as a main cast client, and will not be described in detail later), or a client using an object as a viewer of the preset live broadcasting room (may be simply referred to as a viewer client, and will not be described in detail later). The second client may be a client using the object as a main cast of the preset living room or a client using the object as a viewer of the preset living room.
Specifically, the first client and the second client are anchor or audience entering the preset living room, so that the first client and the second client can interact through the preset living room.
Further, the resource data may include data to be displayed in the preset living room, interactive data in the preset living room, and the like, which are associated with the preset living room. For example, a plurality of financial products are displayed in a financial living room, then the plurality of financial products are the resource data associated with the living room; the anchor client of the financial living room may send coupons for a certain financial product to certain viewer clients so that the viewer clients may purchase the financial product through coupons, with coupons that interact between clients, i.e., resource data.
In addition, the target resource data refers to one or more resource data among at least one resource data received by the client. The target resource data is the resource data that the use object of the first client wants to send to the second client, that is, the target resource data needs to be selected from at least one resource data displayed on the live interface by the use object of the terminal device running the first client (may be referred to as the use object of the first client), where a selection operation of the use object occurs, and then the first client may select the target resource data from the at least one resource data in response to the selection operation.
Specifically, the selection operation may be a click operation generated by a mouse click, a touch click, or the like of the use object of the first client, or may be an identification operation generated by identifying information such as voice and image input by the use object of the first client, which is not limited herein.
Based on the above-mentioned data transmission method based on the live broadcasting room, the embodiment of the present application provides a data transmission system based on the live broadcasting room, which may refer to fig. 1, where the data transmission system based on the live broadcasting room shown in fig. 1 may include a terminal device 101, a terminal device 102 and a server 103, where a communication connection is established between any one of the terminal device and the server. Terminal device 101 or terminal device 102 may include any one or more of a smart phone, tablet, notebook, desktop, smart car, and smart wearable device. A wide variety of Applications (APP) may be run within the terminal device 101 or 102, such as insurance clients, banking clients, multimedia play clients, social clients, browser clients, information flow clients, educational clients, and so forth. The server 103 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content delivery network (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligence platform. The terminal device 101 and the server 103 may be directly or indirectly connected to each other by wired or wireless communication, and similarly, the terminal device 102 and the server 103 may be directly or indirectly connected to each other by wired or wireless communication, which is not limited herein.
In one embodiment, the data transmission method based on the living broadcast room may be operated in a data transmission system based on the living broadcast room, and the data transmission system based on the living broadcast room may include at least two terminal devices and a server. Specifically, the data transmission method based on the live broadcasting room may be jointly completed by the terminal device 101, the terminal device 102 and the server 103 included in the data transmission system based on the live broadcasting room shown in fig. 1, where a first client is running in the terminal device 101, a second client is running in the terminal device 102, and the specific implementation process may be: a first client in the terminal device 101 receives at least one resource data associated with a preset live broadcast room sent by the server 103 through a first session link between the first client and the server 103; then, the first client in the terminal device 101 may display a live broadcast interface of a preset live broadcast room, and select target resource data from at least one resource data in response to a selection operation of a use object of the terminal device 101; wherein the live interface includes at least one resource data. Then, the first client in the terminal device 101 sends the target resource data and the second client identifier of the second client to the server through the first session link, so that the server sends the target resource data to the terminal device 102 running with the second client through the second session link. Alternatively, after the second client of the terminal device 102 receives the target resource data through the second session link, the target resource data may be displayed in a live interface of the preset live room displayed by the terminal device 102, and if the preset live room is being displayed in the display screen of the terminal device 102 at this time, the target resource data is displayed in the preset live room.
Based on the data transmission scheme based on the live broadcasting room and the data transmission system based on the live broadcasting room, the embodiment of the application provides a data transmission method based on the live broadcasting room. Referring to fig. 2, a flow chart of a data transmission method based on a live broadcast room according to an embodiment of the present application is provided. The live room-based data transmission method shown in fig. 2 may be performed by a first client running in a terminal device. The data transmission method based on the live broadcasting room shown in fig. 2 may include steps S201 to S204:
s201, the first client receives at least one resource data associated with a preset live broadcast room sent by the server through a first session link between the first client and the server.
In this embodiment of the present application, the first client refers to a client entering a preset live room, where the first client may be a hosting client or an audience client. In addition, the client entering the preset live broadcasting room can interact with other clients by sending bullet comments in the preset live broadcasting room, sending resource data to other clients entering the preset live broadcasting room and the like.
Where a client generally refers to a client of a certain application. In a specific implementation, a live broadcast component with a live broadcast function can be integrated in an application program corresponding to the first client, and because the essence of the live broadcast component is a section of code for realizing the live broadcast function, when the live broadcast component is integrated into the application program, the live broadcast component also belongs to a part of the application program, and at the moment, the application program client is the live broadcast component client.
When the first client is a main broadcasting client, the preset live broadcasting room can be a live broadcasting room created by the first client after logging in a live broadcasting component in a corresponding application program; when the first client is a viewer client, the preset live broadcast room may be a live broadcast room into which the first client enters after logging in a live broadcast component in a corresponding application program. The server may be a server corresponding to an application program, or may be a server corresponding to a live component in an application program, and is not limited herein.
Furthermore, the first session link refers to a communication link for data transmission established by the server after authentication of the first client is passed. The first session link is not an entity's path, but a communication link for data transmission established according to a communication protocol.
Alternatively, the establishment procedure of the first session link may specifically be: the method comprises the steps that a first client receives an identity mark which is sent by a server and used for identifying the first client; the first client encrypts a first client identifier and an identity identifier of the first client through an authentication function to obtain a login message; the first client sends a login message to the server so that the server authenticates the first client through the authentication function and the login message, and after the authentication of the first client is passed, the server establishes a first session link with the first client.
The first client identifier and the identity identifier may be numbers, characters, serial numbers, and the like, which are not limited herein. For example, the first client identifier may be the name "min" of the account number logged on the first client, or may be the ID "00325" of the account number logged on the first client; the identity may be a, and an application for indicating xx insurance is preset in a, or 001, and an application for indicating xx insurance is preset in 001.
Since the above-mentioned client generally refers to a client of a certain application, the identity is specifically used to identify the identity of the application corresponding to the first client. Specifically, when an application integrates a live component, the server may assign an identity to the application integrated with the live component to indicate that the client of the application may use the live component to create a live or enter a live room in the live component through the live component.
Furthermore, since data is typically transferred between a client and a server in the form of packets of data in messages, the authentication function refers to a function for authentication of messages. Message authentication is typically the authentication of the integrity and reliability of a message, which can typically be authenticated by encryption, and thus the authentication function is the function used for encryption.
In particular, the authentication function may include one or more of a message encryption function, a message authentication code, a hash function (i.e., a hash function), and the like.
In addition, a message typically includes a message header, a message body, and a message tail, where the message header typically includes message description information, such as a type, a length, a sequence number, a creation time, etc., of the message, and most of the information in the message header may not need to be encrypted; the message body typically includes the primary content that the message needs to deliver; message tails are commonly used for segmentation from other messages, as well as message verification.
Then, the first client encrypts the first client identifier and the identity identifier of the first client through the authentication function, and the specific manner of obtaining the login message may be: the first client randomly selects an encryption algorithm through an authentication function, and encrypts the second client identifier and the identity identifier according to the randomly selected encryption algorithm to obtain an encrypted message body; the login message is obtained based on the algorithm identification of the randomly selected encryption algorithm and the encrypted message body.
Optionally, the server performs locking processing of the spin lock on the authentication function after the first session link is established, if the server receives the login message from the first client again before the first session link ends, at this time, the server detects that the authentication function is in a locked state, and then deletes the login message received again from the first client, and does not perform authentication processing on the login message received again. Specifically, before the established session link is not finished, in order to avoid that the server performs the same operation after receiving the login message again, the authentication function may be protected by adopting a spin lock mode before the established session link is not finished.
Optionally, the specific way that the server performs authentication processing on the first client through the authentication function and the login message may be: the server analyzes the login message to obtain an algorithm identification and an encrypted message body; and the server decrypts the encrypted message body based on a decryption algorithm matched with the algorithm identification in the authentication function, if the decryption is successful, the first client authentication is determined to pass, the first client identification and the identity identification are obtained, and if the decryption is failed, the first client authentication is determined to not pass.
Optionally, the first client sends a login message to the server, so that the server performs authentication processing on the first client through an authentication function and the login message, and after the authentication of the first client is passed, a specific process of establishing a first session link between the server and the first client by the server may be: the method comprises the steps that a first client sends a login message to a server, so that the server authenticates the first client through an authentication function and the login message, after the first client passes authentication, the server obtains a first client identifier and an identity identifier, the server searches session configuration data matched with the first client identifier and the identity identifier from a preset database, and the server analyzes the session configuration data to obtain session parameters for indicating a first session link; the first client receives session parameters sent by the server to establish a first session link.
The preset database may be a local database of the server, or may be a database associated with the server, which is not limited herein. Since the login message is decrypted through the authentication function, if the login message is decrypted successfully, the first client authentication is determined to pass, and the first client identification and the identity identification are obtained, so that the server can directly obtain the first client identification and the identity identification after determining that the first client authentication passes. In addition, the session parameter is used to indicate a link configuration condition of the first session link.
Optionally, besides packaging the first client identifier and the identity identifier into a login message for the server to authenticate the identity of the first client, the login message may also carry information such as a device identifier of a terminal device running the first client, a component version identifier of a live component in an application program corresponding to the first client, and a responsibility distinguishing identifier of the first client in a preset live room, so that the server can further authenticate the identity of the first client. The device identifier, the component version identifier, and the responsibility identifier may be numbers, characters, serial numbers, and the like, which are not limited herein. For example, the responsibilities of the first client in the preset living room are mainly divided into two types, namely, a host and a spectator, so that a responsibilities distinguishing mark a is set for indicating the host, and a responsibilities distinguishing mark B is set for indicating the spectator.
Optionally, after the server analyzes the session configuration data, the server may obtain session parameters, session path configuration parameters and authentication passing information. The server may send authentication pass information to the first client to cause the first client to confirm that authentication by the server has passed. Meanwhile, the server may store the session path configuration parameters to a preset database so as to store the history message transmitted by the first session link.
In a specific implementation, referring to fig. 3, a schematic process diagram of initializing a live component is shown. The communication protocol pre-agreed between the client of the live component and the server of the live component is fix protocol. Before the live component begins to initialize, the application integrated with the live component will be randomly assigned an appKey (i.e., identity) by the server. When the client is a host client, a communication protocol link between the client and the server is created based on a fix protocol when a live broadcasting room created by the host client is opened, so that communication between the host client and the server is facilitated; when the client is a viewer client, the viewer client creates a communication protocol link between the client and the server based on the fix protocol upon entering the living room, so that communication between the viewer client and the server is possible. Further, the database in this example may be a local database of the server, with the client and server holding the same authentication function.
As shown in step 301 and step 302 in fig. 3, the client randomly selects an encryption algorithm through an authentication function, and encrypts a client identifier (e.g., the id of the client) and an identity identifier (i.e., the appKey mentioned above) based on the selected encryption algorithm, so as to obtain a login message (which may also be referred to as a logo message). The authentication function may be getEncryFunc (function for encryption), among others.
The client then sends a login message to the server over the communication protocol link, as shown in steps 303 to 304. After receiving the login message, the server decrypts the login message through an authentication function (i.e., getEncryFunc), and after the login message is successfully decrypted, the server obtains a client identifier (id) and an identity identifier (appKey), and at this time, the server determines that the client authentication is passed.
Since the authentication passing information of the client is issued in the form of a session configuration file, the server sends the client identifier and the identity obtained by the authentication function to the database, so as to find out the session configuration file (which may also be referred to as session configuration data) matching the client identifier and the identity from the database, as shown in steps 306 to 309.
The session configuration file comprises session parameters, authentication passing information and configuration description information. Specifically, the authentication pass information is used to indicate that the client authentication passes. The authentication pass information may be, for example, a Boolean value (Boolean) indicating authentication pass. The configuration profile may include session path configuration parameters. Optionally, other information related to the session link may also be included in the configuration description file, which is not limited herein. The session path configuration parameter may be a DEFAULT node, for example. The fields commonly used in the DEFAULT node include fields for indicating information such as storage locations of history messages transmitted in a session link, properties of a session, and the like, such as filestore path, filelog path, connectionType (type of connection, which is generally valued as an receiver), resetnlogo, and resetnlogo (indicating whether a session supports reconnection). Session parameters refer to configuration parameters associated with establishing a session link. For example, parameters included in SESSION are SESSION parameters. The SESSION may include fields related to configuration parameters of a SESSION link, such as SESSION start time, expected end time, destination address (i.e., ip address of the client), port number, data format of SESSION support transmission, etc.
After receiving the session configuration file searched by the database, the server analyzes the session configuration file to obtain session parameters, authentication passing information and configuration description information, as shown in step S309.
After obtaining the authentication pass information, the server needs to return the authentication pass information to the client through the communication protocol link in order for the client to determine that it has authenticated itself, as shown in steps 310 to 311. Meanwhile, after obtaining the configuration profile, the server needs to send the configuration profile to the database, so that the database can determine a storage area in the database for storing session messages transmitted through a session link between the client and the server according to the configuration profile, as shown in steps 312 to 313. In particular, after the session link is established, if it is desired to find the history message transmitted by the session link, it can be found in the determined storage area.
And, as shown in steps 314 through 315, the server, after obtaining the session parameters, needs to return the session parameters to the client over the communication protocol link. After receiving the session parameters, the client knows the configuration parameters of the session link, so the client can establish the session link between the client and the server according to the session parameters, as shown in step 316. After the session link between the client and the server is successfully established, the initialization of the live component integrated in the application is completed.
S202, a first client displays a live broadcast interface of a preset live broadcast room;
in this embodiment of the present application, the live broadcast interface includes at least one resource data sent by a server received by the first client. Specifically, at least one resource data may be directly displayed in the live interface, or a data icon of each resource data in the at least one resource data may be generated first, and then the data icon of each resource data may be displayed in the live interface, which is not limited herein.
Alternatively, since not all resource data need to be displayed in the live interface at once, a portion of the resource data may be displayed in the live interface only when certain conditions are met. And then, responding to the editing operation of the live interface, and adjusting the resource data displayed on the live interface. Specifically, the editing operation may be an adding operation, a deleting operation, a position adjusting operation, or the like.
For example, referring to fig. 4, a schematic diagram of a live interface is shown. As shown by shelf 402 in the live interface 401 of the anchor "R city educational channel", the live interface 401 includes a plurality of selected net lessons such as "basic chinese class", "basic mathematical class", and the like. The king wants to learn math from the base, the language is thus smaller Wang Ke to click the delete button 403, at which time a delete operation of the resource data about "basic group of language" is generated, and in response to the delete operation, the resource data about "basic group of language" is not displayed in the live interface 401.
S203, the first client responds to the selection operation of the live interface, and selects target resource data from at least one resource data.
In this embodiment of the present application, the selection operation may be generated based on a click operation of the target resource data displayed in the live interface by the use object of the terminal device running the first client, or may be generated by identifying information such as voice and image input by the use object, which is not limited herein.
For example, the first client is a hosting client, and the use object of the hosting client clicks the financial product a among the financial products displayed on the live broadcast interface as a financial product newly released in the financial live broadcast room, and at this time, the hosting client determines that the financial product a is the target resource data to be sent to all the audience clients entering the financial live broadcast room in response to the click operation.
S204, the first client sends the target resource data and the second client identification of the second client to the server through the first session link, so that the server sends the target resource data to the second client indicated by the second client identification through the second session link.
In this embodiment, the second session link is established by the server after authentication of the second client is passed. The specific establishment procedure of the second session link may refer to the specific establishment procedure of the first session link in step S201, which is not described herein.
The second client identifier may be, but is not limited to, an object name of the second client to be used, a client code of the second client, and the like. The specific way for the server to send the target resource data to the second client indicated by the second client identifier through the second session link may be: the server determines a second client indicated by the second client identification; the server transmits the target resource data to the second client over a second session link with the second client.
In addition, since the data format of the data transmitted between the client and the server needs to conform to the data format required by the pre-agreed communication protocol, the specific manner in which the first client sends the target resource data and the second client identifier of the second client to the server through the first session link may be: the first client performs format conversion processing on the target resource data and the second client identifier to obtain a session message, wherein the data format of the session message is a data format specified by a preset communication protocol, and the preset communication protocol refers to a communication protocol between a client and a server which are agreed in advance; finally, the first client sends the session message to the server over the first session link.
Specifically, since the data types of the data that the preset communication protocol can support transmission are different, the format conversion process may be to convert the data types of the target resource data and the second client identifier into the preset data types, where the preset data types refer to the data types of the data that the preset communication protocol supports transmission. For example, the preset data type may be an integer type, a character type, etc.
Alternatively, in a specific implementation, when the preset live broadcast room is a live broadcast room in the financial field, the preset communication protocol may be a financial information exchange protocol (i.e. FIX protocol, an open protocol provided by the international FIX association organization, for the purpose of promoting the process of international trade electronization, and among various participants, including investment managers, brokers, buyers and sellers, establish a real-time electronization communication protocol), where resource data associated with the preset live broadcast is financial data.
Since fix protocol specifies transmitting data in the form of messages, one of which consists of a message header, a message body and a message trailer; meanwhile, the fix protocol also requires that the basic data type of data be an integer (int), a floating point number (float), a character (char), a Boolean (Boolean), a String (String), or binary data (data).
In addition, since certain specific financial parameters are specified in the fix protocol to have their corresponding specific tag fields (i.e., tag fields), such as tag=55 represents a contract code of futures, tag=110 represents a minimum transaction amount, and tag=207 represents a specified exchange. In addition, the fix protocol also provides that Tag fields with Tag numbers above 10000 can be customized. Therefore, when the target resource data includes a specific resource value, it is necessary to determine the resource tag of the resource value first; then searching a label domain corresponding to the parameter label of the resource value based on a preset corresponding relation between the resource label and the label domain; and finally, loading the resource value into the searched tag field to obtain the session message.
In this embodiment of the present application, resource data is transmitted between a first client and a server through a first session link, resource data is transmitted between a second client and a server through a second session link, where the first session link is a session link established by the server after passing authentication of the first client, and the second session link is a session link established by the server after passing authentication of the second client, so that both the first session link and the second session link are authenticated session links with higher security. That is, the security of the resource data transmitted through the first session link and the second session link can be ensured. Then, after the server receives the target resource data sent by the first client through the first session link, no additional data verification on the target resource data may be required, and the target resource data may be directly sent to the second client through the second session link. Therefore, the server only needs to forward the target resource data, and does not need to carry out additional data verification, thereby being beneficial to improving the data transmission efficiency under the condition of ensuring the data security.
Based on the data transmission scheme based on the live broadcasting room and the data transmission system based on the live broadcasting room, the embodiment of the application provides another data transmission method based on the live broadcasting room. Referring to fig. 5, a flowchart of another data transmission method based on a live broadcast room according to an embodiment of the present application is provided. The live-room-based data transmission method shown in fig. 5 may be performed by the server and the terminal device shown in fig. 1, in which the client is operated. The data transmission method based on the live broadcasting room shown in fig. 5 may include the following steps:
s501, a server sends at least one resource data associated with a preset living broadcast room to a first client through a first session link.
In this embodiment of the present application, a specific manner in which the server sends, through the first session link, at least one resource data associated with the preset live broadcast room to the first client may be: the server performs format conversion processing on at least one resource data to obtain a resource session message, wherein the data format of the resource session message is a data format specified by a preset communication protocol, and the preset communication protocol refers to a communication protocol between a client and the server, which is agreed in advance; finally the server sends a resource session message to the first client over the first session link. It should be noted that, the specific embodiment of the format conversion process may refer to the specific embodiment of the format process in step S202, which is not described herein.
In addition, the embodiment of establishing the first session link in step S501 may refer to the embodiment of establishing the first session link in step S201, which is not described herein.
S502, the first client displays a live interface of a preset live broadcasting room.
In this embodiment of the present application, the live interface may include at least one resource data sent by a server and received by the first client. In particular, at least one resource data may be displayed in the live interface, or an icon, an identification, or the like for characterizing the respective resource data may be displayed; or play a voice or the like for indicating the respective resource data, which is not limited herein.
S503, the first client responds to the selection operation of the live interface and generates a resource data searching request.
In this embodiment of the present application, after receiving at least one resource data from the server, the first client may make each resource data in the at least one resource data correspond to an object identifier, where the resource data search request carries a target object identifier, where the target object identifier is an object identifier corresponding to the target resource data. Further, the object identifier may be a character, a number, a serial number, etc., which is not limited herein. The object identifier may be an object name such as "futures" or an encoding such as "0036".
When searching the target resource data, the first client side can directly search the target resource data by directly comparing whether the object identification corresponding to each resource data in the at least one resource data is the same as the target object identification without analyzing each resource data in the at least one resource data, thereby effectively improving the searching efficiency of the target resource data.
Optionally, since the selection operation selects icons or words displayed in the live interface, where the icons or words are often a field in the code, that is, an identifier, which indicates the corresponding resource data, the specific manner of generating the resource data search request in response to the selection operation may be: and acquiring a target object identifier of the resource data selected by the selection operation, and generating a resource data search request based on the target object identifier.
S504, the first client traverses at least one resource data, and if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier, the currently traversed resource data is determined to be the target resource data.
In this embodiment of the present application, the specific way of traversing the at least one resource data may be traversing the at least one resource data in a forward direction, traversing the at least one resource data in a reverse direction, and traversing the at least one resource data in a two-way direction (i.e. traversing both forward and reverse directions), which is not limited herein. In addition, the traversing at least one resource data, if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier, the specific manner of determining the currently traversed resource data as the target resource data may be: traversing at least one resource data, acquiring an object identifier corresponding to the currently traversed resource data, and determining the currently traversed resource data as target resource data if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier.
Optionally, after receiving at least one resource data from the server, the first client may perform data packaging processing on the resource data with respect to any one of the at least one resource data to obtain an object and object attribute information of the object, where the object attribute information may include an object identifier for identifying uniqueness of the object, a first pointer for indicating a next object traversing the object, and a second pointer for indicating a last object traversing the object.
Then, the at least one resource data is also respectively data-packed into at least one object, each object having its object attribute information. Therefore, the specific manner of determining the currently traversed resource data as the target resource data may be that the object identifier corresponding to the currently traversed resource data is the same as the target object identifier by the first client traversing at least one resource data: the first client forward traverses at least one object through the head pointer, and if the object identification of the forward traversed object currently traversed by the head pointer is different from the target object identification, the first pointer of the forward traversed object is determined to be pointed by the head pointer so as to traverse the next object of the forward traversed object; the first client side reversely traverses at least one object through the tail pointer, and if the object identification of the reverse traversing object traversed by the tail pointer at present is different from the target object identification, the tail pointer is determined to point to the second pointer of the reverse traversing object so as to traverse the last object of the reverse traversing object; and until the object identification is traversed to the object with the same object identification as the target object identification, the first client determines the resource data corresponding to the traversed object as target resource data.
Specifically, after the at least one resource data is subjected to the data packaging process respectively to obtain at least one object, the at least one object, that is, the at least one resource data, is traversed. Meanwhile, each object has own object attribute information, so that when any object can be traversed, the object attribute information of the currently traversed object can be quickly checked to compare whether the object identifier in the object attribute information of the currently traversed object is the same as the target object identifier. At this time, when at least one resource data is not required to be traversed, the step of obtaining the object identifier corresponding to the currently traversed resource data is also required to be executed, which is beneficial to further improving the searching efficiency. In addition, the searching efficiency of the target resource data can be doubled by traversing at least one object in the forward direction and the backward direction respectively through the head pointer and the tail pointer.
In one possible implementation manner, after receiving at least one resource data from the server, the first client may further perform data packaging processing on the resource data with respect to any one of the at least one resource data to obtain an object and object attribute information of the object, where the object attribute information includes an object identifier of the object and an object type of the object; then, the first client may further cluster at least one object to obtain at least one object set, where the object types of the objects in the same object set are the same.
The object type refers to a service type of a service to which the resource data corresponding to the object belongs. Illustratively, when the living room is a financial living room, since the data to the resource associated with the financial living room includes the financial product a under the fund service, the object type of the object obtained after the financial product a is data-packed is the fund.
At this time, the resource data search request may further carry a target object type, and if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier, the specific manner of determining the currently traversed resource data as the target resource data may be: and traversing the objects in the object set corresponding to the target object type by the first client, and determining the resource data corresponding to the currently traversed object as target resource data if the object identifier of the currently traversed object is the same as the target object identifier.
Optionally, when the first client performs data packaging processing on the resource data with respect to any one of the at least one resource data to obtain an object and object attribute information of the object, the object attribute information may include, in addition to an object identifier of the object and an object type of the object, a first pointer for indicating a next object traversing the object and a second pointer for indicating a last object traversing the object.
Then, the specific manner of determining the resource data corresponding to the currently traversed object as the target resource data may be that the first client traverses the object in the object set corresponding to the target object type, if the object identifier of the currently traversed object is the same as the target object identifier: the first client traverses at least one object in the object set corresponding to the target object type in the forward direction through the head pointer, and if the object identification of the forward direction traversed object traversed by the head pointer at present is different from the target object identification, the head pointer is determined to point to the first pointer of the forward direction traversed object so as to traverse the next object of the forward direction traversed object; the first client-side reversely traverses at least one object in the object set corresponding to the target object type through the tail pointer, and if the object identification of the reversely traversed object traversed by the tail pointer at present is different from the target object identification, the tail pointer is determined to point to the second pointer of the reversely traversed object so as to traverse the last object of the reversely traversed object; and until the object identification is traversed to the object with the same object identification as the target object identification, the first client determines the resource data corresponding to the traversed object as target resource data.
In particular implementations, at least one resource data may be traversed by creating an iterator. The client may wrap each resource data into an object, where the object attribute information of each object includes a tagId (i.e., object identification) for identifying the object's uniqueness, a next pointer (i.e., first pointer) for indicating that the next object is to be looked up, a pre pointer (i.e., second pointer) for indicating that the last object is to be looked up, and an aggregate class name class (i.e., object type) for indicating the service to which the object belongs.
After receiving the resource data search request, the client determines a target tagId carried by the resource data search request, then the client creates an iterator to traverse the at least one object, and when starting the traversal, the client may create bi-directional pointers (i.e., a head pointer and a tail pointer), then traverse the at least one object through the head pointer in a forward direction, and traverse the at least one object through the tail pointer in a reverse direction until either of the head pointer and the tail pointer traverses to an object having the tagId equal to the target tagId. If the tagId of the forward direction traversing object currently traversed by the head pointer is different from the target tagId, determining that the head pointer points to the next pointer of the forward direction traversing object so as to traverse the next object of the forward direction traversing object. If the tagId of the reverse traversal object currently traversed by the tail pointer is different from the target tagId, determining that the tail pointer points to the pre pointer of the reverse traversal object so as to traverse the last object of the reverse traversal object. And finally, the client determines the resource data corresponding to the object with the same tagId as the target resource data.
Optionally, after obtaining at least one object, the objects with the same aggregate class name class may be clustered to obtain at least one object set, where the aggregate class names of the objects in the same object set are the same. Then, after the client receives the resource data search request, it determines the target tagId and the target class carried by the resource data search request, then the client creates an iterator to traverse at least one object in the set of objects whose class is the same as the target class, when starting the traversing, the client creates a bi-directional pointer (i.e., a head pointer and a tail pointer), then traverses at least one object in the set of objects whose class is the same as the target class forward through the head pointer, and traverses at least one object in the set of objects whose class is the same as the target class backward through the tail pointer until any one of the head pointer and the tail pointer traverses to an object whose tagId is the same as the target tagId. And finally, the client determines the resource data corresponding to the object with the same tagId as the target resource data.
S505, the first client sends the target resource data and the second client identification of the second client to the server through the first session link.
In this embodiment of the present application, a specific manner in which the first client sends, through the first session link, the target resource data and the second client identifier of the second client to the server may be: the first client performs format conversion processing on the target resource data and the second client identifier to obtain a first session message, wherein the data format of the first session message is a data format specified by a preset communication protocol, and the preset communication protocol refers to a communication protocol between a client and a server which are agreed in advance; finally, the first client sends the session message to the server over the first session link. It should be noted that, the specific embodiment of the format conversion process may refer to the specific embodiment of the format process in step S202, which is not described herein.
S506, the server sends the target resource data to the second client through the second session link.
In this embodiment of the present application, the specific manner in which the server sends the target resource data to the second client through the second session link may be: the server determines a second client indicated by the second client identification; the server performs format conversion processing on the target resource data to obtain a second session message, wherein the data format of the second session message is a data format specified by a preset communication protocol, and the preset communication protocol refers to a communication protocol between a client and the server, which is agreed in advance; and finally, the server sends a second session message to the server through a second session link. It should be noted that, the specific embodiment of the format conversion process may refer to the specific embodiment of the format process in step S202, which is not described herein.
Alternatively, since the live component having the live function may be integrated in the application program corresponding to the first client in step S201, the session between the client and the server may be established through the client corresponding to the live component. Meanwhile, step S203 refers to that the data to be sent to other clients may also be subjected to format conversion by the live component to generate session messages in which the communication protocol between the client and the server supports transmission. The operation process of searching the target resource data in step S504 may also be implemented by the client corresponding to the live broadcast component, so that the live broadcast component is a program code including functions of creating a session between the client and the server, searching the target resource data, processing the target resource data to generate a session message, and the like, that is, the steps of data transmission and processing in the live broadcast process on the technical level may be encapsulated in the live broadcast component, and after any application integrates the live broadcast component in the application, only a manager is required to configure resource data associated with the live broadcast room, such as marketing products, activities, popup windows, advertisements, poster types, and the like, thereby greatly reducing development cost and development difficulty of developing live broadcast functions in the application.
In particular, referring to fig. 6, a schematic diagram of a communication process is shown. The communication protocol between the anchor client and the server, and between the viewer client and the server is fix protocol. The server provides financial data configuration templates, wherein data to be configured in the financial data configuration templates comprise a live broadcasting room ID, a live broadcasting function ID, a occupation map, a name, a label, a description, product content and the like, and a manager or a host can configure corresponding financial data (namely resource data associated with the live broadcasting room) in the financial data configuration templates of each live broadcasting room. That is, a live room corresponds to a financial data configuration template configured with at least one financial data. In this example, each live room identification and each financial data configuration template are stored in a server in correspondence.
When the anchor client creates the live broadcast room A (which can also be called anchor client multicast), authentication of the server to the anchor client is completed by sending a login message to the server, and a first session link between the anchor client and the server is established after the authentication is passed. The anchor client then sends a data acquisition message to the server over the first session link, wherein the data acquisition message includes the live room identification of live room a, as shown in fig. 6. Specifically, the live room identifier of the live room a may be a live room name, a live room ID, or the like, so that the server may obtain financial data configured in the financial data configuration template corresponding to the live room a.
After the server receives the data acquisition message, as each live broadcast room identifier and each financial data configuration template are correspondingly stored, the server can find the corresponding financial data configuration template according to the live broadcast room identifier and send at least one financial data included in the found financial data configuration template to the anchor client. Finally, as shown in fig. 6, the anchor client receives at least one financial data included in the financial data configuration template searched by the server according to the live broadcast room identification and sends the at least one financial data to the anchor client. Then, as shown in fig. 6, the anchor client performs data packaging processing on any one of the at least one financial data to obtain an object and an object identifier of the object. Then, the anchor client stores each obtained object and object identification thereof into an object set; wherein the object set comprises at least one object. Specifically, each object has four attributes, namely tagId (i.e., object identification), next pointer, pre pointer, and aggregate class name class.
Meanwhile, as shown in fig. 6, the anchor client also displays at least one financial data on the live interface of the live broadcast room a. After the anchor selects a certain financial data by clicking on the live broadcast interface and sends the financial data to the audience client, as shown in fig. 6, the anchor client may respond to the selection operation on the live broadcast interface to generate a resource data search request. The resource data searching request carries the target object identification. The target object identifier refers to an object identifier of an object obtained by packaging the selected financial data by the anchor. In particular, the resource data lookup request may carry the target tagID.
After generating the resource data lookup request, as shown in fig. 6, the anchor client triggers the iterator to traverse each object in the set of objects and determine the object with the same object identification as the target object. Specifically, the anchor client may find out, through the iterator, a target object with the same tagId as the target tagId.
After the target object is found, the anchor client needs to perform format conversion processing on the target financial data corresponding to the target object, so that the target financial data is packaged into a byte code which can be identified by the fix protocol, and therefore the target financial data needs to be loaded into a message body. As shown in fig. 6, the anchor client may determine whether there is a financial attribute value (i.e., the resource value mentioned in step S203) in the target financial data corresponding to the target object, and if there is a financial attribute value, may assign the financial attribute value to a specific tag field of the initial message body, so as to obtain a second message body; the initial message body consists of a plurality of characteristic tag fields and a plurality of custom fields. The data format of the initial message body is a data format supported by a preset communication protocol for transmission. Specifically, the preset communication protocol in this example is the fix protocol, and then the specific tag field is the specific tag field in the fix protocol.
Meanwhile, as shown in fig. 6, if there is no financial attribute value, the data type of the data except the financial attribute value in the target financial data may be converted into a basic data type, and assigned to the custom domain of the initial message body, so as to obtain the first message body. Specifically, in this example, the preset communication protocol is fix protocol, and the basic data type is the basic data type mentioned in step S204, which is not described herein.
In order to further ensure the reliability and the security of the financial data, as shown in fig. 6, digital signature processing may be performed on the first message body and the second message body respectively to obtain a first message body after digital signature and a second message body after digital signature, so as to obtain the target message body according to the first message body after digital signature and the second message body after digital signature.
Specifically, according to the first message body after digital signature and the second message body after digital signature, the obtaining the target message body may be to combine the first message body after digital signature and the second message body after digital signature to obtain the target message body.
Since it is mentioned in step S201 that a message should include a header, a body and a tail, finally, as shown in fig. 6, a session message is obtained by adding the header and the tail to the target body. Wherein the message header includes a client identification of the viewer client, the message trailer is used to distinguish between the session message and other session messages, and the message check.
Fig. 6, after obtaining the session message, the anchor client sends the session message to the server over a first session link between the anchor client and the server. The session message is then forwarded by the server to the server as shown in fig. 6. In particular, the server forwards the session message to the viewer client over a second session link between the viewer client and the server.
After receiving the session message, the viewer client analyzes the session message to obtain the target financial data, as shown in fig. 6. Finally, as shown in fig. 6, the spectator client may display the target financial data in the live interface of the live room a displayed by the terminal device running the spectator client.
In addition, in practical application, please refer to fig. 7, an interface schematic diagram of a live broadcast component is shown. As shown in interface 701, a financial live room component 702 with live functionality is accessed in an "AA cloud banking" application. The financial living room component 702 includes a plurality of living rooms, such as financial classroom, farm-assisted living room, etc. After logging in the account of the user in the application of the 'AA cloud banking', the user browses a plurality of financial living broadcast rooms in the application of the 'AA cloud banking', generates interest in the 'financial classroom' which hosts living broadcast of the 'M financial channel', clicks the 'financial classroom' living broadcast room in the financial living broadcast room component 702, and then can directly enter a living broadcast room interface as shown in an interface 703.
In addition to a living broadcast room for selling financial products such as funds like a living broadcast room for "financial class", a living broadcast room for internal training such as collective training for internal staff (e.g., insurance agency training), a living broadcast room for investment education such as analysis and advice guidance for investment financial education and market conditions, and a living broadcast room for campaign propaganda such as holiday and holiday, etc., may be included, which is not limited herein.
The account registered by the Ming in the "AA cloud banking" application is equivalent to the name, ID, etc. of the account registered by the client in the "AA cloud banking" application before the client is identified as the Ming. After clicking the "financial class" living broadcast room in the financial living broadcast room component 702, the "financial class" living broadcast room can be completely displayed and interacted with other clients in the "financial class" living broadcast room due to the need of receiving the resource data associated with the "financial class" living broadcast room; thus, before entering the live room interface, as shown by interface 703, the Ming's client will send a login message to the server to establish a session between the Ming's client and the server to receive the resource data associated with the "financial class" live room.
In addition, after the Xiaoming enters the living room of the financial class, besides watching living broadcast and sending bullet screens as shown in the interface 703, the living room can also include functions of a financial shelf (for displaying financial products pushed by a host of the living room), praying and floating hearts, living broadcast chat, living broadcast sharing (such as generating a sharing poster, etc.), and the like. Illustratively, referring to FIG. 8, a schematic interface diagram of a live room is shown. As shown in shelf 802 of interface 801, the "financial classroom" anchor "M financial channel" in the living room pushes to the audience a plurality of carefully selected financial products such as "structured deposit 2022456", "Li Lichang in 2300 enhancement", "Li Lichang in core mix". The mins select "structural deposit 2022456" from among a plurality of selected financial products and click "buy immediately" and purchase successfully. At this time, the Ming's client may determine, in response to the Ming's click operation, resource data about successful purchase of the financial product "structural deposit 2022456" as target resource data, and perform format conversion processing on the target resource data and the client identifier of the "M financial channel" anchor client, respectively, to generate a session message.
The Ming's client may then send a session message to the server through the session with the server. And then, the server sends the session message to the anchor client through the session with the anchor client. Finally, after receiving the session message, the anchor client may parse the session message to display information about "structural deposit 2022456" of successful financial products purchased by the anchor client in the live room interface, so that the anchor may grasp the real-time purchase condition of each financial product.
Alternatively, the resource data regarding successful purchase of the financial products "structural deposit 2022456" may be transmitted to all clients entering the living room in addition to the anchor client so that the anchor and all viewers in the living room can grasp the real-time purchase of each financial product.
In this embodiment of the present application, resource data is transmitted between a first client and a server through a first session link, resource data is transmitted between a second client and a server through a second session link, where the first session link is a session link established by the server after passing authentication of the first client, and the second session link is a session link established by the server after passing authentication of the second client, so that both the first session link and the second session link are authenticated sessions with higher security. That is, the security of the resource data transmitted through the first session link and the second session link can be ensured. Then, after the server receives the target resource data sent by the first client through the first session link, no additional data verification on the target resource data may be required, and the target resource data may be directly sent to the second client through the second session link. Therefore, the server only needs to forward the target resource data, and does not need to carry out additional data verification, thereby being beneficial to improving the data transmission efficiency. In addition, in the embodiment of the application, the searching efficiency of the data can be optimized by packing the resource data into the object, and the searching efficiency of the data is further improved by combining a bidirectional pointer to carry out traversal access on the object.
In addition, the live broadcast function in the embodiment of the application program can be integrated to the application program in a live broadcast component mode, the live broadcast component comprises program codes for creating a session link between the client and the server, searching target resource data, processing the target resource data to generate session information and the like, and therefore the application program integrated with the live broadcast component only needs a manager to configure resource data needed by a live broadcast room, and development cost and development difficulty of developing the live broadcast function in the application program are greatly reduced.
Based on the related description of the data transmission method based on the live broadcasting room, the application also discloses a data transmission device based on the live broadcasting room. The live room based data transmission means may be a computer program (comprising program code) running on one of the above mentioned computer devices. The data transmission device based on the living broadcasting room can execute the data transmission method based on the living broadcasting room as shown in fig. 2 and 5, please refer to fig. 9, the data transmission device based on the living broadcasting room at least can include: a receiving unit 901, a processing unit 902, and a transmitting unit 903.
The receiving unit 901 is configured to receive, through a first session link between the receiving unit and a server, at least one resource data associated with a preset live broadcast room sent by the server; wherein the first session link is established by the server after authentication of the first client is passed; the first client interacts with a second client through the preset live broadcasting room;
The processing unit 902 is configured to display a live interface of the preset live room, where the live interface includes the at least one resource data;
the processing unit 902 is further configured to select target resource data from the at least one resource data in response to a selection operation of the live interface;
the sending unit 903 is configured to send, through the first session link, the target resource data and a second client identifier of the second client to the server, so that the server sends, through a second session link, the target resource data to the second client indicated by the second client identifier, where the second session link is established by the server after authentication of the second client passes.
In one embodiment, each resource data in the at least one resource data corresponds to an object identifier;
the processing unit 902 may be further configured to, in response to a selection operation on the live interface, select target resource data from the at least one resource data, perform:
responding to the selection operation of the live broadcast interface, generating a resource data search request, wherein the resource data search request carries a target object identifier;
Traversing the at least one resource data, and if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier, determining the currently traversed resource data as the target resource data.
In yet another embodiment, the resource data lookup request further carries a target object type, and the processing unit 902 is further configured to perform:
for any resource data in the at least one resource data, carrying out data packaging processing on the resource data to obtain an object and object attribute information of the object, wherein the object attribute information comprises an object identifier of the object and an object type of the object;
clustering at least one object to obtain at least one object set, wherein the object types of the objects in the same object set are the same;
the processing unit 902 may be further configured to, when traversing the at least one resource data, determine the currently traversed resource data as the target resource data if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier, perform:
traversing the objects in the object set corresponding to the target object type, and determining the resource data corresponding to the currently traversed object as the target resource data if the object identification of the currently traversed object is the same as the target object identification
In yet another embodiment, the processing unit 902 may be further configured to perform:
for any resource data in the at least one resource data, carrying out data packaging processing on the resource data to obtain an object and object attribute information of the object, wherein the object attribute information comprises an object identifier of the object, a first pointer used for indicating traversing the next object of the object and a second pointer used for indicating traversing the last object of the object;
the processing unit 902 may be further configured to, when traversing the at least one resource data, determine the currently traversed resource data as the target resource data if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier, perform:
forward traversing at least one object through a head pointer, and if the object identifier of the forward traversing object currently traversed by the head pointer is different from the target object identifier, determining that the head pointer points to a first pointer of the forward traversing object so as to traverse the next object of the forward traversing object;
reversely traversing the at least one object through a tail pointer, and if the object identifier of the reversely traversed object currently traversed by the tail pointer is different from the target object identifier, determining that the tail pointer points to a second pointer of the reversely traversed object so as to traverse the last object of the reversely traversed object;
And until the object identification is traversed to the object with the same object identification as the target object identification, the first client determines the resource data corresponding to the traversed object as the target resource data.
In yet another embodiment, the receiving unit 901 is further configured to perform: receiving an identity identifier sent by the server and used for identifying the first client;
the processing unit 902 is further configured to perform: encrypting a first client identifier of the first client and the identity identifier through an authentication function to obtain a login message;
the sending unit 903 may be further configured to perform: and sending the login message to the server so that the server authenticates the first client through the authentication function and the login message, and after the authentication of the first client is passed, the server establishes a first session link with the first client.
In yet another embodiment, the server performs a locking process of the spin lock on the authentication function after the first session link is established;
the sending unit 903 may be further configured to perform: and before the first session is finished, sending a login message to the server again, so that the server deletes the login message received again from the first client when detecting that the authentication function is in a locked state.
In yet another embodiment, the sending unit 903 may be configured to, when sending the login message to the server, cause the server to perform authentication processing on the first client through the authentication function and the login message, and after authentication of the first client is passed, establish a first session link with the first client, where the first session link is specifically configured to perform:
the login message is sent to the server, so that the server authenticates the first client through the authentication function and the login message, after the first client passes through authentication, the server acquires the first client identifier and the identity identifier, searches session configuration data matched with the first client identifier and the identity identifier from a preset database, and analyzes the session configuration data to obtain session parameters for indicating the first session link;
the receiving unit 901 is further configured to perform: and receiving the session parameters sent by the server to establish the first session link.
According to one embodiment of the present application, the steps involved in the methods shown in fig. 2 and 5 may be performed by the units in the live room-based data transmission device shown in fig. 9. For example, step S201 shown in fig. 2 may be performed by the receiving unit 901 in the live broadcast-based data transmission apparatus shown in fig. 9; step S202 may be performed by the processing unit 902 in the live room-based data transmission apparatus shown in fig. 9; step S203 may be performed by the transmitting unit 903 in the live-room-based data transmission apparatus shown in fig. 9. For another example, the receiving unit 901 in the data transmission apparatus based on the living broadcasting room may receive at least one resource data transmitted by the server in step S501 shown in fig. 5; steps S502 to S504 shown in fig. 5 may be performed by the processing unit 902 in the live-room-based data transmission apparatus shown in fig. 9; step S505 may be performed by the transmitting unit 903 in the live-room-based data transmission apparatus shown in fig. 9.
According to another embodiment of the present application, each unit in the data transmission device based on the live broadcasting room shown in fig. 9 is divided based on a logic function, and each unit may be respectively or completely combined into one or several other units, or some (some) of the units may be further split into a plurality of units with smaller functions to form the unit, which may achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. In other embodiments of the present application, the data transmission device based on the live broadcast room may also include other units, and in practical applications, these functions may also be implemented with assistance of other units, and may be implemented by cooperation of multiple units.
According to another embodiment of the present application, a data transmission apparatus based on a living room as shown in fig. 9, and a data transmission method based on a living room of the present application may be implemented by running a computer program (including program code) capable of executing steps involved in the method as shown in fig. 2 or fig. 5 on a general-purpose computing device such as a computer device including a Central Processing Unit (CPU), a random access storage medium (RAM), a read only storage medium (ROM), and the like, and a storage element. The computer program may be recorded on, for example, a computer storage medium, and loaded into and run in the above-described computer apparatus through the computer storage medium.
In this embodiment of the present application, resource data is transmitted between a first client and a server through a first session link, resource data is transmitted between a second client and a server through a second session link, where the first session link is a session link established by the server after passing authentication of the first client, and the second session link is a session link established by the server after passing authentication of the second client, so that both the first session link and the second session link are authenticated session links with higher security. That is, the security of the resource data transmitted through the first session link and the second session link can be ensured. Then, after the server receives the target resource data sent by the first client through the first session link, no additional data verification on the target resource data may be required, and the target resource data may be directly sent to the second client through the second session link. Therefore, the server only needs to forward the target resource data, and does not need to carry out additional data verification, thereby being beneficial to improving the data transmission efficiency under the condition of ensuring the data security.
Based on the method embodiment and the device embodiment, the application also provides electronic equipment. Referring to fig. 10, a schematic structural diagram of an electronic device according to an embodiment of the present application is provided. The electronic device shown in fig. 10 may include at least a processor 1001, an input interface 1002, an output interface 1003, and a computer storage medium 1004. Wherein the processor 1001, input interface 1002, output interface 1003, and computer storage medium 1004 may be connected by a bus or other means.
The computer storage medium 1004 may be stored in a memory of the electronic device, the computer storage medium 1004 for storing a computer program comprising program instructions, and the processor 1001 for executing the program instructions stored by the computer storage medium 1004. The processor 1001 (or CPU (Central Processing Unit, central processing unit)) is a computing core and a control core of the electronic device, which are adapted to implement one or more instructions, in particular to load and execute one or more instructions to implement the above-mentioned live-room-based data transmission method flow or corresponding functions.
The embodiment of the application also provides a computer storage medium (Memory), which is a Memory device in the electronic device and is used for storing programs and data. It will be appreciated that the computer storage medium herein may include both a built-in storage medium in the terminal and an extended storage medium supported by the terminal. The computer storage medium provides a storage space that stores an operating system of the terminal. Also stored in this memory space are one or more instructions, which may be one or more computer programs (including program code), adapted to be loaded and executed by the processor 1001. Note that the computer storage medium may be a high-speed random access memory (random access memory, RAM) or a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory; optionally, at least one computer storage medium remote from the processor may be present.
In one embodiment, one or more instructions stored in a computer storage medium may be loaded and executed by the processor 1001 to implement the corresponding steps of the methods described above in connection with the live-room-based data transmission method embodiments of fig. 2 and 5, and in a specific implementation, the one or more instructions in the computer storage medium are loaded and executed by the processor 1001 to:
the processor 1001 receives at least one resource data associated with a preset living room sent by a server through a first session link with the server, wherein the first session link is established after the server passes authentication of the first client, and the first client interacts with a second client through the preset living room;
the processor 1001 displays a live interface of the preset live room, where the live interface includes the at least one resource data;
the processor 1001 selects target resource data from the at least one resource data in response to a selection operation of the live interface;
the processor 1001 sends the target resource data and the second client identifier of the second client to the server through the first session link, so that the server sends the target resource data to the second client indicated by the second client identifier through a second session link, where the second session link is established by the server after passing the authentication of the second client.
In one embodiment, each resource data in the at least one resource data corresponds to an object identifier; the processor 1001, in response to a selection operation on the live interface, is further configured to, when selecting target resource data from the at least one resource data:
responding to the selection operation of the live broadcast interface, generating a resource data search request, wherein the resource data search request carries a target object identifier;
traversing the at least one resource data, and if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier, determining the currently traversed resource data as the target resource data.
In one embodiment, the resource data lookup request further carries a target object type, and the processor 1001 is further configured to perform:
for any resource data in the at least one resource data, carrying out data packaging processing on the resource data to obtain an object and object attribute information of the object, wherein the object attribute information comprises an object identifier of the object and an object type of the object;
clustering at least one object to obtain at least one object set, wherein the object types of the objects in the same object set are the same;
The processor 1001 may be further configured to, when traversing the at least one resource data, determine the currently traversed resource data as the target resource data if an object identifier corresponding to the currently traversed resource data is the same as the target object identifier, specifically perform:
traversing the objects in the object set corresponding to the target object type, and if the object identification of the currently traversed object is the same as the target object identification, determining the resource data corresponding to the currently traversed object as the target resource data.
In one embodiment, the processor 1001 is further operable to perform:
for any resource data in the at least one resource data, carrying out data packaging processing on the resource data to obtain an object and object attribute information of the object, wherein the object attribute information comprises an object identifier of the object, a first pointer used for indicating traversing the next object of the object and a second pointer used for indicating traversing the last object of the object;
the processor 1001 may be further configured to, when traversing the at least one resource data, determine the currently traversed resource data as the target resource data if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier, specifically perform:
Forward traversing at least one object through a head pointer, and if the object identifier of the forward traversing object currently traversed by the head pointer is different from the target object identifier, determining that the head pointer points to a first pointer of the forward traversing object so as to traverse the next object of the forward traversing object;
reversely traversing the at least one object through a tail pointer, and if the object identifier of the reversely traversed object currently traversed by the tail pointer is different from the target object identifier, determining that the tail pointer points to a second pointer of the reversely traversed object so as to traverse the last object of the reversely traversed object;
and until the object identification is traversed to the object with the same object identification as the target object identification, the first client determines the resource data corresponding to the traversed object as the target resource data.
In one embodiment, the processor 1001 is further operable to perform:
receiving an identity identifier sent by the server and used for identifying the first client;
encrypting a first client identifier of the first client and the identity identifier through an authentication function to obtain a login message;
and sending the login message to the server so that the server authenticates the first client through the authentication function and the login message, and after the authentication of the first client is passed, the server establishes a first session link with the first client.
In one embodiment, the server performs a locking process of the spin lock on the authentication function after the first session link is established;
the processor 1001 may be further configured to perform:
and before the first session link is finished, sending a login message to the server again, so that the server deletes the login message received again from the first client when detecting that the authentication function is in a locked state.
In one embodiment, the processor 1001 is configured to, when sending the login message to the server, cause the server to perform authentication processing on the first client through the authentication function and the login message, and after authentication of the first client is passed, establish a first session link with the first client, and specifically be configured to perform:
the login message is sent to the server, so that the server authenticates the first client through the authentication function and the login message, after the first client passes through authentication, the server acquires the first client identifier and the identity identifier, searches session configuration data matched with the first client identifier and the identity identifier from a preset database, and analyzes the session configuration data to obtain session parameters for indicating the first session link;
The processor 1001 is further configured to perform:
and receiving the session parameters sent by the server to establish the first session link.
In this embodiment of the present application, resource data is transmitted between a first client and a server through a first session link, resource data is transmitted between a second client and a server through a second session link, where the first session link is a session link established by the server after passing authentication of the first client, and the second session link is a session link established by the server after passing authentication of the second client, so that both the first session link and the second session link are authenticated session links with higher security. That is, the security of the resource data transmitted through the first session link and the second session link can be ensured. Then, after the server receives the target resource data sent by the first client through the first session link, no additional data verification on the target resource data may be required, and the target resource data may be directly sent to the second client through the second session link. Therefore, the server only needs to forward the target resource data, and does not need to carry out additional data verification, thereby being beneficial to improving the data transmission efficiency under the condition of ensuring the data security.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium and executes the computer instructions to cause the electronic device to perform the method embodiments described above and illustrated in fig. 2 and 5. The computer readable storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The data transmission method based on the live broadcasting room in the embodiment of the invention is mainly exemplified by the financial field, and the data transmission method based on the live broadcasting room in the embodiment of the invention can be applied to other scenes and fields needing live broadcasting, and is not limited in the invention.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A live broadcast room-based data transmission method, comprising:
the method comprises the steps that a first client receives at least one resource data which is sent by a server and is associated with a preset living broadcast room through a first session link between the first client and the server, wherein the first session link is established after the server passes authentication of the first client, and the first client interacts with a second client through the preset living broadcast room;
the first client displays a live broadcast interface of the preset live broadcast room, wherein the live broadcast interface comprises the at least one resource data;
the first client responds to the selection operation of the live interface and selects target resource data from the at least one resource data;
the first client sends the target resource data and a second client identifier of the second client to the server through the first session link, so that the server sends the target resource data to the second client indicated by the second client identifier through a second session link, and the second session link is established after the server passes the authentication of the second client.
2. The method of claim 1, wherein each of the at least one resource data corresponds to an object identifier;
the first client selecting target resource data from the at least one resource data in response to the selection operation of the live interface, including:
the first client responds to the selection operation of the live broadcast interface to generate a resource data search request, wherein the resource data search request carries a target object identifier;
and the first client traverses the at least one resource data, and if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier, the currently traversed resource data is determined to be the target resource data.
3. The method of claim 2, wherein the resource data lookup request further carries a target object type, the method further comprising:
the first client performs data packaging processing on the resource data aiming at any one of the at least one resource data to obtain an object and object attribute information of the object, wherein the object attribute information comprises an object identifier of the object and an object type of the object;
The first client clusters at least one object to obtain at least one object set, wherein the object types of the objects in the same object set are the same;
the first client traverses the at least one resource data, and if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier, the currently traversed resource data is determined to be the target resource data, including:
and traversing the object in the object set corresponding to the target object type by the first client, and determining the resource data corresponding to the currently traversed object as the target resource data if the object identifier of the currently traversed object is the same as the target object identifier.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
the first client performs data packaging processing on the resource data aiming at any one of the at least one resource data to obtain an object and object attribute information of the object, wherein the object attribute information comprises an object identifier of the object, a first pointer used for indicating traversing of a next object of the object and a second pointer used for indicating traversing of a last object of the object;
The first client traverses the at least one resource data, and if the object identifier corresponding to the currently traversed resource data is the same as the target object identifier, the currently traversed resource data is determined to be the target resource data, including:
the first client traverses at least one object in the forward direction through a head pointer, and if the object identification of the forward direction traversed object currently traversed by the head pointer is different from the target object identification, the head pointer is determined to point to the first pointer of the forward direction traversed object so as to traverse the next object of the forward direction traversed object;
the first client traverses the at least one object reversely through a tail pointer, and if the object identification of the reverse traversing object currently traversed by the tail pointer is different from the target object identification, the tail pointer is determined to point to a second pointer of the reverse traversing object so as to traverse the last object of the reverse traversing object;
and until the object identification is traversed to the object with the same object identification as the target object identification, the first client determines the resource data corresponding to the traversed object as the target resource data.
5. The method according to claim 1, wherein the method further comprises:
The first client receives an identity identifier sent by the server and used for identifying the first client;
the first client encrypts a first client identifier and the identity identifier of the first client through an authentication function to obtain a login message;
the first client sends the login message to the server so that the server authenticates the first client through the authentication function and the login message, and after the first client is authenticated, the server establishes a first session link with the first client.
6. The method of claim 5, wherein the server performs a spin-lock locking process on the authentication function after the first session link is established, the method further comprising:
and the first client sends a login message to the server again before the first session link is finished, so that the server deletes the login message from the first client which is received again when the authentication function is detected to be in a locking state.
7. The method of claim 5, wherein the first client sending the login message to the server to cause the server to authenticate the first client via the authentication function and the login message, and wherein after authenticating the first client, the server establishes a first session link with the first client, comprising:
The first client sends the login message to the server so that the server authenticates the first client through the authentication function and the login message, after the first client passes through authentication, the server acquires the first client identifier and the identity, the server searches session configuration data matched with the first client identifier and the identity from a preset database, and the server analyzes the session configuration data to obtain session parameters for indicating the first session link;
the first client receives the session parameters sent by the server to establish the first session link.
8. The data transmission device based on the live broadcasting room is characterized by comprising a receiving unit, a processing unit and a sending unit, wherein:
the receiving unit is configured to receive, through a first session link with a server, at least one resource data associated with a preset live broadcast room sent by the server, where the first session link is established after authentication of the first client by the server, and the first client interacts with a second client through the preset live broadcast room;
The processing unit is configured to display a live broadcast interface of the preset live broadcast room, where the live broadcast interface includes the at least one resource data
The processing unit is further used for responding to the selection operation of the live broadcast interface and selecting target resource data from the at least one resource data;
the sending unit is configured to send, by using the first session link, the target resource data and a second client identifier of the second client to the server, so that the server sends, by using the second session link, the target resource data to the second client indicated by the second client identifier, where the second session link is established by the server after authentication of the second client passes.
9. A computer device, comprising:
a processor adapted to implement one or more computer programs;
computer storage medium storing one or more computer programs adapted to be loaded by the processor and to perform the live-room based data transmission method according to any of claims 1-7.
10. A computer storage medium, characterized in that the computer storage medium stores one or more computer programs adapted to be loaded by a processor and to perform the live-room based data transmission method according to any of claims 1-7.
11. A computer program product, characterized in that the computer program product comprises a computer program adapted to be loaded by a processor and to perform the live room-based data transmission method according to any one of claims 1-7.
CN202211154821.1A 2022-09-21 2022-09-21 Data transmission method based on live broadcasting room, related equipment and storage medium Pending CN117793168A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211154821.1A CN117793168A (en) 2022-09-21 2022-09-21 Data transmission method based on live broadcasting room, related equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211154821.1A CN117793168A (en) 2022-09-21 2022-09-21 Data transmission method based on live broadcasting room, related equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117793168A true CN117793168A (en) 2024-03-29

Family

ID=90400473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211154821.1A Pending CN117793168A (en) 2022-09-21 2022-09-21 Data transmission method based on live broadcasting room, related equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117793168A (en)

Similar Documents

Publication Publication Date Title
US10976923B2 (en) Enhanced virtual keyboard
US11386050B2 (en) Activity verification using a distributed database
US9904469B2 (en) Keyboard stream logging
US9888074B1 (en) Method, web browser and system for co-browsing online content
CN113711536A (en) Extracting data from a blockchain network
CN109521956B (en) Cloud storage method, device, equipment and storage medium based on block chain
US10768810B2 (en) Enhanced keyboard including multiple application execution
JP2021530011A (en) Peer-to-peer money transfer
JP2017501645A (en) Apparatus and method for supporting relationships associated with content provisioning
CN114020378A (en) Method and system for processing digital components
CN112613877B (en) Intelligent contract triggering method and device applied to block chain network and related equipment
US20220337562A1 (en) Connecting Web Publisher Inventory to Programmatic Exchanges without Third-Party Cookies
CN113129008A (en) Data processing method and device, computer readable medium and electronic equipment
CN113191902A (en) Transaction processing method and device based on block chain, electronic equipment and medium
KR100786951B1 (en) System and method for interactive home shopping system using moving picture
US11663346B2 (en) Methods and systems for facilitating joint submissions
US20160239641A1 (en) Method and System for Scan and Matching Media for Streaming Authorization
CN117793168A (en) Data transmission method based on live broadcasting room, related equipment and storage medium
US20230055835A1 (en) Systems and Methods for Using a Non-Fungible Digital Asset to Facilitate Accessing an Access-Restricted Resource
US11757891B1 (en) Using a host application to authorize a user of a client device to perform an action within a guest application
CN107888951A (en) Piece menu manager method, apparatus and server
Facebook Tech Note: Shader Snippets for Efficient 2D Dithering | Oculus
CN112261040A (en) Online audio and video anti-theft method and system
US10079794B2 (en) Generating a content item based on user information maintained by a first online system for present on a second online system
JP2017528784A (en) User / interaction association via media gateway

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