Data transmission method, device, equipment and storage medium
By building a target data acquisition framework in the terminal device, the problem of not being able to obtain data from the baseband chip is solved, and data interaction and application from the baseband chip to the data requester is realized.
Patent Information
- Application Number
- CN202110304033.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-22
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2041-03-22
AI Technical Summary
In the prior art, relevant data cannot be obtained from the baseband chip of the mobile terminal, which will affect subsequent data applications.
By building a target data acquisition framework in a terminal device, including an interface layer, a data exchange layer and a baseband chip, data acquisition instructions are generated and transmitted to the baseband chip through the data exchange layer, and target data is obtained and sent.
It realizes the acquisition of target data from the baseband chip, meets the needs of the data requester, and supports subsequent applications.
Smart Images

Figure CN115114040B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal technology, and in particular to a data sending method, apparatus, device, and storage medium. Background Art
[0002] With the advancement of mobile terminal technology, mobile-based big data applications have garnered increasing attention. Related technologies typically rely on standard interfaces provided by the mobile terminal system to collect data. For example, the Android system provides standard interfaces for the application layer, allowing the application layer to collect relevant data based on these interfaces. However, these technologies fail to capture relevant data from the underlying baseband chip, hindering subsequent applications of this data. Summary of the Invention
[0003] To overcome the problems existing in the related art, the embodiments of the present disclosure provide a data sending method, apparatus, device and storage medium to solve the defects in the related art.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a data transmission method, which is applied to a pre-built target data acquisition framework, the framework comprising an interface layer, a data exchange layer, and a baseband chip;
[0005] The method comprises:
[0006] In response to receiving, based on the interface layer, request information for obtaining target data sent by a data requester, generating, based on the interface layer, a data acquisition instruction for obtaining the target data from a baseband chip;
[0007] Controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction;
[0008] The target data is sent to the data requester based on the interface layer.
[0009] In one embodiment, the request information includes the data source of the target data;
[0010] The generating, based on the interface layer, a data acquisition instruction for acquiring the target data from the baseband chip includes:
[0011] generating, based on the interface layer and according to the data source, a data acquisition instruction for acquiring the target data from the baseband chip, wherein the data acquisition instruction carries the data source;
[0012] The controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction, includes:
[0013] The interface layer is controlled to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and the target data is acquired in the baseband chip according to the data source carried by the data acquisition instruction.
[0014] In one embodiment, the target data includes at least one of the following:
[0015] Log data obtained from the baseband chip based on a preset log parsing interface;
[0016] Event information obtained from the baseband chip based on a preset event monitoring interface;
[0017] The cache data is obtained from the baseband chip based on a preset cache acquisition interface.
[0018] In one embodiment, the data exchange layer includes a data exchange program;
[0019] The controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction, includes:
[0020] The interface layer is controlled to transmit the data acquisition instruction to the baseband chip through the data exchange program, so that the baseband chip acquires the target data according to the data acquisition instruction.
[0021] In one embodiment, the data exchange layer further includes a wireless interface program;
[0022] The controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange program, so that the baseband chip acquires the target data according to the data acquisition instruction, includes:
[0023] The interface layer is controlled to transmit the data acquisition instruction to the wireless interface program through the data exchange program, and based on the wireless interface program, the target data is acquired in the baseband chip according to the data acquisition instruction.
[0024] According to a second aspect of an embodiment of the present disclosure, there is provided a data sending device, which is applied to a pre-built target data acquisition framework, wherein the framework includes an interface layer, a data exchange layer, and a baseband chip;
[0025] The device comprises:
[0026] an acquisition instruction generation module, configured to generate, based on the interface layer, a data acquisition instruction for acquiring the target data from the baseband chip in response to receiving, based on the interface layer, request information for acquiring target data sent by a data requester;
[0027] a target data acquisition module, configured to control the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquire the target data in the baseband chip according to the data acquisition instruction;
[0028] A target data sending module is used to send the target data to the data requester based on the interface layer.
[0029] In one embodiment, the request information includes the data source of the target data;
[0030] The acquisition instruction generation module is further configured to generate a data acquisition instruction for acquiring the target data from the baseband chip based on the interface layer and the data source, wherein the data acquisition instruction carries the data source;
[0031] The target data acquisition module is further configured to control the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquire the target data in the baseband chip according to the data source carried by the data acquisition instruction.
[0032] In one embodiment, the target data includes at least one of the following:
[0033] Log data obtained from the baseband chip based on a preset log parsing interface;
[0034] Event information obtained from the baseband chip based on a preset event monitoring interface;
[0035] The cache data is obtained from the baseband chip based on a preset cache acquisition interface.
[0036] In one embodiment, the data exchange layer includes a data exchange program;
[0037] The target data acquisition module is further configured to control the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange program, so that the baseband chip acquires the target data according to the data acquisition instruction.
[0038] In one embodiment, the data exchange layer further includes a wireless interface program;
[0039] The target data acquisition module is further configured to control the interface layer to transmit the data acquisition instruction to the wireless interface program through the data exchange program, and based on the wireless interface program, acquire the target data in the baseband chip according to the data acquisition instruction.
[0040] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, the device comprising:
[0041] A processor, a memory for storing processor executable instructions, and a pre-built target data acquisition framework, the framework including an interface layer, a data exchange layer, and a baseband chip;
[0042] Wherein, the processor is configured to:
[0043] In response to receiving, based on the interface layer, request information for obtaining target data sent by a data requester, generating, based on the interface layer, a data acquisition instruction for obtaining the target data from a baseband chip;
[0044] Controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction;
[0045] The target data is sent to the data requester based on the interface layer.
[0046] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the following is achieved:
[0047] In response to receiving, based on the interface layer, request information for obtaining target data sent by a data requester, generating, based on the interface layer, a data obtaining instruction for obtaining the target data from a baseband chip;
[0048] Controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction;
[0049] The target data is sent to the data requester based on the interface layer.
[0050] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0051] The present disclosure generates a data acquisition instruction for acquiring the target data from the baseband chip based on the interface layer in response to request information for acquiring target data sent by the data requester received based on the interface layer, controls the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, acquires the target data in the baseband chip according to the data acquisition instruction, and then sends the target data to the data requester based on the interface layer. Since data interaction between the interface layer of the target data acquisition framework and the baseband chip is realized, it is possible to acquire the target data from the baseband chip in response to the request information of the data requester and provide it to the data requester, which can overcome the problem in the related art that the relevant data in the baseband chip cannot be acquired, and is beneficial for the data requester to realize subsequent applications based on the acquired target data.
[0052] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0054] Figure 1 is a flow chart showing a data sending method according to a first exemplary embodiment;
[0055] Figure 2 is a flow chart of a data sending method according to a second exemplary embodiment;
[0056] Figure 3 is a flow chart of a data sending method according to a third exemplary embodiment;
[0057] Figure 4 is a flow chart of a data sending method according to a fourth exemplary embodiment;
[0058] Figure 5 is a flowchart illustrating a data sending method according to an exemplary embodiment;
[0059] Figure 6 is a block diagram of a data sending device according to an exemplary embodiment;
[0060] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0061] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0062] Abbreviations:
[0063] Modem: Modulator-Demodulator, modem.
[0064] RILD: Radio Interface Layer Demon, referred to as RIL, is the bridge for communication between the modem (baseband chip) on the terminal and the Android system.
[0065] QMI: Qualcomm Message Interface, is the information interface for communication between Qualcomm chip Modem and RIL.
[0066] AT: Attention, AT command is the general information interface for communication between Android system RIL and Modem.
[0067] HIDL: Hardware Interface Definition Language, an interface description language used by the Android platform to specify the interface between RIL and its upper-level user applications.
[0068] HOOK: HOOK here refers to a special application of HIDL in the Android system platform, which is used to provide an interface to Android applications.
[0069] MTB SHELL: Modem Test Box shell is an executable program that provides a data interface for PC (personal computer) applications on the terminal device.
[0070] Figure 1 This is a flowchart of a data sending method according to an exemplary embodiment; the method of this embodiment can be applied to a target data acquisition framework pre-built in a terminal device with a baseband chip (such as a smartphone, tablet computer, laptop computer or wearable device, etc.), and the framework includes an interface layer, a data exchange layer and a baseband chip.
[0071] like Figure 1 As shown, the method includes the following steps S101-S103:
[0072] In step S101, in response to receiving request information for obtaining target data sent by a data requester based on the interface layer, a data acquisition instruction for obtaining the target data from a baseband chip is generated based on the interface layer.
[0073] In this embodiment, after the interface layer in the target data acquisition framework receives the request information sent by the data requester for obtaining the target data, a data acquisition instruction for obtaining the target data from the baseband chip can be generated based on the interface layer, that is, after the terminal device receives the request information through the interface layer, the data acquisition instruction is generated in the interface layer according to the request information.
[0074] For example, the data requester may send the request information via an interface corresponding to the data type of the target data set in the terminal device interface layer.
[0075] It is worth noting that the data type of the above-mentioned target data can be set based on actual needs, such as network data, display data, radio frequency data, test data, power consumption data, scenario data, etc., which is not limited in this embodiment.
[0076] The network data may include: data such as the band, frequency, PLMN information of the network cell where the terminal device resides, and communication parameters such as network cell reselection parameters.
[0077] The displayed data may include: information about the cell where the terminal device is currently residing, such as signal strength and quality, cell identification, transmit power of the terminal device, throughput-related parameters, and other data.
[0078] Radio frequency data may include: antenna parameters of the terminal device, signal reception and transmission parameters and other data.
[0079] Power consumption data may include: air interface connection status of terminal equipment, terminal transmission power and other data.
[0080] Scenario data may include: cell switching, cell redirection and other application scenario-related data of the terminal device.
[0081] It is worth noting that the above-mentioned interface layer is a data layer preset in the target data acquisition framework for receiving data request information sent by a data requester and sending the acquired target data to the data requester.
[0082] In step S102, the interface layer is controlled to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and the target data is acquired in the baseband chip according to the data acquisition instruction.
[0083] In this embodiment, after generating a data acquisition instruction for acquiring target data from the baseband chip based on the interface layer, the terminal device can control the interface layer to transmit the data acquisition instruction to the baseband chip via the data exchange layer, and acquire the target data from the baseband chip according to the data acquisition instruction. For example, after generating a data acquisition instruction for acquiring the target data from the baseband chip, the interface layer can be controlled to send the data acquisition instruction to the data exchange layer, which then transmits the data acquisition instruction to the baseband chip, and the baseband chip then acquires the target data according to the data acquisition instruction. The data exchange layer is located between the interface layer and the baseband chip.
[0084] In one embodiment, the target data may also be processed via the interface layer. Specifically, the interface layer may be used to process the target data, for example, by packaging the target data according to a set type, and then sending the processed data to the upper-layer application, i.e., the aforementioned data requester. The method for packaging the target data may be set based on actual business needs and is not limited in this embodiment.
[0085] In one embodiment, the baseband chip can obtain log data from the baseband chip based on a preset log parsing interface, event information from the baseband chip based on a preset event monitoring interface, and cache data from the baseband chip based on a preset cache acquisition interface, and then fill the obtained log data, event information and cache data into a pre-written data file, and the data file can be used to display the corresponding log data, event information and cache data based on a set format. On this basis, when the baseband chip receives a data acquisition instruction for obtaining target data, it can extract the target data from the above data file based on the data acquisition instruction, and encapsulate the target data into a data packet according to the data type, and then output the data packet through a preset interface that matches the data type, for example, output the data packet to the data exchange layer through the preset interface, and send the data packet to the interface layer through the data exchange layer, so as to obtain the target data in the baseband chip.
[0086] In step S103, the target data is sent to the data requester based on the interface layer.
[0087] In this embodiment, after the target data is acquired in the baseband chip according to the data acquisition instruction, the target data may be sent to the data requester based on the interface layer, that is, the target data is sent to the data requester through the interface layer.
[0088] For example, after the above-mentioned data acquisition instruction is transmitted to the baseband chip, the baseband chip can obtain the target data in response to the data acquisition instruction, and return the target data to the interface layer through the data exchange layer, and then send the target data to the data requester based on the interface layer.
[0089] As can be seen from the above description, this embodiment generates a data acquisition instruction for acquiring the target data from the baseband chip based on the interface layer in response to the request information for acquiring the target data sent by the data requester received based on the interface layer, and controls the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquires the target data in the baseband chip according to the data acquisition instruction, and then sends the target data to the data requester based on the interface layer. Since data interaction between the interface layer of the target data acquisition framework and the baseband chip is realized, it is possible to acquire the target data from the baseband chip in response to the request information of the data requester and provide it to the data requester, which can overcome the problem in the related art that the relevant data in the baseband chip cannot be acquired, and is beneficial for the data requester to realize subsequent applications based on the acquired target data.
[0090] Figure 2 This is a flowchart of a data sending method according to a second exemplary embodiment; the method of this embodiment can be applied to a target data acquisition framework pre-built in a terminal device with a baseband chip (such as a smart phone, tablet computer, laptop computer or wearable device, etc.), and the framework includes an interface layer, a data exchange layer and a baseband chip.
[0091] In this embodiment, the request information sent by the data requester for obtaining the target data may include the data source of the target data, that is, the data requester may specify the data source from which to obtain the target data based on the sent request information.
[0092] On this basis, if Figure 2 As shown, the method includes the following steps S201-S203:
[0093] In step S201, in response to receiving a request message for obtaining target data from a data requester based on the interface layer, the interface layer generates a data acquisition instruction for obtaining the target data from a baseband chip according to the data source.
[0094] In this embodiment, after the interface layer in the target data acquisition framework receives the request information for obtaining the target data sent by the data requester, a data acquisition instruction for obtaining the target data from the baseband chip can be generated based on the interface layer according to the data source, wherein the data acquisition instruction carries the data source of the above-mentioned target data.
[0095] For example, the target data may be derived from at least one of the following: a pre-set log parsing interface of the baseband chip, a pre-set event monitoring interface of the baseband chip, or a pre-set cache acquisition interface of the baseband chip. Specifically, date data may be acquired through the log parsing interface, event information may be acquired through the event monitoring interface, and cache data may be acquired through the cache acquisition interface.
[0096] in:
[0097] The above-mentioned log data can be obtained through the interface provided by the baseband chip itself, and then the relevant data can be parsed out of the log data through the parsing description document provided by the baseband chip, and cached locally. It can be understood that by parsing these log data, on the one hand, key logical data such as radio frequency data, protocol data, etc. can be obtained; on the other hand, event type data can also be obtained, that is, some activities of the terminal device can be monitored, such as network access events, etc., and then the data can be provided to the upper-layer application; thus, the upper-layer application can respond to this data, for example, it can display corresponding prompt information to the user based on the event of the terminal device accessing the network. It is worth noting that the way in which the above-mentioned upper-layer application responds to the obtained data is only for illustrative purposes, and this embodiment does not limit this.
[0098] The above-mentioned event information may be some key events in the native module of the baseband chip, such as events corresponding to processes such as terminal device accessing the network and switching networks. For example, the OEM (original equipment manufacturer) can register and monitor the above-mentioned types of events, and then obtain activity parameters of certain activities performed by the terminal device from the monitored events and provide them to the upper-layer application. The upper-layer application can then respond to this data, for example, by displaying corresponding prompt information to the user based on the type of network currently connected to the terminal device. It is worth noting that the above-mentioned manner in which the upper-layer application responds to the obtained data is for illustrative purposes only and is not limited in this embodiment.
[0099] This cache data can be retrieved through the baseband chip's pre-set cache access interfaces. These interfaces provide access to a large amount of cache data from the baseband's native modules. This data can reflect the operating status of the native modules, allowing the data requester to perform targeted optimizations based on this data. For example, if the cache data indicates an abnormal operating status of the corresponding native module, the data requester can use this data to analyze the cause of the module's failure and implement targeted repairs for the module.
[0100] In step S202, the interface layer is controlled to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and the target data is acquired in the baseband chip according to the data source carried by the data acquisition instruction.
[0101] In this embodiment, after a data acquisition instruction for obtaining the target data from the baseband chip is generated based on the interface layer, the interface layer can be controlled to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and the target data can be obtained in the baseband chip according to the data source carried by the data acquisition instruction.
[0102] For example, after a data acquisition instruction for obtaining the target data from the baseband chip is generated based on the interface layer, the interface layer can be controlled to transmit the above-mentioned data acquisition instruction carrying the data source to the baseband chip through the data exchange layer, and then the baseband chip can obtain the target data from the data source based on the data acquisition instruction.
[0103] Since the data source may include at least one of a preset log parsing interface, a preset event monitoring interface, and a preset cache acquisition interface of the baseband chip, the target data obtained from the data source may include at least one of the following:
[0104] Log data obtained from the baseband chip based on a preset log parsing interface;
[0105] Event information obtained from the baseband chip based on a preset event monitoring interface;
[0106] The cache data is obtained from the baseband chip based on a preset cache acquisition interface.
[0107] In step S203, the target data is sent to the data requester based on the interface layer.
[0108] The explanation and description of step S203 can be found in the above Figure 1 Step S103 in the illustrated embodiment is not described in detail here.
[0109] As can be seen from the above description, this embodiment generates a data acquisition instruction for acquiring target data from the baseband chip based on the data source specified in the request information, and sends the data acquisition instruction to the baseband chip, and then sends the target data to the data requester in response to receiving the target data acquired and sent by the baseband chip from the data source based on the data acquisition instruction. This can achieve the acquisition of target data from the baseband chip based on the request information of the data requester and the specified data source and provide it to the data requester, which can improve the accuracy of acquiring target data, overcome the problem in related technologies that relevant data in the baseband chip cannot be acquired, and thus lay the foundation for subsequent data requesters to apply the target data.
[0110] Figure 3 This is a flowchart of a data sending method according to a third exemplary embodiment; the method of this embodiment can be applied to a target data acquisition framework pre-built in a terminal device with a baseband chip (such as a smart phone, tablet computer, laptop computer or wearable device, etc.), and the framework includes an interface layer, a data exchange layer and a baseband chip.
[0111] In this embodiment, the data exchange layer may include a data exchange program. Figure 3 As shown, the method includes the following steps S301-S303:
[0112] In step S301, in response to receiving request information for obtaining target data sent by a data requester based on the interface layer, a data acquisition instruction for obtaining the target data from a baseband chip is generated based on the interface layer.
[0113] The explanation and description of step S301 can be found in the above Figure 1 Step S101 in the illustrated embodiment will not be described in detail here.
[0114] In step S302, the interface layer is controlled to transmit the data acquisition instruction to the baseband chip through the data exchange program, so that the baseband chip acquires the target data according to the data acquisition instruction.
[0115] In this embodiment, after a data acquisition instruction for acquiring the target data from the baseband chip is generated based on the interface layer, the interface layer can be controlled to transmit the data acquisition instruction to the baseband chip through the data exchange program, that is, the interface layer is controlled to send the data acquisition instruction to the data exchange layer, and the data exchange layer transmits the data acquisition instruction to the baseband chip through the data exchange program, so that the target data can be acquired in the baseband chip according to the data acquisition instruction.
[0116] Among them, the above-mentioned data exchange program can be an interface application pre-set between the interface layer and the baseband chip in the target data acquisition framework. The interface application can be used to transfer information between the interface layer and the baseband chip. For example, it can be used to transmit data acquisition instructions obtained from the interface layer to the baseband chip, and to send target data obtained from the baseband chip to the interface layer.
[0117] For example, the data exchange program may be an MTB Shell program and / or a Hook program.
[0118] In step S303, the target data is sent to the data requester based on the interface layer.
[0119] In this embodiment, after the target data is acquired in the baseband chip according to the data acquisition instruction, the target data may be sent to the data requester based on the interface layer.
[0120] Taking the data exchange program as the MTB Shell program as an example, when the control interface layer transmits the data acquisition instruction to the baseband chip through the MTB Shell program, the baseband chip can obtain the target data based on the received data acquisition instruction, and then return the target data to the interface layer based on the MTB Shell program. The method for the baseband chip to obtain the target data based on the above data acquisition instruction can be referred to above. Figure 2 The explanations and illustrations in the illustrated embodiment, for example, may be based on the data source carried in the request information to obtain parsed log data, monitored event information or pre-stored cache data, etc., which are not elaborated in this embodiment.
[0121] As can be seen from the above description, this embodiment controls the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange program, so that the target data is obtained in the baseband chip according to the data acquisition instruction. It can realize the transmission of data acquisition instructions to the baseband chip based on the data exchange program and the acquisition of target data from the baseband chip, and can realize data interaction between the interface layer of the target data acquisition framework and the baseband chip, and then can realize the acquisition of target data. It can overcome the problem in related technologies that relevant data in the baseband chip cannot be obtained, and can lay the foundation for subsequently providing target data to the data requester.
[0122] Figure 4 This is a flowchart of a data sending method according to a fourth exemplary embodiment; the method of this embodiment can be applied to a target data acquisition framework pre-built in a terminal device with a baseband chip (such as a smart phone, tablet computer, laptop computer or wearable device, etc.), and the framework includes an interface layer, a data exchange layer and a baseband chip.
[0123] like Figure 4 As shown, the method includes the following steps S401-S403:
[0124] In step S401, in response to receiving request information for obtaining target data sent by a data requester based on the interface layer, a data acquisition instruction for obtaining the target data from a baseband chip is generated based on the interface layer.
[0125] The explanation and description of step S401 can be found in the above Figure 1 Step S101 in the illustrated embodiment will not be described in detail here.
[0126] In step S402, the interface layer is controlled to transmit the data acquisition instruction to the wireless interface program through the data exchange program, and based on the wireless interface program, the target data is acquired in the baseband chip according to the data acquisition instruction.
[0127] In this embodiment, after a data acquisition instruction for acquiring the target data from the baseband chip is generated based on the interface layer, the interface layer can be controlled to transmit the data acquisition instruction to the wireless interface program through the data exchange program, and then the wireless interface program sends the data acquisition instruction to the baseband chip, so that the target data can be acquired in the baseband chip according to the data acquisition instruction.
[0128] Taking the data exchange program as the Hook program and the wireless interface program as the RIL layer as an example, after a data acquisition instruction for acquiring the target data from the baseband chip is generated based on the interface layer, the data acquisition instruction can be sent to the RIL layer through the Hook program, and the data acquisition instruction is transmitted to the baseband chip through the RIL layer. Among them, the data interaction between the Hook program and the RIL layer can be implemented based on the HIDL interface description language. It is worth noting that the RIL layer can be used to only receive the target data returned by the baseband chip, and does not perform any processing on the target data, that is, it only transparently transmits the target data to the Hook program.
[0129] In step S403, the target data is sent to the data requester based on the interface layer.
[0130] In this embodiment, when the interface layer is controlled to transmit the data acquisition instruction to the wireless interface program through the data exchange program, and based on the wireless interface program, after the target data is acquired in the baseband chip according to the data acquisition instruction, the target data can be sent to the data requester based on the interface layer.
[0131] Still taking the data exchange program as the Hook program and the wireless interface program as the RIL layer as an example, when the control interface layer sends the data acquisition instruction to the RIL layer through the Hook program, and transmits the data acquisition instruction to the baseband chip based on the RIL layer, the baseband chip can obtain the target data in response to the data acquisition instruction, and then send the obtained target data to the Hook program through the RIL layer, so that the target data can be transparently transmitted to the interface layer through the Hook program, so that the interface layer can send the target data to the data requester.
[0132] The interaction mode between the RIL layer and the baseband chip may include any one of a QMI mode and an AT command mode.
[0133] As can be seen from the above description, this embodiment controls the interface layer to transmit the data acquisition instruction to the wireless interface program through the data exchange program, and based on the wireless interface program, obtains the target data in the baseband chip according to the data acquisition instruction, thereby realizing accurate and efficient data interaction between the interface layer of the target data acquisition framework and the baseband chip, thereby realizing the acquisition of target data, overcoming the problem in related technologies that the relevant data in the baseband chip cannot be obtained, and realizing the subsequent provision of target data to the data requester.
[0134] Figure 5 FIG. 1 is a flow chart of a data sending method according to an exemplary embodiment; FIG. Figure 5 As shown, this embodiment can be applied to a target data acquisition framework pre-built in a terminal device with a baseband chip (such as a smart phone, tablet computer, laptop computer or wearable device, etc.), which includes a baseband chip (Modem), RIL, data exchange layer and interface layer.
[0135] In this embodiment, the data flow may include a modem active reporting method and an application layer active acquisition method.
[0136] For example, when a data requester (e.g., an application layer) sends a request message to the interface layer for obtaining target data, the interface layer can, in response to receiving the request message sent by the data requester for obtaining target data, generate a data acquisition instruction for obtaining the target data from the baseband chip. The type of target data can be set based on the actual needs of the data requester, such as one or more of network data, display data, radio frequency data, test data, power consumption data, scenario data, etc., which is not limited in this embodiment. Furthermore, the interface layer can send the generated data acquisition instruction to the baseband chip modem via the Hook program or MTB Shell program of the data exchange layer, and then receive the target data returned by the baseband chip based on the data acquisition instruction. The interface layer can then return the target data to the data requester based on the interface layer. Specifically, when the interface layer sends the data acquisition instruction to the modem via the MTB Shell program of the data exchange layer, the MTB Shell program can interact with the modem based on a preset interaction method, which can include either a QMI method or an AT command method. When the interface layer sends a data acquisition instruction to the modem through the hook program of the data exchange layer, the hook program can interact with the modem through the QMI Client in the RIL. The interaction between the QMI Client and the modem can include either QMI or AT command. In one embodiment, the data interaction between the hook program and the QMI Client can be implemented based on HIDL interface description voice.
[0137] Figure 6 This is a block diagram of a data transmission device according to an exemplary embodiment; the device of this embodiment can be applied to a target data acquisition framework pre-built in a terminal device with a baseband chip (such as a smart phone, tablet computer, laptop computer or wearable device, etc.), and the framework includes an interface layer, a data exchange layer and a baseband chip. Figure 6 As shown, the device includes: an acquisition instruction generation module 110, a target data acquisition module 120 and a target data sending module 130, wherein:
[0138] an acquisition instruction generating module 110 for generating, based on the interface layer, a data acquisition instruction for acquiring the target data from the baseband chip in response to receiving, based on the interface layer, a request for acquiring target data from a data requester;
[0139] a target data acquisition module 120, configured to control the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquire the target data in the baseband chip according to the data acquisition instruction;
[0140] The target data sending module 130 is configured to send the target data to the data requester based on the interface layer.
[0141] As can be seen from the above description, this embodiment generates a data acquisition instruction for acquiring the target data from the baseband chip based on the interface layer in response to the request information for acquiring the target data sent by the data requester received based on the interface layer, and controls the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquires the target data in the baseband chip according to the data acquisition instruction, and then sends the target data to the data requester based on the interface layer. Since data interaction between the interface layer of the target data acquisition framework and the baseband chip is realized, it is possible to acquire the target data from the baseband chip in response to the request information of the data requester and provide it to the data requester, which can overcome the problem in the related art that the relevant data in the baseband chip cannot be acquired, and is beneficial for the data requester to realize subsequent applications based on the acquired target data.
[0142] In one embodiment, the request information may include the data source of the target data;
[0143] On this basis, the acquisition instruction generation module 110 can also be used to generate a data acquisition instruction for acquiring the target data from the baseband chip based on the interface layer and the data source, wherein the data acquisition instruction carries the data source;
[0144] The target data acquisition module 120 is further configured to control the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquire the target data in the baseband chip according to the data source carried by the data acquisition instruction.
[0145] In one embodiment, the target data includes at least one of the following:
[0146] Log data obtained from the baseband chip based on a preset log parsing interface;
[0147] Event information obtained from the baseband chip based on a preset event monitoring interface;
[0148] The cache data is obtained from the baseband chip based on a preset cache acquisition interface.
[0149] In one embodiment, the data exchange layer includes a data exchange program;
[0150] On this basis, the target data acquisition module 120 can also be used to control the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange program, so that the baseband chip acquires the target data according to the data acquisition instruction.
[0151] In one embodiment, the data exchange layer further includes a wireless interface program;
[0152] On this basis, the target data acquisition module 120 can also be used to control the interface layer to transmit the data acquisition instruction to the wireless interface program through the data exchange program, and based on the wireless interface program, obtain the target data in the baseband chip according to the data acquisition instruction.
[0153] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0154] Figure 7 9 is a block diagram of an electronic device according to an exemplary embodiment. For example, device 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0155] Reference Figure 7 , device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .
[0156] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 902 may include one or more modules to facilitate interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
[0157] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0158] The power supply component 906 provides power to the various components of the device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 900.
[0159] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0160] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), which is configured to receive external audio signals when the device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0161] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0162] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display and keypad of the device 900. The sensor assembly 914 can also detect changes in the position of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and temperature changes of the device 900. The sensor assembly 914 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0163] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0164] In an exemplary embodiment, the device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described methods.
[0165] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, which can be executed by the processor 920 of the device 900 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0166] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0167] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data sending method, characterized in that: Applied to a pre-built target data acquisition framework, the framework including an interface layer, a data exchange layer, and a baseband chip; The method comprises: In response to receiving, based on the interface layer, request information for obtaining target data sent by a data requester, generating, based on the interface layer, a data acquisition instruction for obtaining the target data from a baseband chip; Controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction; Sending the target data to the data requester based on the interface layer; The request information includes the data source of the target data; The generating, based on the interface layer, a data acquisition instruction for acquiring the target data from the baseband chip includes: generating, based on the interface layer and according to the data source, a data acquisition instruction for acquiring the target data from the baseband chip, wherein the data acquisition instruction carries the data source; The controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction, includes: The interface layer is controlled to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and the target data is acquired in the baseband chip according to the data source carried by the data acquisition instruction.
2. The method according to claim 1, characterized in that The target data includes at least one of the following: Log data obtained from the baseband chip based on a preset log parsing interface; Event information obtained from the baseband chip based on a preset event monitoring interface; The cache data is obtained from the baseband chip based on a preset cache acquisition interface.
3. The method according to claim 1, characterized in that The data exchange layer includes a data exchange program; The controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction, includes: The interface layer is controlled to transmit the data acquisition instruction to the baseband chip through the data exchange program, so that the baseband chip acquires the target data according to the data acquisition instruction.
4. The method according to claim 3, characterized in that The data exchange layer also includes a wireless interface program; The controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange program, so that the baseband chip acquires the target data according to the data acquisition instruction, includes: The interface layer is controlled to transmit the data acquisition instruction to the wireless interface program through the data exchange program, and based on the wireless interface program, the target data is acquired in the baseband chip according to the data acquisition instruction.
5. A data sending device, characterized in that: Applied to a pre-built target data acquisition framework, the framework including an interface layer, a data exchange layer, and a baseband chip; The device comprises: an acquisition instruction generation module, configured to generate, based on the interface layer, a data acquisition instruction for acquiring the target data from the baseband chip in response to receiving, based on the interface layer, request information for acquiring target data sent by a data requester; a target data acquisition module, configured to control the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquire the target data in the baseband chip according to the data acquisition instruction; A target data sending module, configured to send the target data to the data requester based on the interface layer; The request information includes the data source of the target data; The acquisition instruction generation module is further configured to generate a data acquisition instruction for acquiring the target data from the baseband chip based on the interface layer and the data source, wherein the data acquisition instruction carries the data source; The target data acquisition module is further configured to control the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquire the target data in the baseband chip according to the data source carried by the data acquisition instruction.
6. The device according to claim 5, characterized in that The target data includes at least one of the following: Log data obtained from the baseband chip based on a preset log parsing interface; Event information obtained from the baseband chip based on a preset event monitoring interface; The cache data is obtained from the baseband chip based on a preset cache acquisition interface.
7. The device according to claim 5, characterized in that The data exchange layer includes a data exchange program; The target data acquisition module is further configured to control the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange program, so that the baseband chip acquires the target data according to the data acquisition instruction.
8. The device according to claim 7, characterized in that The data exchange layer also includes a wireless interface program; The target data acquisition module is further configured to control the interface layer to transmit the data acquisition instruction to the wireless interface program through the data exchange program, and based on the wireless interface program, acquire the target data in the baseband chip according to the data acquisition instruction.
9. An electronic device, characterized in that: The device comprises: A processor, a memory for storing processor executable instructions, and a pre-built target data acquisition framework, the framework including an interface layer, a data exchange layer, and a baseband chip; Wherein, the processor is configured to: In response to receiving, based on the interface layer, request information for obtaining target data sent by a data requester, generating, based on the interface layer, a data acquisition instruction for obtaining the target data from a baseband chip; Controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction; Sending the target data to the data requester based on the interface layer; The request information includes the data source of the target data; The generating, based on the interface layer, a data acquisition instruction for acquiring the target data from the baseband chip includes: generating, based on the interface layer and according to the data source, a data acquisition instruction for acquiring the target data from the baseband chip, wherein the data acquisition instruction carries the data source; The controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction, includes: The interface layer is controlled to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and the target data is acquired in the baseband chip according to the data source carried by the data acquisition instruction.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the following is achieved: In response to receiving, based on the interface layer, request information for obtaining target data sent by a data requester, generating, based on the interface layer, a data obtaining instruction for obtaining the target data from a baseband chip; Controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction; Sending the target data to the data requester based on the interface layer; The request information includes the data source of the target data; The generating, based on the interface layer, a data acquisition instruction for acquiring the target data from the baseband chip includes: generating, based on the interface layer and according to the data source, a data acquisition instruction for acquiring the target data from the baseband chip, wherein the data acquisition instruction carries the data source; The controlling the interface layer to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and acquiring the target data in the baseband chip according to the data acquisition instruction, includes: The interface layer is controlled to transmit the data acquisition instruction to the baseband chip through the data exchange layer, and the target data is acquired in the baseband chip according to the data source carried by the data acquisition instruction.