Method and device for communication interaction between digital audio broadcasting (DAB) module and application layer
Through DAB middleware service encapsulation and registration, modular communication between the digital audio broadcast module and the application layer is realized, which solves the problems of complex DAB module calls and high code coupling in the existing technology, and achieves high cohesion and low coupling. Interactive, easy to maintain and compatible with different chip models.
Patent Information
- Application Number
- CN202410621807.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-09-03
AI Technical Summary
The existing digital audio broadcast DAB module needs to rely on JNI when calling three parties. The implementation is complex and the code coupling is high. The code compatibility of different chip models is not high, making maintenance and secondary development difficult.
Determine the operating interface of the target DAB chip through the DAB middleware service, encapsulate it as a calling interface, and register it as a system service, so that the application layer can directly communicate with the DAB module in a modular manner to achieve high cohesion and low coupling interaction.
It achieves high cohesion and low coupling interaction between the DAB module and the application layer, simplifies post-maintenance and secondary development, facilitates compatibility of different chip models, and reduces code coupling.
Smart Images

Figure CN118585253A
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to a method and device for communication and interaction between a digital audio broadcasting (DAB) module and an application layer. Background Art
[0002] DAB (Digital Audio Broadcasting) module is a video processing component that transmits audio and other data information through radio waves. It has the advantages of anti-noise, anti-interference, and anti-radio wave propagation fading. It can be unaffected by multi-path interference within a certain range, ensuring high quality of fixed, portable and mobile reception. It is widely used in multifunctional products such as miniaturized combination audio, radio recorders, DVD players, audio receivers, especially in the fields of car radios, home audio, portable radios, etc.
[0003] However, when the existing DAB module is called by a third party, it needs to rely on JNI, which is complex to implement and has a high degree of code coupling. In addition, the DAB module has a variety of optional chip models, and the code compatibility is not high. If a chip is replaced, the scope of change is relatively large. Among them, JNI (Java Native Interface) is a Java local interface, which is a mechanism for Java to interact with native code (such as C, C++), allowing Java programs to call functions written in other languages or functions implemented in other languages, improving program performance and functional scalability. Summary of the invention
[0004] In view of this, the purpose of this application is to provide a method and device for communication and interaction between a digital audio broadcasting DAB module and an application layer, which can change the direct interaction between the DAB module and the application layer into modular communication, achieve high cohesion and low coupling in the code, and facilitate later maintenance and secondary development.
[0005] In a first aspect, the present application provides a method for communication and interaction between a digital audio broadcasting (DAB) module and an application layer, the method comprising the following steps:
[0006] Determine the target DAB chip used by the DAB module based on the DAB middleware service, encapsulate various operation interfaces of the target DAB chip according to the chip document, and provide a calling interface to the application layer according to various functions of the target DAB chip;
[0007] Register the DAB middleware service as a system service so that the application layer can obtain the proxy class of the system service;
[0008] The information interaction between the application layer and the DAB module is completed through the DAB middleware service.
[0009] In a possible implementation manner, the step of determining a target DAB chip used by the DAB module based on the DAB middleware service includes the following steps:
[0010] After the DAB module loads the driver according to the connected target DAB chip, establishing communication between the DAB middleware service and the driver;
[0011] A target DAB chip acquisition request is sent to the driver through the DAB middleware service, and the model of the target DAB chip returned by the driver in response to the target DAB chip acquisition request is received.
[0012] In a possible implementation manner, registering the DAB middleware service as a system service so that the application layer obtains the proxy class of the system service includes the following steps:
[0013] Using the service registration command in the binder mechanism to register the DAB middleware service as a system service, and defining a service name for the DAB middleware service registered as a system service;
[0014] The service adding method is adopted to enable the application layer to obtain the proxy class of the DAB middleware service according to the service name.
[0015] In a possible implementation manner, after the application layer obtains the proxy class of the DAB middleware service, it develops a user interface in combination with UI / UE.
[0016] In a possible implementation manner, completing the information interaction between the application layer and the DAB module through the DAB middleware service includes the following steps:
[0017] The application layer selects a target calling interface from each of the calling interfaces through the acquired proxy class to initiate a calling request to the DAB middleware service;
[0018] The DAB middleware service calls a target operation interface for executing a corresponding function of the DAB module from among the integrated operation interfaces according to the received call request.
[0019] In a possible implementation manner, the DAB middleware service further provides a callback interface to the application layer.
[0020] In a possible implementation manner, completing the information interaction between the application layer and the DAB module through the DAB middleware service further includes the following steps:
[0021] The DAB module sends the corresponding callback data to the callback interface of the DAB middleware service according to the set callback mechanism;
[0022] The callback interface of the DAB middleware service parses the callback data according to a set data format, and returns the parsed callback data to the application layer.
[0023] In a second aspect, the present application provides a digital audio broadcasting (DAB) module and an application layer communication and interaction device, the device comprising:
[0024] The encapsulation module is used to determine the target DAB chip used by the DAB module based on the DAB middleware service, encapsulate various operation interfaces of the target DAB chip according to the chip document, and provide a calling interface to the application layer according to various functions of the target DAB chip;
[0025] A registration module, used to register the DAB middleware service as a system service so that the application layer can obtain the proxy class of the system service;
[0026] The interaction module is used to complete the information interaction between the application layer and the DAB module through the DAB middleware service.
[0027] In a third aspect, the present application provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for communication and interaction between the digital audio broadcasting DAB module and the application layer as described in the first aspect are performed.
[0028] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method for communication and interaction between a digital audio broadcasting DAB module and an application layer as described in the first aspect are executed.
[0029] The present embodiment provides a method and device for communication and interaction between a digital audio broadcasting DAB module and an application layer. The method determines the target DAB chip used by the DAB module based on the DAB middleware service, encapsulates the various operation interfaces of the target DAB chip according to the chip document, and provides a calling interface to the application layer according to the various functions of the target DAB chip; registers the DAB middleware service as a system service so that the application layer can obtain the proxy class of the system service; and completes the information interaction between the application layer and the DAB module through the DAB middleware service. Thus, through modular design, the DAB middleware service exists as a separate service and is registered as a system service to complete the communication and interaction between the DAB module and the application layer. Compared with the direct interaction between the DAB module and the application layer in the prior art, high cohesion and low coupling in the code are achieved, which is convenient for later maintenance and secondary development. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 It is a flowchart of a method for communication and interaction between a digital audio broadcasting DAB module and an application layer described in an embodiment of the present application;
[0032] Figure 2 A schematic diagram of a process of completing information interaction between the application layer and the DAB module through the DAB middleware service in one embodiment of the present application;
[0033] Figure 3 A software flow chart of completing information interaction between the application layer and the DAB module through the DAB middleware service in one embodiment of the present application;
[0034] Figure 4 It is a structural block diagram of the digital audio broadcasting DAB module and the application layer communication interaction device described in one embodiment of the present application;
[0035] Figure 5 It is a structural block diagram of an electronic device described in one embodiment of the present application. DETAILED DESCRIPTION
[0036] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0037] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and marked in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0038] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0039] Based on the technical problems raised by the background technology, the present application provides a method and device for communication and interaction between a digital audio broadcasting DAB module and an application layer, which can change the direct interaction between the DAB module and the application layer into modular communication, achieve high cohesion and low coupling in the code, and facilitate later maintenance and secondary development.
[0040] See the instruction manual Figure 1 In one embodiment, the present application provides a method for communication and interaction between a digital audio broadcasting (DAB) module and an application layer, the method comprising the following steps:
[0041] S1. Determine the target DAB chip used by the DAB module based on the DAB middleware service, encapsulate various operation interfaces of the target DAB chip according to the chip document, and provide a calling interface to the application layer according to various functions of the target DAB chip;
[0042] S2, registering the DAB middleware service as a system service so that the application layer can obtain the proxy class of the system service;
[0043] S3. Complete the information interaction between the application layer and the DAB module through the DAB middleware service.
[0044] It should be noted that in step S1, there are many kinds of chips that receive and process the DAB signal of the DAB module, and there are different private protocols. In order to enable it to normally receive the DAB signal to receive data, it is necessary to implement it one by one according to the chip document, send the corresponding instructions, and then process the received data. In one embodiment, the DAB middleware service determines the target DAB chip used by the DAB module in the following way, including the following steps:
[0045] After power-on, the DAB module first loads the driver. The driver loads the correct driver according to the chip that the hardware is actually connected to, that is, the target DAB chip, and runs successfully, waiting for the call of the DAB middleware service.
[0046] After the driver loading is completed, the RC file parsing stage is entered. In this stage, the DAB middleware service is started. After the DAB middleware service is started, the communication with the driver is first established through spi (Serial Peripheral Interface), and then the target DAB chip acquisition request is sent to the driver in a loop, that is, the driver is requested in a loop to know which DAB chip is currently loaded by the driver. If the driver has a return value, the DAB chip model in the DAB middleware service is defined according to the return value; if the driver has no return value within the set time period, it is determined that the DAB module driver loading has failed and the operation is abandoned.
[0047] After the DAB middleware service obtains the model of the target DAB chip, the target DAB chip is initialized, played, searched, signal values are obtained, pictures are obtained, and other operations are completed by calling the corresponding protocol code. Therefore, the corresponding operation methods are packaged according to different models of DAB chips to achieve code compatibility, that is, no matter which DAB chip is currently mounted on the machine, there is a corresponding protocol response. Specifically, the commonly used API (Application Programming Interface) is packaged according to the chip documentation, such as playback, search, etc.; wherein, the chip documentation is detailed technical information and instructions related to the chip, generally including the chip's functional description, electrical characteristics, pin definition, usage, application examples, programming guide, etc.
[0048] In addition, the DAB middleware service also encapsulates a set of interfaces for calling upper-layer applications through AIDL. When the upper-layer application calls the AIDL client and then calls the DAB middleware service, it uses the encapsulated corresponding API interface to initiate calls and data requests to the DAB module. If the returned data is returned directly, it is returned through the return value; if it is asynchronous, it is returned through a callback. That is, in this application, the DAB middleware service is used to not only encapsulate different operation interfaces downward, but also provide a unified calling interface upward.
[0049] Furthermore, in step S2, after the DAB middleware service is started, the addService(name) command in the binder mechanism is used to add the DAB middleware service to the system service by means of the service corresponding constant name, and a single instance object of a DAB service is provided to the system, and its service name is defined at the same time. Since the DAB middleware service has been registered as a system service, it has the characteristics of a system service, and its priority is higher than that of an application. Compared with ordinary applications, it is less likely to be recycled by the system, which ensures the reliability of the service, and then ensures the reliability of the DAB application, fundamentally improving the user experience;
[0050] After the DAB middleware service is registered as a system service, the upper-layer application obtains the proxy object of the DAB middleware service according to the service name through getService(name), and then calls and sets various data and callbacks of the DAB middleware service through the obtained proxy, and implements the development of the user interface according to the UI / UE logic.
[0051] This application registers the DAB middleware service into the system as a separate system service through the design of the module. Compared with the design of integrating into an application through JNI in the prior art, the scope of use is expanded. It is no longer a one-to-one binding, but a one-to-many service. The effect brought about by this is that any developer who has the authority to obtain the system SDK can develop DAB and implement business logic. It not only shields the complex chip document interaction at the bottom layer, but also ensures the integrity of the development function. For example, when the system needs to sleep or mute, the service agent can be directly obtained at the system level to control the module, without having to communicate specifically with a specific application, and then let the application perform the operation. This ensures the timeliness and stability of the system.
[0052] See the instruction manual Figure 2 And the instruction manual Figure 3 In step S3, the information interaction between the application layer and the DAB module is completed through the DAB middleware service, including the following steps:
[0053] S301, the application layer selects a target calling interface from each calling interface through the acquired proxy class to initiate a calling request to the DAB middleware service;
[0054] S302: The DAB middleware service calls a target operation interface for executing a corresponding function of a DAB module from among the integrated operation interfaces according to the received call request.
[0055] For example, the operation interface packaged by the DAB middleware service for the target DAB chip includes an operation interface A for searching channels and an operation interface B for playing; the calling interface provided by the DAB middleware service to the application layer includes a calling interface a for searching channels and a calling interface b for playing. When the application layer calls the calling interface a in the DAB middleware service registered as a system service through the acquired proxy class, the DAB middleware service calls the operation interface A corresponding to the calling interface a from the integrated various operation interfaces, thereby realizing the channel searching function; or when the application layer calls the calling interface b in the DAB middleware service registered as a system service through the acquired proxy class, the DAB middleware service calls the operation interface B corresponding to the calling interface b from the integrated various operation interfaces, thereby realizing the playing function.
[0056] It should be noted that, in the present application, the DAB middleware service also provides a callback interface to the application layer. When the information interaction between the application layer and the DAB module is completed through the DAB middleware service, the DAB module sends the corresponding callback data to the callback interface of the DAB middleware service according to the set callback mechanism; the callback interface of the DAB middleware service parses the callback data according to the set data format, and returns the parsed callback data to the application layer.
[0057] For example, text information callbacks and image loading callbacks require the DAB middleware service to parse and convert data. For example, when the text of the DAB program list is updated or different DAB chip data is sent to the DAB middleware service, there will be different formats and parsing methods. The DAB middleware service will then switch to the data format agreed upon with the upper-level application, and then call back to the upper-level application through the callback interface. In particular, image loading is relatively complex and needs to be parsed and converted according to the corresponding data format and algorithm, and then given to the callback registered by the upper-level application. Among them, a fixed method is used to parse and complete the operation for the fixed callback interface; at the same time, this application also designs an additional extensible method for the situation where the method parameters are not fixed and the callback result type is uncertain. The method parameters are selected to be passed in using a json string. The DAB middleware service parses the specific operation according to the json string and calls the extended interface of the DAB chip to return the result, thereby improving the extensibility and robustness of this application.
[0058] The present application provides a method for communication and interaction between a digital audio broadcasting DAB module and an application layer. The method determines the target DAB chip used by the DAB module based on the DAB middleware service, encapsulates the various operation interfaces of the target DAB chip according to the chip document, and provides a calling interface to the application layer according to the various functions of the target DAB chip; registers the DAB middleware service as a system service so that the application layer can obtain the proxy class of the system service; and completes the information interaction between the application layer and the DAB module through the DAB middleware service. Thus, through modular design, the DAB middleware service exists as a separate service and is registered as a system service to complete the communication and interaction between the DAB module and the application layer. Compared with the direct interaction between the DAB module and the application layer in the prior art, code decoupling is achieved, the coupling degree of the code is reduced, and later maintenance and secondary development are facilitated.
[0059] Based on the same inventive concept, an embodiment of the present application also provides a device for communication and interaction between a digital audio broadcasting DAB module and an application layer. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the method for communication and interaction between a digital audio broadcasting DAB module and an application layer in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0060] As the instruction manual Figure 4 As shown, the present application also provides a digital audio broadcasting DAB module and an application layer communication interaction device, the device comprising:
[0061] The encapsulation module 401 is used to determine the target DAB chip used by the DAB module based on the DAB middleware service, encapsulate various operation interfaces of the target DAB chip according to the chip document, and provide a calling interface to the application layer according to various functions of the target DAB chip;
[0062] A registration module 402 is used to register the DAB middleware service as a system service so that the application layer can obtain the proxy class of the system service;
[0063] The interaction module 403 is used to complete the information interaction between the application layer and the DAB module through the DAB middleware service.
[0064] In some embodiments, the encapsulation module 401 determines the target DAB chip used by the DAB module based on the DAB middleware service, including: establishing communication between the DAB middleware service and the driver after the DAB module loads the driver according to the connected target DAB chip; sending a target DAB chip acquisition request to the driver through the DAB middleware service, and receiving the model of the target DAB chip returned by the driver in response to the target DAB chip acquisition request.
[0065] In some implementations, the registration module 402 registers the DAB middleware service as a system service so that the application layer obtains the proxy class of the system service, including: using the service registration command in the binder mechanism to register the DAB middleware service as a system service, and defining a service name for the DAB middleware service registered as a system service; using the service addition method to enable the application layer to obtain the proxy class of the DAB middleware service according to the service name.
[0066] In some embodiments, the device further comprises:
[0067] The development module is used to develop a user interface in combination with UI / UE after acquiring the proxy class of the DAB middleware service at the application layer.
[0068] In some implementations, the interaction module 403 completes information interaction between the application layer and the DAB module through the DAB middleware service, including: the application layer selects a target calling interface from each of the calling interfaces through the acquired proxy class to initiate a calling request to the DAB middleware service; the DAB middleware service calls the target operation interface that executes the corresponding function of the DAB module from each of the integrated operation interfaces according to the received calling request.
[0069] In some embodiments, the DAB middleware service also provides a callback interface to the application layer, and the interaction module 403 completes the information interaction between the application layer and the DAB module through the DAB middleware service, and also includes: the DAB module sends the corresponding callback data to the callback interface of the DAB middleware service according to the set callback mechanism; the callback interface of the DAB middleware service parses the callback data according to the set data format, and returns the parsed callback data to the application layer.
[0070] The present application provides a communication and interaction device between a digital audio broadcasting DAB module and an application layer. The encapsulation module determines the target DAB chip used by the DAB module based on the DAB middleware service, and encapsulates the various operation interfaces of the target DAB chip according to the chip document, and provides a calling interface to the application layer according to the various functions of the target DAB chip; the registration module registers the DAB middleware service as a system service so that the application layer can obtain the proxy class of the system service; the interaction module completes the information interaction between the application layer and the DAB module through the DAB middleware service. Thus, through modular design, the DAB middleware service exists as a separate service and is registered as a system service to complete the communication and interaction between the DAB module and the application layer. Compared with the direct interaction between the DAB module and the application layer in the prior art, code decoupling is achieved and the coupling degree of the code is reduced.
[0071] Based on the same concept of the present invention, the specification is attached Figure 5 As shown, the structure of an electronic device 500 provided in an embodiment of the present application includes: at least one processor 501, at least one network interface 504 or other user interface 503, a memory 505, and at least one communication bus 502. The communication bus 502 is used to realize the connection and communication between these components. The electronic device 500 optionally includes a user interface 503, including a display (for example, a touch screen, LCD, CRT, holographic imaging (Holographic) or projection (Projector), etc.), a keyboard or a pointing device (for example, a mouse, a trackball (trackball), a touch pad or a touch screen, etc.).
[0072] The memory 505 may include a read-only memory and a random access memory, and provides instructions and data to the processor 501. A portion of the memory 505 may also include a non-volatile random access memory (NVRAM).
[0073] In some implementations, the memory 505 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof:
[0074] Operating system 5051, including various system programs, used to implement various basic services and process hardware-based tasks;
[0075] The application module 5052 includes various application programs, such as a launcher, a media player, a browser, etc., which are used to implement various application services.
[0076] In an embodiment of the present application, by calling a program or instruction stored in the memory 505, the processor 501 is used to execute steps in a method for communication and interaction between a digital audio broadcasting DAB module and an application layer, so that the direct interaction between the DAB module and the application layer can be changed to modular communication, thereby achieving high cohesion and low coupling in the code, and facilitating later maintenance and secondary development.
[0077] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the method for communication and interaction between a digital audio broadcasting (DAB) module and an application layer are executed.
[0078] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is executed, the above-mentioned method of communication and interaction between the digital audio broadcasting DAB module and the application layer can be executed.
[0079] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0080] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0081] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0082] If the function is implemented in the form of a business function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0083] Finally, it should be noted that the above embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for communication and interaction between a digital audio broadcasting (DAB) module and an application layer, characterized in that: The method comprises the following steps: Determine the target DAB chip used by the DAB module based on the DAB middleware service, encapsulate various operation interfaces of the target DAB chip according to the chip document, and provide a calling interface to the application layer according to various functions of the target DAB chip; Register the DAB middleware service as a system service so that the application layer can obtain the proxy class of the system service; The information interaction between the application layer and the DAB module is completed through the DAB middleware service.
2. According to claim 1, a method for communication and interaction between a digital audio broadcasting (DAB) module and an application layer, characterized in that: The method of determining the target DAB chip used by the DAB module based on the DAB middleware service comprises the following steps: After the DAB module loads the driver according to the connected target DAB chip, establishing communication between the DAB middleware service and the driver; A target DAB chip acquisition request is sent to the driver through the DAB middleware service, and the model of the target DAB chip returned by the driver in response to the target DAB chip acquisition request is received.
3. According to claim 2, a method for communication and interaction between a digital audio broadcasting (DAB) module and an application layer, characterized in that: The step of registering the DAB middleware service as a system service so that the application layer can obtain the proxy class of the system service comprises the following steps: Using the service registration command in the binder mechanism to register the DAB middleware service as a system service, and defining a service name for the DAB middleware service registered as a system service; The service adding method is adopted to enable the application layer to obtain the proxy class of the DAB middleware service according to the service name.
4. According to claim 3, a method for communication and interaction between a digital audio broadcasting (DAB) module and an application layer, characterized in that: in, After the application layer obtains the proxy class of the DAB middleware service, it develops the user interface in combination with the UI / UE.
5. The method for communication and interaction between a digital audio broadcasting (DAB) module and an application layer according to claim 3, characterized in that: The information interaction between the application layer and the DAB module is completed by the DAB middleware service, including the following steps: The application layer selects a target calling interface from each of the calling interfaces through the acquired proxy class to initiate a calling request to the DAB middleware service; The DAB middleware service calls a target operation interface for executing a corresponding function of the DAB module from among the integrated operation interfaces according to the received call request.
6. The method for communication and interaction between a digital audio broadcasting (DAB) module and an application layer according to claim 5, characterized in that: in, The DAB middleware service also provides a callback interface to the application layer.
7. The method for communication and interaction between a digital audio broadcasting (DAB) module and an application layer according to claim 6, characterized in that: The information interaction between the application layer and the DAB module is completed by the DAB middleware service, and further comprises the following steps: The DAB module sends the corresponding callback data to the callback interface of the DAB middleware service according to the set callback mechanism; The callback interface of the DAB middleware service parses the callback data according to a set data format, and returns the parsed callback data to the application layer.
8. A communication and interaction device between a digital audio broadcasting DAB module and an application layer, characterized in that: The device comprises: The encapsulation module is used to determine the target DAB chip used by the DAB module based on the DAB middleware service, encapsulate various operation interfaces of the target DAB chip according to the chip document, and provide a calling interface to the application layer according to various functions of the target DAB chip; A registration module, used to register the DAB middleware service as a system service so that the application layer can obtain the proxy class of the system service; The interaction module is used to complete the information interaction between the application layer and the DAB module through the DAB middleware service.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for communication and interaction between a digital audio broadcasting DAB module and an application layer as described in any one of claims 1 to 7 are performed.
10. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for communication and interaction between a digital audio broadcasting DAB module and an application layer as claimed in any one of claims 1 to 7 are executed.
