CN112689169A - Service playing method and device - Google Patents

Service playing method and device Download PDF

Info

Publication number
CN112689169A
CN112689169A CN202011518801.9A CN202011518801A CN112689169A CN 112689169 A CN112689169 A CN 112689169A CN 202011518801 A CN202011518801 A CN 202011518801A CN 112689169 A CN112689169 A CN 112689169A
Authority
CN
China
Prior art keywords
component
signal
service
playing
service component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011518801.9A
Other languages
Chinese (zh)
Other versions
CN112689169B (en
Inventor
施为
王磊泰
李京
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Original Assignee
Hunan Happly Sunshine Interactive Entertainment Media 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 Hunan Happly Sunshine Interactive Entertainment Media Co Ltd filed Critical Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority to CN202011518801.9A priority Critical patent/CN112689169B/en
Publication of CN112689169A publication Critical patent/CN112689169A/en
Application granted granted Critical
Publication of CN112689169B publication Critical patent/CN112689169B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application provides a service playing method and a device, wherein a playing component generates a playing signal, routes the playing signal, triggers a dependent component of the playing signal to execute a first operation, continues to transmit the playing signal after the first operation is executed, triggers an associated component to transmit the playing signal and execute the first operation, and executes a service playing operation and destroys the playing signal when the playing signal is transmitted to the playing component. Wherein the first operation comprises: and acquiring shared data related to the to-be-processed transaction of the service component in the shared channel based on the shared data protocol object injected into the service component, processing the to-be-processed transaction based on the shared data, and sharing the processed processing result to the shared channel. According to the method and the device, the play signal is routed, the association component and the dependence component of the play signal are triggered to perform transaction processing, and the service logic of the service component is controlled to be operated only in the component, so that decoupling among the service components is realized.

Description

Service playing method and device
Technical Field
The present application relates to the field of network video playing, and in particular, to a service playing method and apparatus.
Background
With the development of network communication technology and multimedia technology, more and more people play video services through terminal applications on terminal devices by using terminal devices such as smart phones, notebook computers, tablet computers and the like. The terminal application needs to be realized by matching a plurality of service components when playing the video service, and service data needs to be exchanged among the service components.
In the prior art, a certain service component acquires related service data of other service components, an object of a component on which the service component depends needs to be injected into a constructor of the service component in advance, and then the related service data is acquired through the injected object, so that strong association exists among the service components, when a certain service component needs to be repaired, the other service components become unavailable, and a large amount of time needs to be spent on debugging, thereby increasing the difficulty and cost of maintenance.
Disclosure of Invention
The application provides a service playing method and a service playing device, and aims to solve the problems that strong association relations exist among service components, when a certain service component needs to be repaired, other service components become unavailable, a large amount of time needs to be spent for debugging, and therefore the maintenance difficulty and cost are increased.
In order to achieve the above object, the present application provides the following technical solutions:
a service playing method comprises the following steps:
the playing component generates a playing signal; the playing component is a first service component in the component queue; a plurality of service components are arranged in the component queue, and the arrangement sequence of each service component in the component queue is determined according to a pre-stored configuration file;
the playing component sends the playing signal to a service component behind the playing component in the component queue; each service component except the playing component in the component queue receives the playing signal sent by the previous service component;
determining that a service component which currently receives the playing signal is a target service component, judging whether the target service component is a dependent component of the playing signal, if so, executing a first operation, transmitting the playing signal to a next service component of the target service component after the first operation is executed, if not, directly transmitting the playing signal to the next service component of the target service component, and executing the first operation when the target service component is judged to be a related component of the playing signal; the first operation includes: acquiring shared data related to a to-be-processed transaction of the target service component in a shared channel based on a shared data protocol object injected into the target service component in advance, processing the to-be-processed transaction based on the acquired shared data to obtain a processing result, and sharing the processing result to the shared channel;
the next service component of the last service component in the component queue is the playing component;
and when the playing assembly receives the playing signal sent by the last service assembly in the assembly queue, executing service playing operation and destroying the playing signal.
Optionally, in the foregoing method, if the target service component is a dependent component of the play signal, before the target service component performs the first operation, the method further includes:
judging whether the target business component has a dependent component or not;
if the target business component has a dependent component, taking the target business component as a first business component, suspending a current signal by the first business component, and generating a new first signal; the current signal is a playing signal or a first signal;
the first service component transmits a current first signal to a subsequent service component of the first service component; each service component in the component queue receives the first signal transmitted by the previous service component, and the first service component in the component queue receives the first signal transmitted by the last service component;
determining that a service component currently receiving the first signal is a second service component, determining whether the second service component is a dependent component of the first signal, if the second service component is the dependent component of the first signal, determining whether the second service component has a dependent component, if the second service component has a dependent component, using the second service component as a new first service component, and based on the new first service component, returning to the step of executing the first service component to suspend the current signal and generate a new first signal, if the second service component does not have a dependent component, executing the first operation, and after the first operation is executed, transmitting the first signal to a subsequent service component of the second service component, if the second service component is not the dependent component of the first signal, directly transmitting the first signal to a subsequent component of the second service component, and executing the first operation when the second service component is judged to be the associated component of the first signal;
when each first service assembly receives the first signal sent by the previous service assembly, each first service assembly destroys the currently received first signal and restores the playing signal or the first signal which is suspended before suspending itself.
Optionally, the method for determining whether the target service component is a dependent component of the playing signal includes:
acquiring attribute information of the playing signal; the attribute information comprises a component identifier of a playing signal dependent component;
judging whether the component identifier of the playing signal dependent component contained in the attribute information is the same as the component identifier of the target service component;
if the target service component is the same as the playing signal, judging that the target service component is a dependent component of the playing signal;
and if not, judging that the target service component is not the dependent component of the playing signal.
Optionally, in the method, the attribute information further includes a component identifier of a component associated with a broadcast signal, and the determining that the target service component is the component associated with the broadcast signal includes:
judging whether the component identifier of the playing signal association component contained in the attribute information is the same as the component identifier of the target service component;
if the target service component is the same as the playing signal, the target service component is judged to be the related component of the playing signal.
Optionally, in the foregoing method, the playing component executes a service playing operation, including:
based on a shared data protocol object injected into the playing component in advance, obtaining shared data related to a service to be played in a shared channel; the service to be played is associated with the playing signal;
and playing the service to be played based on the shared data related to the service to be played.
The foregoing method, optionally, the storing process of the configuration file includes:
after a terminal application is started, sending a configuration file acquisition request to a cloud end;
when a configuration file corresponding to the configuration file acquisition request fed back by the cloud is received, downloading the configuration file, and judging whether version information contained in the configuration file is consistent with version information of the terminal application;
if the configuration files are consistent, storing the configuration files;
and if the configuration file request is inconsistent with the version information of the terminal application, returning to the step of sending the configuration file request to the cloud end until the times of sending the configuration file acquisition request are greater than a threshold value or the version information contained in the configuration file fed back by the cloud end is consistent with the version information of the terminal application.
A service playback apparatus, comprising:
the first generating unit is used for generating a playing signal by the playing component; the playing component is a first service component in the component queue; a plurality of service components are arranged in the component queue, and the arrangement sequence of each service component in the component queue is determined according to a pre-stored configuration file;
a sending unit, configured to send the playing signal to a service component subsequent to the playing component in the component queue by the playing component; each service component except the playing component in the component queue receives the playing signal sent by the previous service component;
a first determining unit, configured to determine that a service component currently receiving the play signal is a target service component, determine whether the target service component is a dependent component of the play signal, if yes, execute a first operation, and after the first operation is executed, transmit the play signal to a subsequent service component of the target service component, if not, directly transmit the play signal to the subsequent service component of the target service component, and when it is determined that the target service component is an associated component of the play signal, execute the first operation; the first operation includes: acquiring shared data related to a to-be-processed transaction of the target service component in a shared channel based on a shared data protocol object injected into the target service component in advance, processing the to-be-processed transaction based on the acquired shared data to obtain a processing result, and sharing the processing result to the shared channel; the next service component of the last service component in the component queue is the playing component;
and the first destroying unit is used for executing service playing operation and destroying the playing signal when the playing component receives the playing signal sent by the last service component in the component queue.
Optionally, the apparatus described above, if the target service component is a dependent component of the broadcast signal, further includes:
the second judging unit is used for judging whether the target business component has a dependent component or not;
a second generating unit, configured to, if the target service component has a dependent component, use the target service component as a first service component, where the first service component suspends a current signal and generates a new first signal; the current signal is a playing signal or a first signal;
a transfer unit, configured to transfer, by the first service component, a current first signal to a subsequent service component of the first service component; each service component in the component queue receives the first signal transmitted by the previous service component, and the first service component in the component queue receives the first signal transmitted by the last service component;
a third determining unit, configured to determine that a service component currently receiving the first signal is a second service component, determine whether the second service component is a dependent component of the first signal, if the second service component is a dependent component of the first signal, determine whether the second service component has a dependent component, if the second service component has a dependent component, take the second service component as a new first service component, and based on the new first service component, return to execute the first service component to suspend the current signal and generate a new first signal, if the second service component does not have a dependent component, execute the first operation, and after the first operation is executed, transmit the first signal to a subsequent service component of the second service component, if the second service component is not a dependent component of the first signal, directly transmitting the first signal to a subsequent component of the second service component, and executing the first operation when the second service component is judged to be the associated component of the first signal;
and the second destroying unit is used for destroying the currently received first signal and recovering the playing signal or the first signal which is suspended before the first service assembly is suspended when the first service assembly receives the first signal sent by the previous service assembly.
Optionally, in the apparatus described above, the first determining unit is configured to perform determination whether the target service component is a dependent component of the broadcast signal, and is configured to:
acquiring attribute information of the playing signal; the attribute information comprises a component identifier of a playing signal dependent component;
judging whether the component identifier of the playing signal dependent component contained in the attribute information is the same as the component identifier of the target service component;
if the target service component is the same as the playing signal, judging that the target service component is a dependent component of the playing signal;
and if not, judging that the target service component is not the dependent component of the playing signal.
Optionally, in the apparatus described above, the attribute information further includes a component identifier of a broadcast signal association component, and the first determining unit performs the determination that the target service component is the broadcast signal association component, and is configured to:
judging whether the component identifier of the playing signal association component contained in the attribute information is the same as the component identifier of the target service component;
if the target service component is the same as the playing signal, the target service component is judged to be the related component of the playing signal.
Compared with the prior art, the method has the following advantages:
the application provides a service playing method and a device, wherein the method comprises the following steps: the playing assembly generates a playing signal, the playing assembly sends the playing signal to the next service assembly of the playing assembly in the assembly queue, each service assembly except the playing assembly in the assembly queue receives the playing signal sent by the previous service assembly, when the target service assembly is a dependent assembly of the playing signal, wherein, the target service component is a service component which currently receives the playing signal, the target service component acquires shared data related to the to-be-processed transaction of the target service component in the shared channel based on a shared data protocol object injected into the target service component, and based on the acquired shared data, processing the transaction to be processed, sharing the processing result to the sharing channel, and transmitting the playing signal to the next service component of the target service component after sharing the processing result to the sharing channel; when the target service component is not a dependent component of a playing signal, transmitting the playing signal to a subsequent service component of the target service component, and when the target service component is an associated component of the playing signal, the target service component acquires shared data related to a to-be-processed transaction of the target service component in a shared channel based on a shared data protocol object injected into the target service component, processes the to-be-processed transaction based on the acquired shared data, and shares a processing result of the processing to the shared channel; when the playing signal is transmitted to the playing component, the playing component executes the service playing operation and destroys the playing signal. The method and the device trigger the association component and the dependence component of the playing signal to perform transaction processing through transmission of the playing signal, and each service component acquires shared data from the shared channel to perform transaction processing based on the shared data protocol object, so that service logic of the service component is only operated in the component, and decoupling among the service components is realized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method of a service playing method provided in the present application;
fig. 2 is a flowchart of another method of a service playing method provided in the present application;
fig. 3 is a flowchart of another method of a service playing method provided in the present application;
fig. 4 is a flowchart of another method of a service playing method provided in the present application;
fig. 5 is an exemplary diagram of a service playing method provided in the present application;
fig. 6 is a diagram illustrating a service playing method according to another embodiment of the present disclosure;
fig. 7 is a diagram of another example of a service playing method provided in the present application;
fig. 8 is a diagram illustrating a service playing method according to another embodiment of the present application;
fig. 9 is a diagram of another example of a service playing method provided in the present application;
fig. 10 is a schematic structural diagram of a service playing apparatus provided in the present application;
fig. 11 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
An execution main body of the service playing method provided by the embodiment of the present application may be a terminal application running on a terminal, and a flowchart of the service playing method is shown in fig. 1, and specifically includes:
s101, the playing component generates playing signals.
The playing component generates a playing signal, wherein the playing component is a first service component in a component queue, and a plurality of service components are arranged in the component queue.
It should be noted that, in the process of generating the play signal, the play component injects the shared data protocol object into the play signal and carries the shared data protocol object to open the route, that is, in the process of transmitting the play signal, the play component carries the shared data protocol object to transmit the play signal.
It should be noted that, the playing component determines the attribute information of the playing signal to be generated based on the signal protocol, and generates the playing signal based on the attribute information of the playing signal to be generated. The protocol description of the signal protocol is shown in table 1:
Figure BDA0002848835300000081
table 1 signal protocol description
In the method provided by the embodiment of the present application, the arrangement order of each service component in the component queue is determined according to a pre-stored configuration file, that is, the arrangement order of each service component in the component queue is determined according to a routing order in the configuration file, where the routing order is used to describe the arrangement order of each service component. It should be noted that, when the routing sequence in the configuration file changes, the arrangement sequence of each service component in the component queue also changes, so that after the terminal application is online, the arrangement sequence of each service component in the component queue can be dynamically adjusted, thereby implementing differentiated delivery operation and improving user experience.
It should be noted that, after the play signal is generated, the play signal is added to the signal pool of the play service component.
S102, the playing component sends the playing signal to the next service component of the playing component in the component queue.
And after the playing component generates a playing signal, transmitting the playing signal to the next service component of the playing signal in the component queue.
Each service component except the playing component in the component queue receives a playing signal sent by the previous service component, and the playing service component receives the playing signal sent by the last service component in the component queue, namely, each service component in the component queue forms a closed loop circuit for signal transmission.
S103, determining the service component which currently receives the playing signal as a target service component.
And in the transmission process of the playing signal, confirming the service components which currently receive the playing signal except the playing component as target service components.
And S104, judging whether the target service component is a dependent component for playing the signal.
The target service component determines whether the target service component is a dependent component for playing the signal, that is, in the transmission process of the playing signal, it determines whether the service component currently receiving the playing signal except the playing component is a dependent component for playing the signal.
In the method provided in this embodiment of the present application, whether the target service component is a dependent component of the broadcast signal is determined based on the attribute information of the broadcast signal, if it is determined that the target service component is the dependent component of the broadcast signal, step S105 is executed, and if it is determined that the target service component is not the dependent component of the broadcast signal, step S106 is executed.
S105, judging whether the target business component has a dependent component.
In the method provided by the embodiment of the application, whether a dependent component exists in the target service component is judged based on the configuration file, that is, whether the dependent component exists in the target service component for processing the to-be-processed transaction is judged. Wherein, the configuration file stores the relevant field for explaining whether each business component has the dependent component.
If the target business component has a dependent component, step S107 is executed, and if the target business component does not have a dependent component, step S108 is executed.
S106, judging whether the target service assembly is the related assembly of the playing signal.
The target service component determines whether the target service component is a related component of the playing signal, that is, in the transmission process of the playing signal, it determines whether the service component currently receiving the playing signal except the playing component is a dependent component of the playing signal.
In the method provided in this embodiment of the present application, it is determined whether the target service component is a related component of the broadcast signal based on the attribute information of the broadcast signal, if it is determined that the target service component is the related component of the broadcast signal, step S109 is executed, and if it is determined that the target service component is not the related component of the broadcast signal, step S110 is executed.
S107, the target business component is taken as a first business component.
And if the target business component has the dependent component, the target business component is the first business component.
S108, the target service assembly executes the first operation, and transmits the playing signal to the next service assembly of the target service assembly after the first operation is executed.
In the case that the target business component is a dependent component for playing the signal, the target business component performs a first operation, the first operation comprising: based on a shared data protocol object injected into a target service component in advance, shared data related to a to-be-processed transaction of the target service component in a shared channel is obtained, the to-be-processed transaction is processed based on the obtained shared data, a processing result is obtained, and the processing result is shared into the shared channel.
In the method provided in the embodiment of the present application, a process in which a target service component acquires shared data related to a to-be-processed transaction of the target service component in a shared channel based on a shared data protocol object injected into the target service component in advance includes: and the target service component acquires shared data related to the to-be-processed transaction of the target service component in the shared channel through a shared data protocol based on a shared data protocol object injected into the target service component in advance.
The protocol description of the shared data protocol is shown in table 2:
Figure BDA0002848835300000101
table 2 shared data protocol description
In the method provided in the embodiment of the present application, each service component in the component queue is generated in advance based on a component protocol, and the description of the component protocol is shown in table 3:
Figure BDA0002848835300000102
TABLE 3 description of the component protocols
It should be noted that, in the present application, each service component and the shared data protocol object have a weak reference relationship, after the service component is destroyed, the link between the service component and the shared data protocol object is automatically broken, and the relationship between the signal and the shared data object is also a weak reference relationship.
S109, the target service component executes the first operation and transmits the playing signal to the next service component of the target service component.
When the target service component is the associated component of the playing signal, the target service component executes the first operation and transmits the playing signal to the next service component of the target service component, and the playing signal is transmitted to the next service component of the target service component without waiting for the completion of the execution of the first operation.
The first operation includes: the target service component acquires shared data related to the to-be-processed transaction of the target service component in the shared channel based on a pre-injected shared data protocol object, and specifically, the target service component acquires the shared data related to the to-be-processed transaction of the target service component in the shared channel through a shared data protocol based on the pre-injected shared data protocol object.
S110, the target business component transmits the playing signal to the next business component of the target business component.
And under the condition that the target service component is neither the associated component nor the dependent component of the playing signal, the target service component directly transmits the playing signal to the next service component of the target service component.
And S111, the first service component executes the suspension of the current signal and generates a new first signal.
The first service assembly executes the suspension of the current signal and generates a new first signal, wherein the current signal is a playing signal or a first signal.
The first service component determines attribute information of a first signal to be generated based on a signal protocol, and generates a new first signal based on the attribute information of the first signal to be generated, where the description of the signal protocol is described in table 1, and is not described herein again.
And S112, the first service component transmits the first signal to the next service component of the first service component.
In the method provided by the embodiment of the present application, a target service component is used as a first service component, and the first service component transmits a first signal to a subsequent service component of the first service component. Each service component in the component queue receives the first signal transmitted by the service component before the service component, and the first service component in the component queue receives the first signal transmitted by the service component at the tail.
S113, determining that the service component currently receiving the first signal is the second service component.
In the method provided by the embodiment of the present application, a service component currently receiving a first signal, except for a first service component, is taken as a second service component.
And S114, judging whether the second service component is a dependent component of the first signal.
In the method provided in this embodiment, it is determined whether the second service component is a dependent component of the first signal based on the attribute information of the first signal, if it is determined that the target service component is a dependent component of the broadcast signal, step S115 is performed, and if it is determined that the target service component is not a dependent component of the first signal, step S116 is performed.
And S115, judging whether the second business component has a dependent component.
If the second service component is a dependent component of the first signal, it is determined whether there is a dependent component in the second service component based on the configuration file, and if so, step S1117 is executed, and if not, step S118 is executed.
S116, judging whether the second service component is the related component of the first signal.
In the method provided in this embodiment, it is determined whether the second service component is a component associated with the first signal based on the attribute information of the first signal, if it is determined that the target service component is a component associated with the broadcast signal, step S117 is performed, and if it is determined that the target service component is not a component associated with the first signal, step S118 is performed.
And S117, taking the current second service assembly as a new first service assembly.
And taking the current second service component as a new first service component, and returning to execute the step S111 based on the new first service component.
And S118, the second service component executes the first operation, and after the first operation is executed, the first signal is transmitted to the next service component of the second service component.
The second business component performs a first operation, the first operation comprising: and acquiring shared data related to the to-be-processed transaction of the second service component in the shared channel based on a shared data protocol object injected into the second service component in advance, processing the to-be-processed transaction based on the acquired shared data to obtain a processing result, and sharing the processing result into the shared channel.
And the second service assembly transmits the first signal to a subsequent service assembly of the second service assembly after the first operation is executed.
S119, the second service component transmits the first signal to the next service component of the second service component and executes the first operation.
And if the second service component is the association component of the first signal, the second service component transmits the first signal to the next service component of the second service component and executes the first operation.
And S120, the second service component transmits the first signal to the latter service component of the second service component.
If the second service component is neither a dependent component nor an associated component of the first signal, the second service component directly passes the first signal to a subsequent service component of the second service component.
S121, when each first service assembly receives a first signal sent by the previous service assembly, each first service assembly destroys the currently received first signal and restores the playing signal or the first signal which is suspended before the first service assembly is suspended.
For each first service assembly, when receiving a first signal sent by a previous service assembly of the first service assembly, the first service assembly destroys the currently received first signal and resumes the playing signal or the first signal which was suspended before suspending the first service assembly.
And S122, when the playing assembly receives a playing signal sent by a service assembly at the tail of the assembly queue, executing service playing operation and destroying the playing signal.
And when the playing component receives a playing signal sent by a service component at the tail of the component queue, executing service playing operation.
The process of the playing component executing the service playing operation specifically includes:
acquiring shared data related to a service to be played in a shared channel based on a shared data protocol object injected into a playing component in advance; the service to be played is associated with the playing signal;
and playing the service to be played based on the shared data related to the service to be played.
In the method provided by the embodiment of the application, when a play component receives a play signal sent by a last service component in a component queue, based on a shared data protocol object injected into the play component in advance, shared data related to a service to be played in a shared channel is acquired through a shared data protocol, so that the service to be played is played based on the shared data related to the service to be played. The service to be played is associated with the playing signal, that is, the playing signal is different, and the service to be played is also different.
The playing assembly destroys the playing signal and deletes the playing signal from the signal pool of the playing assembly.
It should be noted that, in the method provided in the embodiment of the present application, lazy loading of each service component is supported, and when a signal is transmitted to a specific service component, the service component is initialized instead of initializing all service components from the beginning, thereby avoiding waste of computer resources.
In the service playing method provided in the embodiment of the present application, the playing component generates and transmits a playing signal to a subsequent service component of the playing component in the component queue, each service component except the playing component in the component queue receives the playing signal sent by a previous service component, and when a target service component is a dependent component of the playing signal, wherein, the target service component is a service component which currently receives the playing signal, the target service component acquires shared data related to the to-be-processed transaction of the target service component in the shared channel based on a shared data protocol object injected into the target service component, and based on the acquired shared data, processing the transaction to be processed, sharing the processing result to the sharing channel, and transmitting the playing signal to the next service component of the target service component after sharing the processing result to the sharing channel; when the target service component is not the associated component of the playing signal, the target service component transmits the playing signal to the next service component of the target service component, acquires shared data related to the to-be-processed transaction of the target service component in the shared channel based on a shared data protocol object injected into the target service component, processes the to-be-processed transaction based on the acquired shared data, and shares the processed processing result to the shared channel; when the target service component is not a dependent component for playing the signal, or is a related component for playing the signal, the playing signal is directly transmitted to the next service component of the target service component; when the playing signal is transmitted to the playing component, the playing component executes the service playing operation and destroys the playing signal. According to the service playing method provided by the embodiment of the application, the association component and the dependence component of the playing signal are triggered to perform transaction processing through transmission of the playing signal, and each service component is based on the shared data protocol object, and shared data is obtained from the shared channel to perform transaction processing, so that service logic of the service component is only operated in the component, decoupling between the service components is achieved, and maintenance difficulty and cost are reduced.
In the method provided by the embodiment of the application, in the process of signal transmission once, if a dependency component of a signal executes a to-be-processed transaction and a dependency party exists, namely, the dependency component of the signal itself exists, the signal is suspended, a new signal is generated for transmission, after the new signal is destroyed, the suspended signal is restored again to continue transmission, if the dependency component of the new signal itself exists again in the process of signal transmission, the new signal is suspended, a new signal is generated for transmission again, and the process is repeated until all signals are suspended again. According to the method provided by the embodiment of the application, only one dependent component is limited to exist in a single signal, and the atomization operation of each business component is controlled, so that the requirement that a plurality of dependent components are matched to complete a specific task in real business scene application is met. And through sharing the channel, realize each business module exchange data, reduce the packing and the transmission of developer to the data of frequently switching, improve development efficiency.
The above-mentioned storage process of the configuration file related to step S101 disclosed in fig. 1 in the embodiment of the present application, as shown in fig. 2, includes the following steps:
s201, after the terminal application is started, a configuration file acquisition request is sent to the cloud.
After the terminal application is started, the terminal application sends a configuration file acquisition request to the cloud end to request to acquire a configuration file corresponding to the terminal application.
S202, downloading the configuration file when the configuration file corresponding to the configuration file acquisition request fed back by the cloud is received.
S203, judging whether the version information contained in the configuration file is consistent with the version information of the terminal application.
Comparing the version information contained in the configuration file with the version information of the terminal application, judging whether the version information contained in the configuration file is consistent with the version information of the terminal application, if so, executing the step S204, and if not, executing the step S205.
And S204, storing the configuration file.
And under the condition that the version information contained in the configuration file is consistent with the version information of the terminal application, storing the configuration file, namely replacing the configuration file locally stored in the terminal application with the configuration file fed back by the cloud.
S205, judging whether the number of times of sending the configuration file acquisition request is larger than a threshold value.
Under the condition that the version information contained in the configuration file is inconsistent with the version information of the terminal application, judging whether the frequency of sending the configuration file acquisition request to the cloud end by the terminal application is greater than a threshold value, wherein the threshold value is a manually set numerical value and can be adjusted according to requirements, and optionally, the threshold value can be 3; if the number of times of sending the configuration file acquisition request is greater than the threshold, the process is directly ended, and if the number of times of sending the configuration file acquisition request is not greater than the threshold, the process returns to the step S201.
In the method provided by the embodiment of the application, the technical scheme of repeated retry is adopted, the download failure caused by network jitter is converged, and the download success rate of the configuration file is improved.
In the above embodiment of the present application, a flowchart of a process related to determining whether a target service component is a dependent component for playing a signal in step S104 disclosed in fig. 1 is shown in fig. 3, and includes the following steps:
s301, acquiring attribute information of the playing signal.
In the method provided by the embodiment of the application, attribute information of the playing signal is acquired, and the attribute information includes a component identifier of a playing signal dependent component.
It should be noted that there may be multiple associated components in a broadcast signal transmission process, but there is only one dependent component.
S302, judging whether the component identification of the playing signal dependent component contained in the attribute information is the same as the component identification of the target service component.
Comparing the component identifier of the playing signal dependent component contained in the attribute signal of the playing signal with the component identifier of the target service component, determining whether the component identifier of the playing signal dependent component contained in the attribute information is the same as the component identifier of the target service component, if determining that the component identifier of the playing signal dependent component contained in the attribute information is the same as the component identifier of the target service component, executing step S303, and if determining that the component identifier of the playing signal dependent component contained in the attribute information is not the same as the component identifier of the target service component, executing step S304.
S303, judging that the target service component is a dependent component for playing the signal.
And if the component identifier of the playing signal dependent component contained in the attribute information of the playing signal is the same as the component identifier of the target service component, determining that the target service component is the dependent component of the playing signal.
S304, judging that the target service component is not a dependent component for playing the signal.
And if the component identifier of the playing signal dependent component contained in the attribute information of the playing signal is different from the component identifier of the target service component, judging that the target service component is not the dependent component of the playing signal.
In the method provided by the embodiment of the application, whether a target service component is a dependent component of a playing signal is judged by comparing a component identifier of a playing signal dependent component contained in attribute information of the playing signal with a component identifier of the target service component, and the target service component is judged to be the dependent component of the playing signal under the condition that the component identifier of the playing signal dependent component contained in the attribute information of the playing signal is the same as the component identifier of the target service component; and under the condition that the component identification of the playing signal dependent component contained in the attribute information of the playing signal is different from the component identification of the target service component, judging that the target service component is not the dependent component of the playing signal.
It should be noted that the specific process of determining whether the second service component is a dependent component of the first signal in step S110 is similar to the steps disclosed in fig. 3 of the embodiment of the present application, and details are not repeated here.
The attribute information of the playing signal mentioned in fig. 4 in the embodiment of the present application further includes a component identifier of a playing signal association component; in the above-mentioned embodiment of the present application, the process related to the step S117 disclosed in fig. 1 for determining whether the target service component is an associated component for playing a signal, and a flowchart is shown in fig. 4, and includes the following steps:
s401, judging whether the component identification of the playing signal related component contained in the attribute information is the same as the component identification of the target service component.
Comparing the component identifier of the broadcast signal association component contained in the attribute information of the broadcast signal with the component identifier of the target service component, if the component identifier of the broadcast signal association component contained in the attribute information is the same as the component identifier of the target service component, executing step S402, and if the component identifier of the broadcast signal association component contained in the attribute information is not the same as the component identifier of the target service component, executing step S403.
S402, judging that the target service component is the related component of the playing signal.
And if the component identifier of the playing signal association component contained in the attribute information is the same as the component identifier of the target service component, judging that the target service component is the association component of the playing signal.
S403, judging that the target service component is not the related component for playing the signal.
And if the component identifier of the playing signal association component contained in the attribute information is different from the component of the target service component, judging that the target service component is not the association component of the playing signal.
In the method provided by the embodiment of the present application, a component identifier of a broadcast signal association component included in attribute information of a broadcast signal is compared with a component identifier of a target service component to determine whether the target service component is an association component of the broadcast signal, if the component identifier of the broadcast signal association component included in the attribute information is the same as the component identifier of the target service component, it is determined that the target service component is the association component of the broadcast signal, and if the component identifier of the broadcast signal association component included in the attribute information is not the same as the component identifier of the target service component, it is determined that the target service component is not the association component of the broadcast signal.
It should be noted that the specific process of determining whether the second service component is the associated component of the first signal in step S112 is similar to the steps disclosed in fig. 4 in the embodiment of the present application, and details are not repeated here.
In the method provided by the embodiment of the application, when one service component has a plurality of signals to be routed, that is, when one service component has a plurality of signals to be transmitted, a specific signal routing is initiated according to the priority of the signals, and a signal with a higher priority can initiate a signal with a lower priority to be routed after the signal with the higher priority is destroyed; when a plurality of service components send out a plurality of signals for routing, the signals are routed according to the priority of the signals, and the signals with the same priority can be simultaneously and concurrently routed.
Referring to fig. 5, an implementation process of the service playing method is illustrated as follows:
PlayCore is the Play component and ComepoentX is the load animation component.
1. The play component generates a signal a (e.g., initiates a first frame).
2. The signal A routes each service component in the component queue in sequence according to the component arrangement sequence in the configuration file.
3. When the signal A is routed to the association component, the association component executes the pending transaction and routes the signal A to the next business component of the association component.
4. When the signal A is routed to the animation loading assembly, namely to the dependent assembly of the signal A, waiting for the animation loading assembly to execute the transaction to be processed, and then routing the signal A to the next service assembly.
5. The signal A returns to the playing module to be verified, and is destroyed after the verification is successful.
Referring to fig. 6, another implementation process of the service playing method is illustrated as follows:
comeponent2 is the load animation UI component and ComepoentX is the Member recommendation component.
1. The load animation UI component generates a signal B (e.g., directing the animation to finish execution).
2. The signal B routes each service component in the component queue in sequence according to the order of component arrangement in the configuration file.
3. When the signal B is routed to the association component, the association component executes the pending transaction and routes the signal B to the next business component of the association component.
4. When the signal B is routed to the member recommending component, namely, the signal B is routed to the dependent component of the signal B, the user can choose to receive or not receive any recommendation, and after the member recommending component waits for the execution of the pending transaction, the signal B is routed to the next service component.
5. The signal B returns to the state that the animation UI component is loaded, is verified and is destroyed after the verification is successful.
Referring to fig. 7, another implementation process of the service playing method is illustrated as follows:
comenent 1 is an advertising component.
1. The ad component generates a signal C (e.g., the ad insertion is buffered and needs to be initiated).
2. The signal C routes each service component in the component queue in sequence according to the order of component arrangement in the configuration file.
3. When the signal C is routed to the association component, the association component executes the pending transaction and routes the signal B to the next business component of the association component.
4. When signal C is routed to the comedontx component, i.e., to the independent, unassociated component, signal C is routed directly to the next traffic component.
5. When the signal C is routed to the dependent component, it is required to wait for the execution of the pending transaction (for example, the video player stops playing), and then route the signal C to the next service component.
6. The signal B returns to the advertising component to be verified and is destroyed after the verification is successful.
Referring to fig. 8, another implementation process of the service playing method is illustrated as follows:
PlayCore is the playing component, Comeponent1 is the advertising component, and Comeponent3 provides the component for the player parent view.
1. The advertisement component generates a signal D (e.g., because the ad insertion buffer is complete, playback needs to be initiated, and a video player signal needs to be paused is initiated).
2. And the signal D sequentially routes each service component in the component queue according to the component arrangement sequence in the configuration file.
3. When the signal D is routed to the association component, the association component executes the transaction to be processed and routes the signal D to the next service component of the association component.
4. After the dependent component waiting for the signal D executes the pending transaction (for example, the video player stops playing), it traces back that the advertisement component is verified, ends the routing of the signal D, and destroys the signal D.
5. The ad component generates signal E (e.g., a signal that initiates a view of the ad playing container to be shown on the outermost layer because the ad insertion is cached and needs to be started).
6. And the signal E sequentially routes each service component in the component queue according to the component arrangement sequence in the configuration file, and when the signal E is routed to the independent and non-associated component of the signal E, the signal E is directly routed to the next service component.
7. The player parent view rendering component presents the advertisement container view at the outermost layer.
8. And the signal E is routed to the advertisement assembly to be checked and the advertisement is started to be broadcasted, and the signal E is destroyed.
Referring to fig. 9, another implementation process of the service playing method is illustrated as follows:
PlayCore is a playback component, Comeponent2 is a loaded video animation UI component, Comeponent3 is a 4G playback control component, and in the case that ComepoentX is 4G, the user selects a UI component that is stream-less or directly uses 4G playback.
1. In the case of 4G playback, the PlayCore generates signal a (e.g., the first frame is loaded).
2. The signal A routes each service component in the component queue in sequence according to the component arrangement sequence in the configuration file.
3. Signal A is routed to Comeponent2, and after loading of animation is stopped, it is routed to Comeponent3 for correlation.
4. Backtracking to the point that the PlayCore is verified, the signal A route is finished, and the signal A is destroyed.
5. The PlayCore generates a signal B to begin playback, which in turn is routed to Comeponent 3.
6. Comeponent3 detects that the current 4G network condition requires the user selection panel to be presented and suspends signal B, generating a new signal C. And the signal C is used for prompting that two UIs are played in a streaming-free or direct mode under the condition that 4G flow-free playing is displayed.
7. Signal C is routed to ComeponentX, which presents the selection panel described above.
8. If the user chooses to view directly, the signal C is routed to the next service component and finally returned to the communication 3 to be verified, and the signal C is destroyed after the verification is passed.
9. And the signal B resumes the route from the suspended state.
10. Signal B is routed to PlayCore to be verified, player starts playing, and signal B is destroyed.
Corresponding to the method described in fig. 1, an embodiment of the present application further provides a service playing apparatus, which is used for specifically implementing the method in fig. 1, and a schematic structural diagram of the service playing apparatus is shown in fig. 10, and specifically includes:
a first generating unit 1001 for generating a play signal by the play component; the playing component is a first service component in the component queue; a plurality of service components are arranged in the component queue, and the arrangement sequence of each service component in the component queue is determined according to a pre-stored configuration file;
a sending unit 1002, configured to send the playing signal to a service component subsequent to the playing component in the component queue by the playing component; each service component except the playing component in the component queue receives the playing signal sent by the previous service component;
a first determining unit 1003, configured to determine that a service component currently receiving the broadcast signal is a target service component, determine whether the target service component is a dependent component of the broadcast signal, if yes, execute a first operation, and after the first operation is executed, transmit the broadcast signal to a subsequent service component of the target service component, if not, directly transmit the broadcast signal to the subsequent service component of the target service component, and when it is determined that the target service component is an associated component of the broadcast signal, execute the first operation; the first operation includes: acquiring shared data related to a to-be-processed transaction of the target service component in a shared channel based on a shared data protocol object injected into the target service component in advance, processing the to-be-processed transaction based on the acquired shared data to obtain a processing result, and sharing the processing result to the shared channel; the next service component of the last service component in the component queue is the playing component;
a first destroying unit 1004, configured to execute a service playing operation and destroy the playing signal when the playing component receives the playing signal sent by a last service component in the component queue.
The service playing device provided by the embodiment of the application triggers the association component and the dependency component of the playing signal to perform transaction processing through transmission of the playing signal, and each service component acquires shared data from the shared channel to perform transaction processing based on the shared data protocol object, so that service logic of the service component is only operated inside the component, thereby decoupling between each service component is realized, and further, maintenance difficulty and cost are reduced. And the single signal is limited to only have one dependent component, and the atomization operation of each service component is controlled, so that the requirement that a plurality of dependent components are matched to complete a specific task in the application of a real service scene is met. And through sharing the channel, realize that each business module exchanges data, reduce the packing and the transmission of developer to the data of frequently switching, improve development efficiency.
In an embodiment of the present application, based on the foregoing scheme, the method may further include:
the second judging unit is used for judging whether the target business component has a dependent component or not;
a second generating unit, configured to, if the target service component has a dependent component, use the target service component as a first service component, where the first service component suspends a current signal and generates a new first signal; the current signal is a playing signal or a first signal;
a transfer unit, configured to transfer, by the first service component, a current first signal to a subsequent service component of the first service component; each service component in the component queue receives the first signal transmitted by the previous service component, and the first service component in the component queue receives the first signal transmitted by the last service component;
a third determining unit, configured to determine that a service component currently receiving the first signal is a second service component, determine whether the second service component is a dependent component of the first signal, if the second service component is a dependent component of the first signal, determine whether the second service component has a dependent component, if the second service component has a dependent component, take the second service component as a new first service component, and based on the new first service component, return to execute the first service component to suspend the current signal and generate a new first signal, if the second service component does not have a dependent component, execute the first operation, and after the first operation is executed, transmit the first signal to a subsequent service component of the second service component, if the second service component is not a dependent component of the first signal, directly transmitting the first signal to a subsequent component of the second service component, and executing the first operation when the second service component is judged to be the associated component of the first signal;
and the second destroying unit is used for destroying the currently received first signal and recovering the playing signal or the first signal which is suspended before the first service assembly is suspended when the first service assembly receives the first signal sent by the previous service assembly.
In an embodiment of the present application, based on the foregoing solution, the first determining unit 1003 executes to determine whether the target service component is a dependent component of the playback signal, and is configured to:
acquiring attribute information of the playing signal; the attribute information comprises a component identifier of a playing signal dependent component;
judging whether the component identifier of the playing signal dependent component contained in the attribute information is the same as the component identifier of the target service component;
if the target service component is the same as the playing signal, judging that the target service component is a dependent component of the playing signal;
and if not, judging that the target service component is not the dependent component of the playing signal. In an embodiment of the application, based on the foregoing scheme, the attribute information further includes a component identifier of a component associated with a broadcast signal, and the first determining unit 1003 executes to determine that the target service component is the component associated with the broadcast signal, and is configured to:
judging whether the component identifier of the playing signal association component contained in the attribute information is the same as the component identifier of the target service component;
if the target service component is the same as the playing signal, the target service component is judged to be the related component of the playing signal.
In an embodiment of the present application, based on the foregoing solution, the first destroying unit 1004 executes a playing component to execute a service playing operation, so as to:
based on a shared data protocol object injected into the playing component in advance, obtaining shared data related to a service to be played in a shared channel; the service to be played is associated with the playing signal;
and playing the service to be played based on the shared data related to the service to be played.
In an embodiment of the present application, based on the foregoing scheme, the method may further include:
the request unit is used for sending a configuration file acquisition request to the cloud after the terminal application is started;
the downloading unit is used for downloading the configuration file when receiving the configuration file corresponding to the configuration file acquisition request fed back by the cloud end, and judging whether version information contained in the configuration file is consistent with version information of the terminal application or not;
the storage unit is used for storing the configuration file if the configuration file is consistent with the configuration file;
and the return unit is used for returning to execute the step of sending the configuration file request to the cloud if the configuration file request is inconsistent, until the times of sending the configuration file acquisition request is greater than a threshold value or the version information contained in the configuration file fed back by the cloud is consistent with the version information of the terminal application.
The embodiment of the application also provides a storage medium, where the storage medium includes a stored instruction, and when the instruction runs, the device where the storage medium is located is controlled to execute the service playing method.
An electronic device is further provided in the embodiment of the present application, and its schematic structural diagram is shown in fig. 11, and specifically includes a memory 1101 and one or more instructions 1102, where the one or more instructions 1102 are stored in the memory 1101, and are configured to be executed by the one or more processors 1103 to perform the following operations:
the playing component generates a playing signal; the playing component is a first service component in the component queue; a plurality of service components are arranged in the component queue, and the arrangement sequence of each service component in the component queue is determined according to a pre-stored configuration file;
the playing component sends the playing signal to a service component behind the playing component in the component queue; each service component except the playing component in the component queue receives the playing signal sent by the previous service component;
determining that a service component which currently receives the playing signal is a target service component, judging whether the target service component is a dependent component of the playing signal, if so, executing a first operation, transmitting the playing signal to a next service component of the target service component after the first operation is executed, if not, directly transmitting the playing signal to the next service component of the target service component, and executing the first operation when the target service component is judged to be a related component of the playing signal; the first operation includes: acquiring shared data related to a to-be-processed transaction of the target service component in a shared channel based on a shared data protocol object injected into the target service component in advance, processing the to-be-processed transaction based on the acquired shared data to obtain a processing result, and sharing the processing result to the shared channel;
the next service component of the last service component in the component queue is the playing component;
and when the playing assembly receives the playing signal sent by the last service assembly in the assembly queue, executing service playing operation and destroying the playing signal.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The service playing method and device provided by the present application are introduced in detail, and a specific example is applied in the text to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A service playing method, comprising:
the playing component generates a playing signal; the playing component is a first service component in the component queue; a plurality of service components are arranged in the component queue, and the arrangement sequence of each service component in the component queue is determined according to a pre-stored configuration file;
the playing component sends the playing signal to a service component behind the playing component in the component queue; each service component except the playing component in the component queue receives the playing signal sent by the previous service component;
determining that a service component which currently receives the playing signal is a target service component, judging whether the target service component is a dependent component of the playing signal, if so, executing a first operation, transmitting the playing signal to a next service component of the target service component after the first operation is executed, if not, directly transmitting the playing signal to the next service component of the target service component, and executing the first operation when the target service component is judged to be a related component of the playing signal; the first operation includes: acquiring shared data related to a to-be-processed transaction of the target service component in a shared channel based on a shared data protocol object injected into the target service component in advance, processing the to-be-processed transaction based on the acquired shared data to obtain a processing result, and sharing the processing result to the shared channel;
the next service component of the last service component in the component queue is the playing component;
and when the playing assembly receives the playing signal sent by the last service assembly in the assembly queue, executing service playing operation and destroying the playing signal.
2. The method of claim 1, wherein if the target service component is a dependent component of the playback signal, before the target service component performs the first operation, the method further comprises:
judging whether the target business component has a dependent component or not;
if the target business component has a dependent component, taking the target business component as a first business component, suspending a current signal by the first business component, and generating a new first signal; the current signal is a playing signal or a first signal;
the first service component transmits a current first signal to a subsequent service component of the first service component; each service component in the component queue receives the first signal transmitted by the previous service component, and the first service component in the component queue receives the first signal transmitted by the last service component;
determining that a service component currently receiving the first signal is a second service component, determining whether the second service component is a dependent component of the first signal, if the second service component is the dependent component of the first signal, determining whether the second service component has a dependent component, if the second service component has a dependent component, using the second service component as a new first service component, and based on the new first service component, returning to the step of executing the first service component to suspend the current signal and generate a new first signal, if the second service component does not have a dependent component, executing the first operation, and after the first operation is executed, transmitting the first signal to a subsequent service component of the second service component, if the second service component is not the dependent component of the first signal, directly transmitting the first signal to a subsequent component of the second service component, and executing the first operation when the second service component is judged to be the associated component of the first signal;
when each first service assembly receives the first signal sent by the previous service assembly, each first service assembly destroys the currently received first signal and restores the playing signal or the first signal which is suspended before suspending itself.
3. The method according to claim 1 or 2, wherein said determining whether the target service component is a dependent component of the playback signal comprises:
acquiring attribute information of the playing signal; the attribute information comprises a component identifier of a playing signal dependent component;
judging whether the component identifier of the playing signal dependent component contained in the attribute information is the same as the component identifier of the target service component;
if the target service component is the same as the playing signal, judging that the target service component is a dependent component of the playing signal;
and if not, judging that the target service component is not the dependent component of the playing signal.
4. The method according to claim 3, wherein the attribute information further includes a component identifier of a component associated with a broadcast signal, and the determining that the target service component is the component associated with the broadcast signal includes:
judging whether the component identifier of the playing signal association component contained in the attribute information is the same as the component identifier of the target service component;
if the target service component is the same as the playing signal, the target service component is judged to be the related component of the playing signal.
5. The method of claim 1, wherein the playback component performs a service playback operation, comprising:
based on a shared data protocol object injected into the playing component in advance, obtaining shared data related to a service to be played in a shared channel; the service to be played is associated with the playing signal;
and playing the service to be played based on the shared data related to the service to be played.
6. The method of claim 1, wherein the storing of the configuration file comprises:
after a terminal application is started, sending a configuration file acquisition request to a cloud end;
when a configuration file corresponding to the configuration file acquisition request fed back by the cloud is received, downloading the configuration file, and judging whether version information contained in the configuration file is consistent with version information of the terminal application;
if the configuration files are consistent, storing the configuration files;
and if the configuration file request is inconsistent with the version information of the terminal application, returning to the step of sending the configuration file request to the cloud end until the times of sending the configuration file acquisition request are greater than a threshold value or the version information contained in the configuration file fed back by the cloud end is consistent with the version information of the terminal application.
7. A service playback apparatus, comprising:
the first generating unit is used for generating a playing signal by the playing component; the playing component is a first service component in the component queue; a plurality of service components are arranged in the component queue, and the arrangement sequence of each service component in the component queue is determined according to a pre-stored configuration file;
a sending unit, configured to send the playing signal to a service component subsequent to the playing component in the component queue by the playing component; each service component except the playing component in the component queue receives the playing signal sent by the previous service component;
a first determining unit, configured to determine that a service component currently receiving the play signal is a target service component, determine whether the target service component is a dependent component of the play signal, if yes, execute a first operation, and after the first operation is executed, transmit the play signal to a subsequent service component of the target service component, if not, directly transmit the play signal to the subsequent service component of the target service component, and when it is determined that the target service component is an associated component of the play signal, execute the first operation; the first operation includes: acquiring shared data related to a to-be-processed transaction of the target service component in a shared channel based on a shared data protocol object injected into the target service component in advance, processing the to-be-processed transaction based on the acquired shared data to obtain a processing result, and sharing the processing result to the shared channel; the next service component of the last service component in the component queue is the playing component;
and the first destroying unit is used for executing service playing operation and destroying the playing signal when the playing component receives the playing signal sent by the last service component in the component queue.
8. The apparatus of claim 7, wherein if the target service component is a dependent component of the playback signal, further comprising:
the second judging unit is used for judging whether the target business component has a dependent component or not;
a second generating unit, configured to, if the target service component has a dependent component, use the target service component as a first service component, where the first service component suspends a current signal and generates a new first signal; the current signal is a playing signal or a first signal;
a transfer unit, configured to transfer, by the first service component, a current first signal to a subsequent service component of the first service component; each service component in the component queue receives the first signal transmitted by the previous service component, and the first service component in the component queue receives the first signal transmitted by the last service component;
a third determining unit, configured to determine that a service component currently receiving the first signal is a second service component, determine whether the second service component is a dependent component of the first signal, if the second service component is a dependent component of the first signal, determine whether the second service component has a dependent component, if the second service component has a dependent component, take the second service component as a new first service component, and based on the new first service component, return to execute the first service component to suspend the current signal and generate a new first signal, if the second service component does not have a dependent component, execute the first operation, and after the first operation is executed, transmit the first signal to a subsequent service component of the second service component, if the second service component is not a dependent component of the first signal, directly transmitting the first signal to a subsequent component of the second service component, and executing the first operation when the second service component is judged to be the associated component of the first signal;
and the second destroying unit is used for destroying the currently received first signal and recovering the playing signal or the first signal which is suspended before the first service assembly is suspended when the first service assembly receives the first signal sent by the previous service assembly.
9. The apparatus according to claim 7 or 8, wherein the first determining unit performs determining whether the target service component is a dependent component of the playback signal, and is configured to:
acquiring attribute information of the playing signal; the attribute information comprises a component identifier of a playing signal dependent component;
judging whether the component identifier of the playing signal dependent component contained in the attribute information is the same as the component identifier of the target service component;
if the target service component is the same as the playing signal, judging that the target service component is a dependent component of the playing signal;
and if not, judging that the target service component is not the dependent component of the playing signal.
10. The apparatus according to claim 9, wherein the attribute information further includes a component identifier of a component associated with a broadcast signal, and the first determining unit performs the determination that the target service component is the component associated with the broadcast signal, and is configured to:
judging whether the component identifier of the playing signal association component contained in the attribute information is the same as the component identifier of the target service component;
if the target service component is the same as the playing signal, the target service component is judged to be the related component of the playing signal.
CN202011518801.9A 2020-12-21 2020-12-21 Service playing method and device Active CN112689169B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011518801.9A CN112689169B (en) 2020-12-21 2020-12-21 Service playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011518801.9A CN112689169B (en) 2020-12-21 2020-12-21 Service playing method and device

Publications (2)

Publication Number Publication Date
CN112689169A true CN112689169A (en) 2021-04-20
CN112689169B CN112689169B (en) 2022-06-17

Family

ID=75449916

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011518801.9A Active CN112689169B (en) 2020-12-21 2020-12-21 Service playing method and device

Country Status (1)

Country Link
CN (1) CN112689169B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080120620A1 (en) * 2006-09-27 2008-05-22 Richard Lett Systems and methods for scheduling, processing, and monitoring tasks
WO2009072809A2 (en) * 2007-12-05 2009-06-11 An-Mo Jeong A method for decoupling service components from application-specific business entities
CN102566992A (en) * 2010-12-17 2012-07-11 卓望数码技术(深圳)有限公司 Dependency injection method and dependency injection device based on system running
CN105872784A (en) * 2015-12-29 2016-08-17 乐视网信息技术(北京)股份有限公司 Video player and multi-service control method thereof
CN105991416A (en) * 2015-02-15 2016-10-05 无锡北邮感知技术产业研究院有限公司 Message passing method and message passing middleware
CN110012308A (en) * 2019-05-15 2019-07-12 广州虎牙信息科技有限公司 A kind of method for processing business based on live streaming, device, equipment and storage medium
CN111429129A (en) * 2020-03-20 2020-07-17 上海依图网络科技有限公司 Service processing method and device based on identification information verification
CN111737032A (en) * 2020-07-27 2020-10-02 腾讯科技(深圳)有限公司 Subprogram running method and device based on microkernel system and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080120620A1 (en) * 2006-09-27 2008-05-22 Richard Lett Systems and methods for scheduling, processing, and monitoring tasks
WO2009072809A2 (en) * 2007-12-05 2009-06-11 An-Mo Jeong A method for decoupling service components from application-specific business entities
CN102566992A (en) * 2010-12-17 2012-07-11 卓望数码技术(深圳)有限公司 Dependency injection method and dependency injection device based on system running
CN105991416A (en) * 2015-02-15 2016-10-05 无锡北邮感知技术产业研究院有限公司 Message passing method and message passing middleware
CN105872784A (en) * 2015-12-29 2016-08-17 乐视网信息技术(北京)股份有限公司 Video player and multi-service control method thereof
CN110012308A (en) * 2019-05-15 2019-07-12 广州虎牙信息科技有限公司 A kind of method for processing business based on live streaming, device, equipment and storage medium
CN111429129A (en) * 2020-03-20 2020-07-17 上海依图网络科技有限公司 Service processing method and device based on identification information verification
CN111737032A (en) * 2020-07-27 2020-10-02 腾讯科技(深圳)有限公司 Subprogram running method and device based on microkernel system and electronic equipment

Also Published As

Publication number Publication date
CN112689169B (en) 2022-06-17

Similar Documents

Publication Publication Date Title
CN109831456B (en) Message pushing method, device, equipment and storage medium
US10065119B2 (en) Game accessing method and processing method, server, terminal, and system
CN109936587B (en) Control method, control device, electronic apparatus, and storage medium
US20230412853A1 (en) Multi-user live streaming method, terminal, server, and storage medium
CN111991813B (en) Method and device for logging in game, electronic equipment and storage medium
US11157959B2 (en) Multimedia information processing method, apparatus and system, and computer storage medium
US20050256985A1 (en) Sending progress information of other users for transmitted shared content
EP4054198A1 (en) Live broadcast method and apparatus, electronic device, and storage medium
US11558721B2 (en) Method and system for fairly charging talk time of video call that introduces new person
CN113727130A (en) Message prompting method, system and device for live broadcast room and computer equipment
CN112486620A (en) Cross-process off-screen rendering method and device, electronic equipment and storage medium
CN105704001A (en) WeChat server message distribution method and WeChat server message distribution system
CN113568699A (en) Content display method, device, equipment and storage medium
AU2018432003B2 (en) Video processing method and device, and terminal and storage medium
US20170171266A1 (en) Method and electronic device based on android platform for multimedia resource play
CN112689169B (en) Service playing method and device
CN111723353A (en) Identity authentication method, device, terminal and storage medium based on face recognition
CN113079085B (en) Business service interaction method, business service interaction device, business service interaction equipment and storage medium
CN112511884B (en) Mixed flow control method, system and storage medium for audio and video flow
CN111766992B (en) Information display method and device, electronic equipment and storage medium
CN108829824B (en) Resource processing method and device in internet operation activity
CN110868640A (en) Resource transfer method, device, equipment and storage medium
CN112099736A (en) Data storage method and device, electronic equipment and storage medium
CN111921204A (en) Control method, device and equipment of cloud application program and storage medium
US20170134486A1 (en) Method and device for information synchronization

Legal Events

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