Method and device for playing multimedia data and computer readable storage medium

By introducing a page information storage stack and sharing player objects in multimedia data playback applications, the problem caused by frequent player switching is solved, more efficient memory usage and improved user experience are achieved, and continuous statistics and backtracking capabilities of player information are provided.

CN120676196APending Publication Date: 2025-09-19ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510824816.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

When frequently switching to play the same multimedia data within the same application, existing technologies lead to complex player management, large memory overhead, long first frame time, poor user experience, and discontinuous player information statistics.

Method used

A page information storage stack management mechanism is adopted to share the same player object between different pages to avoid frequent release and creation of players, and the stack structure is used to achieve automatic management and backtracking of player objects.

Benefits of technology

Reduce memory overhead, shorten the first frame time, improve the user viewing experience, simplify player information statistics, implement playback scene backtracking function, and improve development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120676196A_ABST
    Figure CN120676196A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a multimedia data playing method and device and a computer readable storage medium, and the method can comprise the steps: responding to a request for playing first multimedia data in a first page, and obtaining a page information storage stack for the first multimedia data; first page information about the first page is generated, the first page information is stored in the stack top of the page information storage stack, and the first page information comprises a first playing view for playing the first multimedia data in the first page; the first page information stored in the stack top is bound with a player object so that the first multimedia data can be played in the first page through the player object, the player object is created when the first multimedia data is played in a second page, and the second page is the first page for playing the first multimedia data. Therefore, at least one problem caused by frequent release and creation of the player when the same multimedia data is switched and played among different pages can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of computer technology, and in particular to a method, device, and computer-readable storage medium for playing multimedia data. Background Art

[0002] Currently, when switching between different pages within the same application (APP) to play the same multimedia data (such as video or audio), the player needs to be frequently released and created. This leads to a series of problems, including complex player management, high memory usage, long first frame time, poor user viewing experience, and complex player information statistics. Improvements are urgently needed. Summary of the Invention

[0003] Embodiments of the present application provide a method, device, and computer-readable storage medium for playing multimedia data to solve at least one problem caused by frequent release and creation of players when switching between different pages to play the same multimedia data in existing multimedia data playback solutions.

[0004] To solve the above technical problems, the embodiments of the present application are implemented as follows: In a first aspect, a method for playing multimedia data is provided, the method comprising: In response to a request to play first multimedia data in a first page, obtaining a page information storage stack for the first multimedia data; generating first page information about the first page, and storing the first page information at the top of the page information storage stack, wherein the first page information includes a first playback view for playing the first multimedia data in the first page; Bind the first page information stored at the top of the stack to a player object to play the first multimedia data through the player object in the first page, wherein the player object is created when the first multimedia data is played on the second page, and the second page is the first page to play the first multimedia data.

[0005] In a second aspect, a device for playing multimedia data is provided, the device comprising: A first acquisition module, configured to acquire a page information storage stack for the first multimedia data in response to a request to play the first multimedia data in the first page; a first storage module, configured to generate first page information about the first page, and store the first page information at the top of the page information storage stack, wherein the first page information includes a first playback view for playing the first multimedia data in the first page; A first binding module is used to bind the first page information stored at the top of the stack to a player object so as to play the first multimedia data through the player object in the first page, wherein the player object is created when the first multimedia data is played on the second page, and the second page is the first page to play the first multimedia data.

[0006] According to a third aspect, an electronic device is provided, including: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method as described in the first aspect.

[0007] In a fourth aspect, a computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in the first aspect.

[0008] In a fifth aspect, a computer program product comprising instructions is provided, wherein when a computer runs the instructions of the computer program product, the computer executes the method described in the first aspect.

[0009] In an embodiment of the present application, a player object is created on the first page that plays the first multimedia data, and a page information storage stack is introduced for the first multimedia data. When the first multimedia data needs to be played on the first page, first page information about the first page is generated and stored at the top of the page information storage stack, and the first page information stored at the top of the stack is bound to the player object, so that the first multimedia data can be played through the player object in the first page. In this way, when the page that plays the first multimedia data is switched from other pages to the first page, there is no need to release and recreate the player, so that at least one problem caused by frequent release and creation of the player when the existing multimedia data playback scheme switches between different pages to play the same multimedia data can be avoided, thereby achieving the beneficial effects of reducing memory overhead, reducing the first frame time, improving user viewing experience, and simplifying the player information statistics process. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0011] Figure 1This is a flowchart of a method for playing multimedia data provided in an embodiment of the present application.

[0012] Figure 2 This is a flowchart of a method for playing multimedia data provided in an embodiment of the present application.

[0013] Figure 3 This is a flowchart of a method for playing multimedia data provided in an embodiment of the present application.

[0014] Figure 4 This is a structural diagram of an electronic device proposed in an embodiment of the present application.

[0015] Figure 5 This is a structural diagram of a framework for playing multimedia data proposed in an embodiment of the present application.

[0016] Figure 6 It is a structural diagram of a device for playing multimedia data provided in an embodiment of the present application.

[0017] Figure 7 It is a structural diagram of a device for playing multimedia data provided in an embodiment of the present application.

[0018] Figure 8 It is a structural diagram of a device for playing multimedia data provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this document.

[0020] The terms "first," "second," etc., in this application and the claims are used to distinguish similar objects and are not used to describe a particular order or precedence. It should be understood that the numerals used in this manner are interchangeable where appropriate so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein. In addition, the term "and / or" in this application and the claims represents at least one of the connected objects, and the character " / " generally represents that the objects associated with each other are in an "or" relationship.

[0021] Currently, multimedia playback applications typically handle switching between different pages of the same multimedia data. This involves frequent player creation and relies heavily on application developers to handle the process. There are no dedicated systems to automate this task. This leads to a series of issues, including complex player management, high memory usage, long first-frame playback times, a poor user experience, and complex player information statistics.

[0022] Since the 4G era, mobile video has become a ubiquitous part of mobile phone users' lives. With the rapid development of the internet and the ubiquity of smartphones, people can now access a wide variety of video-based information anytime, anywhere. The development of internet video playback has profoundly transformed information dissemination, entertainment, and social interaction. Its evolution has been closely intertwined with technological breakthroughs, making it the foundational infrastructure of the digital age. Simultaneously, with the advancement of networks and hardware, users are demanding higher and higher video clarity and a more stringent viewing experience. Both long-form and short-form video applications are constantly evolving, leading to increasingly complex playback scenarios within their apps. Within apps, the same video is increasingly frequently switched between different pages, posing significant challenges to player management, memory usage, switching experience, and the time it takes to reach the first frame. Furthermore, the industry currently lacks playback scene replay functionality, relying solely on the simple switching of the player between different pages, lacking robust practical examples for player management and user experience. Furthermore, maintaining statistics for playback information when switching between pages presents a significant challenge.

[0023] To address at least one of the aforementioned issues, this application proposes a method, device, and computer-readable storage medium for playing multimedia data. The method can be executed by an electronic device or software installed in the electronic device. The electronic device includes, but is not limited to, any of the following smart devices: smartphones, personal computers (PCs), laptops, tablets, e-readers, internet-connected televisions, wearable devices, and the like.

[0024] The goal of a method for playing multimedia data proposed in an embodiment of the present application is: for the same multimedia data, when switching between different pages for playback, the same player object is used. The technical concept of a method for playing multimedia data proposed in an embodiment of the present application is roughly: to provide a general framework for automated player management and backtracking, which provides automatic shared management of player objects between different pages. The framework manages the playback information of multimedia data in different pages (i.e., page information containing playback views) based on a global stack structure. When the same multimedia data is switched between different pages for playback, the method will automatically bind the page information stored at the top of the stack to the unique player object created for the multimedia data, thereby completing the sharing of player objects when the same multimedia data is switched between different pages for playback, thereby solving at least one of the above-mentioned problems existing in existing multimedia data playback solutions.

[0025] The technical significance of the method for playing multimedia data proposed in the embodiments of this application lies in: using an independent system to achieve player sharing between different pages, while significantly reducing development costs while solving at least one of the above-mentioned problems. The method for playing multimedia data proposed in the embodiments of this application does not rely on any third-party technology or network, and therefore has wide applicability and strong stability. It can be used in any video software, for example, on system platforms such as Android, iOS, and Windows.

[0026] In the embodiments of the present application, multimedia data may include, but is not limited to, one of video, audio, and animation. Accordingly, the player for the multimedia data may be one of a video player, an audio player, and an animation player. The following describes a method for playing multimedia data proposed in the embodiments of the present application, primarily using video as an example.

[0027] As an example, a method for playing multimedia data proposed in an embodiment of the present application is applicable to scenarios where the same video is switched between different pages within the video playback software, such as switching between floating windows, video players, video preview pages, and horizontal screen playback pages.

[0028] In addition, it should be noted that the method for playing multimedia data proposed in the embodiment of the present application is not only a framework for solving the above-mentioned problems existing in multimedia data playback, but its core idea can also be extrapolated to other services.

[0029] The following first describes a method for playing multimedia data provided by an embodiment of the present application.

[0030] like Figure 1 As shown, an embodiment of the present application proposes a method for playing multimedia data, which may include: Step 101: In response to a request to play first multimedia data in a first page, obtain a page information storage stack for the first multimedia data.

[0031] In some embodiments, the first page may be a page in a first application, the first application may be any application (or software) capable of playing multimedia data, and the first multimedia data may be any multimedia data that can be played in the first application.

[0032] In some embodiments, the first page may be an initialization page for playing the first multimedia data in the first application, or may be another page for playing the first multimedia data in the first application.

[0033] The page information storage stack of the first multimedia data is used to store the page information of the first multimedia data on each playback page. In some embodiments, the page information of the first multimedia data on a certain playback page may include a playback view (Playback View) on the playback page that plays the first multimedia data. The playback view refers to the core interface area that the user directly sees and operates on the playback page. It is responsible for presenting the multimedia data content and supporting user interaction. Optionally, the page information of the first multimedia data on a certain playback page may also include at least one item of information such as the data content of the first multimedia data and the context of the player object.

[0034] Step 102 : Generate first page information about the first page, and store the first page information at the top of the page information storage stack, wherein the first page information includes a first playback view for playing the first multimedia data in the first page.

[0035] In some embodiments, before storing the first page information at the top of the page information storage stack, it may be further determined whether the page information storage stack is empty. If the page information storage stack is empty, the first page information is directly stored at the top of the page information storage stack. If the page information storage stack is not empty, the third page information stored at the top of the page information storage stack is moved to the second top layer of the page information storage stack before the first page information is stored at the top of the page storage stack. The third page information may include a second playback view of the first multimedia data played on a third page, the third page being the page that most recently played the first multimedia data before the first page played the first multimedia data.

[0036] Step 103: Bind the first page information stored at the top of the stack to the player object to play the first multimedia data through the player object in the first page, wherein the player object is created when the first multimedia data is played on the second page, and the second page is the first page to play the first multimedia data.

[0037] In some embodiments, the second page may be the first page in the first application that plays the first multimedia data, wherein the first application may be any application (or software) that can play multimedia data, and the first multimedia data may be any multimedia data that can be played in the first application.

[0038] It can be understood that if the first page is the first page for playing the first multimedia data in the first application, the second page is the first page.

[0039] It can be understood that since the first page information includes the first playback view for playing the first multimedia data in the first page, binding the first page information stored at the top of the stack to the player object can enable the player object to play the first multimedia data on the first page according to the first playback view.

[0040] The embodiment of the present application proposes a method for playing multimedia data, which creates a player object on the first page of playing the first multimedia data, and introduces a page information storage stack for the first multimedia data. When the first multimedia data needs to be played on the first page, first page information about the first page is generated and stored at the top of the page information storage stack, and the first page information stored at the top of the stack is bound to the player object, so that the first multimedia data can be played through the player object in the first page. In this way, when the page playing the first multimedia data switches from other pages to the first page, there is no need to release and recreate the player, so that at least one problem caused by frequent release and creation of the player when switching between different pages to play the same multimedia data in the existing multimedia data playback scheme can be avoided, thereby achieving the beneficial effects of reducing memory overhead, reducing the time consumption of the first frame, improving the user viewing experience, and simplifying the player information statistics process.

[0041] Alternatively, as Figure 2 As shown, after step 101 and before step 102, the method for playing multimedia data proposed in the embodiment of the present application may further include: Step 104 , determining whether the page information storage stack is obtained, if so, executing step 105 ; otherwise, executing step 106 .

[0042] Step 105: When the page information storage stack is obtained, if the top of the stack stores third page information and the third page information is bound to the player object, the third page information stored at the top of the stack is unbound from the player object.

[0043] The third page information includes a second play view for playing the first multimedia data in a third page, and the third page is a page that played the first multimedia data most recently before the first page played the first multimedia data.

[0044] It can be understood that if the third page is the first page for playing the first multimedia data in the first application, then the second page is the third page.

[0045] Step 106: If the page information storage stack is not obtained, create the page information storage stack.

[0046] Optionally, the method for playing multimedia data proposed in the embodiment of the present application may further include: storing the page information storage stack and the identifier of the first multimedia data in correspondence with each other after the page information storage stack is created each time.

[0047] Optionally, after creating a page information storage stack for the first multimedia data, the method for playing multimedia data provided in an embodiment of the present application may further include: creating the player object based on the identifier of the first multimedia data. In some embodiments, a player object serving as the player object may be created in the singleton object by calling a playback scene initialization interface of the singleton object described below, for playing the first multimedia data.

[0048] In some embodiments, a method for playing multimedia data proposed in an embodiment of the present application may exist as a singleton object in a first application.

[0049] A singleton object is a unique instance of a class designed using the Singleton Pattern. This pattern ensures that a class has only one instance and provides a global access point for obtaining that instance. The Singleton Interface is the set of public methods exposed by the singleton class. It controls the creation and access of the singleton object, hiding internal implementation details and exposing only necessary functionality, ensuring that external code can operate the singleton object through a unified entry point.

[0050] Optionally, the singleton object can provide a playback scene initialization interface and a playback scene destruction interface to the outside world, wherein the playback scene initialization interface is used to call the singleton object to manage the player object and page information stack that plays the first multimedia data; the playback scene destruction interface is used to call the singleton object to execute the operation of unbinding the page information stored at the top of the stack from the player object, and / or, execute the operation of destroying the player object.

[0051] Optionally, a page information storage stack object for the first multimedia data may be created within the singleton object, for storing page information of the first multimedia data on each playback page.

[0052] Optionally, the singleton object can maintain a data mapping storage object internally. Accordingly, the corresponding storage of the page information storage stack and the identifier of the first multimedia data may include: corresponding storage of the page information storage stack and the identifier of the first multimedia data in a data mapping storage object. The identifier of the first multimedia data can be used as a search value for the mapping data, and the page information storage stack can be used as a mapping value for the mapping data. As an example, the identifier of the first multimedia data can be the ID of the first multimedia data. It can be understood that since the multimedia data ID is unique within the same application software, using the multimedia data ID as the search value for data mapping can ensure that the same multimedia data uses the same page information storage stack object.

[0053] At this time, in the above step 101, the acquiring of the page information storage stack for the first multimedia data may include: acquiring the page information storage stack for the first multimedia data from the data mapping storage object according to the identifier of the first multimedia data.

[0054] The method for playing multimedia data provided by the above embodiment can realize seamless switching and playback of the first multimedia data between the third page and the first page. In the process of switching playback between different pages, the same player is shared without the need to frequently release or rebuild the player, avoiding the performance overhead caused by frequent creation and release of the player, while improving the utilization efficiency of the player and greatly optimizing the user's direct viewing experience.

[0055] Optionally, after step 103, as Figure 3 As shown, a method for playing multimedia data proposed in an embodiment of the present application may further include: Step 107 : In response to canceling the request to play the first multimedia data in the first page, obtain the page information storage stack.

[0056] The cancellation of the request to play the first multimedia data in the first page is used to destroy the playback scene of the first multimedia data in the first page, that is, to end the playback of the first multimedia data in the first page.

[0057] Step 108 , determining whether the page information storage stack is obtained, if so, executing step 109 , otherwise executing step 116 or doing nothing.

[0058] Step 109: unbind the first page information stored at the top of the stack from the player object, and remove the first page information from the top of the stack.

[0059] It can be understood that by executing step 109 , the playback scene of playing the first multimedia data on the first page can be destroyed, that is, the playback of the first multimedia data on the first page can be ended.

[0060] Alternatively, as Figure 3 As shown, after step 109, the method for playing multimedia data proposed in the embodiment of the present application may further include: Step 110 , determining whether the page information storage stack is empty, if so, executing at least one of steps 111 , 112 and 113 , otherwise executing step 114 .

[0061] Step 111: Generate statistical information of the player object through the player information statistical object.

[0062] The player object information statistics object may be created when the player object is created. Optionally, the player information statistics object may be applied to each page along with the player object, thereby completing the playback information statistics of the player object across different pages.

[0063] The statistics of a player object vary depending on the specific player type (e.g., video player, audio player, streaming player, in-game player / replay system), but generally include the following core information: 1) Basic playback information, including one or more of the following: Current playback position / progress: Displays the current playback time point.

[0064] Total playback time.

[0065] Playback status: playing, paused, stopped, buffering, finished, etc.

[0066] Playback speed: The current playback rate (e.g., 1.0x normal speed, 1.5x double speed, 0.75x slow speed).

[0067] Loop mode: single song loop, list loop, random play, no loop, etc. (mainly when playing audio / video lists).

[0068] 2) Performance and network information, including one or more of the following: Buffer status: Displays the amount of data downloaded and stored locally waiting for playback (usually expressed in time or data volume). Insufficient buffering can cause lag.

[0069] Network Speed / Download Rate: Displays the current speed (e.g. 1.2 MB / s) of downloading data from the network (streaming or online source) in real time.

[0070] Number of dropped frames / number of rendered frames: The video player will count the number of frames that are forced to be skipped due to insufficient performance (decoding or rendering cannot keep up), as well as the number of frames / frame rate that are actually successfully rendered.

[0071] Decoder information: The name of the audio and video decoder used.

[0072] CPU / GPU usage: The resource usage of the player process or the entire system (provided by some advanced players or system monitoring tools).

[0073] Latency: This is particularly important in live streaming, and refers to the time difference between when the signal is generated and when the audience sees the picture (e.g., a 5-second delay).

[0074] Jitter: The instability of data packet arrival time during network transmission affects smoothness.

[0075] 3) Audio / video specific information, including one or more of the following: Volume / Gain: The current playback volume level, sometimes including dynamic range compression or gain information.

[0076] Audio spectrum / visualization: Graphically displays the frequency distribution of audio (mostly in music players).

[0077] Subtitle / audio track information: currently enabled subtitle language, audio track language, subtitle encoding, etc.

[0078] It can be understood that in the management of statistical information of player objects, along with the sharing of player objects, the statistical information is also shared along with the players, avoiding the problem of discontinuous statistical information between different pages and improving the accuracy of statistical information.

[0079] Step 112: destroy the player object.

[0080] Step 113: Delete the identifiers of the page information storage stack and the first multimedia data stored in the data mapping storage object.

[0081] It can be understood that when the page information storage stack for the first multimedia data is empty, it means that there is no scenario where the first multimedia data needs to be played, that is, the playback of the first multimedia data has ended. At this time, statistical information of the player object can be generated, the player object can be destroyed, and the corresponding page information storage stack and the identifier of the first multimedia data stored in the data mapping storage object can be deleted to save storage and network resources of the playback device.

[0082] Step 114 : Move the third page information stored in the second top layer of the page information storage stack to the top of the stack.

[0083] It can be understood that the characteristic of the data stack is first-in-last-out, so after the first page information at the top of the stack is moved out of the page information storage stack, the third page information stored in the second top layer will be automatically moved to the top of the stack.

[0084] Step 115 : Bind the third page information stored at the top of the stack to the player object, so as to play the first multimedia data in the third page through the player object.

[0085] It can be understood that through the above step 115, the playback scene corresponding to the third page can be backtracked.

[0086] For example, assuming that the first multimedia data is a video, the first page is page B, and the third page is page A, when you need to play a video on page A, you can call the playback scene initialization interface of the above-mentioned singleton object, and query whether there is a page information storage stack for the video in the data mapping storage object according to the video ID. If it exists, you will get the page information storage stack for the video; if it does not exist, you will generate a page information storage stack for the video, and store the page information storage stack and the ID of the video in the data mapping storage object accordingly, and create a player object according to the ID of the video; then, package the third page information of the video on page A, which may include the playback view of the video on page A, the video data of the video and other information; then, store the packaged third page information at the top of the page information storage stack corresponding to the video; next, bind the third page information at the top of the stack to the player object created for the video, thereby completing the initialization operation of the first playback of the video.

[0087] Furthermore, when the video enters page B for playback, the playback scene initialization interface of the above-mentioned singleton object is called to generate the first page information under page B, and the existing page information storage stack for the video is queried through the video ID, the third page information is unbound from the player object, and then the first page information is stored at the top of the page information storage stack; thereafter, the first page information stored at the top of the stack is bound to the player object, so that the player object plays the video on page B, thereby completing the seamless switching of the video playback page from page A to page B.

[0088] Furthermore, when the playback page of the video returns to page A from page B, the playback scene destruction interface of the above-mentioned singleton object can be called to unbind the first page information under page B from the player object, and move the first page information stored at the top of the stack out of the page information storage stack, and at the same time move the third page information stored at the second top layer of the page information storage stack to the top of the stack. Next, the player object and the third page information packaged at the top of the stack are bound, thereby completing the automatic backtracking function of the playback scene under page A.

[0089] Optionally, the player's playback information statistics are associated with the player application in each page, completing the continuous statistics of the player's playback information between different pages.

[0090] A method for playing multimedia data proposed in an embodiment of the present application can not only solve at least one problem caused by the frequent release and creation of players when switching between different pages to play the same multimedia data in existing multimedia data playback solutions, but also achieve the beneficial effects of reducing memory overhead, reducing first frame time, improving user viewing experience, and simplifying the player information statistics process; it can also take the user's perspective as the starting point and stand from the user's perspective to provide users with a more flexible and better viewing experience; at the same time, it reduces the difficulty of player management and improves developer development efficiency; in addition, the method can also realize the backtracking function of the playback scene, and provides support for the player to automatically backtrack to the previous page for playback when the page rolls back; finally, the method uses the player's statistical information as the companion data of the player object, completes the continuous statistics of the playback information, and ensures the integrity and reliability of the statistical information.

[0091] The foregoing description describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0092] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 4 At the hardware level, the electronic device includes a processor and, optionally, an internal bus, a network interface, and memory. The memory may include internal memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for its services.

[0093] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0094] The memory is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.

[0095] The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs it, forming a device for playing multimedia data at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations: In response to a request to play first multimedia data in a first page, obtaining a page information storage stack for the first multimedia data; generating first page information about the first page, and storing the first page information at the top of the page information storage stack, wherein the first page information includes a first playback view for playing the first multimedia data in the first page; Bind the first page information stored at the top of the stack to a player object to play the first multimedia data through the player object in the first page, wherein the player object is created when the first multimedia data is played on the second page, and the second page is the first page to play the first multimedia data.

[0096] The above application Figure 4 The methods performed by the apparatus for playing multimedia data disclosed in the illustrated embodiments can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the aforementioned method can be performed by hardware integrated logic circuits within the processor or by software instructions. The aforementioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly executed by a hardware decoding processor or by a combination of hardware and software modules within the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.

[0097] The electronic device may also perform Figure 1 Method and device for playing multimedia data Figure 1 The functions in the illustrated embodiments will not be described in detail in the embodiments of the present application.

[0098] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0099] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including multiple target applications, can enable the portable electronic device to execute Figure 1 The method of the embodiment shown is specifically used to perform the following operations: In response to a request to play first multimedia data in a first page, obtaining a page information storage stack for the first multimedia data; generating first page information about the first page, and storing the first page information at the top of the page information storage stack, wherein the first page information includes a first playback view for playing the first multimedia data in the first page; Bind the first page information stored at the top of the stack to a player object to play the first multimedia data through the player object in the first page, wherein the player object is created when the first multimedia data is played on the second page, and the second page is the first page to play the first multimedia data.

[0100] The embodiment of the present application further provides a computer program product including instructions. When a computer runs the instructions of the computer program product, the computer executes the following Figure 1 The method of the embodiment shown in the figure can achieve the same technical effect.

[0101] The embodiment of the present application takes into account the problems of difficulty in player management, high performance overhead, inability to backtrack playback scenes, and discontinuous player information statistics when switching playback between different pages of multimedia data playback application software. A player management framework that acts on the global level is proposed to handle the above problems within the framework, shield the implementation details from the outside, and help the outside to initialize and destroy through a simple interface. This technology is not a simple integration of existing technologies, but a framework that can automatically realize the sharing of players between different pages. The framework can also reduce the development and maintenance difficulty of external businesses in this function. In the framework provided in the embodiment of the present application, the first-in-last-out feature of the data stack is utilized to provide the framework with playback scene backtracking capabilities. At the same time, it is highly encapsulated, providing a simple access practice case for the outside, thereby improving development efficiency. Finally, the automated player creation, binding, unbinding, destruction and other behaviors also provide necessary support for a series of player management.

[0102] In addition, the technical concept of the embodiment of the present application can not only be used for shared management of the player, but can also be used in more similar multi-scenario sharing. For example, in the embodiment of the present application, the player's playback information statistics can also use this method to realize the sharing of statistical information between different playback pages.

[0103] Figure 5 FIG. 1 shows a schematic diagram of a structure of a multimedia data playing framework proposed in an embodiment of the present application in practical application. Figure 5As shown, for a certain multimedia data that needs to be played, a framework 50 for playing multimedia data proposed in an embodiment of the present application can realize the sharing of data mapping storage objects 51, player objects 52, page information storage stack objects 53 and player information statistics objects 54 on the playback pages corresponding to different playback scenarios, thereby avoiding at least one problem caused by frequent release and creation of players when the existing multimedia data playback scheme switches between different pages to play the same multimedia data, and achieving beneficial effects such as reducing memory overhead, reducing first frame time, improving user viewing experience, and simplifying the player information statistics process.

[0104] Figure 6 This is a schematic diagram of the structure of an apparatus 600 for playing multimedia data according to an embodiment of the present application. Figure 6 In a software implementation, the first device 600 for playing multimedia data may include: a first acquisition module 601 , a first storage module 602 and a first binding module 603 .

[0105] The first acquisition module 601 is configured to acquire a page information storage stack for the first multimedia data in response to a request to play the first multimedia data in the first page.

[0106] In some embodiments, the first page may be a page in a first application, the first application may be any application (or software) capable of playing multimedia data, and the first multimedia data may be any multimedia data that can be played in the first application.

[0107] In some embodiments, the first page may be an initialization page for playing the first multimedia data in the first application, or may be another page for playing the first multimedia data in the first application.

[0108] The page information storage stack of the first multimedia data is used to store the page information of the first multimedia data on each playback page. In some embodiments, the page information of the first multimedia data on a certain playback page may include a playback view (Playback View) on the playback page that plays the first multimedia data. The playback view refers to the core interface area that the user directly sees and operates on the playback page. It is responsible for presenting the multimedia data content and supporting user interaction. Optionally, the page information of the first multimedia data on a certain playback page may also include at least one item of information such as the data content of the first multimedia data and the context of the player object.

[0109] The first storage module 602 is configured to generate first page information about the first page and store the first page information at the top of the page information storage stack, wherein the first page information includes a first playback view for playing the first multimedia data in the first page.

[0110] In some embodiments, before storing the first page information at the top of the page information storage stack, the first storage module 602 may further determine whether the page information storage stack is empty. If the page information storage stack is empty, the first page information may be directly stored at the top of the page information storage stack. If the page information storage stack is not empty, the first page information may be moved from the top of the page information storage stack to the second top layer of the page information storage stack before the first page information is stored at the top of the page storage stack. The third page information may include a second playback view of the first multimedia data played on a third page, the third page being the page that most recently played the first multimedia data before the first page played the first multimedia data.

[0111] The first binding module 603 is used to bind the first page information stored at the top of the stack to the player object to play the first multimedia data through the player object in the first page, wherein the player object is created when the first multimedia data is played on the second page, and the second page is the first page to play the first multimedia data.

[0112] It can be understood that since the first page information includes the first playback view for playing the first multimedia data in the first page, binding the first page information stored at the top of the stack to the player object can enable the player object to play the first multimedia data on the first page according to the first playback view.

[0113] Figure 6 The apparatus 600 for playing multimedia data provided in the embodiment shown can also execute Figure 1 method, and implement Figure 1 The functions of the embodiments shown in the figure are the same and the technical effects are achieved, so the embodiments of the present application will not be described in detail here.

[0114] Alternatively, as Figure 7 As shown, the apparatus 600 for playing multimedia data proposed in the embodiment of the present application may further include: a first determining module 604 , a first unbinding module 605 and a stack creating module 606 .

[0115] The first determination module 604 is used to determine whether the page information storage stack is obtained before storing the first page information at the top of the page information storage stack. If yes, the first unbinding module 605 is triggered; otherwise, the stack creation module 606 is triggered.

[0116] The first unbinding module 605 is used to unbind the third page information stored at the top of the stack from the player object if the third page information is stored at the top of the stack and the third page information is bound to the player object when the page information storage stack is obtained.

[0117] The third page information includes a second play view for playing the first multimedia data in a third page, and the third page is a page that played the first multimedia data most recently before the first page played the first multimedia data.

[0118] The stack creation module 606 is configured to create the page information storage stack if the page information storage stack is not obtained.

[0119] Optionally, the apparatus 600 for playing multimedia data proposed in the embodiment of the present application may further include: a stack storage module, configured to store the page information storage stack and the identifier of the first multimedia data in correspondence with each other after the page information storage stack is created each time.

[0120] Optionally, after creating a page information storage stack for the first multimedia data, the apparatus 600 for playing multimedia data according to an embodiment of the present application may further include a player creation module configured to create the player object based on the identifier of the first multimedia data. In some embodiments, a player object serving as the player object may be created in the singleton object by calling a playback scene initialization interface of the singleton object described below, for playing the first multimedia data.

[0121] In some embodiments, a device for playing multimedia data proposed in an embodiment of the present application may exist as a singleton object in a first application.

[0122] A singleton object is a unique instance of a class designed using the Singleton Pattern. This pattern ensures that a class has only one instance and provides a global access point for obtaining that instance. The Singleton Interface is the set of public methods exposed by the singleton class. It controls the creation and access of the singleton object, hiding internal implementation details and exposing only necessary functionality, ensuring that external code can operate the singleton object through a unified entry point.

[0123] Optionally, the singleton object can provide a playback scene initialization interface and a playback scene destruction interface to the outside world, wherein the playback scene initialization interface is used to call the singleton object to manage the player object and page information stack that plays the first multimedia data; the playback scene destruction interface is used to call the singleton object to execute the operation of unbinding the page information stored at the top of the stack from the player object, and / or, execute the operation of destroying the player object.

[0124] Optionally, a page information storage stack object for the first multimedia data may be created within the singleton object, for storing page information of the first multimedia data on each playback page.

[0125] Optionally, the singleton object can maintain a data mapping storage object internally. Accordingly, the corresponding storage of the page information storage stack and the identifier of the first multimedia data may include: corresponding storage of the page information storage stack and the identifier of the first multimedia data in a data mapping storage object. The identifier of the first multimedia data can be used as a search value for the mapping data, and the page information storage stack can be used as a mapping value for the mapping data. As an example, the identifier of the first multimedia data can be the ID of the first multimedia data. It can be understood that since the multimedia data ID is unique within the same application software, using the multimedia data ID as the search value for data mapping can ensure that the same multimedia data uses the same page information storage stack object.

[0126] At this time, the first acquisition module 601 may acquire the page information storage stack for the first multimedia data from the data mapping storage object according to the identifier of the first multimedia data.

[0127] Figure 7 The apparatus 600 for playing multimedia data provided in the embodiment shown can also execute Figure 2 method, and implement Figure 2 The functions of the embodiments shown in the figure are the same and the technical effects are achieved, so the embodiments of the present application will not be described in detail here.

[0128] Alternatively, as Figure 8 As shown, the apparatus 600 for playing multimedia data proposed in the embodiment of the present application may further include: a second obtaining module 607 , a second determining module 608 and a second unbinding module 609 .

[0129] The second acquisition module 607 is configured to acquire the page information storage stack in response to canceling the request to play the first multimedia data in the first page.

[0130] The cancellation of the request to play the first multimedia data in the first page is used to destroy the playback scene of the first multimedia data in the first page, that is, to end the playback of the first multimedia data in the first page.

[0131] The second determining module 608 is used to determine whether the page information storage stack is obtained. If yes, the second unbinding module 609 is triggered; otherwise, no processing is performed.

[0132] The second unbinding module 609 is configured to unbind the first page information stored at the top of the stack from the player object and remove the first page information from the top of the stack.

[0133] It can be understood that the second unbinding module 609 can destroy the playback scene of the first multimedia data on the first page, that is, the playback of the first multimedia data on the first page can be terminated.

[0134] Alternatively, as Figure 8 As shown, an apparatus 600 for playing multimedia data proposed in an embodiment of the present application may further include: a third determination module 610, an information generation module 611, a destruction module 612, a deletion module 613, a data movement module 614 and a second binding module 615.

