CN113656091A - Method for realizing independent broadcasting process, related device and equipment - Google Patents
Method for realizing independent broadcasting process, related device and equipment Download PDFInfo
- Publication number
- CN113656091A CN113656091A CN202110859703.XA CN202110859703A CN113656091A CN 113656091 A CN113656091 A CN 113656091A CN 202110859703 A CN202110859703 A CN 202110859703A CN 113656091 A CN113656091 A CN 113656091A
- Authority
- CN
- China
- Prior art keywords
- independent
- application program
- broadcasting process
- broadcasting
- independent broadcasting
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 416
- 230000008569 process Effects 0.000 title claims abstract description 370
- 230000001419 dependent effect Effects 0.000 claims abstract description 18
- 238000004806 packaging method and process Methods 0.000 claims abstract description 8
- 230000004044 response Effects 0.000 claims description 20
- 230000003993 interaction Effects 0.000 claims description 7
- 238000005266 casting Methods 0.000 claims description 4
- 238000011161 development Methods 0.000 claims description 2
- 230000015556 catabolic process Effects 0.000 claims 2
- 230000006870 function Effects 0.000 description 34
- 238000010586 diagram Methods 0.000 description 6
- 230000009471 action Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012856 packing Methods 0.000 description 2
- 208000003028 Stuttering Diseases 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44552—Conflict resolution, i.e. enabling coexistence of conflicting executables
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a method for realizing an independent broadcasting process, and a related device and equipment, wherein the method for realizing the independent broadcasting process comprises the following steps: acquiring a creation instruction of an independent playing process through a live broadcast application program; creating an independent broadcasting process by utilizing a dependent library based on the creating instruction; the dependency library is obtained by adding independent process identifiers in corresponding operating components of the broadcast application program, packaging and transmitting the operating components added with the independent process identifiers to the live broadcast application program; and starting each running component added with the independent process identifier in the dependency library, and running the independent broadcasting process by using the independent process identifier. By the method, the function of the broadcast application program can be integrated into the live application program and independently run in the live application program, and the related function of the live application program is not influenced.
Description
Technical Field
The present application relates to the technical field of implementation of independent broadcast processes, and in particular, to a method for implementing an independent broadcast process, and a related apparatus and device.
Background
With the rapid development of the internet technology, the functions of the internet technology are more and more diversified and efficient. Among them, the user has an increasing demand for the convenience of the application program in the process of using the application program.
In the application process, the application program often integrates the implementation of all functions with the main process, so that the application program can realize multiple functions, and the convenience of the application program is improved.
However, the above-mentioned methods often cause the problem of mutual influence between the multi-function implementations, especially the influence on the mobile phone memory and the CPU, so that the problems of applications such as stuttering and slow execution occur.
Disclosure of Invention
The application provides a method for realizing an independent broadcasting process, a related device and equipment, and solves the problem of mutual influence between a main process and an integrated function in the prior art.
The application provides a method for realizing an independent broadcasting process, which comprises the following steps: acquiring a creation instruction of an independent playing process through a live broadcast application program; creating an independent broadcasting process by utilizing a dependent library based on the creating instruction; the dependency library is obtained by adding independent process identifiers in corresponding operating components of the broadcast application program, packaging and transmitting the operating components added with the independent process identifiers to the live broadcast application program; and starting each running component after the independent process identification is added in the dependency library, and running the independent broadcasting process by using the independent process identification.
The step of creating the independent broadcasting process by utilizing the dependency library based on the creating instruction comprises the following steps: responding to a channel for interaction between a main process of the live broadcast application program and the independent broadcasting process, and directly creating the independent broadcasting process by utilizing a dependent library based on a creation instruction; and in response to the fact that a channel for interacting with the independent broadcasting process does not exist in the main process of the live broadcasting application program, creating the independent broadcasting process and creating a channel between the main process and the independent broadcasting process by utilizing the dependent library based on the creating instruction.
Wherein the step of creating a channel between the host process and the independent playback process comprises: and calling a uniform interface layer of the dependency library through the live broadcast application program, and establishing a channel between the main process and the independent broadcasting process.
The method for realizing the independent broadcasting process further comprises the following steps: in response to the starting of the main process, downloading and decompressing the resource file through the main process to obtain a storage path of the decompressed resource file; and transmitting the storage path of the decompressed resource file to the independent broadcasting process through the channel, so that the independent broadcasting process reads the decompressed resource file based on the storage path.
The method for realizing the independent broadcasting process further comprises the following steps: in response to the fact that the storage path of the target resource does not exist in the independent playing process, updating the storage path of the decompressed resource file from the main process based on the channel; in response to the fact that the storage path of the target resource does not exist in the main process, the target resource is downloaded and decompressed through the independent broadcasting process, and the storage path of the target resource is obtained; and transmitting the storage path of the target resource to the main process through the channel.
The method for realizing the independent broadcasting process further comprises the following steps: creating a data report based on the independent broadcasting process; and independently storing the data reported by the independent broadcasting process in a data report so as to distinguish the data reported by the independent broadcasting process.
The step of creating the data report based on the independent broadcasting process comprises the following steps: creating a user volume report and a crash volume report corresponding to the independent broadcasting process; the step of storing the data reported by the independent broadcasting process in the data report individually to distinguish the data reported by the independent broadcasting process comprises the following steps: reporting the user quantity corresponding to the independent broadcasting process to a user quantity report; performing crash capture on the independent broadcasting process to obtain a crash amount, and uploading the crash amount to a crash amount report; determining a crash rate of the independent launch process based on the user volume report and the crash volume report.
The method for realizing the independent broadcasting process further comprises the following steps: and adding the name of the independent broadcasting process into the name of the data reported by the independent broadcasting process so as to distinguish the data reported by the independent broadcasting process.
Wherein, starting each running component after adding the independent process identifier in the dependency library, and the step of running the independent broadcasting process by using the independent process identifier comprises the following steps: and in response to the stack of the independent broadcasting process meeting the preset condition, ending the operation of the independent broadcasting process.
The application also provides a device for realizing the independent broadcasting process, which comprises: the acquisition module is used for acquiring a creation instruction of the independent broadcasting process through the live broadcasting application program; the creating module is used for creating an independent broadcasting process by utilizing the dependency library based on the creating instruction; the dependency library is obtained by adding independent process identifiers in corresponding operating components of the broadcast application program, packaging and transmitting the operating components added with the independent process identifiers to the live broadcast application program; and the running module is used for starting each running component added with the independent process identifier in the dependency library and running the independent broadcast process by using the independent process identifier.
The application also provides an electronic device, which includes a memory and a processor coupled to each other, where the processor is configured to execute program instructions stored in the memory to implement any one of the above-mentioned implementation methods of the independent broadcast process.
The present application also provides a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a processor, the method for implementing any one of the above independent broadcasting processes is implemented.
Above-mentioned scheme, the function that this application will need to integrate on the live application is through the mode that adds independent process sign in every operation subassembly that corresponds to realize above-mentioned function through the independent process of opening a broadcast of operation in the live application, can avoid the influence confusion between the function that above-mentioned function and live application's main process correspond, and then simplify the operation logic of each process, improve the operating efficiency of each process.
Drawings
Fig. 1 is a schematic flowchart of an embodiment of a method for implementing an independent broadcast process according to the present application;
FIG. 2 is a flowchart illustrating another embodiment of a method for implementing a standalone broadcast process according to the present application;
FIG. 3 is a block diagram of an embodiment of an apparatus for implementing a standalone broadcasting process according to the present application;
FIG. 4 is a block diagram of an embodiment of an electronic device of the present application;
FIG. 5 is a block diagram of an embodiment of a computer-readable storage medium of the present application.
Detailed Description
The following describes in detail the embodiments of the present application with reference to the drawings attached hereto.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present application.
The terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is merely an association describing an associated object, and there may be three relationships, e.g., a and/or B, and: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in this document, the character "/", generally, the former and latter related objects are in an "or" relationship. Further, herein, "more" than two or more than two.
Referring to fig. 1, fig. 1 is a flowchart illustrating an embodiment of a method for implementing an independent broadcast process according to the present application.
Step S11: and acquiring a creation instruction of the independent playing process through the live broadcast application program.
And acquiring a creation instruction of the independent playing process through the live broadcast application program. In a specific application scenario, a preset action of a user on a function button corresponding to an independent playing process on a live application program is received, so that a creation instruction of the independent playing process is determined to be acquired. In another specific application scenario, a creation instruction of the background to the independent broadcasting process may also be directly received through the live application program. The preset action includes a click action, a slide action, a long press action, and the like, and is not limited herein.
In a specific application scenario, the number of independent broadcast processes may be one or more, and multiple independent broadcast processes may run simultaneously. While the independent playback process may be a main process running on the playback application.
The live application program of the embodiment is an application program for live viewing, and the broadcast application program is an application program specially used for starting a live and/or video transmission function. For example: the live application may be "some live" and the casting application may be "some casting helper".
Step S12: creating an independent broadcasting process by utilizing a dependent library based on the creating instruction; the dependency library is obtained by adding independent process identifiers in corresponding operating components of the broadcast application program, packaging and transmitting the operating components added with the independent process identifiers to the live broadcast application program.
And creating an independent broadcasting process by the live broadcasting application program based on the creation instruction by utilizing the dependent library.
The dependency library refers to a dynamic database which is called by the playing process corresponding to the playing application program and is needed to be realized. The dependency library of this embodiment is obtained by adding an independent process identifier to each corresponding running component of the broadcast application, and packaging and transmitting each running component to which the independent process identifier is added to the live broadcast application.
The running components corresponding to the independent launching process may include any one or more running components in the running components under the android system, such as Activity (Activity), service (service), Broadcast reception (Broadcast reception), Content Provider (Content Provider), and the like, any one or more running components under the IOS system, or any one or more running components under other running systems. And the independent process identification may include a process identifier or identification code, such as: the process: streamers, and the like. The running component added with the independent process identification can run independently based on the independent process identification.
The functions that can be realized by the independent broadcasting process of this embodiment are functions that can be realized by the broadcasting application. The dependency libraries corresponding to the independent broadcasting processes in the broadcasting application program are packaged to the live broadcasting application program, so that the live broadcasting application program can realize the related functions of the broadcasting application program based on the dependency libraries, and further, the related functions of the broadcasting application program are integrated to the live broadcasting application program.
Step S13: and starting each running component added with the independent process identifier in the dependency library, and running the independent broadcasting process by using the independent process identifier.
After the independent broadcast process is established, each running component in the dependency library is correspondingly started, and the independent broadcast process is run by using the independent process identifier, so that the related functions of the independent broadcast process are realized.
In this embodiment, the related functions integrated by the broadcast application program into the live broadcast application program are implemented and run separately through the independent broadcast process, so that the problem that the implementation of the related functions and the implementation of the main process function of the live broadcast application program affect each other, for example, the problem of affecting the configuration of the memory, the CPU, and the like of the smart device corresponding to the application program and the problem of determining the execution logic can be avoided.
By the method, the function to be integrated into the live application program is realized by adding the independent process identifier in each corresponding running component, so that the function is realized by running the independent playing process in the live application program, influence confusion between the function and the function corresponding to the main process of the live application program can be avoided, running logics of the processes are simplified, and running efficiency of the processes is improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating another embodiment of a method for implementing an independent broadcast process according to the present application.
Step S21: and acquiring a creation instruction of the independent playing process through the live broadcast application program.
Before the independent broadcasting process is started, the broadcasting application program provides the dependency library corresponding to the broadcasting function for the live broadcasting application program. Specifically, an independent process identifier may be added to each running component corresponding to the independent broadcast process, and then each component to which the independent process identifier is added is packaged into a dependent library and provided to the live broadcast application program. Wherein the packing logic of this step is the same as the conventional packing logic.
And acquiring a creation instruction of the independent broadcasting process through the live broadcasting application program, and creating the independent broadcasting process on the live broadcasting application program through the broadcasting application program based on the creation instruction to realize the broadcasting function.
Step S22: and in response to the fact that a channel for interacting with the independent broadcasting process does not exist in the main process of the live broadcasting application program, creating the independent broadcasting process and creating a channel between the main process and the independent broadcasting process by utilizing the dependent library based on the creating instruction.
In a specific application scenario, after a live application is started, a host process is created and started to run. After the live broadcast application program is started, in response to acquiring a creation instruction of the independent broadcasting process, whether a channel interacting with the independent broadcasting process exists in a main process of the live broadcast application program is judged at first, so that whether a channel between the main process and the independent broadcasting process needs to be established subsequently or not is distinguished.
Specifically, in response to the fact that a channel for interaction with the independent broadcasting process does not exist in the main process of the live broadcast application program, the independent broadcasting process and the channel between the main process and the independent broadcasting process are created at the same time by utilizing the dependency library based on the creation instruction; and in response to the fact that a channel for interaction with the independent broadcasting process exists in the main process of the live broadcast application program, the independent broadcasting process is directly created by utilizing the dependent library based on the creation instruction.
The specific steps of creating the channel for interaction between the main process and the independent broadcast process may be: and calling a uniform interface layer of the dependency library through the live broadcast application program, and establishing a multi-process channel between the main process and the independent broadcasting process. The channels in this embodiment include channels such as aid l (android Interface definition channel) or IPC (Inter-Process Communication). After the channel is established, user state data can be transmitted between the main process and the independent broadcasting process through the channel.
In a specific application scenario, after the independent playing process is created, the live broadcast application program starts a related running component added with the independent process identifier in the dependency library to run the independent playing process, so that the related function of the playing application program runs in the independent playing process of the live broadcast application program.
Step S23: and transmitting the storage path of the resource file decompressed by the main process to the independent broadcasting process through the channel, so that the independent broadcasting process reads the decompressed resource file based on the storage path.
In a specific application scenario, after a main process of a live broadcast application program is started, a resource file is downloaded and decompressed through the main process, and a storage path of the decompressed resource file is obtained. In a specific application scenario, in response to the start of the main process of the live application program, the main process starts the unified download of the resource files, decompresses the downloaded files into the designated directory after the download, and saves the ID names of the resource files and the decompressed storage paths, which may be specifically saved in a memory or other storage devices. The content of the application scenario may be performed in any step before steps S21-S23, that is, the downloading and decompressing of the resource file of the host process is performed in response to the start of the host process, regardless of the creation and operation of the independent broadcast process.
In a specific application scenario, the storage path of the decompressed resource file can be transmitted from the main process to the independent broadcasting process through a channel between the main process and the independent broadcasting process, so that the independent broadcasting process can automatically read the decompressed resource file based on the acquired storage path, and therefore after the independent broadcasting process is in a background or is recycled by a system, the independent broadcasting process can acquire the related resource file based on the acquired storage path, and independent operation of the independent broadcasting process is guaranteed and is not dependent on the main process.
The resource files of this embodiment may include related resource files required for the main process to run and related resource files required for the independent broadcast process to run, including resource files such as application settings and user information.
In a specific application scenario, when the independent broadcast process needs to display the target resource and the independent broadcast process does not have a storage path of the target resource, the independent broadcast process may obtain, based on the channel, an updated storage path of the decompressed resource file from a memory or other storage device of the host process. In a specific application scenario, in response to that a memory or other storage device of the host process does not have a storage path of the target resource, the target resource is downloaded and decompressed through the independent broadcast process to obtain the storage path of the target resource, and the storage path of the target resource is synchronized to the host process through the channel. After the independent broadcasting process downloads and decompresses the target resource, the storage path of the target resource is stored in the memory or other storage devices of the independent broadcasting process. In a specific application scenario, when the independent broadcasting process downloads and decompresses the target resource, all updated resource files can be downloaded and decompressed together, so as to obtain storage paths of the target resource and all updated resource files, and the storage paths of the target resource and all updated resource files are synchronized to the main process through the channel. After the independent broadcasting process downloads and decompresses the target resource and all updated resource files, the storage paths of the target resource and all updated resource files are stored in the memory or other storage devices of the independent broadcasting process.
Through the above manner, the channel of the embodiment can realize resource unification between the main process and the independent broadcasting process, and synchronous operation between different processes.
Step S24: and starting each running component added with the independent process identifier in the dependency library, and running the independent broadcasting process by using the independent process identifier.
And after the independent broadcasting process is established, starting each running component added with the independent process identification in the dependency library, and running the independent broadcasting process by using the independent process identification.
In a specific application scenario, a data report can be created based on the independent broadcasting process through a live broadcast application program, and the data reported by the independent broadcasting process is separately stored in the data report to distinguish the data reported between the independent broadcasting process and the main process. And reporting the data of the main process to the original report according to the original reporting rule.
In a specific application scenario, a user volume report can be created based on an independent broadcasting process through a live broadcasting application program, and data reported by the independent broadcasting process is separately stored in the user volume report, so that a background can count the number of users of the independent broadcasting process in each time period or daily life.
In a specific application scenario, a user volume report and a crash volume report corresponding to an independent broadcast process can be created through a live broadcast application program, the user volume corresponding to the independent broadcast process is reported to the user volume report, the independent broadcast process is subjected to crash capture to obtain a crash volume, the crash volume is uploaded to the crash volume report, finally, the crash rate of the independent broadcast process is determined based on the user volume report and the crash volume report, and specifically, the crash volume in the crash volume report in a time period is divided by the user volume data in the user volume report in the same time period to obtain the crash rate of the independent broadcast process in the time period. Wherein the time period may include a one hour, one day, one week, etc. time period.
When the crash rate of the independent broadcasting process exceeds a preset crash threshold, an alarm can be given based on the independent broadcasting process. Specifically, a human or a developer can be notified in real time when the collapse rate exceeds a preset collapse threshold value, and a program related to the independent broadcasting process is checked, so that the independent broadcasting process is monitored.
In a specific application scenario, the method for distinguishing the data uploaded by the main process and the independent broadcasting process further includes adding the name of the independent broadcasting process to the name of the data reported by the independent broadcasting process, so as to distinguish the data reported by the independent broadcasting process. And when the data is counted and the independent broadcasting process reports the data, judging whether the name of the independent broadcasting process exists in each data or not, and if so, classifying the data into the data reported by the independent broadcasting process. If not, classifying the data into the data reported by other processes.
In the running process of the independent broadcasting process, whether the stack of the independent broadcasting process meets the preset condition or not can be judged, and if the stack of the independent broadcasting process meets the preset condition, the running of the independent broadcasting process is finished. And if the preset condition is not met, continuing the running of the independent broadcasting process. The preset condition includes that the stack is 0, the stack is below a certain stack threshold, or the user exits the relevant interface of the independent playing process. The stack threshold may be set based on actual conditions, and is not limited herein.
Through the steps, the method for realizing the independent broadcasting process of the embodiment can integrate the broadcasting function of the broadcasting application program to the live broadcasting application program by operating the independent broadcasting process through each operation component added with the independent process identification, and avoids the influence confusion between the broadcasting function and the function corresponding to the main process of the live broadcasting application program through the independent operation of the independent broadcasting process, thereby simplifying the operation logic of each process and improving the operation efficiency of each process. In addition, in the embodiment, a channel between the main process and the independent broadcasting process is established, and information interaction between the main process and the independent broadcasting process is realized through the channel, so that the independent broadcasting process can automatically read the required resource file, dependence on the main process is reduced, and the main process can still independently run after being recovered by the background. In addition, in the embodiment, a data report or a specific name is separately established for the reported data of the independent broadcasting process, so that the data reported by the independent broadcasting process can be rapidly distinguished, the independent monitoring of the independent broadcasting process is realized, and the operation of the independent broadcasting process is guaranteed.
Referring to fig. 3, fig. 3 is a schematic diagram of a framework of an embodiment of an apparatus for implementing an independent broadcast process according to the present application. The implementation device 30 of the independent broadcasting process includes an obtaining module 31, a creating module 32, and an executing module 33. The acquisition module 31 is configured to acquire a creation instruction of an independent broadcasting process through a live broadcast application; the creating module 32 is used for creating an independent broadcasting process by utilizing the dependency library based on the creating instruction; the dependency library is obtained by adding independent process identifiers in corresponding operating components of the broadcast application program, packaging and transmitting the operating components added with the independent process identifiers to the live broadcast application program; and the running module 33 is configured to start each running component in the dependency library after the independent process identifier is added, and run the independent broadcast process by using the independent process identifier.
The creating module 32 is further configured to respond to a channel through which a main process of the live application program interacts with the independent playing process, and directly create the independent playing process by using the dependent library based on a creating instruction; and in response to the fact that a channel for interaction with the independent broadcasting process does not exist in the main process of the live broadcast application program, creating the independent broadcasting process and creating a channel between the main process and the independent broadcasting process by utilizing the dependency library based on the creation instruction.
The creating module 32 is further configured to call a uniform interface layer of the dependent library through the live application program, and establish a channel between the main process and the independent broadcast process.
The running module 33 is further configured to respond to starting of the main process, download and decompress the resource file through the main process, and obtain a storage path of the decompressed resource file; and transmitting the storage path of the decompressed resource file to the independent broadcasting process through the channel, so that the independent broadcasting process reads the decompressed resource file based on the storage path.
The running module 33 is further configured to update the storage path of the decompressed resource file from the main process based on the channel in response to that the storage path of the target resource does not exist in the independent broadcast process; in response to the fact that the storage path of the target resource does not exist in the main process, the target resource is downloaded and decompressed through the independent broadcasting process, and the storage path of the target resource is obtained; and transmitting the storage path of the target resource to the main process through the channel.
The running module 33 is further configured to create a data report based on the independent broadcast process; and independently storing the data reported by the independent broadcasting process in a data report so as to distinguish the data reported by the independent broadcasting process.
The running module 33 is further configured to create a user volume report and a crash volume report corresponding to the independent broadcast process; the step of storing the data reported by the independent broadcasting process in the data report individually to distinguish the data reported by the independent broadcasting process comprises the following steps: reporting the user quantity corresponding to the independent broadcasting process to a user quantity report; performing crash capture on the independent broadcasting process to obtain a crash amount, and uploading the crash amount to a crash amount report; determining a crash rate of the independent launch process based on the user volume report and the crash volume report.
The running module 33 is further configured to add the name of the independent broadcasting process to the name of the data reported by the independent broadcasting process, so as to distinguish the data reported by the independent broadcasting process.
The running module 33 is further configured to end the running of the independent playing process in response to that the stack of the independent playing process satisfies a preset condition.
By the aid of the scheme, functions of the application program can be integrated into the live application program and independently run in the live application program, and related functions of the live application program are not affected.
Referring to fig. 4, fig. 4 is a schematic diagram of a frame of an embodiment of an electronic device according to the present application. The electronic device 40 includes a memory 41 and a processor 42 coupled to each other, and the processor 42 is configured to execute program instructions stored in the memory 41 to implement the steps of the method for implementing the independent broadcasting process according to any of the embodiments. In one particular implementation scenario, electronic device 40 may include, but is not limited to: a microcomputer, a server, and the electronic device 40 may also include a mobile device such as a notebook computer, a tablet computer, and the like, which is not limited herein.
In particular, the processor 42 is configured to control itself and the memory 41 to implement the steps of any of the above-described implementation method embodiments of the independent casting process. Processor 42 may also be referred to as a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip having signal processing capabilities. The Processor 42 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 42 may be commonly implemented by an integrated circuit chip.
By the aid of the scheme, functions of the application program can be integrated into the live application program and independently run in the live application program, and related functions of the live application program are not affected.
Referring to fig. 5, fig. 5 is a block diagram illustrating an embodiment of a computer-readable storage medium according to the present application. The computer readable storage medium 50 stores program instructions 501 capable of being executed by the processor, and the program instructions 501 are used for implementing the steps of the method for implementing the independent broadcasting process of any one of the above embodiments.
By the aid of the scheme, functions of the application program can be integrated into the live application program and independently run in the live application program, and related functions of the live application program are not affected.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely one type of logical division, and an actual implementation may have another division, for example, a unit or a component may be combined or integrated with another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on network elements. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Claims (12)
1. A method for implementing an independent broadcast process is characterized in that the method for implementing the independent broadcast process comprises the following steps:
acquiring a creation instruction of an independent playing process through a live broadcast application program;
creating the independent broadcasting process by utilizing a dependent library based on the creating instruction; the dependency library is obtained by adding independent process identifiers in corresponding operating components of the broadcast application program, packaging and transmitting the operating components added with the independent process identifiers to the live broadcast application program;
and starting each running component added with the independent process identifier in the dependency library, and running the independent broadcast process by using the independent process identifier.
2. The method according to claim 1, wherein the step of creating the independent broadcast process using a dependent library based on the creation instruction comprises:
responding to the fact that a channel for interaction with the independent playing process exists in a main process of the live broadcast application program, and directly creating the independent playing process by utilizing the dependent library based on the creating instruction;
and in response to the fact that a channel for interacting with the independent broadcasting process does not exist in the main process of the live application program, creating the independent broadcasting process and a channel between the main process and the independent broadcasting process by utilizing the dependent library based on the creating instruction.
3. The method according to claim 2, wherein the step of creating a channel between the main process and the independent broadcast process comprises:
and calling a uniform interface layer of the dependency library through a live broadcast application program, and establishing the channel between the main process and the independent broadcasting process.
4. The method for implementing an independent broadcasting process according to claim 2, wherein the method for implementing an independent broadcasting process further comprises:
responding to the starting of the main process, downloading and decompressing the resource file through the main process, and obtaining a storage path of the decompressed resource file;
and transmitting the decompressed storage path of the resource file to the independent broadcasting process through the channel, so that the independent broadcasting process reads the decompressed resource file based on the storage path.
5. The method for implementing an independent broadcasting process according to claim 4, wherein the method for implementing an independent broadcasting process further comprises:
updating the storage path of the decompressed resource file from the main process based on the channel in response to the fact that the storage path of the target resource does not exist in the independent playing process;
in response to the fact that the storage path of the target resource does not exist in the main process, downloading and decompressing the target resource through the independent broadcasting process to obtain the storage path of the target resource;
and transmitting the storage path of the target resource to the main process through the channel.
6. The method for implementing independent broadcasting process according to claim 1 or 2, wherein the method for implementing independent broadcasting process further comprises:
creating a data report based on the independent broadcasting process;
and independently storing the data reported by the independent broadcasting process in the data report so as to distinguish the data reported by the independent broadcasting process.
7. The method for implementing an independent broadcasting process according to claim 6, wherein the step of creating a data report based on the independent broadcasting process includes:
creating a user volume report and a crash volume report corresponding to the independent playing process;
the step of separately storing the data reported by the independent broadcasting process in the data report to distinguish the data reported by the independent broadcasting process comprises:
reporting the user quantity corresponding to the independent broadcasting process to the user quantity report; and
performing crash capture on the independent development process to obtain a crash amount, and uploading the crash amount to the crash amount report;
and determining the breakdown rate of the independent broadcasting process based on the user quantity report and the breakdown quantity report.
8. The method for implementing independent broadcasting process according to claim 1 or 2, wherein the method for implementing independent broadcasting process further comprises:
and adding the name of the independent broadcasting process into the name of the data reported by the independent broadcasting process so as to distinguish the data reported by the independent broadcasting process.
9. The method according to claim 1, wherein the step of starting each running component after adding the independent process identifier in the dependent library and running the independent broadcasting process by using the independent process identifier includes:
and in response to the stack of the independent broadcasting process meeting a preset condition, ending the running of the independent broadcasting process.
10. An apparatus for implementing an independent broadcast process, comprising:
the acquisition module is used for acquiring a creation instruction of the independent broadcasting process through the live broadcasting application program;
the creating module is used for creating the independent broadcasting process by utilizing a dependent library based on the creating instruction; the dependency library is obtained by adding independent process identifiers in corresponding operating components of the broadcast application program, packaging and transmitting the operating components added with the independent process identifiers to the live broadcast application program;
and the running module is used for starting each running component after the independent process identifier is added in the dependency library and running the independent broadcasting process by using the independent process identifier.
11. An electronic device, comprising a memory and a processor coupled to each other, wherein the processor is configured to execute program instructions stored in the memory to implement the method for implementing the independent broadcast process according to any one of claims 1 to 9.
12. A computer-readable storage medium having stored thereon program instructions, which when executed by a processor implement a method of implementing the independent casting process of any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110859703.XA CN113656091B (en) | 2021-07-28 | 2021-07-28 | Method for realizing independent open program process, related device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110859703.XA CN113656091B (en) | 2021-07-28 | 2021-07-28 | Method for realizing independent open program process, related device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113656091A true CN113656091A (en) | 2021-11-16 |
CN113656091B CN113656091B (en) | 2024-06-21 |
Family
ID=78490816
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110859703.XA Active CN113656091B (en) | 2021-07-28 | 2021-07-28 | Method for realizing independent open program process, related device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113656091B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117130680A (en) * | 2023-02-24 | 2023-11-28 | 荣耀终端有限公司 | Calling method of chip resources and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101996095A (en) * | 2009-08-26 | 2011-03-30 | 阿里巴巴集团控股有限公司 | Method and device for accessing instant messaging program to plugin |
CN104216738A (en) * | 2014-08-20 | 2014-12-17 | 北京奇艺世纪科技有限公司 | Operation method and operation device of application program |
CN107678801A (en) * | 2017-10-09 | 2018-02-09 | 武汉斗鱼网络科技有限公司 | A kind of method and apparatus of plug-in unit loading |
-
2021
- 2021-07-28 CN CN202110859703.XA patent/CN113656091B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101996095A (en) * | 2009-08-26 | 2011-03-30 | 阿里巴巴集团控股有限公司 | Method and device for accessing instant messaging program to plugin |
CN104216738A (en) * | 2014-08-20 | 2014-12-17 | 北京奇艺世纪科技有限公司 | Operation method and operation device of application program |
CN107678801A (en) * | 2017-10-09 | 2018-02-09 | 武汉斗鱼网络科技有限公司 | A kind of method and apparatus of plug-in unit loading |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117130680A (en) * | 2023-02-24 | 2023-11-28 | 荣耀终端有限公司 | Calling method of chip resources and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN113656091B (en) | 2024-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108491275B (en) | Program optimization method, device, terminal and storage medium | |
CN109471653B (en) | Application program updating method, electronic device, server and storage medium | |
US11360737B2 (en) | Method and apparatus for providing speech service | |
CN109391843B (en) | Online video speed doubling playing method, device, medium and intelligent terminal | |
CN111125604B (en) | Page management method and device, terminal equipment and storage medium | |
CN111324378B (en) | Configuration method, device and equipment for video monitoring application software | |
CN111614954A (en) | Index acquisition processing method and device for streaming media, computer and storage medium | |
CN115185717B (en) | Interface calling method and device, electronic equipment and storage medium | |
CN111008032A (en) | Page data updating method and device | |
CN113656091A (en) | Method for realizing independent broadcasting process, related device and equipment | |
CN101964742B (en) | Method, system and device for using network open ability | |
CN110610080B (en) | Application isolation implementation method, mobile terminal, computer equipment and storage medium | |
CN107888772B (en) | Method, device and storage medium for determining configuration information | |
CN114157725B (en) | Method, device, server, electronic equipment and storage medium for equipment linkage | |
CN114221968B (en) | Method, device and equipment for processing service in private network terminal | |
CN111068304B (en) | Haptic feedback sharing method, device and system | |
CN111638914A (en) | Method, equipment and storage medium for setting terminal function | |
CN111970675A (en) | Early warning method and device and storage medium | |
CN106970884B (en) | Method and device for processing serial port command applied to android system running layer | |
CN111198721A (en) | Application program running method and device | |
CN112463515A (en) | Data acquisition method and device based on small program, storage medium and electronic equipment | |
CN111770361B (en) | Picture processing method, device and equipment and computer readable storage medium | |
CN111026650B (en) | Method and device for testing software, storage medium and electronic equipment | |
CN114501057B (en) | Data processing method, storage medium, processor and system | |
CN115580535A (en) | Configuration file updating method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |