CN114498028B - Data transmission method, device, equipment and storage medium - Google Patents

Data transmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN114498028B
CN114498028B CN202210087307.4A CN202210087307A CN114498028B CN 114498028 B CN114498028 B CN 114498028B CN 202210087307 A CN202210087307 A CN 202210087307A CN 114498028 B CN114498028 B CN 114498028B
Authority
CN
China
Prior art keywords
signal
antenna
time
data
period
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210087307.4A
Other languages
Chinese (zh)
Other versions
CN114498028A (en
Inventor
杨婧
时龙飞
陈嘉琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310140124.9A priority Critical patent/CN116315667B/en
Priority to CN202210087307.4A priority patent/CN114498028B/en
Publication of CN114498028A publication Critical patent/CN114498028A/en
Application granted granted Critical
Publication of CN114498028B publication Critical patent/CN114498028B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01QANTENNAS, i.e. RADIO AERIALS
    • H01Q1/00Details of, or arrangements associated with, antennas
    • H01Q1/52Means for reducing coupling between antennas; Means for reducing coupling between an antenna and another structure
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01QANTENNAS, i.e. RADIO AERIALS
    • H01Q1/00Details of, or arrangements associated with, antennas
    • H01Q1/12Supports; Mounting means
    • H01Q1/22Supports; Mounting means by structural association with other equipment or articles
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01QANTENNAS, i.e. RADIO AERIALS
    • H01Q1/00Details of, or arrangements associated with, antennas
    • H01Q1/12Supports; Mounting means
    • H01Q1/22Supports; Mounting means by structural association with other equipment or articles
    • H01Q1/2258Supports; Mounting means by structural association with other equipment or articles used with computer equipment
    • H01Q1/2266Supports; Mounting means by structural association with other equipment or articles used with computer equipment disposed inside the computer
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01QANTENNAS, i.e. RADIO AERIALS
    • H01Q1/00Details of, or arrangements associated with, antennas
    • H01Q1/12Supports; Mounting means
    • H01Q1/22Supports; Mounting means by structural association with other equipment or articles
    • H01Q1/24Supports; Mounting means by structural association with other equipment or articles with receiving set
    • H01Q1/241Supports; Mounting means by structural association with other equipment or articles with receiving set used in mobile communications, e.g. GSM
    • H01Q1/242Supports; Mounting means by structural association with other equipment or articles with receiving set used in mobile communications, e.g. GSM specially adapted for hand-held use
    • H01Q1/243Supports; Mounting means by structural association with other equipment or articles with receiving set used in mobile communications, e.g. GSM specially adapted for hand-held use with built-in antennas
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01QANTENNAS, i.e. RADIO AERIALS
    • H01Q1/00Details of, or arrangements associated with, antennas
    • H01Q1/27Adaptation for use in or on movable bodies
    • H01Q1/273Adaptation for carrying or wearing by persons or animals
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01QANTENNAS, i.e. RADIO AERIALS
    • H01Q1/00Details of, or arrangements associated with, antennas
    • H01Q1/27Adaptation for use in or on movable bodies
    • H01Q1/32Adaptation for use in or on road or rail vehicles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application is applicable to the technical field of terminals, and provides a data transmission method, a device, equipment and a storage medium, wherein the data transmission method is applied to electronic equipment, the electronic equipment comprises a shooting device and an antenna, and the antenna radiates a second signal to the shooting device when adopting a first working mode to transmit a first signal, and the method comprises the following steps: the method comprises the steps of detecting transmission state information, obtaining information of a first time interval based on the first time when the transmission state information indicates that an antenna transmits a first signal at the first time, and transmitting first data of a shooting device at the first time interval, namely, the electronic equipment transmits the first data of the shooting device at a time interval except the time interval when the antenna transmits the first signal, so that the situation that the shooting device is jammed or exits due to the influence of a second signal radiated by the antenna is avoided.

Description

Data transmission method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a data transmission method, a data transmission device, data transmission equipment and a storage medium.
Background
With the popularization of terminal devices, more and more functions are integrated on the terminal devices, and shooting is performed through a shooting device on the terminal devices. In a specific shooting process, data generated by shooting is transmitted in the terminal device through an Inter-Integrated Circuit (I2C).
The terminal device usually further includes an antenna for communication, and the signal radiated from the antenna becomes an important factor affecting other functions integrated in the terminal device. In one possible case, when the user uses the terminal device to make a call, the photographing is performed simultaneously using the photographing means. Signals radiated outwards by the antenna in the communication process are radiated to the shooting device through the metal back plate in the terminal equipment, so that signals transmitted on the I2C are interfered, and the shooting device is blocked or directly closed.
Therefore, how to avoid the interference of the antenna to the shooting device becomes a problem to be solved urgently.
Disclosure of Invention
Embodiments of the present application provide a data transmission method, an apparatus, a device, and a storage medium, which can avoid interference of an antenna with a shooting device, so as to solve a problem to be solved urgently.
In a first aspect, a data transmission method is provided, which is applied to an electronic device, where the electronic device includes a shooting device and an antenna, the antenna adopts a first working mode, the first working mode is a periodic working mode based on a first period, and the antenna radiates a second signal to the shooting device when the antenna adopts the first working mode to transmit a first signal; the method comprises the following steps:
detecting transmission state information of the antenna, wherein the transmission state information indicates whether the antenna transmits a first signal or not;
when the first time transmission state information indicates that the antenna transmits the first signal, obtaining information of a first time interval based on the first time, wherein the first time interval is a time interval of a first cycle except the time interval of the first signal transmitted by the antenna;
in a first period, first data of a photographing apparatus is transmitted.
In an embodiment of the application, a data transmission method is applied to an electronic device, the electronic device includes a shooting device and an antenna, the antenna adopts a first working mode, the first working mode is a periodic working mode based on a first period, and the antenna radiates a second signal to the shooting device when the antenna adopts the first working mode to transmit a first signal, including: the method comprises the steps of detecting transmission state information, obtaining information of a first time interval based on the first time when the transmission state information indicates that the antenna transmits a first signal at the first time, and transmitting first data of the shooting device at the first time interval, wherein the first time interval is a time interval of the first cycle except for the time interval when the antenna transmits the first signal. That is to say, the electronic device transmits the first data of the shooting device in a time period other than the time period in which the antenna transmits the first signal, and in the first time period, because the antenna does not transmit the first signal, the antenna does not radiate the second signal outwards, so that the shooting device is not interfered by the second signal radiated outwards by the antenna when transmitting the first signal, and the situation that the shooting device is jammed or exits due to the influence of the second signal radiated by the antenna is avoided.
In one embodiment, further comprising: configuring a first interface, wherein the first interface is connected with an antenna, and the level value of the first interface corresponds to the transmission state information; detecting transmission state information of an antenna, comprising: and detecting a level value of the first interface, and determining the transmission state information according to the level value of the first interface.
In the embodiment of the application, the electronic device determines the transmission state information according to the level value of the first interface connected with the antenna, that is, the transmission state information determined by the electronic device directly detects the level value of the interface connected with the antenna, and compared with reading system configuration information, the transmission state information can be determined more accurately, so that the condition that the determined transmission state information is wrong due to the fact that the system configuration information is wrong is avoided, the first time period determined according to the transmission state information is more accurate, further, the first data of the shooting device is transmitted in the first time period more effectively to avoid the time period that the antenna transmits the first signal, and the condition that the shooting device is jammed or exits due to the fact that the antenna radiates the second signal is further avoided.
In one embodiment, the level value of the first interface is a first preset value, and the transmission state information indicates that the antenna does not transmit the first signal; the level value of the first interface is a second preset value, and the transmitting state information indicates that the antenna transmits the first signal.
Optionally, the first preset value is 0, and the second preset value is 1.
In an embodiment, the obtaining information of the first time interval based on the first time includes: acquiring a preset first time length and a preset second time length; the preset first time length is determined according to the time length of the antenna for transmitting the first signal in the first period, and the preset second time length is determined according to the time length of the antenna for not transmitting the signal in the first period; taking the second moment as the starting moment of the first time interval and taking the third moment as the ending moment of the first time interval; the second moment is a moment after the first moment and separated by a preset first duration; the third time is the time after the second time and separated by a preset second time length.
In the embodiment of the application, the information of the first period is obtained by obtaining a preset first time length determined according to the time length of the antenna for transmitting the first signal in the first period, and obtaining a preset second time length determined according to the time length of the antenna for not transmitting the signal in the first period, taking the time (second time) after the first time length and spaced by the preset first time length as the starting time of the first period, and taking the time (third time) after the second time length and spaced by the preset second time length as the ending time of the first period. That is, the duration of the first period is determined according to the duration of the signal not transmitted from the antenna, so that the first data of the photographing device is transmitted in the first period by making full use of the duration of the signal not transmitted from the antenna.
In one embodiment, the photographing device acquires M groups of data, the first data is N groups of data in the M groups of data, and N is a positive integer smaller than M.
Alternatively, the M groups of data may be referred to as second data, and the second data is split into the first data, that is, N groups of data.
In the embodiment of the application, the first data are obtained by splitting the second data, the second data are acquired through the shooting device, the electronic equipment transmits the state information through periodic detection, transmits the first data once when detecting that the antenna transmits the first signal every time, and completes the transmission of the plurality of first data through a plurality of periods, namely completes the transmission of the second data. Under the condition that the time length that the antenna does not transmit the first signal in the first working mode is short, a plurality of pieces of first data are transmitted periodically, and transmission of second data with large data quantity is completed.
In one embodiment, the N groups of data are determined according to the duration of the first period and the signal transmission rate of the shooting device.
According to the embodiment of the application, the N groups of data are determined according to the duration of the first time interval and the signal transmission rate of the shooting device, so that the first data can be completely transmitted in the first time interval, a plurality of first data can be completely transmitted in a plurality of first time intervals, and the second data can be completely transmitted.
In one embodiment, the method further comprises: in a second time interval, the transmitting state information indicates that the antenna does not transmit the first signal and transmits second data of the shooting device; the second data refers to data collected by the shooting device, and the duration of the second period is the duration of the first period.
In the embodiment of the application, if the transmission state information indicates that the antenna does not transmit the first signal all the time, the antenna does not perform radiation interference on the shooting device, that is, the second data does not need to be split to obtain the first data, and the first data is transmitted in the first time period, that is, when the shooting device acquires the second data, the second data can be directly transmitted, so that the second data is prevented from being split into the first data, the first time period for transmitting the first data is determined, and consumption of computing resources of the electronic device is reduced.
In one embodiment, the detecting the transmission state information includes: the detection of the emission status information is periodic.
In the embodiment of the application, the electronic device periodically detects the level value of the first interface, that is, the electronic device does not transmit the first data of the photographing device once based on the transmission state information once, but repeatedly detects the transmission state information many times, and determines the first time period for transmitting the first data of the photographing device whenever the transmission state information is detected to indicate the antenna to transmit the first signal, so that the data acquired by the photographing device can be transmitted through a plurality of first time periods, and the situation that the data acquired by the photographing device cannot be transmitted through only one first time period is avoided.
In one embodiment, the first signal is a GSM signal.
In the embodiment of the application, the antenna transmits the first signal in the GSM mode, so that the time length for transmitting the first signal by the antenna is short, the time length for not transmitting the signal is long, generally, the data volume of the first data transmitted by the shooting device is large, and the data volume of the voice call is small. Therefore, the electronic equipment can allocate more time to the first data with more transmission data, and the electronic equipment can complete the transmission of the first data more quickly.
In a second aspect, a data transmission apparatus is provided, which includes means for performing any of the methods of the first aspect. The device can be an electronic device, and the electronic device can be a terminal device or a chip in the terminal device. The apparatus may include an input unit and a processing unit.
When the apparatus is a terminal device, the processing unit may be a processor, and the input unit may be a communication interface; the terminal device may further comprise a memory for storing computer program code which, when executed by the processor, causes the terminal device to perform any of the methods of the first aspect.
When the apparatus is a chip in a terminal device, the processing unit may be a processing unit inside the chip, and the input unit may be an output interface, a pin, a circuit, or the like; the chip may also include a memory, which may be a memory within the chip (e.g., registers, cache, etc.) or a memory external to the chip (e.g., read only memory, random access memory, etc.); the memory is adapted to store computer program code which, when executed by the processor, causes the chip to perform any of the methods of the first aspect.
In one possible implementation, the memory is configured to store computer program code; a processor executing the computer program code stored by the memory, the processor when the computer program code stored by the memory is executed operable to: detecting transmission state information indicating whether the antenna transmits a first signal; when the first time transmission state information indicates that the antenna transmits the first signal, obtaining information of a first time interval based on the first time, wherein the first time interval is a time interval of a first cycle except the time interval of the first signal transmitted by the antenna; in a first period, first data of a photographing apparatus is transmitted.
In a third aspect, an electronic device is provided, where the electronic device includes a processor, and the processor is configured to couple with a memory, read instructions in the memory, and cause the electronic device to perform the method provided in the first aspect according to the instructions.
In a fourth aspect, a computer-readable storage medium is provided, which stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the method provided in the first aspect.
In a fifth aspect, a chip is provided, the chip comprising a processor configured to couple with a memory and execute a computer program in the memory to perform the method provided in the first aspect.
In a sixth aspect, a computer program product comprising instructions for causing an electronic device to perform the method provided in the first aspect when the computer program product is run on the electronic device is provided.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a block diagram of a software structure of an electronic device according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of an application scenario of a data transmission method in an embodiment of the present application;
fig. 4 is a schematic flow chart of a data transmission method according to another embodiment of the present application;
FIG. 5 is a schematic diagram of a GSM signal cycle according to an embodiment of the present application;
FIG. 6 is a schematic illustration of a first time period in one embodiment of the present application;
fig. 7 is a schematic flowchart of a data transmission method according to another embodiment of the present application;
FIG. 8 is a flowchart illustrating a method for obtaining a first time period according to an embodiment of the present application;
FIG. 9 is a schematic illustration of different first time periods in one embodiment of the present application;
FIG. 10 is a diagram illustrating a relationship between a first period and a period during which an antenna transmits a first signal according to an embodiment of the present application;
fig. 11 is a schematic flowchart of a data transmission method according to another embodiment of the present application;
FIG. 12 is a schematic diagram of a data transmission device according to an embodiment of the present application;
FIG. 13 is a diagram of an electronic device in one embodiment of the application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Wherein in the description of the embodiments of the present application, "/" indicates an inclusive meaning, for example, a/B may indicate a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
In the following, the terms "first", "second" and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", "third" may explicitly or implicitly include one or more of the features.
For ease of understanding, the following description will first describe related terms and concepts to which embodiments of the present application may relate.
The data transmission method provided by the embodiment of the application can be applied to electronic equipment. Alternatively, the electronic device may be a notebook computer, a tablet computer, a palm computer, a vehicle-mounted terminal, a sales terminal, a wearable device, a mobile phone, and the like. In a possible case, the electronic device may be a terminal device.
By way of example, fig. 1 shows a schematic structural diagram of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. Wherein, the different processing units may be independent devices or may be integrated in one or more processors.
The controller may be, among other things, a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bidirectional synchronous serial bus comprising a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, and the like.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (TD-SCDMA), long Term Evolution (LTE), fifth Generation wireless communication systems (5g, the 5th Generation of wireless communication system), BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
It should be noted that any electronic device mentioned in the embodiments of the present application may include more or less modules in the electronic device 100.
The electronic device provided by the embodiment of the present application may include a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the method according to any one of the above method embodiments.
Fig. 2 is a block diagram of a software structure of the electronic device 100 according to the embodiment of the present application.
The layered architecture of the electronic device 100 divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver, a sensor driver, a Wi-Fi driver and the like.
The workflow of the software system and the hardware system of the electronic device 100 is exemplarily described below in conjunction with displaying a photographing scene.
When a user performs a touch operation on the touch sensor 180K, a corresponding hardware interrupt is sent to the kernel layer, and the kernel layer processes the touch operation into an original input event, where the original input event includes information such as touch coordinates and a timestamp of the touch operation. The original input event is stored in the kernel layer, and the application framework layer acquires the original input event from the kernel layer, identifies a control corresponding to the original input event, and notifies an Application (APP) corresponding to the control. For example, the touch operation is a click operation, the APP corresponding to the control is a camera APP, and after the camera APP is awakened by the click operation, the camera drive of the kernel layer can be called through the API, and the camera 193 is controlled to shoot through the camera drive. In one possible case, the shooting data shot by the camera 193 is transmitted to the internal memory 121 or the external memory through the I2C interface.
The following briefly describes an application scenario of the embodiment of the present application.
When a user uses the mobile phone to carry out voice call, the mobile phone transmits signals outwards through the antenna and establishes communication connection with the base station. In the process of voice communication, the antenna can radiate signals through a metal backboard in the mobile phone. In a possible situation, in the process of the user making a voice call, the user also needs to use a camera on the mobile phone to shoot, and then the signal radiated by the antenna through the metal back plate is radiated to the camera, as shown in fig. 3. The radiated signals may affect the performance of the camera in transmitting data, causing the camera to jam or directly exit the shooting interface. Illustratively, data shot by the camera is transmitted to the internal memory through an I2C interface, where the data collected by the camera is usually a digital signal, that is, a high-low level signal. When the camera is interfered by the radiation signal of the antenna, the digital signal which is originally low level is changed into high level. Therefore, data transmitted by the camera is wrong, and the camera is stuck or directly exits from a shooting interface in serious conditions.
It should be understood that the above description is illustrative of the application scenario and does not limit the application scenario of the present application in any way.
The data transmission method provided by the embodiment of the present application is described in detail below with reference to fig. 4 to 11.
In an example, a flow diagram of a data transmission method provided in an embodiment of the present application may be as shown in fig. 4, where the method is applied to an electronic device, the electronic device includes a camera and an antenna, the antenna adopts a first working mode, the first working mode is a periodic working mode based on a first period, and the antenna radiates a second signal to the camera when the antenna samples the first working mode to transmit a first signal; the method comprises the following steps:
s101, detecting transmission state information, wherein the transmission state information indicates whether the antenna transmits a first signal or not.
It should be understood that the electronic device may refer to a terminal device, such as a cell phone. Electronic devices are often provided with an antenna for transmitting signals and a camera, such as a camera, for capturing image data. It will be appreciated that the antenna may adopt a corresponding mode of operation when the electronic device is operating in different modes. For example, during a call, the antenna may use a Global System for Mobile Communication (GSM) mode or a Code Division Multiple Access (CDMA) mode. When the electronic device downloads data, for example, when buffering video data, the antenna may adopt a fifth Generation Mobile Communication technology (5 g) mode. Optionally, the first operating mode is a GSM mode.
When the antenna operates in the first mode of operation, it is generally referred to that the antenna transmits signals periodically with a first period. Illustratively, the antenna adopts a GSM operation mode as an example. The duration of one working period of the GSM mode is 4.6ms, that is, the antenna operates periodically based on 4.6ms (first period) in the GSM mode. In one cycle, as shown in fig. 5, 1/8g of the slots (i.e., 4.6 ms/8) =576 μ s) are used for transmitting the GSM signal (i.e., the first signal), and the first signal is not transmitted in the other 7/8 slots (i.e., (4.6 ms/8) × 7= 4.024ms).
When the antenna transmits the first signal, the signal is radiated through the metal back plate of the electronic device, that is, within 4.6ms of a GSM signal period, as shown in fig. 5, the T0+576 μ s antenna transmits the first signal, and within the 576 μ s, the antenna transmits the second signal to the camera. During the period with the start time T0+576 mus and the end time T0+4.6ms, the antenna does not transmit the first signal.
It should be understood that, in the GSM signal, the time length of transmitting the signal occupies a short period, which is 1/8 of the period. That is, when the first operating mode is the GSM mode, in one period, the time length of the antenna in transmitting the signal is short, and the time length of the antenna in not transmitting the signal is long.
Since the antenna does not always transmit the first signal in the first operating mode, it can be indicated whether the antenna is transmitting the first signal at the present time by the transmission status information. In the process of detecting the transmission state information, the transmission state information may be determined by reading system configuration information of the electronic device, or the transmission state information may be determined by reading a level of the antenna transmission port, which is not limited in this embodiment of the present application.
In the embodiment of the application, the antenna transmits the first signal in the GSM mode, so that the time length for transmitting the first signal by the antenna is short, the time length for not transmitting the signal is long, generally, the data volume of the first data transmitted by the shooting device is large, and the data volume of the voice call is small. Therefore, the electronic equipment can use more time for transmitting the first data with more data volume, and the electronic equipment can finish the transmission of the first data more quickly.
S102, when the first-time transmission state information indicates that the antenna transmits the first signal, obtaining information of a first time interval based on the first time, wherein the first time interval is a time interval of the first cycle except the time interval of the first signal transmitted by the antenna.
When the transmission state information indicates that the antenna transmits the first signal at the first time, the electronic device may determine, with reference to the first time, a period in which the antenna does not transmit the signal, that is, the first period.
As can be seen from the above description, when the antenna operates in the first operation mode, the signal is transmitted in a partial period of the first period, and the signal is not transmitted in the partial period. Therefore, after determining the first time instant at which the antenna transmits the first signal, it may be determined that the antenna does not transmit the signal after a preset first time duration after the first time instant.
The first operating mode is taken as the GSM mode for example. As shown in fig. 6, the antenna is detected to transmit the first signal at time T1 (first time). Here, the time T1 may be any time between the time T0 and the time (T0 +576 μ s). After 600 μ s has elapsed, a period in which the antenna does not transmit a signal arrives, regardless of any position between the time T1 and the times T0 to (T0 +576 μ s). Therefore, the (T1 +600 ms) time may be taken as the inspiration time of the first period. When the ending time of the first time interval is determined, the last time of the cycle, namely the Tn time, can be used as the ending time of the first time interval according to the cycle duration of a GSM signal; or a margin of 0.5ms is reserved, and the time (Tn-0.5 ms) is taken as the end time of the first time period; the embodiment of the present application does not limit this.
S103, transmitting first data of the shooting device in a first time interval.
The first data may be data acquired by the shooting device, or may also be data obtained by splitting the data acquired by the shooting device, which is not limited in the embodiment of the present application.
In the process of transmitting the first data of the shooting device, the electronic device may transmit the first data to the internal memory by using an I2C interface, or may store the first data in the external memory, which is not limited in this embodiment of the present application. In a possible case, the electronic device performs a video call with other electronic devices, and the electronic device may also transmit the first data to the other electronic devices through the I2C interface.
In an embodiment of the application, a data transmission method is applied to an electronic device, the electronic device includes a shooting device and an antenna, the antenna adopts a first working mode, the first working mode is a periodic working mode based on a first period, and the antenna radiates a second signal to the shooting device when the antenna adopts the first working mode to transmit a first signal, including: the method comprises the steps of detecting transmission state information, obtaining information of a first time interval based on the first time when the transmission state information indicates that the antenna transmits a first signal at the first time, and transmitting first data of the shooting device at the first time interval, wherein the first time interval is a time interval of the first cycle except for the time interval when the antenna transmits the first signal. That is to say, the electronic device transmits the first data of the shooting device in a time period other than the time period in which the antenna transmits the first signal, and in the first time period, because the antenna does not transmit the first signal, the antenna does not radiate the second signal outwards, so that the shooting device is not interfered by the second signal radiated outwards by the antenna when transmitting the first signal, and the situation that the shooting device is jammed or exits due to the influence of the second signal radiated by the antenna is avoided.
In one possible case, it may be determined whether the antenna is transmitting the first signal by detecting a level value of an interface connected to the antenna, as described in detail below with respect to the embodiment shown in fig. 7.
Fig. 7 is a schematic flow chart of a data transmission method according to another embodiment of the present application, as shown in fig. 7, including:
s201, configuring a first interface, wherein the first interface is connected with an antenna, and the level value of the first interface corresponds to the transmission state information.
The first interface is an interface connected to an antenna. Illustratively, the first Interface may be a Baseline Privacy Interface (BPI). BPI is typically used for time-critical control interfaces. Such as a transmit switch, channel switch, etc. That is, the value of the BPI is typically related to whether the antenna is transmitting the first signal.
And S202, periodically detecting the level value of the first interface in the second period, and determining the transmission state information according to the level value of the first interface.
The electronic device may periodically detect a level value of the first interface based on a second period, which may be a signal sampling period in the electronic device, and generally, the second period is smaller than the first period. That is, the level value of the first interface is detected many times during the process of switching the antenna from transmitting signals to not transmitting signals. Wherein a level value of the first interface is related to whether the antenna transmits the first signal. Illustratively, the BPI (first interface) level value is 0, the transmission status information indicates that the antenna is not transmitting the first signal; the level value of the BPI is 1 and the transmission status information instructs the antenna to transmit the first signal.
In the embodiment of the application, the electronic device periodically detects the level value of the first interface, that is, the electronic device does not transmit the first data of the photographing device once based on the transmission state information once, but repeatedly detects the transmission state information many times, and determines the first time period for transmitting the first data of the photographing device whenever the transmission state information is detected to indicate the antenna to transmit the first signal, so that the data acquired by the photographing device can be transmitted through a plurality of first time periods, and the situation that the data acquired by the photographing device cannot be transmitted through only one first time period is avoided.
The duration of the second period may be the duration of the first period, that is, the duration of one period in the first operating mode, and for example, the duration of the second period may be 4.6ms in the GSM mode. The level value of the first interface in a period is detected, if the level value is always 0, the antenna does not work, a whole data packet (second data) collected by the shooting device can be directly transmitted, if the level value of the first interface is 1 at a moment in the period, the antenna works normally, and a first time period when the antenna does not send the first signal can be determined according to the rule that the GSM sends the first signal. Wherein the first period is a period of the first cycle excluding a period in which the antenna transmits the first signal.
In the embodiment of the application, the electronic device determines the transmission state information according to the level value of the first interface connected with the antenna, that is, the transmission state information determined by the electronic device directly detects the level value of the interface connected with the antenna, and compared with reading system configuration information, the transmission state information can be determined more accurately, so that the condition that the determined transmission state information is wrong due to the fact that the system configuration information is wrong is avoided, the first time period determined according to the transmission state information is more accurate, further, the first data of the shooting device is transmitted in the first time period more effectively to avoid the time period that the antenna transmits the first signal, and the condition that the shooting device is jammed or exits due to the fact that the antenna radiates the second signal is further avoided.
S203, determining whether the transmission state information indicates that the antenna transmits the first signal, if so, executing S204; if not; s206 is performed.
S204, according to the first moment of the antenna transmitting the first signal indicated by the antenna transmitting state information, determining the information of the first time interval.
It should be understood that the electronic device acquires not only the level value of the first interface but also the detected time stamp information each time the transmission state information is detected. When the transmission state information indicates that the antenna transmits the first signal, the electronic device may acquire timestamp information of the time as the first time. Further, the electronic device may determine information of a first time period during which the antenna does not transmit the first signal according to the first time. Alternatively, as shown in fig. 8, S204 may determine the information of the first period by the following steps.
S204A, acquiring a preset first time length and a preset second time length.
The preset first time duration is a time duration determined according to a time duration in which the antenna transmits the first signal in the first period, and taking a GSM mode as an example, the preset first time duration is 576 μ s of the time duration in which the antenna transmits the first signal in one period. It should be understood that the preset first time period may be 576 μ s, or may be slightly longer than 576 μ s, for example 600 μ s, which is not limited in the embodiment of the present application. The preset second time length is determined according to the time length of the antenna not transmitting signals in the first period; continuing with the GSM mode as an example, the duration of the period in which the antenna does not transmit the first signal is 4.6ms-576 μ s =4.024ms. It should be appreciated that in order to ensure that the first data is transmitted without interference, a period margin is typically reserved, i.e., the predetermined second time duration is typically slightly shorter than the time duration in which the antenna does not transmit the first signal. For example, a margin of 0.5ms may be reserved, that is, 3.5ms is used as the preset second duration.
And S204B, taking the second moment as the starting moment of the first time interval and taking the third moment as the ending moment of the first time interval to obtain the information of the first time interval.
The second moment is a moment which is after the first moment and is separated by a preset first duration; the third time is the time after the second time and separated by a preset second time length.
Illustratively, as shown in (a) of fig. 9, the time T0 is an initial time when the antenna transmits the first signal, and the time T1= T0+576 μ s is an end time when the antenna transmits the first signal. The first time Tx overlaps with the time T0, that is, the antenna is detected to transmit the first signal at the time T0. The second time Ty at the start time of the first period is a time spaced from the time T0 by a preset first time period, and is after the time T1, that is, in a period in which the antenna does not transmit the first signal. The third Tz time at the end time of the first period is a time spaced from the second time Ty by a preset second time period, since the preset second time period is slightly shorter than a time period in which the antenna does not transmit the first signal. The third time Tz is within the current period by reasonably adjusting the time margin. That is, the first period is a period in which the antenna does not transmit a signal in one cycle of the GSM mode.
As shown in (b) of fig. 9, the time T0 is an initial time at which the antenna transmits the first signal, and the time T1= T0+576 μ s is an end time at which the antenna transmits the first signal. The first time Tx is between time T0 and time T1. The second time Ty at the start of the first period is a time spaced from the first time by a preset first duration, and is after the time T1, that is, in a period in which the antenna does not transmit the first signal. The third time Tz at the end time of the first period is a time spaced from the second time Ty by a preset second time period, which is slightly shorter than a time period during which the antenna does not transmit the first signal. The third time Tz is within the current period by reasonably adjusting the time margin. That is, the first period is a period in which the antenna does not transmit a signal in one cycle of the GSM mode.
As shown in (c) of fig. 9, the time T0 is an initial time at which the antenna transmits the first signal, and the time T1= T0+576 μ s is an end time at which the antenna transmits the first signal. The first time Tx overlaps with the time T1, that is, the antenna is detected to transmit the first signal at the time T1. The second time Ty at the start time of the first period is a time spaced from the time T1 by a preset first time period, and is after the time T1, that is, in a period in which the antenna does not transmit the first signal. The third time Tz at the end time of the first period is a time spaced from the second time Ty by a preset second time period, which is slightly shorter than a time period during which the antenna does not transmit the first signal. The third time Tz is within the current period by reasonably adjusting the time margin. That is, the first period is a period in which the antenna does not transmit a signal in one cycle of the GSM mode.
In summary, the first period determined by taking the second time as the starting time of the first period and the third time as the ending time of the first period is a period in which the antenna does not transmit signals.
In the embodiment of the application, the information of the first period is obtained by obtaining a preset first time length determined according to the time length of the first signal transmitted by the antenna in the first period and a preset second time length determined according to the time length of the signal not transmitted by the antenna in the first period, taking the time (second time) after the first time and spaced by the preset first time length as the starting time of the first period, and taking the time (third time) after the second time and spaced by the preset second time length as the ending time of the first period. That is, the duration of the first period is determined according to the duration of the signal not transmitted from the antenna, so that the first data of the photographing device is transmitted in the first period by making full use of the duration of the signal not transmitted from the antenna.
S205, in a first time interval, first data of the shooting device are transmitted.
It should be understood that the data collected by the camera is usually large, and the transmission of the data cannot be completed normally through the transmission of 3.5ms, that is, the first data is not all the data collected by the camera, and it may be obtained by splitting all the books collected by the camera. Optionally, the first data is obtained by splitting second data, where the second data is data acquired by a shooting device.
As can be seen from the above description, the electronic device periodically detects the transmission status information, determines a first time period during which the antenna does not transmit a signal according to the first time when the antenna is detected to transmit a first signal, and then transmits the first data during the first time period. This process is repeated with periodic detection of the transmission status information. And splitting the second data to obtain a plurality of first data. And transmitting one first data in each first period until the transmission of a plurality of first data is completed, namely, the transmission of the second data is completed.
Illustratively, as shown in fig. 10, the period in which the antenna transmits the first signal does not overlap with the period in which the first data of the photographing device is transmitted, and is periodically repeated.
In the embodiment of the application, the first data are obtained by splitting the second data, the second data are acquired through the shooting device, the electronic equipment transmits the state information through periodic detection, transmits the first data once when detecting that the antenna transmits the first signal every time, and completes the transmission of the plurality of first data through a plurality of periods, namely completes the transmission of the second data. Under the condition that the time length that the antenna does not transmit the first signal in the first working mode is short, a plurality of pieces of first data are transmitted periodically, and transmission of second data with large data quantity is completed.
Optionally, the data amount of the first data is determined according to the duration of the first period and the signal transmission rate of the photographing device.
For example, in the GSM mode, the duration of the first period is 3.5ms, and the data amount of the first data is 3.5ms × X, where X is the signal transmission rate of the camera.
According to the embodiment of the application, the data volume of the first data is determined according to the duration of the first time period and the signal transmission rate of the shooting device, so that the first data can be completely transmitted in the first time period, a plurality of first data can be completely transmitted in a plurality of first time periods, and the second data can be completely transmitted.
And S206, transmitting second data of the shooting device.
In the second time interval, namely the time length of the first period, the transmission state information indicates that the antenna does not transmit the first information, and the antenna is in a non-working state, and at the moment, the second data of the shooting device can be directly transmitted.
In the embodiment of the application, if the transmission state information indicates that the antenna does not transmit the first signal all the time, the antenna does not perform radiation interference on the shooting device, that is, the second data does not need to be split to obtain the first data, and the first data is transmitted in the first time period, that is, when the shooting device acquires the second data, the second data can be directly transmitted, so that the second data is prevented from being split into the first data, the first time period for transmitting the first data is determined, and consumption of computing resources of the electronic device is reduced.
Fig. 11 is a schematic flowchart of a data transmission method in another embodiment of the present application, as shown in fig. 11, including:
s301, configuring a BPI interface, wherein the BPI interface is connected with an antenna, and the level value of the BPI interface corresponds to the transmission state information.
S302, whether the camera is opened or not is detected, and if yes, S303 is executed.
When the camera is turned on, the antenna on the terminal device may radiate a signal to the camera, causing interference.
S303, detecting whether the value of the BPI interface is 1; if so, S304 is executed, and if not, S305 is executed.
And if the value of the BPI interface is 1, the antenna transmits a first signal, and the antenna radiates a second signal to the camera, so that interference is caused.
The value of the BPI interface is 0, the antenna does not transmit the first signal, the antenna does not radiate the second signal to the camera, and interference is not caused.
S304, interval 600 mu S, and first data are transmitted through I2C.
S305, detecting whether overflow occurs; if yes, go to step S306, otherwise, go back to step S303.
Whether the detection is over or not refers to determining whether the values of the BPI interfaces are all 0 in the second time period, if the values of the BPI interfaces are all 0 in the second time period (the first period), the antenna does not transmit the first signal in one period, that is, the terminal device does not perform voice call, the antenna does not radiate the second signal to the camera, and the second data is directly transmitted through the I2C.
S306, transmitting the second data through I2C.
The embodiment shown in fig. 11 has similar advantages and implementation principles to those of the above-mentioned method embodiments, and is not described herein again.
It should be understood that, although the respective steps in the flowcharts in the above-described embodiments are sequentially shown as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Fig. 12 is a schematic structural diagram of a data transmission device according to an embodiment of the present application.
It should be understood that the data transmission apparatus 600 may perform the data transmission methods illustrated in fig. 4 to 11; the data transmission device 600 includes: an acquisition unit 610 and a processing unit 620.
In one example, the processing unit 620 is configured to detect transmission status information of the antenna, the transmission status information indicating whether the antenna transmits the first signal; when the first time transmission state information indicates that the antenna transmits the first signal, obtaining information of a first time interval based on the first time, wherein the first time interval is a time interval of a first cycle except the time interval of the first signal transmitted by the antenna; in a first period, first data of a photographing apparatus is transmitted.
In one example, the processing unit 620 is further configured to configure a first interface, the first interface being connected to the antenna, a level value of the first interface corresponding to the transmission state information; and detecting a level value of the first interface, and determining the transmission state information according to the level value of the first interface.
In one example, the level value of the first interface is a first preset value, and the transmission state information indicates that the antenna does not transmit the first signal; the level value of the first interface is a second preset value, and the transmitting state information indicates that the antenna transmits the first signal.
In an example, the processing unit 620 is specifically configured to obtain a preset first duration and a preset second duration; the preset first time length is the time length determined according to the time length of the antenna for transmitting the first signal in the first period, and the preset second time length is the time length determined according to the time length of the antenna for not transmitting the signal in the first period; taking the second time as the starting time of the first time interval and taking the third time as the ending time of the first time interval; the second moment is a moment which is after the first moment and is separated by a preset first duration; the third time is the time after the second time and separated by a preset second time length.
In one example, the first data is obtained by splitting second data, and the second data refers to data collected by a shooting device.
In one example, the data amount of the first data is determined according to the duration of the first period and the signal transmission rate of the photographing device.
In one embodiment, the processing unit 620 is further configured to transmit the second data of the photographing apparatus during a second time period, wherein the transmission status information indicates that the antenna does not transmit the first signal; the second data refers to data collected by the shooting device, and the duration of the second period is the duration of the first period.
In one example, the processing unit 620 is specifically configured to periodically detect the transmission status information of the antenna.
In one example, the first signal is a global system for mobile communications, GSM, signal.
The data transmission apparatus provided in this embodiment is used to implement the data transmission method of the foregoing embodiments, and the technical principle and the technical effect are similar, and are not described herein again.
It should be noted that the data transmission device 600 is embodied in the form of a functional unit. The term "unit" herein may be implemented by software and/or hardware, and is not particularly limited thereto.
For example, a "unit" may be a software program, a hardware circuit, or a combination of both that implement the above-described functions. The hardware circuitry may include an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group of processors) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that support the described functionality.
Accordingly, the units of the respective examples described in the embodiments of the present application can be realized in electronic hardware, or a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
Fig. 13 shows a schematic structural diagram of an electronic device provided in the present application. The dashed lines in fig. 13 indicate that the unit or the module is optional. The electronic device 700 may be used to implement the data transmission method described in the above method embodiments.
The electronic device 700 includes one or more processors 701, and the one or more processors 701 may support the electronic device 700 to implement the data transmission method in the method embodiments. The processor 701 may be a general purpose processor or a special purpose processor. For example, the processor 701 may be a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic device, such as a discrete gate, a transistor logic device, or a discrete hardware component.
The processor 701 may be used to control the electronic device 700, execute software programs, and process data of the software programs. The electronic device 700 may further include a communication unit 705 to enable input (reception) and output (transmission) of signals.
For example, the electronic device 700 may be a chip and the communication unit 705 may be an input and/or output circuit of the chip, or the communication unit 705 may be a communication interface of the chip, which may be a component of a terminal device or other electronic device.
Also for example, the electronic device 700 may be a terminal device and the communication unit 705 may be a transceiver of the terminal device, or the communication unit 705 may be a transceiver circuit of the terminal device.
The electronic device 700 may comprise one or more memories 702, on which programs 704 are stored, and the programs 704 may be executed by the processor 701 to generate instructions 703, so that the processor 701 may execute the data transmission method described in the above method embodiment according to the instructions 703.
Optionally, data may also be stored in the memory 702. Alternatively, the processor 701 may also read data stored in the memory 702, the data may be stored at the same memory address as the program 704, or the data may be stored at a different memory address from the program 704.
The processor 701 and the memory 702 may be provided separately or integrated together; for example, on a System On Chip (SOC) of the terminal device.
Illustratively, the memory 702 may be configured to store a program 704 related to the data transmission method provided in the embodiment of the present application, and the processor 701 may be configured to call the program 704 related to the data transmission method stored in the memory 702 when the terminal device is subjected to image restoration, and execute the data transmission method of the embodiment of the present application; for example, transmit state information of the antenna is detected, the transmit state information indicating whether the antenna transmits the first signal; when the first time transmission state information indicates that the antenna transmits the first signal, obtaining information of a first time interval based on the first time, wherein the first time interval is a time interval of a first cycle except the time interval of the first signal transmitted by the antenna; in a first period, first data of a photographing apparatus is transmitted.
The present application further provides a computer program product, which when executed by the processor 701 implements the data transmission method according to any of the method embodiments of the present application.
The computer program product may be stored in the memory 702, for example, as the program 704, and the program 704 is finally converted into an executable object file capable of being executed by the processor 701 through preprocessing, compiling, assembling, linking and the like.
The present application also provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a computer, implements the data transmission method described in any of the method embodiments of the present application. The computer program may be a high-level language program or an executable object program.
Such as memory 702. Memory 702 may be either volatile memory or nonvolatile memory, or memory 702 may include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM, enhanced SDRAM, SLDRAM, synchronous Link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
In this application, "at least one" means one or more, "a plurality" means two or more. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative; for example, the division of the unit is only a logic function division, and there may be another division manner in actual implementation; for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. The data transmission method is characterized by being applied to electronic equipment, wherein the electronic equipment comprises a shooting device and an antenna, the antenna adopts a first working mode, the first working mode is a periodic working mode based on a first period, and the antenna radiates a second signal to the shooting device when adopting the first working mode to transmit a first signal; the method comprises the following steps:
configuring a first interface, wherein the first interface is connected with the antenna, the first interface is a base line privacy interface (BPI), and a level value of the first interface corresponds to the transmission state information;
periodically detecting a level value of the first interface;
determining transmission state information of the antenna according to a level value of the first interface, the transmission state information indicating whether the antenna transmits the first signal;
when the transmission state information indicates that the antenna transmits the first signal at a first time, obtaining information of a first time interval based on the first time, wherein the first time interval is a time interval of the first cycle except for the time interval when the antenna transmits the first signal;
and transmitting first data of the shooting device in the first period.
2. The method of claim 1, wherein a level value of the first interface is a first preset value, and wherein the transmission status information indicates that the antenna does not transmit the first signal; the level value of the first interface is a second preset value, and the transmission state information indicates that the antenna transmits the first signal.
3. The method of claim 1 or 2, wherein the deriving information of the first time interval based on the first time comprises:
acquiring a preset first time length and a preset second time length, wherein the preset first time length is determined according to the time length of a first signal transmitted by an antenna in the first period, and the preset second time length is determined according to the time length of a signal not transmitted by the antenna in the first period;
taking the second time as the starting time of the first time interval and taking the third time as the ending time of the first time interval; the second moment is a moment which is after the first moment and is separated by the preset first duration; and the third moment is a moment after the second moment and spaced by the preset second duration.
4. The method according to claim 1 or 2, wherein the camera acquires M groups of data, the first data is N groups of data in the M groups of data, and N is a positive integer smaller than M.
5. The method of claim 4, wherein the N groups of data are determined according to the duration of the first period and a signal transmission rate of the camera.
6. The method of claim 4, further comprising:
during a second time period, the transmission state information indicates that the antenna does not transmit the first signal and the M groups of data are transmitted; the duration of the second period is equal to the duration of the first period.
7. A method according to claim 1 or 2, wherein the first signal is a global system for mobile communications, GSM, signal.
8. A data transmission apparatus, characterized in that the data transmission apparatus comprises a processor and a memory for storing a computer program, the processor being adapted to invoke and run the computer program from the memory, such that the data transmission apparatus performs the method of any one of claims 1 to 7.
9. A chip comprising a processor that, when executing instructions, performs the method of any one of claims 1 to 7.
10. An electronic device, comprising a processor configured to couple with a memory, read instructions in the memory, and cause the electronic device to perform the method according to any one of claims 1 to 7 according to the instructions.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the method of any one of claims 1 to 7.
CN202210087307.4A 2022-01-25 2022-01-25 Data transmission method, device, equipment and storage medium Active CN114498028B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202310140124.9A CN116315667B (en) 2022-01-25 2022-01-25 Data transmission method, device, equipment and storage medium
CN202210087307.4A CN114498028B (en) 2022-01-25 2022-01-25 Data transmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210087307.4A CN114498028B (en) 2022-01-25 2022-01-25 Data transmission method, device, equipment and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202310140124.9A Division CN116315667B (en) 2022-01-25 2022-01-25 Data transmission method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114498028A CN114498028A (en) 2022-05-13
CN114498028B true CN114498028B (en) 2023-03-24

Family

ID=81474089

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210087307.4A Active CN114498028B (en) 2022-01-25 2022-01-25 Data transmission method, device, equipment and storage medium
CN202310140124.9A Active CN116315667B (en) 2022-01-25 2022-01-25 Data transmission method, device, equipment and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202310140124.9A Active CN116315667B (en) 2022-01-25 2022-01-25 Data transmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (2) CN114498028B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116048848A (en) * 2022-05-16 2023-05-02 荣耀终端有限公司 Data transmission method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8923364B1 (en) * 2013-03-13 2014-12-30 Google Inc. Transmitting data over discontiguous portions of radio frequency spectrum
CN108111672A (en) * 2017-11-29 2018-06-01 广东欧珀移动通信有限公司 Anti-interference method, electronic device and computer readable storage medium
CN109743119A (en) * 2018-12-04 2019-05-10 Oppo广东移动通信有限公司 Electromagnetic interference control method and relevant apparatus
CN110806994A (en) * 2019-09-29 2020-02-18 华为终端有限公司 Signal transmission method and device
CN111095723A (en) * 2018-09-29 2020-05-01 华为技术有限公司 Wireless charging method and electronic equipment

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8559346B2 (en) * 2010-11-19 2013-10-15 Blackberry Limited System and method for controlling extended uplink temporary block flow and dynamic timeslot reduction
CN102918780B (en) * 2011-05-30 2016-03-09 华为技术有限公司 Data transmission method for uplink in a kind of multiaerial system and device
US10476569B1 (en) * 2016-11-28 2019-11-12 Amazon Technologies, Inc. Antenna selection for interference avoidance
CN108882026A (en) * 2018-06-15 2018-11-23 深圳市茁壮网络股份有限公司 A kind of big document transmission method and device based on TS stream
CN109041030B (en) * 2018-08-28 2021-06-08 维沃移动通信有限公司 Data transmission method and terminal equipment
CN111416794B (en) * 2019-01-08 2022-07-29 华为技术有限公司 Data transmission method and electronic equipment
CN111510997B (en) * 2019-01-31 2024-01-16 成都华为技术有限公司 Method and device for receiving signal
CN110798893A (en) * 2019-09-26 2020-02-14 华为技术有限公司 Method for solving coexistence interference and electronic equipment
CN113691271B (en) * 2021-07-21 2022-08-05 荣耀终端有限公司 Data transmission method and wearable device
CN113630142A (en) * 2021-09-09 2021-11-09 上海闻泰电子科技有限公司 Signal transmission method and signal transmission device
CN113890648B (en) * 2021-10-11 2023-01-06 荣耀终端有限公司 Method for detecting approach of living body to terminal equipment, storage medium and chip

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8923364B1 (en) * 2013-03-13 2014-12-30 Google Inc. Transmitting data over discontiguous portions of radio frequency spectrum
CN108111672A (en) * 2017-11-29 2018-06-01 广东欧珀移动通信有限公司 Anti-interference method, electronic device and computer readable storage medium
CN111095723A (en) * 2018-09-29 2020-05-01 华为技术有限公司 Wireless charging method and electronic equipment
CN109743119A (en) * 2018-12-04 2019-05-10 Oppo广东移动通信有限公司 Electromagnetic interference control method and relevant apparatus
CN110806994A (en) * 2019-09-29 2020-02-18 华为终端有限公司 Signal transmission method and device

