Compensation parameter determination method, processor, storage medium and electronic equipment
By comparing the test data between the data transmission device and the external device, determining and setting compensation parameters, the problem of poor compatibility between the data transmission device and different data reception devices is solved, and the data transmission quality is improved.
Patent Information
- Application Number
- CN202311282402.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing data transmission equipment is difficult to compatible with all data receiving equipment, resulting in the problem of data transmission failure.
Through a compensation parameter determination method, targeted compensation parameters are set using the comparison results of the first test data and the second test data to compensate for the differential positions of the transmitted data.
Improve the data quality of data transmission to different external devices, ensuring the stability and success rate of data transmission.
Smart Images

Figure CN119728036A_ABST
Abstract
Description
Technical Field
[0001] The technical solution disclosed herein relates to the technical field of data transmission, and in particular to a compensation parameter determination method, a processor, a storage medium, and an electronic device. Background Art
[0002] A data transmission device usually needs to perform data transmission with multiple data receiving devices. In the prior art, a data transmission device may not be compatible with all data receiving devices, which may result in the problem that the data transmission device successfully transmits with some data receiving devices but fails to transmit with other data receiving devices.
[0003] Therefore, a solution is needed that can ensure the data transmission quality between a data transmission device and different data receiving devices. Summary of the invention
[0004] In view of this, the present disclosure provides a compensation parameter determination method, a processor, a storage medium, and an electronic device to improve the data quality of data transmitted to different external devices.
[0005] According to a first aspect of an embodiment of the present disclosure, a compensation parameter determination method is provided, the method comprising:
[0006] In response to establishing a connection with an external device, transmitting first test data to the external device;
[0007] receiving second test data transmitted by the external device, wherein the second test data is data reflected back by the external device through an original path of the received first test data;
[0008] Obtaining a comparison result between the first test data and the second test data;
[0009] Based on the difference position indicated by the comparison result, a compensation parameter is set; the compensation parameter is used to compensate for the difference position of the data to be transmitted to the external device.
[0010] According to a second aspect of an embodiment of the present disclosure, a processor is provided, the processor comprising:
[0011] A first transmission module, configured to transmit first test data to the external device in response to establishing a connection with the external device;
[0012] A receiving module, used for receiving second test data transmitted by the external device, where the second test data is data reflected back by the external device from the original path of the received first test data;
[0013] A comparison module, used to obtain a comparison result between the first test data and the second test data;
[0014] A parameter setting module is used to set compensation parameters based on the difference positions indicated by the comparison result; the compensation parameters are used to compensate for the difference positions of the data to be transmitted to the external device.
[0015] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0016] processor;
[0017] a memory for storing processor-executable instructions;
[0018] Wherein, the processor is configured to implement the steps of any compensation parameter determination method of the first aspect by running the executable instructions.
[0019] According to a fourth aspect of an embodiment of the present disclosure, there is provided a non-temporary computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any method described in the first aspect are implemented.
[0020] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0021] After connecting to the external device, the first test data is first transmitted to the external device, and then the second test data is received by the external device by reflecting the received first test data back along the original path. At this time, the second test data can reflect the situation that the first test data is interfered by the transmission loss and the impedance of the external device. By comparing the first test data that is not interfered with with the second test data that is interfered with, it is possible to determine the difference position that needs to be compensated when transmitting data with the external device, and then generate compensation parameters for the difference position.
[0022] Through the above method, targeted compensation parameters can be set when data is transmitted to different external devices. The data to be transmitted can be enhanced by using the compensation parameters, which helps to improve the data quality of data transmitted to different external devices.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0025] Figure 1 It is a transmission quality test diagram shown in the present disclosure according to an exemplary embodiment.
[0026] Figure 2It is another transmission quality test diagram shown in the present disclosure according to an exemplary embodiment.
[0027] Figure 3 is a flow chart of a method for determining compensation parameters according to an exemplary embodiment of the present disclosure.
[0028] Figure 4 It is a waveform diagram of a compensation parameter determination method shown in the present disclosure according to an exemplary embodiment.
[0029] Figure 5 It is a waveform diagram of another compensation parameter determination method according to an exemplary embodiment of the present disclosure.
[0030] Figure 6 It is a schematic diagram of the structure of a processor according to an exemplary embodiment of the present disclosure.
[0031] Figure 7 is a flow chart of another compensation parameter determination method according to an exemplary embodiment of the present disclosure.
[0032] Figure 8 It is a schematic diagram of the structure of another processor according to an exemplary embodiment of the present disclosure.
[0033] Fig. 9 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0034] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure. Instead, they are merely examples of processors and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0035] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0036] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0037] When two devices (data transmission device and data receiving device) perform data transmission, there will be certain data transmission losses, such as line losses and losses caused by impedance in the device. In order to avoid the problem of transmission failure caused by losses during data transmission, certain compensation parameters are usually set so that the data to be transmitted can be enhanced in advance in the data transmission device, and then the enhanced data can be transmitted to the data receiving device.
[0038] Generally speaking, a fixed compensation parameter is set for a data transmission device. However, when the data transmission device needs to transmit data to different data receiving devices, this fixed compensation parameter cannot play a good compensation role. The following example illustrates:
[0039] For example, when the data transmission device is transmitting data with external device A (data receiving device), it usually loses 30 at position A; when the data transmission device is transmitting data with external device B (data receiving device), it usually loses 200 at position B. Assuming that the compensation parameter is set to compensate 100 at position A, the following situation will occur:
[0040] 1. For external device A: the loss at position A is 80, and the compensation is 100, which can effectively enhance the signal transmitted to external device A (but there is still a certain error).
[0041] 2. For external device B: Compensating 100 at position A will not affect the problem of 200 loss at position B during data transmission, and will cause the problem of over-compensation of data at position A.
[0042] Therefore, the above compensation scheme may easily cause the problem that when the data transmission device performs data transmission with different data receiving devices, the transmission with some data receiving devices is successful, while the transmission with other data receiving devices fails.
[0043] Based on this, it is necessary to provide a solution for targeted data compensation when performing data transmission with different data receiving devices to improve the data transmission quality.
[0044] When measuring the quality of data transmission between two devices, you can connect an oscilloscope to the USB signal lines of the two devices and test the data transmission quality by displaying the USB eye diagram on the oscilloscope. The data transmission mode between the two devices can be High Speed, Low Speed or Full Speed. Among them, different modes usually correspond to different transmission rates defined in the USB 2.0 standard. The transmission rate in high-speed mode can reach 480Mbps (megabits per second), supporting faster data transmission speeds and higher bandwidth. It is suitable for applications that require large amounts of data transmission, such as high-definition video and audio streaming, high-speed data storage, etc., which are prone to large transmission losses in high-speed mode. Here is a detailed introduction to the USB eye diagram:
[0045] The USB eye diagram is the result of displaying the bits of the collected serial signal by accumulating the afterglow of the oscilloscope. The shape of the superimposed graph looks very similar to an eye, hence the name eye diagram. Since the USB eye diagram fully represents the bit information of the serial signal with a single graph, it has become the most important tool for measuring signal quality, so eye diagram measurement is also called "signal quality test."
[0046] Figure 1 is a transmission quality test diagram shown in the present disclosure according to an exemplary embodiment. Figure 1 As shown, the lines marked with 101 and 102 are the transmission data recorded by the oscilloscope (that is, the area where the measured transmission data is located), and 103 is the eye area, which is automatically generated by the oscilloscope according to the information of the transmission data (such as the voltage change of the data), and is formed by the superposition of multiple USB signal cycles.
[0047] When two devices are transmitting data, they usually convert the transmitted data into a square wave signal for transmission. In the case of no square wave loss, both the rising edge and the falling edge should be vertical (steep enough). Therefore, the flatter the slope of the waveform detected by the oscilloscope and the more severe the attenuation during the transmission process, the easier it is to touch the eye area in the middle of the eye diagram (that is, 101 and 102 are likely to touch the eye area 103). Therefore, it can be determined by judging whether 101 and 102 touch the eye area 103 to determine whether the data transmission quality meets the requirements.
[0048] The present disclosure is applied in a processor, or in a terminal device equipped with a processor. The processor may be a CPU (Central Processing Unit) in a terminal device, or a control center in a terminal device. In the present disclosure, a port for data transmission with other devices is configured for the processor so that the processor can communicate with other devices. The terminal device may be, for example, a mobile phone, a tablet computer, a television, a smart watch, a smart wearable device, and the like.
[0049] The following is an example of a mobile phone processor being the data transmission device and an external device being the data receiving device:
[0050] like Figure 1 As shown, 101 and 102 do not touch the eye area 103. At this time, it is considered that the transmission quality between the two devices is relatively good, and it is not easy to have problems such as poor transmission quality and transmission failure.
[0051] Figure 2 is another transmission quality test diagram shown in the present disclosure according to an exemplary embodiment. Figure 2 As shown, when 101 and 102 touch the eye area 103 (for example, touching position 201 and touching position 202), the transmission quality is considered to be poor. Figure 2 It can be seen that during data transmission, the rising edge at the touch position 201 rises relatively smoothly (not steep enough), and the falling edge at the touch position 202 falls relatively smoothly (not steep enough), resulting in touching the eye area 103. This is because: during data transmission, part of the data is attenuated and reflected due to line insertion loss, characteristic impedance, etc. during the transmission process, resulting in the data strength becoming weaker and weaker.
[0052] Therefore, when the USB eye diagram obtained by test is Figure 2 When the data transmission quality is poor or the data transmission fails, the problem may occur.
[0053] In order to solve the above problem, appropriate compensation parameters can be set for the data transmission device, and the transmission data in the mobile phone processor can be enhanced before data transmission. In this way, even if the data is attenuated and reflected partly during the transmission process, the waveform strength is sufficient (the signal waveform in the USB eye diagram will be steeper), so that the eye area 103 will not be touched, and there will be no problems such as poor transmission quality.
[0054] Considering that when the same mobile phone processor transmits data with different external devices, since the length of the USB signal line, the line insertion loss, and the line impedance of each external device are different, different compensation parameters need to be set for different external devices.
[0055] The following is a detailed introduction:
[0056] Figure 3 is a flow chart of a compensation parameter determination method according to an exemplary embodiment of the present disclosure. Figure 3 As shown, the method comprises the following steps:
[0057] Step 301: In response to establishing a connection with an external device, first test data is transmitted to the external device.
[0058] The external device is a device that can communicate with the processor (that is, a device for receiving data), and can be, for example, one of the terminal devices listed above, or other devices. The external device can communicate with the processor.
[0059] When the mobile phone processor detects that a connection is established with an external device, it will automatically generate first test data according to the pre-set transmission parameters, so as to test the transmission loss between the mobile phone processor and the external device by sending the first test data to the external device. The transmission parameters set basic parameters such as transmission protocol, transmission port, and transmission rate.
[0060] Among them, the external device, the mobile phone CPU or the terminal device all support wired transmission (such as USB transmission).
[0061] Step 302: receiving second test data transmitted by the external device, where the second test data is data reflected back by the external device through the original path of the received first test data.
[0062] After the first test data is transmitted to the external device in step 301, the external device receives the first test data transmitted by wire (after attenuation and / or reflection). Afterwards, the external device does not process the data in any way, and reflects the first test data received from the mobile phone processor back to the mobile phone processor in the original path, and uses the first test data reflected back by the mobile phone processor in the original path as the second test data.
[0063] The second test data can reflect the transmission loss result in the entire transmission process from the mobile phone processor to the external device and then from the external device back to the mobile phone processor.
[0064] Step 303: Obtain a comparison result between the first test data and the second test data.
[0065] Since the first test data is generated by the mobile phone processor, the mobile phone processor can compare the first test data without transmission loss with the second test result with transmission loss to obtain a comparison result, and determine the position where the second test data and the first test data are different according to the comparison result, and determine it as the difference position. Among them, the data at the difference position in the second test data is the data that has undergone transmission loss, and according to the difference between the data at the difference position in the second test data and the data at the difference position in the first test data, the loss degree of the second test data can be determined (the greater the difference, the more serious the loss; the smaller the difference, the smaller the loss).
[0066] Exemplarily, the first test data and the second test data are both square waves.
[0067] A square wave can be considered to be composed of countless sine waves of different frequencies, including the first harmonic f, the third harmonic 3f, the fifth harmonic 5f, etc. For high-speed signal transmission, the transmission line has insertion loss and impedance discontinuity, which will cause signal attenuation and reflection, resulting in the loss of some harmonic components (such as the fifth harmonic 5f, or the successive harmonic 1f loss), and the signal quality will deteriorate. Setting the compensation parameters is to make up for the lost harmonic components before transmitting data.
[0068] Based on the characteristic that square waves are composed of multiple harmonics, if you want to understand the amplitude, frequency and other parameters of the square wave, you need to perform Fourier transform on each square wave and convert a square wave into multiple harmonics.
[0069] Figure 4 FIG. 1 is a waveform diagram of a compensation parameter determination method according to an exemplary embodiment of the present disclosure. Figure 4 As shown, it can be seen that a square wave is composed of multiple harmonics. By performing Fourier transform on the first test data and the second test data, the first group of harmonics corresponding to the first test data and the second group of harmonics corresponding to the second test data can be obtained. By comparing the two groups of harmonics, a comparison result can be obtained.
[0070] Step 304: Set compensation parameters based on the difference positions indicated by the comparison result; the compensation parameters are used to compensate for the difference positions of the data to be transmitted to the external device.
[0071] Since the difference between the different positions can indicate the degree of loss of the transmitted data, different compensation parameters can be set for different different positions.
[0072] For example, the comparison result of the first test data and the second test data indicates that the data strength of the first test data in the first distinct position is 200, and the data strength of the second test data is 100. Then the compensation parameter for the first distinct position can be set to 100 (only exemplary, it can also be considered that the second test data is transmitted back and forth twice, while it is only transmitted once under normal circumstances, so it can be set to 50).
[0073] For another example, the comparison result of the first test data and the second test data indicates that the data intensity of the first test data in the second distinguished position is 200, and the data intensity of the second test data is 50. Then the compensation parameter for the second distinguished position can be set to 150 (greater than the compensation parameter for the first distinguished position).
[0074] After the compensation parameters for the external device are set, compensation may be subsequently performed for different positions of each data to be transmitted to the external device according to the set compensation parameters.
[0075] For example, the first distinct position and the second distinct position of the data to be transmitted to the external device next time are compensated respectively, and the compensated data is transmitted to the external device. In the process of transmitting the compensated data to the external device, due to line loss or impedance, some loss will still occur at the first distinct position and the second distinct position, so that the data lost after compensation can achieve the expected effect.
[0076] After connecting to the external device, the first test data is first transmitted to the external device, and then the second test data is received by the external device by reflecting the received first test data back along the original path. At this time, the second test data can reflect the situation that the first test data is interfered by the transmission loss and the impedance of the external device. By comparing the first test data that is not interfered with with the second test data that is interfered with, it is possible to determine the difference position that needs to be compensated when transmitting data with the external device, and then generate compensation parameters for the difference position.
[0077] Through the above method, targeted compensation parameters can be set when data is transmitted to different external devices. The data to be transmitted can be enhanced by using the compensation parameters, which helps to improve the data quality of data transmitted to different external devices.
[0078] Optionally, when performing step 304 to set compensation parameters based on the difference positions indicated by the comparison result, the method further includes the following steps:
[0079] The position where there is a difference between the first group of harmonics and the second group of harmonics in the comparison result is determined as the difference position, and the second group of harmonics has harmonic loss at the difference position; based on the harmonic loss at the difference position, the compensation parameter is set; the compensation parameter is used to perform harmonic enhancement on the difference position of the data to be transmitted to the external device.
[0080] Figure 5 FIG. 1 is a waveform diagram of another compensation parameter determination method according to an exemplary embodiment of the present disclosure. Figure 5 As shown, assuming that the upper harmonics are partial harmonics intercepted from the first group of harmonics, and the lower harmonics are partial harmonics intercepted from the same position of the second group of harmonics, by comparing the two groups of harmonics, it is possible to obtain a distinguishing position 501 and a distinguishing position 502 (only two positions are schematically listed). The second group of slopes has different degrees of harmonic loss in the distinguishing position 501 and the distinguishing position 502.
[0081] Therefore, different compensation parameters can be set according to the specific degree of harmonic loss (such as comparison amplitude). Figure 5This is merely illustrative, and the harmonics in the second group of harmonics may be missing altogether or may be lost to a greater extent.
[0082] Optionally, when executing step 302 to receive the second test data transmitted by the external device, the following steps are included:
[0083] In response to starting to transmit the first test data to the external device, starting the timing function; in response to determining that the timing duration reaches a first preset duration, turning off the timing function and starting the data receiving function; the first preset duration is determined based on the sum of the transmission durations required for the first test data to be transmitted to the external device and reflected back via the original path; and based on the data receiving function, receiving the second test data transmitted by the external device.
[0084] When the mobile phone processor starts to transmit the first test data to the external device, the timing function is started (starting from 0), and when it is determined that the timing duration reaches the first preset duration, the timing function is turned off (reset to 0), and the data receiving function is started at this time. The first preset duration is: the duration required for the first test data to be transmitted to the external device + the duration required for the external device to receive the first test data and reflect it back by the original path.
[0085] For example, assuming that the line length between the mobile phone processor and the external device (including the USB signal line + the wiring in the mobile phone processor + the wiring length between external devices) = 2 meters, then the total round-trip transmission line length is 4 meters; then if the transmission speed is known, the time t required for transmission can be calculated according to s = v*t.
[0086] Taking into account the possibility of certain errors, the final first preset time length can be obtained based on the obtained t with a certain error ±, for example, assuming t≈0.13ns, leaving a little margin, the first preset time length can be set to 0.15ns.
[0087] That is to say, the data receiving function is turned on after the first preset time is reached from the start of the transmission of the first test data. In this way, the problem of the mobile phone processor turning on the data receiving function too early and wasting power consumption when the second test data transmitted by the external device has not yet reached the mobile phone processor can be avoided. Furthermore, it can also avoid the reception of other interference data due to the premature opening of the data receiving function, which helps to improve the accuracy of the comparison result.
[0088] Optionally, when executing step 302 to receive the second test data transmitted by the external device, the following steps are included:
[0089] In response to starting the data receiving function, restarting the timing function; in response to determining that the timing duration reaches a second preset duration, turning off the timing function and the data receiving function to complete the reception of the second test data; the second preset duration is determined based on the length and transmission rate of the second test data.
[0090] When the data receiving function is started, the timing function can be restarted (starting from 0, or restarting another timer) to set the data receiving function of the mobile phone processor to be turned on only for the second preset time. The second preset time here is the time required for the second test data to be received from the beginning to the end of receiving.
[0091] Through the above, the second test data can be accurately received to avoid data distortion caused by excessive reception of other interference data. It should be noted that the start and end points of the second test data can also be determined according to the data flag to avoid receiving other interference data.
[0092] Optionally, the method further includes: storing, for each external device, a mapping relationship between the external device and the compensation parameter.
[0093] In this way, there is no need to execute the above steps 301 to 304 every time an external device is connected, which can reduce the computing pressure of the processor. When data needs to be transmitted to the external device, the compensation parameters corresponding to each external device in the mapping relationship can be directly called.
[0094] Exemplarily, the following steps may be performed:
[0095] In response to establishing a connection with a target external device, target data to be transmitted to the target external device is generated based on preset transmission parameters; in response to determining a target compensation parameter corresponding to the target external device from the mapping relationship, harmonic enhancement is performed on the target data based on the target compensation parameter; and the enhanced target data is transmitted to the target external device.
[0096] That is, when the mobile phone processor stores mapping relationships between multiple external devices and compensation parameters, the target compensation parameters corresponding to the target external device connected to the mobile phone can be directly found from the mapping relationship, without the need to test each time the external device is connected.
[0097] After the target data to be transmitted to the target external device is generated according to the transmission parameters, the target data is harmonically enhanced according to the target compensation parameters, so that the harmonics at some positions of the target data can be enhanced to avoid the weakening of the harmonics at these positions due to attenuation, reflection and other problems. Finally, the target data with harmonic enhancement is transmitted to the target external device.
[0098] Compared with target data compensated by using fixed compensation parameters, target data obtained by compensating target data by using target compensation parameters is less likely to have transmission failure problems during the transmission process between the mobile phone processor and the target external device.
[0099] Figure 6 FIG. 1 is a schematic diagram of a processor structure according to an exemplary embodiment of the present disclosure. Figure 6 As shown, the processor 610 performs data transmission with the external device 611. The processor 610 includes:
[0100] The code element module 601 is used to generate data (such as test data or other data) to be transmitted to the external device 611.
[0101] The transmission module 602 is used to transmit the data generated by the code element module 601 to the external device 611.
[0102] The first transformation module 603 is used to directly transform (for example, Fourier transform) the data generated by the symbol module 601 (data that has not been transmitted) to generate a first group of harmonics.
[0103] The receiving module 604 is used to receive data returned from the external device 611 along the original path (ie, the data is transmitted from the transmission module 602 to the external device 611 and then returned to the receiving module 604 ).
[0104] The second transformation module 605 is used to perform Fourier transformation on the data transmitted by the receiving module 604 to obtain a second group of harmonics.
[0105] The comparison module 606 is used to compare the two groups of harmonics transmitted by the first conversion module 603 and the second conversion module 605 respectively to obtain a comparison result.
[0106] The parameter setting module 607 is used to set compensation parameters according to the comparison result sent by the comparison module 606, and compensate the data to be transmitted to the external device in the transmission module 602 based on the compensation parameters.
[0107] Figure 7 FIG. 1 is a flow chart of another compensation parameter determination method according to an exemplary embodiment of the present disclosure. Figure 7 As shown, the method comprises the following steps:
[0108] Step 701, (processor) connects to external device.
[0109] Step 702: The processor sets the data to be transmitted.
[0110] Step 703: Perform Fourier transform on the data to be transmitted to obtain a first group of harmonics.
[0111] Step 704, at time T0, the transmission module (such as Figure 6 602) sends the data to be transmitted.
[0112] Step 705 , at time T1 (after a first preset time duration, for example, T1=T0+0.15 ns), the processor receives the reflected data through the receiving module 604 .
[0113] Step 706: Perform Fourier transform on the data received by the receiving module 604 to obtain a second group of harmonics.
[0114] Step 707, comparing the two groups of harmonics obtained in step 703 and step 706 to obtain a comparison result.
[0115] Step 708: Determine compensation parameters according to the comparison result.
[0116] For the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present disclosure is not limited by the described order of actions, because according to the present disclosure, certain steps can be performed in other orders or simultaneously.
[0117] Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0118] Corresponding to the aforementioned application function implementation method embodiment, the present disclosure also provides an embodiment of a processor and a corresponding terminal.
[0119] Figure 8 FIG. 1 is a schematic diagram of another processor structure according to an exemplary embodiment of the present disclosure. Figure 8 As shown, the processor may include:
[0120] The first transmission module 801 is configured to transmit first test data to an external device in response to establishing a connection with the external device.
[0121] The receiving module 802 is used to receive second test data transmitted by the external device, where the second test data is data reflected back by the external device from the original path of the received first test data.
[0122] The comparison module 803 is used to obtain a comparison result between the first test data and the second test data.
[0123] The parameter setting module 804 is used to set compensation parameters based on the difference positions indicated by the comparison result; the compensation parameters are used to compensate for the difference positions of the data to be transmitted to the external device.
[0124] Optionally, the first test data and the second test data are both square waves.
[0125] When the comparison module 803 is used to obtain the comparison result between the first test data and the second test data, it is used to:
[0126] Fourier transform is performed on the first test data and the second test data respectively to obtain a first group of harmonics and a second group of harmonics.
[0127] A comparison result of the first group of harmonics and the second group of harmonics is obtained.
[0128] Optionally, when the parameter setting module 804 is used to set the compensation parameter based on the difference position indicated by the comparison result, it is used to:
[0129] A position where there is a difference between the first group of harmonics and the second group of harmonics in the comparison result is determined as the difference position, and the second group of harmonics has harmonic loss at the difference position.
[0130] The compensation parameters are set based on the harmonic loss at the distinct positions; the compensation parameters are used to perform harmonic enhancement on the distinct positions of the data to be transmitted to the external device.
[0131] Optionally, when the receiving module 802 is used to receive the second test data transmitted by the external device, it is used to:
[0132] In response to starting to transmit the first test data to the external device, a timing function is started.
[0133] In response to determining that the timing duration reaches a first preset duration, the timing function is turned off and the data receiving function is started; the first preset duration is determined based on the sum of the transmission durations required for the first test data to be transmitted to the external device and reflected back by the original path.
[0134] The second test data transmitted by the external device is received based on the data receiving function.
[0135] Optionally, when the receiving module 802 is used to receive the second test data transmitted by the external device, it is used to:
[0136] In response to starting the data receiving function, the timing function is restarted.
[0137] In response to determining that the timing duration reaches a second preset duration, the timing function and the data receiving function are turned off to complete the reception of the second test data; the second preset duration is determined based on the length and transmission rate of the second test data.
[0138] Optionally, the processor further includes:
[0139] The storage module is used to store, for each external device, a mapping relationship between the external device and the compensation parameter.
[0140] Optionally, the processor further includes:
[0141] The code element module is used for generating target data to be transmitted to the target external device based on preset transmission parameters in response to establishing a connection with the target external device.
[0142] The harmonic enhancement module is used for, in response to determining a target compensation parameter corresponding to the target external device from the mapping relationship, performing harmonic enhancement on the target data based on the target compensation parameter.
[0143] The second transmission module transmits the enhanced target data to the target external device.
[0144] For the processor embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The processor embodiment described above is only schematic, wherein the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0145] Accordingly, an embodiment of the present disclosure provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the steps of any of the above compensation parameter determination methods by running the executable instructions. The electronic device may be an electronic device equipped with the above processor (e.g., a mobile phone processor), that is, the electronic device may be a terminal such as a mobile phone, a computer, a tablet computer, a smart watch, etc.
[0146] Fig. 9 9 is a schematic diagram of a structure of an electronic device according to an exemplary embodiment of the present disclosure. For example, the electronic device 900 may be a user device, which may specifically be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a wearable device such as a smart watch, a smart glasses, a smart bracelet, a smart running shoe, etc.
[0147] Reference Fig. 9, the electronic device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .
[0148] The processing component 902 generally controls the overall operation of the electronic device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.
[0149] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include instructions for any application or method operating on the electronic device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0150] The power supply component 906 provides power to the various components of the electronic device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 900.
[0151] The multimedia component 908 includes a screen that provides an output interface between the electronic device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the electronic device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0152] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the electronic device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0153] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0154] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the electronic device 900. For example, the sensor assembly 914 can detect the open / closed state of the electronic device 900, the relative positioning of the components, such as the display and keypad of the electronic device 900, and the sensor assembly 914 can also detect the position change of the electronic device 900 or a component of the electronic device 900, the presence or absence of contact between the user and the electronic device 900, the orientation or acceleration / deceleration of the electronic device 900, and the temperature change of the electronic device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0155] The communication component 916 is configured to facilitate wired or wireless communication between the electronic device 900 and other devices. The electronic device 900 can access a wireless network based on a communication standard, such as WiFi, 4G or 5G, 4G LTE, 5G NR or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0156] In an exemplary embodiment, the electronic device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0157] In an exemplary embodiment, a non-temporary computer-readable storage medium is also provided, such as a memory 904 including instructions, which, when executed by a processor 920 of an electronic device 900, enables the electronic device 900 to perform any of the above-mentioned compensation parameter determination methods.
[0158] The non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0159] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0160] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for determining compensation parameters, characterized in that: The method comprises: In response to establishing a connection with an external device, transmitting first test data to the external device; receiving second test data transmitted by the external device, wherein the second test data is data reflected back by the external device through an original path of the received first test data; Obtaining a comparison result between the first test data and the second test data; Based on the difference position indicated by the comparison result, a compensation parameter is set; the compensation parameter is used to compensate for the difference position of the data to be transmitted to the external device.
2. The method according to claim 1, characterized in that The first test data and the second test data are both square waves; The obtaining a comparison result between the first test data and the second test data includes: Performing Fourier transform on the first test data and the second test data respectively to obtain a first group of harmonics and a second group of harmonics; A comparison result of the first group of harmonics and the second group of harmonics is obtained.
3. The method according to claim 2, characterized in that The step of setting compensation parameters based on the difference position indicated by the comparison result includes: Determine a position where there is a difference between the first group of harmonics and the second group of harmonics in the comparison result as the difference position, and the second group of harmonics has harmonic loss at the difference position; The compensation parameters are set based on the harmonic loss at the distinct positions; the compensation parameters are used to perform harmonic enhancement on the distinct positions of the data to be transmitted to the external device.
4. The method according to claim 1, characterized in that: The receiving the second test data transmitted by the external device comprises: In response to starting to transmit the first test data to the external device, starting a timing function; In response to determining that the timing duration reaches a first preset duration, turning off the timing function and starting the data receiving function; the first preset duration is determined based on the sum of the transmission durations required for the first test data to be transmitted to the external device and reflected back by the original path; The second test data transmitted by the external device is received based on the data receiving function.
5. The method according to claim 4, characterized in that The receiving the second test data transmitted by the external device comprises: In response to starting the data receiving function, restarting the timing function; In response to determining that the timing duration reaches a second preset duration, the timing function and the data receiving function are turned off to complete the reception of the second test data; the second preset duration is determined based on the length and transmission rate of the second test data.
6. The method according to claim 1, characterized in that The method further comprises: For each external device, a mapping relationship between the external device and the compensation parameter is stored.
7. The method according to claim 6, characterized in that The method further comprises: In response to establishing a connection with a target external device, generating target data to be transmitted to the target external device based on preset transmission parameters; In response to determining a target compensation parameter corresponding to the target external device from the mapping relationship, performing harmonic enhancement on the target data based on the target compensation parameter; The enhanced target data is transmitted to the target external device.
8. A processor, characterized in that: The processor comprises: A first transmission module, configured to transmit first test data to the external device in response to establishing a connection with the external device; A receiving module, used for receiving second test data transmitted by the external device, where the second test data is data reflected back by the external device from the original path of the received first test data; A comparison module, used to obtain a comparison result between the first test data and the second test data; A parameter setting module is used to set compensation parameters based on the difference positions indicated by the comparison result; the compensation parameters are used to compensate for the difference positions of the data to be transmitted to the external device.
9. The processor according to claim 8, characterized in that The first test data and the second test data are both square waves; When the comparison module is used to obtain a comparison result between the first test data and the second test data, the comparison module is used to: Performing Fourier transform on the first test data and the second test data respectively to obtain a first group of harmonics and a second group of harmonics; A comparison result of the first group of harmonics and the second group of harmonics is obtained.
10. The processor according to claim 9, characterized in that The parameter setting module, when used to set the compensation parameters based on the difference position indicated by the comparison result, is used to: Determine a position where there is a difference between the first group of harmonics and the second group of harmonics in the comparison result as the difference position, and the second group of harmonics has harmonic loss at the difference position; The compensation parameters are set based on the harmonic loss at the distinct positions; the compensation parameters are used to perform harmonic enhancement on the distinct positions of the data to be transmitted to the external device.
11. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the steps of any one of the methods of claims 1 to 7 by running the executable instructions.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of any method described in claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and device for obtaining signal compensating parameters and network equipment
CN102064928A
Antenna and radio frequency channel calibration system and antenna and radio frequency channel calibration method
CN106803774A
Compensation method, compensation device, motor and storage medium
CN111245304A
NFC chip test method and device, terminal equipment and storage medium
CN111737121A
Hearing compensation method and device and electronic equipment
CN112306446A