Audio downloading and playing method and device of open source honkong system, terminal and medium
By embedding an audio download and playback framework built on the open-source HarmonyOS kernel into commercial display multimedia terminals, audio data can be acquired and played, solving the problem that commercial display multimedia terminals cannot download and play audio based on the open-source HarmonyOS system, and realizing the audio playback function.
Patent Information
- Application Number
- CN202310336227.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2043-03-31
AI Technical Summary
Commercial display multimedia terminals cannot download and play audio based on the open-source HarmonyOS system, thus preventing the implementation of audio playback functionality.
An audio download and playback framework based on the open-source HarmonyOS kernel is pre-embedded in the commercial display multimedia terminal. This framework includes a JS layer, an application programming interface, a message management module, a transmission control protocol connection establishment module, a transmission control protocol socket module, and the open-source HarmonyOS kernel. Through these modules, the associated data of the audio file to be sent by the digital signage server is obtained, and the audio data to be displayed is determined and played.
It enables audio playback on commercial display multimedia terminals based on the open-source HarmonyOS system, solving the problem of not being able to download and play audio, and is compatible with various open-source HarmonyOS development boards.
Smart Images

Figure CN116366623B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of commercial display, and in particular to an audio downloading and playing method and device of an open-source Harmony system, a terminal and a medium. BACKGROUND
[0002] OpenHarmony (open-source Harmony) is defined as a distributed operating system, which can be used in mobile phones, and can also be used in industrial Internet of Things, transportation and other industries in the future. Various manufacturers are also trying to use open-source Harmony systems in various fields.
[0003] In the field of commercial display, commercial display multimedia terminals are widely used in various display counters in shopping malls, supermarkets, etc. Common commercial display multimedia terminals are installed with Android systems, and cannot download and play audio based on the open-source Harmony system, which cannot realize the adaptation with the open-source Harmony system. SUMMARY
[0004] The present application provides an audio downloading and playing method and device of an open-source Harmony system, a terminal and a medium, to solve the problem that commercial display multimedia terminals cannot download and play audio based on the open-source Harmony system.
[0005] According to an aspect of the present application, an audio downloading and playing method of an open-source Harmony system is provided, which is executed by a commercial display multimedia terminal, and the commercial display multimedia terminal is pre-implanted with an audio downloading and playing framework based on the kernel of the open-source Harmony system, which comprises:
[0006] Based on the audio downloading and playing framework, the associated data of the audio file to be sent sent by the digital signage server is acquired;
[0007] The audio downloading and playing framework comprises a JS layer, an application programming interface, a message management module, a transmission control protocol connection establishment module, a transmission control protocol socket module and an open-source Harmony system kernel connected in sequence;
[0008] According to the audio downloading and playing framework and the associated data of the audio file to be sent, the audio data to be displayed is determined, and audio display is performed based on the audio data to be displayed.
[0009] According to another aspect of the present application, an audio downloading and playing device of an open-source Harmony system is provided, which is configured in a commercial display multimedia terminal, and the commercial display multimedia terminal is pre-implanted with an audio downloading and playing framework based on the kernel of the open-source Harmony system, which comprises:
[0010] A data acquisition module is configured to acquire the associated data of the audio file to be sent sent by the digital signage server based on the audio downloading and playing framework;
[0011] The audio download and play framework comprises a JS layer, an application programming interface, a message management module, a transmission control protocol connection establishment module, a transmission control protocol socket module and an open-source Hongmeng system kernel connected in sequence.
[0012] The audio display module is configured to determine audio data to be displayed according to the audio download and play framework and the associated data of the audio file to be sent, and perform audio display based on the audio data to be displayed.
[0013] According to another aspect of the present application, a commercial display multimedia terminal is provided, which comprises:
[0014] at least one processor; and
[0015] a memory in communication connection with the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the audio download and play method of the open-source Hongmeng system according to any one of the embodiments of the present application.
[0017] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to perform the audio download and play method of the open-source Hongmeng system according to any one of the embodiments of the present application when executed by the processor.
[0018] The technical solution of the embodiments of the present application is that an audio download and play framework based on an open-source Hongmeng system kernel is pre-implanted in a commercial display multimedia terminal, so that the commercial display multimedia terminal can acquire associated data of an audio file to be sent sent by a digital signage server based on the audio download and play framework, and then determine audio data to be displayed according to the audio download and play framework and the associated data of the audio file to be sent, and perform audio display based on the audio data to be displayed. In this solution, the audio download and play framework implanted in the commercial display multimedia terminal is adapted to various open-source Hongmeng system development boards, so that the commercial display multimedia terminal can perform audio play based on the open-source Hongmeng system after the audio download and play framework is implanted, thereby solving the problem that the current commercial display multimedia terminal cannot perform audio download and play based on the open-source Hongmeng system, and enabling the commercial display multimedia terminal to perform audio play based on the open-source Hongmeng system.
[0019] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments description. Obviously, the drawings in the following description only show some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without any creative effort.
[0021] Figure 1 The flow chart of the audio download and play method of the open-source Hongmeng system provided by the first embodiment of the present application;
[0022] Figure 2 The structural diagram of the audio download and play framework provided by the first embodiment of the present application;
[0023] Figure 3 The flow chart of the audio download and play method of the open-source Hongmeng system provided by the second embodiment of the present application;
[0024] Figure 4 The data flow direction diagram of the commercial display multimedia terminal remote download and play advertisement provided by the second embodiment of the present application;
[0025] Figure 5 The structural schematic diagram of the audio download and play device of the open-source Hongmeng system provided by the third embodiment of the present application.
[0026] Figure 6 The structural schematic diagram of the commercial display multimedia terminal which can be used to implement the embodiments of the present application is shown. DETAILED DESCRIPTION
[0027] In order to make the personnel in the technical field better understand the present application scheme, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort should belong to the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", and the like in the description and in the claims of the present application and in the above-described drawings are intended to distinguish similar objects and not necessarily describe a particular chronological or sequential order. It should be understood that the data thus used can be interchanged, where appropriate, so that the embodiments of the application described herein can be practiced in other than the illustrated or described order. Furthermore, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, processes, methods, systems, products, or devices that include a series of steps or units not necessarily limited to those clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0029] Embodiment one
[0030] Figure 1 A flowchart of an open source HONOM system audio download and play method is provided for the first embodiment of the present application. The present embodiment can be applied to the audio play of a commercial display multimedia terminal based on an open source HONOM system. The method can be executed by an open source HONOM system audio download and play device, which can be implemented in the form of hardware and / or software. The open source HONOM system audio download and play device can be configured in a commercial display multimedia terminal, which is pre-implanted with an audio download and play framework based on an open source HONOM system kernel. As shown in Figure 1 , the method comprises:
[0031] S110, based on the audio download and play framework, obtaining the to-be-sent audio file associated data sent by the digital signage server.
[0032] The audio download and play framework can be constructed based on an open source HONOM system kernel and used for audio download and play. The audio download and play framework can include a JS layer, an application programming interface, a message management module, a transmission control protocol connection establishment module, a transmission control protocol socket module, and an open source HONOM system kernel connected in sequence. The structure of the audio download and play framework can be referred to Figure 2 .
[0033] The JS layer is an application layer of the commercial display multimedia terminal, and is mainly used for device registration and audio playing. The application programming interface can be an NAPI module, which is used for completing data conversion from C++ to the JS layer and providing an interface for the JS layer. The message management module can be a Msg_handle module, which is used for message processing according to a message type according to data received by a tcp layer (a layer composed of a tcp_client module and a tcp_socket module). The transmission control protocol connection establishment module can be a tcp_client module, which has functions of thread initialization, chain establishment, pipe creation and listening. The transmission control protocol socket module can be a tcp_socket module, which is mainly used for completing socket connection, encapsulating messages and calling a linux interface for sending. The digital signage server can be a server in a digital signage system. The digital signage server can be used for managing media files and a play list. The to-be-sent audio file associated data can be data sent by the digital signage server to the commercial display multimedia terminal and associated with audio to be played by the commercial display multimedia terminal.
[0034] In the embodiment of the application, after the audio download and play framework composed of the JS layer, the application programming interface, the message management module, the transmission control protocol connection establishment module, the transmission control protocol socket module and the open source monsoon system kernel connected in sequence is implanted into the commercial display multimedia terminal, the commercial display multimedia terminal can be registered and logged in and authenticated in the digital signage server, and after authentication succeeds, based on the audio download and play framework, to-be-sent audio file associated data sent by the digital signage server is acquired.
[0035] S120, according to the audio download and play framework and the to-be-sent audio file associated data, to-be-displayed audio data is determined, and audio display is performed based on the to-be-displayed audio data.
[0036] The to-be-displayed audio data can be audio data in the to-be-sent audio file associated data and needed to be played by the commercial display multimedia terminal.
[0037] In the embodiment of the application, the commercial display multimedia terminal can remotely download to-be-displayed audio data in the audio file associated data according to the audio download and play framework, and send audio playing rules and other data in the to-be-sent audio file associated data to the JS layer, so as to play audio through a screen and an electro-acoustic transducer of the commercial display multimedia terminal.
[0038] The technical scheme of the embodiment of the present application is that an audio download and play framework based on an open-source Hongmeng system kernel is pre-implanted in the commercial display multimedia terminal, so that the commercial display multimedia terminal can acquire the to-be-sent audio file associated data sent by the digital signage server based on the audio download and play framework, and then determine the to-be-displayed audio data according to the audio download and play framework and the to-be-sent audio file associated data, and perform audio display based on the to-be-displayed audio data. In the present scheme, the audio download and play framework implanted in the commercial display multimedia terminal is adapted to various types of open-source Hongmeng system development boards, so that the commercial display multimedia terminal can perform audio play based on the open-source Hongmeng system after the audio download and play framework is implanted, thereby solving the problem that the current commercial display multimedia terminal cannot perform audio download and play based on the open-source Hongmeng system, and enabling the commercial display multimedia terminal to perform audio play based on the open-source Hongmeng system.
[0039] Embodiment Two
[0040] Figure 3 A flowchart of an audio download and play method of an open-source Hongmeng system provided for the second embodiment of the present application is based on the above-mentioned embodiment and is particularized, and a specific optional implementation manner of performing registration of the commercial display multimedia terminal on the server before acquiring the to-be-sent audio file associated data sent by the digital signage server based on the audio download and play framework is given. As shown in the figure, the method comprises the following steps. Figure 3
[0041] S210, sending a first http request to the digital signage server through the JS layer.
[0042] The first http request can be used to determine whether the digital signage server is available.
[0043] In the embodiment of the present application, the commercial display multimedia terminal can send a first http request to the digital signage server to determine whether the digital signage server is available through the first http request.
[0044] In an optional embodiment of the present application, before sending a first hypertext transfer protocol (http) request to the digital signage server through the JS layer, the method can further comprise the following steps: initializing a transmission control protocol (TCP) socket module through a TCP connection establishment module; establishing a system layer of the commercial display multimedia terminal and a link of the digital signage server through the TCP connection establishment module, and creating a target data pipe between the system layer and the digital signage server; adding a read file descriptor (fd) of the target data pipe to a multi-way multiplexing enhanced version interface (epoll) for monitoring through the TCP connection establishment module; and registering a message processing callback function.
[0045] The target data pipeline can be a data pipeline between the commercial display multimedia terminal and the digital signage server. The message processing callback function can be a function of performing data analysis processing on the message in the target data pipeline. The application programming interface, the message management module, the transmission control protocol connection establishment module, and the transmission control protocol socket module can constitute a system layer.
[0046] In the embodiment of the application, before the JS layer sends the first http request to the digital signage server, the transmission control protocol connection establishment module can initialize the transmission control protocol socket module, that is, initialize the socket, so that the transmission control protocol connection establishment module can start the link building operation of the system layer of the commercial display multimedia terminal and the digital signage server, and create the target data pipeline between the system layer and the digital signage server, further add the read end fd of the target data pipeline to the epoll for monitoring, and then register the message processing callback function, complete the initialization of the system layer service, and start the system layer service thread. After that, the service thread of the system layer is in a blocked state, and the epoll and the thread are woken up again only when data is written into the target data pipeline.
[0047] Optionally, the system thread service adopts a monitoring-waking-up-processing-blocking-waking-up-processing mode.
[0048] S220, when the digital signage server feeds back that the server is available according to the first http request to the JS layer, the JS layer sends a second http request to the digital signage server.
[0049] The second http request can be used for device registration of the commercial display multimedia terminal on the digital signage server.
[0050] In the embodiment of the application, if the digital signage server feeds back that the server is available according to the first http request to the JS layer, the JS layer can further send a second http request to the digital signage server to register the device through the second http request.
[0051] S230, the digital signage server parses the second http request, and registers the commercial display multimedia terminal according to the second http request.
[0052] In the embodiment of the application, after the digital signage server receives the second http request sent by the JS layer, the digital signage server can parse the second http request, determine the commercial display multimedia terminal sending the request, and perform device registration on the commercial display multimedia terminal sending the request. After completing the device registration, the commercial display multimedia terminal can also perform authentication login, and prepare for the digital signage server to issue the to-be-sent audio file associated data.
[0053] S240, based on the audio download playing framework, obtaining the to-be-sent audio file associated data sent by the digital signage server.
[0054] In an optional embodiment of the present application, based on the audio download playing framework, obtaining the to-be-sent audio file associated data sent by the digital signage server can include: when data appears in the target data pipe, obtaining the read end fd listened by the epoll through the message management module, and obtaining the to-be-sent audio file associated data sent by the digital signage server according to the read end fd.
[0055] In the embodiment of the present application, when data appears in the target data pipe, the epoll will be woken up, so as to read the information in the read end fd listened by the epoll through the message management module, and perform content analysis on the read end fd to obtain the to-be-sent audio file associated data sent by the digital signage server.
[0056] In an optional embodiment of the present application, obtaining the to-be-sent audio file associated data sent by the digital signage server according to the read end fd can include: when the read end fd is a first read end fd, obtaining the to-be-sent audio file download associated data sent by the digital signage server through the message management module according to the first read end fd and the message processing callback function; when the read end fd is a second read end fd, obtaining the to-be-sent audio file playing rule data sent by the digital signage server through the message management module according to the second read end fd and the message processing callback function.
[0057] The first read end fd can be a file descriptor array associated with a published program sent by the digital signage server to the commercial display multimedia terminal. The to-be-sent audio file download associated data can be data required by the commercial display multimedia terminal for downloading to-be-displayed audio data. The second read end fd can be a file descriptor array related to audio playing rules sent by the digital signage server to the commercial display multimedia terminal. The to-be-sent audio file playing rule data can be a playing rule required in the to-be-sent audio file associated data for publishing a program in the commercial display multimedia terminal. The to-be-sent audio file playing rule data can include but is not limited to a commercial display multimedia terminal program ID and a corresponding playing time, etc.
[0058] In the embodiment of the present application, when the read end fd is the first read end fd, the first read end fd can be parsed by the message management module, and a callback processing function for processing the first read end fd can be determined from the message processing callback function according to the first read end fd, so that the first read end fd is processed according to the callback processing function, and the audio file download associated data to be sent by the digital signage server is obtained. When the read end fd is the second read end fd, the second read end fd can be parsed by the message management module, and a callback processing function for processing the second read end fd can be determined from the message processing callback function according to the second read end fd, so that the second read end fd is processed according to the callback processing function determined by the second read end fd, and the play rule data of the audio file to be sent by the digital signage server is obtained.
[0059] S250, determining the audio data to be displayed according to the audio download and play framework and the audio file to be sent associated data, and performing audio display based on the audio data to be displayed.
[0060] In an optional embodiment of the present application, determining the audio data to be displayed according to the audio download and play framework and the audio file to be sent associated data can include: when the read end fd is the first read end fd, downloading the audio data to be displayed in the digital signage server according to the audio file to be sent download associated data by the message management module, and sending file download progress data to the digital signage server through the target data pipeline.
[0061] The file download progress data can be data representing the degree of file download.
[0062] In the embodiment of the present application, when the read end fd is the first read end fd, the audio data to be displayed in the digital signage server can be downloaded according to the audio file to be sent download associated data by the message management module. After the message management module starts to download the audio data to be displayed, the file download progress data can be sent to the digital signage server in real time through the target data pipeline.
[0063] In an optional embodiment of the present application, performing audio display based on the audio data to be displayed can include: forwarding the audio data to be displayed and the play rule data to the application programming interface by the message management module; performing data format conversion on the audio data to be displayed and the play rule data by the application programming interface to obtain target format audio play associated data, and sending the target format audio play associated data to the JS layer; and performing audio display according to the target format audio play associated data by the JS layer.
[0064] The target format audio play associated data can be JavaScript format audio data to be displayed and play rule data.
[0065] In the embodiment of the present application, the message management module can forward the obtained audio data to be displayed and the play rule data to the application programming interface, so as to convert the audio data to be displayed and the play rule data into data in JavaScript format through the application programming interface, that is, obtain target format audio play associated data, and send the target format audio play associated data to the JS layer. After the JS layer receives the target format audio play associated data, the audio data to be displayed in JavaScript format can be played and displayed according to the play rule data in JavaScript format, and a feedback message is returned to the digital signage server.
[0066] In a specific example, the commercial display multimedia terminal can be deployed in a shopping mall, a supermarket or the like, connected to the Internet through a network cable / WIFI / 4G, and the commercial display multimedia terminal carrying the open-source Hongmeng system can download the advertisement content to be played from the digital signage server. After the download is completed, the advertisement content can be played. The digital signage server can manage multiple remote commercial display multimedia terminals, make advertisement materials, and issue advertisement content.
[0067] Figure 4 A data flow direction diagram for remote download and play of advertisements of the commercial display multimedia terminal according to the second embodiment of the present application is shown in FIG. 2. Figure 4 As shown in FIG. 2, the overall steps are as follows:
[0068] Step a: after starting the advertisement application of the commercial display multimedia terminal, the advertisement application sends a first http request to query whether the configured digital signage server is available according to the configured IP address.
[0069] Step b: when the digital signage server is available, a second http request is continuously sent to register the commercial display multimedia terminal to the digital signage server.
[0070] Step c: the digital signage server returns the device ID allocated to the terminal.
[0071] Step d: the advertisement application calls a system interface to send login related information.
[0072] Step e: the open-source Hongmeng system sends a login authentication request (Method: function name auth, mainly carrying device ID, mac address and other parameters) to the digital signage server end through RPC.
[0073] Step f: the digital signage server end returns the authentication result.
[0074] At this point, the digital signage server can see the registered commercial display multimedia terminal, and can issue an advertisement file to the commercial display multimedia terminal.
[0075] Step g, on the terminal interface on the digital signage server, determine the advertising file to be downloaded and the terminal after downloading, the digital signage server will send RPC message to the terminal (Method: publishResponse, mainly carrying program id, play date, etc.).
[0076] Step h, the system service on the system layer receives the message, calls the curl command in Linux, and starts downloading the advertising file (audio data to be displayed).
[0077] Step i, while downloading the advertising file, the system service on the open source open source system will send the download progress to the digital signage server through the RPC mode.
[0078] Step j, when the system layer downloads the advertising file, it will notify the application of the address and format of the downloaded advertising file through the application programming interface active reporting mode.
[0079] Step k, after the advertising file is downloaded, the digital signage server will send the play rule data such as file id and play period to the system layer through the RPC mode.
[0080] Step l, after the system layer receives the play rule data, it notifies the application of the application readable format play rule data through the application programming interface active reporting mode. After the application gets the rule, it can play the video using the rule.
[0081] The newly added advertising play function in the open source open source system exists in the form of SO dynamic library during implementation. After the application is introduced, it can be used. The system layer and the application run in the same process.
[0082] The advertising machine framework and message processing mechanism on the open source open source system can support the digital signage server connected to the tcp / ipc protocol, realize the download and play of advertising content. The audio download and play framework is independent of hardware and can run on various types of open source development boards. It runs in the form of dynamic library in the application, reducing the occupied memory when running as a service.
[0083] The commercial display multimedia terminal can adopt C-S architecture. After the server is started, the eventhandle drives the server to process messages, and the structure is clear and extensible. Compared with using HTTP protocol, the transmission speed is faster. The entire framework is compiled independently by gn. The compiled SO file can be applied to other types of development boards of the same version, and has portability and hardware independence.
[0084] The technical scheme of the embodiment of the present application is characterized in that an audio download and play framework based on an open-source Hongmeng system kernel is pre-implanted in the commercial display multimedia terminal, so that a first http request is sent to the digital signage server through the JS layer, so that when the digital signage server feeds back the server availability to the JS layer according to the first http request, a second http request is sent to the digital signage server through the JS layer, then the digital signage server parses the second http request, registers the commercial display multimedia terminal according to the second http request, acquires the associated data of the audio file to be sent sent by the digital signage server based on the audio download and play framework, further determines the audio data to be displayed according to the audio download and play framework and the associated data of the audio file to be sent, and performs audio display based on the audio data to be displayed. In the present scheme, the audio download and play framework implanted in the commercial display multimedia terminal is adapted to various types of open-source Hongmeng system development boards, so that the commercial display multimedia terminal can perform audio play based on the open-source Hongmeng system after the audio download and play framework is implanted, thereby solving the problem that the current commercial display multimedia terminal cannot perform audio download and play based on the open-source Hongmeng system, and enabling the commercial display multimedia terminal to perform audio play based on the open-source Hongmeng system.
[0085] Embodiment three
[0086] Figure 5 A structural schematic diagram of an audio download and play device of an open-source Hongmeng system provided for the third embodiment of the present application. The device is configured in a commercial display multimedia terminal, and an audio download and play framework based on an open-source Hongmeng system kernel is pre-implanted in the commercial display multimedia terminal, as shown in FIG. 1, the device comprises a data acquisition module 310 and an audio display module 320, wherein, Figure 5
[0087] The data acquisition module 310 is configured to acquire, based on the audio download and play framework, the associated data of the audio file to be sent sent by the digital signage server.
[0088] The audio download and play framework comprises a JS layer, an application programming interface, a message management module, a transmission control protocol connection establishment module, a transmission control protocol socket module and an open-source Hongmeng system kernel connected in sequence.
[0089] The audio display module 320 is configured to determine the audio data to be displayed according to the audio download and play framework and the associated data of the audio file to be sent, and perform audio display based on the audio data to be displayed.
[0090] The technical scheme of the embodiment of the application is that an audio download and play framework based on an open-source Hongmeng system kernel is pre-implanted in the commercial display multimedia terminal, so that the commercial display multimedia terminal can acquire the to-be-sent audio file associated data sent by the digital signage server based on the audio download and play framework, and then determine the to-be-displayed audio data according to the audio download and play framework and the to-be-sent audio file associated data, and perform audio display based on the to-be-displayed audio data. In the scheme, the audio download and play framework implanted in the commercial display multimedia terminal is adapted to various types of open-source Hongmeng system development boards, so that the commercial display multimedia terminal can perform audio play based on the open-source Hongmeng system after the audio download and play framework is implanted, thereby solving the problem that the current commercial display multimedia terminal cannot perform audio download and play based on the open-source Hongmeng system, and enabling the commercial display multimedia terminal to perform audio play based on the open-source Hongmeng system.
[0091] Optionally, the audio download and play device of the open-source Hongmeng system further includes a device registration module, configured to send a first hypertext transfer protocol (HTTP) request to the digital signage server through the JS layer before the audio download and play framework is used to acquire the to-be-sent audio file associated data sent by the digital signage server; send a second HTTP request to the digital signage server through the JS layer when the digital signage server feeds back that the server is available to the JS layer according to the first HTTP request; and parse the second HTTP request by the digital signage server, and register the commercial display multimedia terminal according to the second HTTP request.
[0092] Optionally, the audio download and play device of the open-source Hongmeng system further includes a start configuration module, configured to initialize a transmission control protocol (TCP) socket module through a TCP connection establishment module before a first hypertext transfer protocol (HTTP) request is sent to the digital signage server through the JS layer; establish a system layer of the commercial display multimedia terminal and the digital signage server link through the TCP connection establishment module, and create a target data pipe between the system layer and the digital signage server; wherein the application programming interface, the message management module, the TCP connection establishment module, and the TCP socket module constitute the system layer; add a read end file descriptor (fd) of the target data pipe to a multiplexing enhanced version interface (epoll) for listening through the TCP connection establishment module; and register a message processing callback function.
[0093] Optionally, the data acquisition module 310 is specifically configured to acquire the read end fd listened by the epoll through the message management module when data appears in the target data pipe, and acquire the to-be-sent audio file associated data sent by the digital signage server according to the read end fd.
[0094] Optionally, the data acquisition module 310 is specifically configured to, when the read end fd is a first read end fd, acquire, by the message management module, the to-be-sent audio file download associated data sent by the digital signage server according to the first read end fd and the message processing callback function; and when the read end fd is a second read end fd, acquire, by the message management module, the playing rule data of the to-be-sent audio file sent by the digital signage server according to the second read end fd and the message processing callback function.
[0095] Optionally, the audio display module 320 includes a to-be-displayed audio data determination unit configured to, when the read end fd is a first read end fd, download, by the message management module, the to-be-displayed audio data in the digital signage server according to the to-be-sent audio file download associated data, and send, by the target data pipeline, the file download progress data to the digital signage server.
[0096] Optionally, the audio display module 320 includes an audio display unit configured to forward, by the message management module, the to-be-displayed audio data and the playing rule data to the application programming interface; perform data format conversion on the to-be-displayed audio data and the playing rule data by the application programming interface to obtain target format audio playing associated data, and send the target format audio playing associated data to the JS layer; and perform audio display according to the target format audio playing associated data by the JS layer.
[0097] The audio download and playing device of the open source Hongmeng system provided in the embodiment can execute the audio download and playing method of the open source Hongmeng system provided in any embodiment of the present application, and has the function modules and beneficial effects corresponding to the execution method.
[0098] Embodiment four
[0099] Figure 6 A structural schematic diagram of a commercial display multimedia terminal that can be used to implement embodiments of the present application is shown. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0100] As Figure 6As shown, the kiosk multimedia terminal 10 includes at least one processor 11, and memories, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., communicatively connected to the at least one processor 11, where the memories store computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 12 or loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the kiosk multimedia terminal 10 can also be stored in the RAM 13. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0101] Various components in the kiosk multimedia terminal 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, speakers, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the kiosk multimedia terminal 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0102] The processor 11 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the audio download and playback method of the open-source
[0103] In some embodiments, the audio download and playback method of the open-source can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the kiosk multimedia terminal 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the audio download and playback method of the open-source can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the audio download and playback method of the open-source by any other appropriate means, such as by means of firmware.
[0104] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0105] Computer programs used to implement the processes of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program, when executed, can cause instructions defined in the flow charts and / or block diagrams to be implemented. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package and partially on a remote machine or entirely on a remote machine or server.
[0106] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0107] To provide for interaction with a user, the systems and techniques described here can be implemented on a commercial multi-media terminal having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the commercial multi-media terminal. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0108] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0109] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0110] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be executed in parallel, executed in sequence, or executed in a different order, as long as the desired results of the present disclosure are achieved, and the present disclosure is not limited herein.
[0111] The specific embodiments described above are not intended to be limiting, and persons skilled in the art will appreciate that various modifications, combinations, sub-combinations and alternatives can be made to the specific embodiments without departing from the spirit and principles of the disclosure. Accordingly, the disclosure is not limited to the specific embodiments described above, but only by the scope of the appended claims.
Claims
1. An audio download and play method of an open-source Holographic System, characterized in that, The method is executed by a commercial display multimedia terminal, wherein an audio download and play framework based on an open-source Hongmeng system kernel is pre-embedded in the commercial display multimedia terminal, and the method comprises the following steps: Based on the audio download and play framework, obtaining audio file association data to be sent sent by a digital signage server; The audio download and play framework comprises a JS layer, an application programming interface, a message management module, a transmission control protocol connection establishment module, a transmission control protocol socket module and an open-source Hongmeng system kernel connected in sequence; Based on the audio download and play framework, obtaining audio file association data to be sent sent by a digital signage server, comprising: when data appears in a target data pipe, obtaining an epoll listening read end fd through the message management module, and obtaining the audio file association data to be sent sent by the digital signage server based on the read end fd, determining audio data to be displayed, and performing audio display based on the audio data to be displayed; Before obtaining the audio file association data to be sent sent by the digital signage server based on the audio download and play framework, the method further comprises the following steps: sending a first hypertext transfer protocol (HTTP) request to the digital signage server through the JS layer, sending a second HTTP request to the digital signage server through the JS layer when the digital signage server feeds back that the digital signage server can be used according to the first HTTP request, parsing the second HTTP request through the digital signage server, and registering the commercial display multimedia terminal according to the second HTTP request; and sending login authentication request information to the digital signage server end. The digital signage server manages multiple remote commercial display multimedia terminals, makes advertising materials, and delivers advertising content. Before sending the first HTTP request to the digital signage server through the JS layer, the method further comprises the following steps: establishing a system layer of the commercial display multimedia terminal and a link of the digital signage server through the transmission control protocol connection establishment module, and creating a target data pipe between the system layer and the digital signage server; wherein the application programming interface, the message management module, the transmission control protocol connection establishment module and the transmission control protocol socket module constitute the system layer.
2. The method of claim 1, wherein, Before sending the first HTTP request to the digital signage server through the JS layer, the method further comprises the following steps: Initializing the transmission control protocol socket module through the transmission control protocol connection establishment module; Adding a read end file descriptor (fd) of the target data pipe to a multiplexing enhanced version interface (epoll) for listening through the transmission control protocol connection establishment module; Registering a message processing callback function.
3. The method of claim 2, wherein, Obtaining the audio file association data to be sent sent by the digital signage server based on the read end fd, comprising: When the read end fd is a first read end fd, obtaining audio file download association data to be sent sent by the digital signage server through the message management module based on the first read end fd and the message processing callback function; When the read end fd is a second read end fd, the message management module obtains the playing rule data of the audio file to be sent from the digital signage server according to the second read end fd and the message processing callback function.
4. The method of claim 3, wherein, According to the audio download and playing framework and the associated data of the audio file to be sent, the audio data to be displayed is determined, including: When the read end fd is a first read end fd, the message management module downloads the audio data to be displayed in the digital signage server according to the associated data of the audio file to be sent, and sends the file download progress data to the digital signage server through the target data pipeline.
5. The method of claim 4, wherein, Based on the audio data to be displayed, audio is played, including: The message management module forwards the audio data to be displayed and the playing rule data to the application programming interface; The application programming interface converts the data format of the audio data to be displayed and the playing rule data to obtain target format audio playing associated data, and sends the target format audio playing associated data to the JS layer; The JS layer plays audio according to the target format audio playing associated data.
6. An apparatus for playing downloaded audio of an open-source Holographic System, for executing the method for playing downloaded audio of an open-source Holographic System according to claim 1, characterized in that, The device is configured in a commercial display multimedia terminal, and the commercial display multimedia terminal is pre-embedded with an audio download and playing framework based on an open-source Hongmeng system kernel, including: A data acquisition module configured to acquire, based on the audio download and playing framework, associated data of an audio file to be sent sent from a digital signage server; The audio download and playing framework includes a JS layer, an application programming interface, a message management module, a transmission control protocol connection establishment module, a transmission control protocol socket module, and an open-source Hongmeng system kernel connected in sequence; An audio display module configured to determine, based on the audio download and playing framework and the associated data of the audio file to be sent, audio data to be displayed, and play audio based on the audio data to be displayed.
7. A kiosk multimedia terminal, characterized by The commercial display multimedia terminal includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the audio download and playing method of the open-source Hongmeng system according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the audio download and playing method of the open-source Hongmeng system according to any one of claims 1-5.
Citation Information
Patent Citations
Screen projection method, device and system for continuously playing videos
CN114679610A
Input device event management method and device
CN115757007A