[0135] The third determination module 610 is used to determine whether the page information storage stack is empty. If so, at least one of the information generation module 611 , the destruction module 612 and the deletion module 613 is triggered. Otherwise, the data movement module 614 is triggered.

[0136] The information generation module 611 is used to generate statistical information of the player object through the player information statistical object.

[0137] The player object information statistics object may be created when the player object is created. Optionally, the player information statistics object may be applied to each page along with the player object, thereby completing the playback information statistics of the player object across different pages.

[0138] It can be understood that in the management of statistical information of player objects, along with the sharing of player objects, the statistical information is also shared along with the players, avoiding the problem of discontinuous statistical information between different pages and improving the accuracy of statistical information.

[0139] The destroy module 612 is used to destroy the player object.

[0140] The deletion module 613 is configured to delete the page information storage stack and the identifier of the first multimedia data stored in the data mapping storage object.

[0141] It can be understood that when the page information storage stack for the first multimedia data is empty, it means that there is no scenario where the first multimedia data needs to be played, that is, the playback of the first multimedia data has ended. At this time, statistical information of the player object can be generated, the player object can be destroyed, and the corresponding page information storage stack and the identifier of the first multimedia data stored in the data mapping storage object can be deleted to save storage and network resources of the playback device.

[0142] The data moving module 614 is configured to move the third page information stored in the second top layer of the page information storage stack to the top of the stack.

[0143] It can be understood that the characteristic of the data stack is first-in-last-out, so after the first page information at the top of the stack is moved out of the page information storage stack, the third page information stored in the second top layer will be automatically moved to the top of the stack.

[0144] The second binding module 615 is configured to bind the third page information stored at the top of the stack to the player object, so as to play the first multimedia data in the third page through the player object.

[0145] It can be understood that, through the second binding module 615 , the playback scene corresponding to the third page can be traced back.

[0146] Figure 8 The apparatus 600 for playing multimedia data provided in the embodiment shown can also execute Figure 3 method, and implement Figure 3 The functions of the embodiments shown in the figure are the same and the technical effects are achieved, so the embodiments of the present application will not be described in detail here.

[0147] In short, the above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

[0148] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0149] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0150] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0151] The various embodiments in this application are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment.

Claims

1. A method for playing multimedia data, characterized in that: The method comprises: In response to a request to play first multimedia data in a first page, obtaining a page information storage stack for the first multimedia data; generating first page information about the first page, and storing the first page information at the top of the page information storage stack, wherein the first page information includes a first playback view for playing the first multimedia data in the first page; Bind the first page information stored at the top of the stack to a player object to play the first multimedia data through the player object in the first page, wherein the player object is created when the first multimedia data is played on the second page, and the second page is the first page to play the first multimedia data.

2. The method according to claim 1, characterized in that Before storing the first page information into the top of the page information storage stack, the method further includes: If the page information storage stack is not obtained, the page information storage stack is created.

3. The method according to claim 2, characterized in that The method further comprises: The page information storage stack and the identifier of the first multimedia data are correspondingly stored in a data mapping storage object.

4. The method according to claim 3, characterized in that The acquiring of the page information storage stack for the first multimedia data includes: According to the identifier of the first multimedia data, a page information storage stack for the first multimedia data is obtained from the data mapping storage object.

5. The method according to claim 2, characterized in that Before binding the first page information stored at the top of the stack with the player object, the method further includes: The player object is created according to the identifier of the first multimedia data.

6. The method according to claim 1, characterized in that Before storing the first page information into the top of the page information storage stack, the method further includes: When the page information storage stack is obtained, if the third page information is stored at the top of the stack and the third page information is bound to the player object, the third page information stored at the top of the stack is unbound from the player object, wherein the third page information includes a second playback view of playing the first multimedia data in the third page, and the third page is the page that played the first multimedia data most recently before the first page played the first multimedia data.

7. The method according to claim 6, characterized in that The method further comprises: In response to canceling the request to play the first multimedia data in the first page, obtaining the page information storage stack; The first page information stored at the top of the stack is unbound from the player object, and the first page information is removed from the top of the stack.

8. The method according to claim 7, characterized in that The method further comprises: After removing the first page information from the top of the stack, determining whether the page information storage stack is empty; When the page information storage stack is not empty, moving the third page information stored in the second top layer of the page information storage stack to the top of the stack; The third page information stored at the top of the stack is bound to the player object, so as to play the first multimedia data in the third page through the player object.

9. The method according to claim 8, characterized in that The method further comprises: When the page information storage stack is empty, the player object is destroyed, and the identifiers of the page information storage stack and the first multimedia data stored in the data mapping storage object are deleted.

10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: The statistical information of the player object is generated through the player information statistical object, wherein the player object information statistical object is created when the player object is created.

11. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 10.

13. A computer program product comprising instructions, characterized in that When a computer runs the instructions of the computer program product, the computer performs the method according to any one of claims 1 to 10.