Also Published As

Publication number Publication date
CN116315667B (en) 2023-11-17
CN116315667A (en) 2023-06-23
CN114498028A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
WO2021000881A1 (en) Screen splitting method and electronic device
CN111095723A (en) Wireless charging method and electronic equipment
CN110543287A (en) Screen display method and electronic equipment
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
CN113568634B (en) Processing method and processing device for application optimization
WO2021238370A1 (en) Display control method, electronic device, and computer-readable storage medium
WO2021218429A1 (en) Method for managing application window, and terminal device and computer-readable storage medium
CN114168065A (en) Method and device for adjusting memory configuration parameters
CN113986162B (en) Layer composition method, device and computer readable storage medium
CN114498028B (en) Data transmission method, device, equipment and storage medium
CN113656089B (en) Class verification method and device in application program
CN112437341B (en) Video stream processing method and electronic equipment
CN117278850A (en) Shooting method and electronic equipment
WO2023207667A1 (en) Display method, vehicle, and electronic device
CN111104209A (en) Method for processing task and related equipment
CN113573045B (en) Stray light detection method and stray light detection device
CN114257502B (en) Log reporting method and device
CN115904297A (en) Screen display detection method, electronic device and storage medium
CN113971034A (en) Method for installing application and electronic equipment
CN115482143B (en) Image data calling method and system for application, electronic equipment and storage medium
CN114020186B (en) Health data display method and device
CN116048831B (en) Target signal processing method and electronic equipment
CN116795604B (en) Processing method, device and equipment for application exception exit
CN113934475B (en) Application call analysis method and electronic equipment
WO2023000746A1 (en) Augmented reality video processing method and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant