Sampling rate conversion system, method and device
By introducing cache nodes and dynamic decimation rate adjustment mechanisms into the sampling rate conversion system, the lag problem caused by transmission blockage in asynchronous sampling rate conversion is solved, and more stable voice signal playback is achieved.
Patent Information
- Application Number
- CN202311054343.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-02-21
AI Technical Summary
When playing digital voice signals, if the sampling rate of the playback device is different from the sampling rate collected by voice signals, asynchronous sampling rate conversion (ASRC) is required, but if a blockage occurs during transmission, it will cause signal playback to stutter.
A sampling rate conversion system is designed, including ASRC nodes, cache nodes, monitoring nodes and control nodes. The ASRC node converts the sample rate of the input sample points, and the output sample points are cached into the cache node. When the number of output sample points in the cache node reaches the preset reference number, the control node controls the cache node to output sample points at the preset output sampling rate, and determines the target extraction rate based on the current cache number, adjusts the extraction rate of the ASRC node to ensure output Stable output of sample points.
Through cache and dynamic adjustment of the decimation rate, the stuttering caused by transmission blockage is reduced, the voice signal playback is ensured to be smoother, and the auditory effect is improved.
Smart Images

Figure CN119496920A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal processing technology, and in particular to a sampling rate conversion system, method and device. Background Art
[0002] When playing digital voice signals, if the sampling rate of the playback device is different from the sampling rate of the voice signal acquisition, the voice signal needs to be asynchronously sampled and converted (ASRC) before it can be played by the playback device.
[0003] In the related art, the collected voice signal is directly played on the playback device through ASRC.
[0004] During the transmission process, if a transmission failure occurs, it will cause signal transmission to be blocked. The blocked voice signal will be played directly on the playback device through ASRC, which will cause jamming. That is to say, the playback device will play a sporadic and intermittent jamming signal. Summary of the invention
[0005] Embodiments of the present application provide a sampling rate conversion system, method, and device for reducing the stuttering phenomenon during the playback of an audio signal.
[0006] In a first aspect, an embodiment of the present application provides a sampling rate conversion system, including an ASRC node, a cache node, a monitoring node, and a control node;
[0007] The ASRC node is used to perform sampling rate conversion on the input sample points to obtain output sample points, and transmit the output sample points to the cache node;
[0008] The cache node is used to cache the output sample points transmitted by the ASRC node;
[0009] The monitoring node is used to monitor the cache quantity of the output sample points in the cache node and send the cache quantity to the control node;
[0010] The control node is used to control the cache node to output the output sample points at a preset output sampling rate after the cache quantity reaches a preset reference quantity for the first time;
[0011] The control node is further configured to determine a target decimation rate based on the cache quantity after controlling the cache node to output the output sample points at a preset output sampling rate, and send the target decimation rate to the ASRC node;
[0012] The ASRC node is further used to adjust the decimation rate based on the target decimation rate.
[0013] In the above scheme, after receiving the input sample points, the ASRC node converts the sampling rate of the input sample points. The converted output sample points are not directly output for playback, but are cached in the cache node; after the number of output sample points in the cache node reaches the preset benchmark number for the first time, the output sample points will be output at the preset output sampling rate, which ensures the output stability of the output sample points, reduces the jamming phenomenon caused by transmission congestion, plays smoother voice signals, and thus improves the auditory effect; after the cache node starts to output, the cache number of output sample points in the cache node is monitored (the output of the cache node is unchanged, but the input may change due to transmission congestion, and the decimation rate will also change), therefore, based on the current cache number, the target decimation rate is determined; and then the decimation rate of the ASRC node is flexibly adjusted to ensure that the cached output sample points are maintained at a certain relatively stable level, further ensuring the normal output of the cache node.
[0014] Some optional implementations further include an input node and an output node;
[0015] The input node is used to transmit the input sample point to the ASRC node;
[0016] The output node is used to receive the output sample points output by the cache node.
[0017] In some optional implementations, the cache node is provided with a redundant area corresponding to the preset reference quantity; before determining the target extraction rate based on the cache quantity, the control node is further used to:
[0018] It is determined that the cache quantity is not in the redundant area.
[0019] The above scheme sets a redundant area corresponding to a preset benchmark number in the above cache node, that is, a floating range above and below the preset benchmark number. If the current cache number is not in the redundant area, it means that there is a certain gap between the cache number and the preset benchmark number. By triggering the decimation rate adjustment, the occurrence of insufficient or overflow output samples of the cache is reduced; if the current cache number is in the redundant area, it means that the cache number is not much different from the preset benchmark number, or is equal to the preset benchmark number, and the decimation rate adjustment will not be triggered, thereby reducing the frequent adjustment of the decimation rate.
[0020] In some optional implementation manners, the control node is specifically used to:
[0021] Compare the cache quantity with the water level limit, and determine the target adjustment information based on the comparison result; or,
[0022] Determine a quantity difference between the cache quantity and the preset reference quantity, and determine adjustment information corresponding to the quantity difference as target adjustment information based on a preset corresponding relationship; wherein the preset corresponding relationship includes a mapping between a preset difference and the adjustment information;
[0023] A target decimation rate corresponding to the target adjustment information is determined.
[0024] The above scheme sets a water level limit and compares the cache quantity with the water level limit. When the output samples of the cache are insufficient or overflow, the degree of shortage or overflow can be known, thereby determining more precise and reasonable target adjustment information; since the preset benchmark quantity is a benchmark value for measuring the cache quantity, the quantity difference between the cache quantity and the preset benchmark quantity reflects the deviation of the current cache quantity. Therefore, based on the quantity difference and the preset corresponding relationship, the target adjustment information can be determined flexibly and efficiently; further, after determining the target adjustment information characterizing the adjustment range, the target extraction rate that meets the current transmission state and the current cache state is determined based on the target adjustment information.
[0025] In some optional implementation manners, the water level limit includes an upper water level limit and a lower water level limit; the control node is specifically used to:
[0026] If the cache quantity is less than the minimum value of the redundant area and greater than the lower limit of the water level, the first preset adjustment information is determined as the target adjustment information;
[0027] If the cache quantity is less than or equal to the lower water level limit, determining the second preset adjustment information as the target adjustment information;
[0028] If the cache quantity is greater than the maximum value of the redundant area and less than the upper watermark limit, determining the third preset adjustment information as the target adjustment information;
[0029] If the cache quantity is greater than or equal to the upper water level limit, determining the fourth preset adjustment information as the target adjustment information;
[0030] Among them, the absolute value of the first preset adjustment information is smaller than the absolute value of the second preset adjustment information; the absolute value of the third preset adjustment information is smaller than the absolute value of the fourth preset adjustment information.
[0031] The above scheme sets the upper and lower limits of the water level to accurately know the degree of insufficient or overflow of the cached output samples, and adopts the corresponding preset adjustment information, which not only meets the adjustment needs, but also reduces the occurrence of uncached output samples and data overflow.
[0032] In some optional implementation manners, the ASRC node is specifically used for:
[0033] Determining a decimation rate difference between the target decimation rate and the decimation rate before ASRC adjustment;
[0034] Determine a single adjustment decimation rate based on the decimation rate difference and a preset number of adjustments;
[0035] Based on the single adjusted decimation rate, the decimation rate of the ASRC is adjusted to the target decimation rate.
[0036] The above scheme adopts a "gradual" decimation rate adjustment method to reduce the distortion when the decimation rate is adjusted, making the audio signal more stable.
[0037] In some optional implementation manners, the ASRC node is specifically used for:
[0038] Based on the (i-1)th decimation rate and the single adjusted decimation rate, obtaining the (i)th decimation rate;
[0039] Performing sampling rate conversion on the ith input sample point after the decimation rate adjustment based on the ith decimation rate, and outputting the ith output sample point after the decimation rate adjustment, until the decimation rate of the ASRC is adjusted to the target decimation rate;
[0040] Among them, 0≤i≤n; the difference between the i-th decimation rate and the i-1-th decimation rate is the single adjustment decimation rate; the 0th decimation rate is the decimation rate before the adjustment; and the nth decimation rate is the target decimation rate.
[0041] In a second aspect, an embodiment of the present application provides a first sampling rate conversion method, which is applied to a control node, and the method includes:
[0042] After the cache quantity of output sample points in the cache node reaches a preset reference quantity for the first time, the cache node is controlled to output the output sample points at a preset output sampling rate; wherein the output sample points in the cache node are obtained after the ASRC node performs sampling rate conversion on the input sample points and transmitted to the cache node;
[0043] Determining a target decimation rate based on the cache quantity;
[0044] Based on the target decimation rate, the ASRC node is controlled to adjust the decimation rate.
[0045] In some optional implementation manners, the cache node is provided with redundant areas corresponding to the preset reference quantity; before determining the target extraction rate based on the cache quantity, the method further includes:
[0046] It is determined that the cache quantity is not in the redundant area.
[0047] In some optional implementations, determining a target extraction rate based on the cache quantity includes:
[0048] Compare the cache quantity with the water level limit, and determine the target adjustment information based on the comparison result; or,
[0049] Determine a quantity difference between the cache quantity and the preset reference quantity, and determine adjustment information corresponding to the quantity difference as target adjustment information based on a preset corresponding relationship; wherein the preset corresponding relationship includes a mapping between a preset difference and the adjustment information;
[0050] A target decimation rate corresponding to the target adjustment information is determined.
[0051] In some optional implementations, the water level limit includes an upper water level limit and a lower water level limit; the control node compares the cache quantity with the water level limit, and determines the target adjustment information based on the comparison result, including:
[0052] If the cache quantity is less than the minimum value of the redundant area and greater than the lower limit of the water level, the first preset adjustment information is determined as the target adjustment information;
[0053] If the cache quantity is less than or equal to the lower water level limit, determining the second preset adjustment information as the target adjustment information;
[0054] If the cache quantity is greater than the maximum value of the redundant area and less than the upper watermark limit, determining the third preset adjustment information as the target adjustment information;
[0055] If the cache quantity is greater than or equal to the upper water level limit, determining the fourth preset adjustment information as the target adjustment information;
[0056] Among them, the absolute value of the first preset adjustment information is smaller than the absolute value of the second preset adjustment information; the absolute value of the third preset adjustment information is smaller than the absolute value of the fourth preset adjustment information.
[0057] In a third aspect, an embodiment of the present application provides a second sampling rate conversion method, which is applied to an ASRC node. The method includes:
[0058] Perform sampling rate conversion on the input sample points to obtain output sample points;
[0059] Transmitting the converted output sample points to the cache node, so that after the cache quantity of the output sample points in the cache node reaches the preset reference quantity for the first time, the control node controls the cache node to output the output sample points at a preset output sampling rate;
[0060] Receive the target decimation rate sent by the control node, and adjust the decimation rate based on the target decimation rate; wherein the target decimation rate is determined by the control node based on the cache quantity after controlling the cache node to output the output sample points at a preset output sampling rate.
[0061] In some optional implementations, adjusting the decimation rate based on the target decimation rate includes:
[0062] Determining a decimation rate difference between the target decimation rate and the decimation rate before ASRC adjustment;
[0063] Determine a single adjustment decimation rate based on the decimation rate difference and a preset number of adjustments;
[0064] Based on the single adjusted decimation rate, the decimation rate of the ASRC is adjusted to the target decimation rate.
[0065] In some optional implementations, based on the single adjustment of the decimation rate, adjusting the decimation rate of the ASRC to the target decimation rate includes:
[0066] Based on the (i-1)th decimation rate and the single adjusted decimation rate, obtaining the (i)th decimation rate;
[0067] Performing sampling rate conversion on the ith input sample point after the decimation rate adjustment based on the ith decimation rate, and outputting the ith output sample point after the decimation rate adjustment, until the decimation rate of the ASRC is adjusted to the target decimation rate;
[0068] Among them, 0≤i≤n; the difference between the i-th decimation rate and the i-1-th decimation rate is the single adjustment decimation rate; the 0th decimation rate is the decimation rate before the adjustment; and the nth decimation rate is the target decimation rate.
[0069] In a fourth aspect, an embodiment of the present application provides a first sampling rate conversion device, which is applied to a control node, and the device includes:
[0070] An output control module, used to control the cache node to output the output samples at a preset output sampling rate after the cache quantity of the output samples in the cache node reaches a preset reference quantity for the first time; wherein the output samples in the cache node are obtained after the ASRC node performs sampling rate conversion on the input samples and transmits them to the cache node;
[0071] An extraction rate determination module, used to determine a target extraction rate based on the cache quantity;
[0072] The decimation rate control module is used to control the ASRC node to adjust the decimation rate based on the target decimation rate.
[0073] In some optional implementations, the cache node is provided with a redundant area corresponding to the preset reference quantity; before determining the target extraction rate based on the cache quantity, the extraction rate determination module is further used to:
[0074] It is determined that the cache quantity is not in the redundant area.
[0075] In some optional implementation manners, the extraction rate determination module is specifically used to:
[0076] Compare the cache quantity with the water level limit, and determine the target adjustment information based on the comparison result; or,
[0077] Determine a quantity difference between the cache quantity and the preset reference quantity, and determine adjustment information corresponding to the quantity difference as target adjustment information based on a preset corresponding relationship; wherein the preset corresponding relationship includes a mapping between a preset difference and the adjustment information;
[0078] A target decimation rate corresponding to the target adjustment information is determined.
[0079] In some optional implementations, the water level limit includes an upper water level limit and a lower water level limit; the extraction rate determination module is specifically used to:
[0080] If the cache quantity is less than the minimum value of the redundant area and greater than the lower limit of the water level, the first preset adjustment information is determined as the target adjustment information;
[0081] If the cache quantity is less than or equal to the lower water level limit, determining the second preset adjustment information as the target adjustment information;
[0082] If the cache quantity is greater than the maximum value of the redundant area and less than the upper watermark limit, determining the third preset adjustment information as the target adjustment information;
[0083] If the cache quantity is greater than or equal to the upper water level limit, determining the fourth preset adjustment information as the target adjustment information;
[0084] Among them, the absolute value of the first preset adjustment information is smaller than the absolute value of the second preset adjustment information; the absolute value of the third preset adjustment information is smaller than the absolute value of the fourth preset adjustment information.
[0085] In a fifth aspect, an embodiment of the present application provides a second sampling rate conversion device, which is applied to an ASRC node, and the device includes:
[0086] A conversion module, used for performing sampling rate conversion on input samples to obtain output samples;
[0087] A transmission module, used for transmitting the converted output sample points to the cache node, so that after the cache quantity of the output sample points in the cache node reaches a preset reference quantity for the first time, the control node controls the cache node to output the output sample points at a preset output sampling rate;
[0088] A sampling rate adjustment module is used to receive the target decimation rate sent by the control node and adjust the decimation rate based on the target decimation rate; wherein the target decimation rate is determined by the control node based on the cache quantity after controlling the cache node to output the output sample points at a preset output sampling rate.
[0089] In some optional implementation manners, the sampling rate adjustment module is specifically used to:
[0090] Determining a decimation rate difference between the target decimation rate and the decimation rate before ASRC adjustment;
[0091] Determine a single adjustment decimation rate based on the decimation rate difference and a preset number of adjustments;
[0092] Based on the single adjusted decimation rate, the decimation rate of the ASRC is adjusted to the target decimation rate.
[0093] In some optional implementation manners, the sampling rate adjustment module is specifically used to:
[0094] Based on the (i-1)th decimation rate and the single adjusted decimation rate, obtaining the (i)th decimation rate;
[0095] Performing sampling rate conversion on the ith input sample point after the decimation rate adjustment based on the ith decimation rate, and outputting the ith output sample point after the decimation rate adjustment, until the decimation rate of the ASRC is adjusted to the target decimation rate;
[0096] Among them, 0≤i≤n; the difference between the i-th decimation rate and the i-1-th decimation rate is the single adjustment decimation rate; the 0th decimation rate is the decimation rate before the adjustment; and the nth decimation rate is the target decimation rate.
[0097] In a sixth aspect, an embodiment of the present application provides a control node, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the sampling rate conversion method described in any one of the above-mentioned second aspects.
[0098] In a seventh aspect, an embodiment of the present application provides an ASRC node, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the sampling rate conversion method described in any one of the third aspects above.
[0099] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program executable by a processor. When the program runs on the processor, the processor executes the sampling rate conversion method described in any one of the second aspect or the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0101] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0102] Figure 2 The first system architecture diagram provided for the embodiment of the present application;
[0103] Figure 3 A second system architecture diagram provided for an embodiment of the present application;
[0104] Figure 4 An interactive flow chart of the first sampling rate conversion method provided in an embodiment of the present application;
[0105] Figure 5 A second system architecture diagram provided for an embodiment of the present application;
[0106] Figure 6 An interactive flow chart of a second sampling rate conversion method provided in an embodiment of the present application;
[0107] Figure 7 A schematic diagram of a first cache node provided in an embodiment of the present application;
[0108] Figure 8 A schematic diagram of a second cache node provided in an embodiment of the present application;
[0109] Fig. 9 The first spectrum diagram provided in the embodiment of the present application;
[0110] Fig.10 A second spectrum diagram provided in an embodiment of the present application;
[0111] Fig.11 A schematic diagram of a flow chart of a first sampling rate conversion method provided in an embodiment of the present application;
[0112] Fig.12 A schematic flow chart of a second sampling rate conversion method provided in an embodiment of the present application;
[0113] Fig.13 A schematic diagram of the structure of a first sampling rate conversion device provided in an embodiment of the present application;
[0114] Fig.14 A schematic diagram of the structure of a second sampling rate conversion device provided in an embodiment of the present application;
[0115] Fig.15 A schematic diagram of the structure of a control node provided in an embodiment of the present application. DETAILED DESCRIPTION
[0116] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0117] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0118] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense, for example, it can be directly connected, or indirectly connected through an intermediate medium, or it can be the internal connection of two devices. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0119] See also Figure 1 As shown, when a digital voice signal is played, if the sampling rate of the playback device is different from the sampling rate of the voice signal acquisition, the voice signal needs to be asynchronously sampled and converted before being played by the playback device. Figure 1 Taking the conversion from 44100 Hz to 48000 Hz as an example, there are various different conversion methods in implementation.
[0120] See also Figure 2 As shown, in the related art, the collected voice signal is passed through ASRC and played directly on the playback device.
[0121] During the transmission process, such as Wireless Fidelity (WiFi) transmission or Bluetooth transmission), if a transmission failure occurs, it will cause signal transmission to be blocked. The blocked voice signal will be played directly on the playback device through ASRC, which will cause jamming. In other words, the playback device will play a sporadic and intermittent jamming signal.
[0122] The farther the distance between the sender and the receiver, the more frequent the transmission congestion.
[0123] In view of this, the embodiments of the present application provide a sampling rate conversion system, method and device to reduce the stuttering phenomenon during the playback of audio signals.
[0124] See also Figure 3 As shown, a sampling rate conversion system provided in this embodiment includes an ASRC node, a cache node, a monitoring node and a control node;
[0125] The ASRC node is used to perform sampling rate conversion on the input sample points to obtain output sample points, and transmit the output sample points to the cache node;
[0126] The cache node is used to cache the output sample points transmitted by the ASRC node;
[0127] The monitoring node is used to monitor the cache quantity of the output sample points in the cache node and send the cache quantity to the control node;
[0128] The control node is used to control the cache node to output the output sample points at a preset output sampling rate after the cache quantity reaches a preset reference quantity for the first time;
[0129] The control node is further configured to determine a target decimation rate based on the cache quantity after controlling the cache node to output the output sample points at a preset output sampling rate, and send the target decimation rate to the ASRC node;
[0130] The ASRC node is further used to adjust the decimation rate based on the target decimation rate.
[0131] In the above scheme, after receiving the input sample points, the ASRC node converts the sampling rate of the input sample points. The converted output sample points are not directly output for playback, but are cached in the cache node; after the number of output sample points in the cache node reaches the preset benchmark number for the first time, the output sample points will be output at the preset output sampling rate, which ensures the output stability of the output sample points, reduces the jamming phenomenon caused by transmission congestion, plays smoother voice signals, and thus improves the auditory effect; after the cache node starts to output, the cache number of output sample points in the cache node is monitored (the output of the cache node is unchanged, but the input may change due to transmission congestion, and the decimation rate will also change), therefore, based on the current cache number, the target decimation rate is determined; and then the decimation rate of the ASRC node is flexibly adjusted to ensure that the cached output sample points are maintained at a certain relatively stable level, further ensuring the normal output of the cache node.
[0132] The following will be combined with the accompanying drawings and specific embodiments to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0133] Figure 4 The interactive flow chart of the first sampling rate conversion method provided in the embodiment of the present application is as follows: Figure 4 As shown, the following steps are included:
[0134] Step S401: the ASRC node performs sampling rate conversion on input samples to obtain output samples.
[0135] In this embodiment, the ASRC node is a node that performs sampling rate conversion on input samples, and the input samples are collected audio data.
[0136] Exemplarily, ASRC sampling rate conversion uses a polyphase filter to complete the resampling work. The coefficients of the polyphase filter are dynamically generated, and this coefficient generation uses a polyphase filter coefficient base table and a polynomial coefficient table. The storage of this table data is designed to be in a system memory (MEMORY) (such as the system memory of ASRC table data).
[0137] In implementation, before receiving the target decimation rate from the control node, the ASRC node converts the input sample points with a preset decimation rate to obtain output sample points, where the preset decimation rate = preset input sampling rate / N*preset output sampling rate, where N is a preset coefficient.
[0138] Step S402: the ASRC node transmits the output sample points to the cache node.
[0139] In this embodiment, after receiving the input samples, the ASRC node converts the input samples into a sampling rate. The converted output samples are not directly output for playback but cached in the cache node. That is, a cache pool for caching the output samples is set in the cache node.
[0140] Step S403: The cache node caches the output samples transmitted by the ASRC node.
[0141] This embodiment does not limit the specific implementation method of the cache node, such as using a piece of system memory.
[0142] Step S404: the monitoring node monitors the cache quantity of the output samples in the cache node, and sends the cache quantity to the control node.
[0143] In this embodiment, the cache node caches the output sample points. By monitoring the cache node, the cache number of the output sample points can be known. The cache number is sent to the control node so that the control node determines whether to control the cache node output based on the cache number, and determines whether to adjust the ASRC extraction rate based on the cache number after the output.
[0144] Step S405: after the buffer quantity reaches a preset reference quantity for the first time, the control node controls the buffer node to output the output sample points at a preset output sampling rate.
[0145] In this embodiment, by setting a preset benchmark number, the output samples will be output at a preset output sampling rate only after the cache quantity reaches the preset benchmark number for the first time (first-in-first-out method). This ensures that an appropriate amount of output samples have been cached to cope with transmission congestion, and at the same time, the extraction rate of the ASRC node can be flexibly adjusted by detecting changes in the cache quantity.
[0146] Step S406: The control node determines a target extraction rate based on the cache quantity.
[0147] Step S407: The control node sends the target decimation rate to the ASRC node.
[0148] As mentioned above, the output of the cache node is unchanged, but the input may change due to transmission congestion, so the current cache quantity (water level depth information of the cache pool) can feedback the status of wireless data transmission and whether the current extraction rate of the ASRC node is appropriate;
[0149] Then, a target decimation rate that meets the current state of wireless transmission is determined.
[0150] Step S408: The ASRC node adjusts the decimation rate based on the target decimation rate.
[0151] In this embodiment, the above steps S401 to S403 are steps executed in real time; before the cache quantity reaches the preset benchmark quantity for the first time, S404 is also a step executed in real time; S405 is a step executed in real time after the cache quantity reaches the preset benchmark quantity for the first time; due to the existence of the cache function, the change of the cache quantity is usually relatively slow, so after the cache quantity reaches the preset benchmark quantity for the first time, steps S404, S406 to S408 can be executed periodically.
[0152] In the above scheme, after receiving the input sample points, the ASRC node converts the sampling rate of the input sample points. The converted output sample points are not directly output for playback, but are cached in the cache node; after the number of output sample points in the cache node reaches the preset benchmark number for the first time, the output sample points will be output at the preset output sampling rate, which ensures the output stability of the output sample points, reduces the jamming phenomenon caused by transmission congestion, plays smoother voice signals, and thus improves the auditory effect; after the cache node starts to output, the cache number of output sample points in the cache node is monitored (the output of the cache node is unchanged, but the input may change due to transmission congestion, and the decimation rate will also change), therefore, based on the current cache number, the target decimation rate is determined; and then the decimation rate of the ASRC node is flexibly adjusted to ensure that the cached output sample points are maintained at a certain relatively stable level, further ensuring the normal output of the cache node.
[0153] See also Figure 5 As shown, this embodiment provides a second sampling rate conversion system, which, based on the above sampling rate conversion system, further includes an input node and an output node;
[0154] This embodiment does not limit the specific implementation of the input node and the output node. Exemplarily, the input node includes an input interface, which receives signals from multiple devices, provides corresponding transmission modes according to the receiving devices, and supports different transmission modes to transmit these signals to the ASRC node;
[0155] The output node includes an output interface, and the cache node outputs the output samples through the output interface. According to different output devices, different transmission modes are supported to write the output samples to various output devices or playback devices.
[0156] Correspondingly, the embodiment of the present application provides an interactive flow chart of a second sampling rate conversion method, such as Figure 6 As shown, the following steps are included:
[0157] Step S601: the ASRC node receives input samples transmitted by the input node, and performs sampling rate conversion on the input samples to obtain output samples.
[0158] Step S602: the ASRC node transmits the output sample points to the cache node.
[0159] Step S603: The cache node caches the output samples transmitted by the ASRC node.
[0160] Step S604: the monitoring node monitors the cache quantity of the output samples in the cache node, and sends the cache quantity to the control node.
[0161] Step S605: after the cache quantity reaches a preset reference quantity for the first time, the control node controls the cache node to transmit the output sample points to the output node at a preset output sampling rate.
[0162] Step S606: The control node determines a target extraction rate based on the cache quantity.
[0163] Step S607: The control node sends the target decimation rate to the ASRC node.
[0164] Step S608: The ASRC node adjusts the decimation rate based on the target decimation rate.
[0165] The specific implementation of steps S601 to S608 can refer to the above embodiment and will not be described in detail here.
[0166] See also Figure 7 As shown, in some optional implementation manners, the cache node is provided with redundant areas corresponding to the preset reference quantity; accordingly, before the above step S406, the following steps are further performed:
[0167] It is determined that the cache quantity is not in the redundant area.
[0168] In this embodiment, the cache node is provided with a redundant area corresponding to a preset reference number, that is, a floating range of the preset reference number. If the current cache number is not in the redundant area, it means that there is a certain gap between the cache number and the preset reference number, and the extraction rate adjustment needs to be triggered;
[0169] If the current cache quantity is in the redundant area, it means that the cache quantity is not much different from the preset benchmark quantity, or is equal to the preset benchmark quantity, and the extraction rate adjustment will not be triggered.
[0170] The above scheme sets a redundant area corresponding to a preset benchmark number in the above cache node, that is, a floating range above and below the preset benchmark number. If the current cache number is not in the redundant area, it means that there is a certain gap between the cache number and the preset benchmark number. By triggering the decimation rate adjustment, the occurrence of insufficient or overflow output samples of the cache is reduced; if the current cache number is in the redundant area, it means that the cache number is not much different from the preset benchmark number, or is equal to the preset benchmark number, and the decimation rate adjustment will not be triggered, thereby reducing the frequent adjustment of the decimation rate.
[0171] In some optional implementation manners, the above step S406 may be implemented by but not limited to the following methods:
[0172] Target adjustment information is determined based on the cache quantity, and a target extraction rate corresponding to the target adjustment information is determined.
[0173] As mentioned above, the current cache quantity (water level depth information of the cache pool) can provide feedback on the status of wireless data transmission and whether the current extraction rate of the ASRC node is appropriate;
[0174] Based on this, this embodiment first determines target adjustment information representing the adjustment range based on the current cache quantity, and then determines a target extraction rate that matches the current transmission state and the current cache state based on the target adjustment information.
[0175] During implementation, the target adjustment information may be determined by, but not limited to, the following methods:
[0176] 1. Compare the cache quantity with the water level limit, and determine the target adjustment information based on the comparison result.
[0177] In this embodiment, a water level limit is set. By comparing the cache quantity with the water level limit, when the cache output samples are insufficient or overflow, the degree of the shortage or overflow can be known, thereby determining more precise and reasonable target adjustment information.
[0178] 2. Determine the quantity difference between the cache quantity and the preset reference quantity, and based on a preset corresponding relationship, determine the adjustment information corresponding to the quantity difference as the target adjustment information; wherein the preset corresponding relationship includes a mapping between the preset difference and the adjustment information.
[0179] As mentioned above, after the cache quantity reaches the preset benchmark quantity for the first time, the output samples will be output at the preset output sampling rate, that is, input and output are performed at the cache node at the same time, so the preset benchmark quantity is a benchmark value for measuring the cache quantity;
[0180] Based on this, this embodiment determines the quantity difference between the cache quantity and the preset reference quantity, and determines the target adjustment information corresponding to the quantity difference based on the preset corresponding relationship (the mapping between the difference and the adjustment information is preset).
[0181] This embodiment does not limit the specific implementation method of the above preset corresponding relationship, which can be set according to actual needs. For example, the larger the absolute value of the difference, the larger the absolute value of the corresponding adjustment information (that is, the larger the adjustment range).
[0182] When determining the target extraction rate corresponding to the target adjustment information, the target extraction rate can be determined based on the current extraction rate and the target adjustment information (such as increasing the extraction rate corresponding to the target adjustment information on the basis of the current extraction rate); the target extraction rate can also be determined based on the preset extraction rate and the target adjustment information, etc. This embodiment does not make any specific limitations on this.
[0183] The above scheme sets a water level limit and compares the cache quantity with the water level limit. When the output samples of the cache are insufficient or overflow, the degree of shortage or overflow can be known, thereby determining more precise and reasonable target adjustment information; since the preset benchmark quantity is a benchmark value for measuring the cache quantity, the quantity difference between the cache quantity and the preset benchmark quantity reflects the deviation of the current cache quantity. Therefore, based on the quantity difference and the preset corresponding relationship, the target adjustment information can be determined flexibly and efficiently; further, after determining the target adjustment information characterizing the adjustment range, the target extraction rate that meets the current transmission state and the current cache state is determined based on the target adjustment information.
[0184] See also Figure 8 As shown, the water level limit includes an upper water level limit and a lower water level limit; wherein the upper water level limit is greater than the maximum value of the redundant area, and the lower water level limit is less than the minimum value of the redundant area;
[0185] In the first method of determining the target adjustment information, determining the target adjustment information based on the comparison result may be achieved by, but not limited to, the following methods:
[0186] If the cache quantity is less than the minimum value of the redundant area and greater than the lower limit of the water level, the first preset adjustment information is determined as the target adjustment information;
[0187] If the cache quantity is less than or equal to the lower water level limit, determining the second preset adjustment information as the target adjustment information;
[0188] If the cache quantity is greater than the maximum value of the redundant area and less than the upper watermark limit, determining the third preset adjustment information as the target adjustment information;
[0189] If the cache quantity is greater than or equal to the upper water level limit, determining the fourth preset adjustment information as the target adjustment information;
[0190] Among them, the absolute value of the first preset adjustment information is smaller than the absolute value of the second preset adjustment information; the absolute value of the third preset adjustment information is smaller than the absolute value of the fourth preset adjustment information.
[0191] Exemplarily, if the cache quantity is less than the minimum value of the redundant area and greater than the lower limit of the water level, it means that the current cache quantity is only slightly insufficient, and the first preset adjustment information with a smaller amplitude (smaller absolute value) is determined as the target adjustment information. In implementation, one or more first preset adjustment information can be set, and one first preset adjustment information can be selected based on the change trend of the cache quantity (for example, the cache quantity shows an upward trend and corresponds to a smaller first preset adjustment information, and the cache quantity shows a downward trend and corresponds to a larger first preset adjustment information, etc.); multiple other preset adjustment information described below can also be set, and one is selected from them according to the change trend of the cache quantity, and examples will not be given one by one in the following;
[0192] If the number of caches is less than or equal to the lower limit of the water level, it means that the current number of caches is seriously insufficient, and the second preset adjustment information with a larger amplitude (larger absolute value) is determined as the target adjustment information to reduce the occurrence of output samples without cache and ensure the normal output of the cache node;
[0193] If the cache quantity is greater than the maximum value of the redundant area and less than the upper water level limit, it means that the current cache quantity is only slightly overflowed, and the third preset adjustment information with a smaller amplitude (smaller absolute value) is determined as the target adjustment information;
[0194] If the cache quantity is greater than or equal to the water level upper limit, it means that the current cache quantity is seriously overflowed, and the fourth preset adjustment information with a larger amplitude (larger absolute value) is determined as the target adjustment information to reduce the occurrence of data overflow.
[0195] The above scheme sets the upper and lower limits of the water level to accurately know the degree of insufficient or overflow of the cached output samples, and adopts the corresponding preset adjustment information, which not only meets the adjustment needs, but also reduces the occurrence of uncached output samples and data overflow.
[0196] See also Fig. 9 As shown in the spectrum diagram, if the ASRC node directly adjusts the decimation rate to the above target decimation rate, distortion may occur when adjusting the decimation rate;
[0197] Based on this, the above step S408 can be implemented by but not limited to the following methods:
[0198] Determining a decimation rate difference between the target decimation rate and the decimation rate before ASRC adjustment;
[0199] Determine a single adjustment decimation rate based on the decimation rate difference and a preset number of adjustments;
[0200] Based on the single adjusted decimation rate, the decimation rate of the ASRC is adjusted to the target decimation rate.
[0201] This embodiment adopts a "gradual" decimation rate adjustment method, that is, instead of adjusting the ASRC from the decimation rate before adjustment (the decimation rate before this adjustment, not the initial decimation rate) to the target decimation rate at one time, the decimation rate difference between the target decimation rate and the decimation rate before ASRC adjustment is first determined, and the decimation rate difference is the total decimation rate adjustment amount; further, based on the decimation rate difference and the preset number of adjustments, a single adjustment decimation rate is determined, that is, the decimation rate for each adjustment; multiple adjustments are made based on the single adjustment decimation rate to adjust the decimation rate of ASRC to the target decimation rate.
[0202] This embodiment does not make any specific limitation on the preset adjustment times, such as setting a preset adjustment number according to the actual scenario; or setting multiple preset adjustment numbers, and selecting one of the preset adjustment numbers based on the decimation rate difference (such as the larger the decimation rate difference, the larger the corresponding preset adjustment number).
[0203] See also Fig.10 As shown in the figure, the “gradual” decimation rate adjustment method is adopted, and almost no distortion occurs when the decimation rate is adjusted.
[0204] The above scheme adopts a "gradual" decimation rate adjustment method to reduce the distortion when the decimation rate is adjusted, making the audio signal more stable.
[0205] In some optional implementations, the above-mentioned adjustment of the decimation rate of the ASRC to the target decimation rate may be achieved by, but not limited to, the following methods:
[0206] Based on the (i-1)th decimation rate and the single adjusted decimation rate, obtaining the (i)th decimation rate;
[0207] Performing sampling rate conversion on the ith input sample point after the decimation rate adjustment based on the ith decimation rate, and outputting the ith output sample point after the decimation rate adjustment, until the decimation rate of the ASRC is adjusted to the target decimation rate;
[0208] Among them, 0≤i≤n; the difference between the i-th decimation rate and the i-1-th decimation rate is the single adjustment decimation rate; the 0th decimation rate is the decimation rate before the adjustment; and the nth decimation rate is the target decimation rate.
[0209] Exemplarily, a first decimation rate is obtained based on the decimation rate before adjustment and the single adjustment decimation rate; a sampling rate conversion is performed on the first input sample point after the decimation rate adjustment based on the first decimation rate, and a first output sample point after the decimation rate adjustment is output;
[0210] Based on the first decimation rate and the above-mentioned single adjustment decimation rate, a second decimation rate is obtained; based on the second decimation rate, a sampling rate conversion is performed on the second input sample point after the decimation rate is adjusted, and a second output sample point after the decimation rate is adjusted is output; ...;
[0211] Based on the n-1th decimation rate and the above-mentioned single adjustment decimation rate, the nth decimation rate is obtained, thereby completing the adjustment of the ASRC decimation rate this time.
[0212] In the embodiment of the present application, the sampling rate conversion method performed by the control node is as follows: Fig.11 As shown, the following steps are included:
[0213] Step S1101: after the cache quantity of output samples in the cache node reaches a preset reference quantity for the first time, control the cache node to output the output samples at a preset output sampling rate; wherein the output samples in the cache node are obtained after the ASRC node performs sampling rate conversion on the input samples and transmits them to the cache node;
[0214] Step S1102: determining a target extraction rate based on the cache quantity;
[0215] Step S1103: Based on the target decimation rate, control the ASRC node to adjust the decimation rate.
[0216] In some optional implementation manners, the cache node is provided with redundant areas corresponding to the preset reference quantity; before determining the target extraction rate based on the cache quantity, the method further includes:
[0217] It is determined that the cache quantity is not in the redundant area.
[0218] In some optional implementations, determining a target extraction rate based on the cache quantity includes:
[0219] Compare the cache quantity with the water level limit, and determine the target adjustment information based on the comparison result; or,
[0220] Determine a quantity difference between the cache quantity and the preset reference quantity, and determine adjustment information corresponding to the quantity difference as target adjustment information based on a preset corresponding relationship; wherein the preset corresponding relationship includes a mapping between a preset difference and the adjustment information;
[0221] A target decimation rate corresponding to the target adjustment information is determined.
[0222] In some optional implementations, the water level limit includes an upper water level limit and a lower water level limit; the control node compares the cache quantity with the water level limit, and determines the target adjustment information based on the comparison result, including:
[0223] If the cache quantity is less than the minimum value of the redundant area and greater than the lower limit of the water level, the first preset adjustment information is determined as the target adjustment information;
[0224] If the cache quantity is less than or equal to the lower water level limit, determining the second preset adjustment information as the target adjustment information;
[0225] If the cache quantity is greater than the maximum value of the redundant area and less than the upper watermark limit, determining the third preset adjustment information as the target adjustment information;
[0226] If the cache quantity is greater than or equal to the upper water level limit, determining the fourth preset adjustment information as the target adjustment information;
[0227] Among them, the absolute value of the first preset adjustment information is smaller than the absolute value of the second preset adjustment information; the absolute value of the third preset adjustment information is smaller than the absolute value of the fourth preset adjustment information.
[0228] In the embodiment of the present application, the sampling rate conversion method performed by the ASRC node is as follows: Fig.12 As shown, the following steps are included:
[0229] Step S1201: performing sampling rate conversion on input samples to obtain output samples;
[0230] Step S1202: transmitting the converted output sample points to the cache node, so that after the cache quantity of the output sample points in the cache node reaches the preset reference quantity for the first time, the control node controls the cache node to output the output sample points at a preset output sampling rate;
[0231] Step S1203: receiving a target decimation rate sent by the control node, and adjusting the decimation rate based on the target decimation rate; wherein the target decimation rate is determined based on the cache quantity after the control node controls the cache node to output the output sample points at a preset output sampling rate.
[0232] In some optional implementations, adjusting the decimation rate based on the target decimation rate includes:
[0233] Determining a decimation rate difference between the target decimation rate and the decimation rate before ASRC adjustment;
[0234] Determine a single adjustment decimation rate based on the decimation rate difference and a preset number of adjustments;
[0235] Based on the single adjusted decimation rate, the decimation rate of the ASRC is adjusted to the target decimation rate.
[0236] In some optional implementations, based on the single adjustment of the decimation rate, adjusting the decimation rate of the ASRC to the target decimation rate includes:
[0237] Based on the (i-1)th decimation rate and the single adjusted decimation rate, obtaining the (i)th decimation rate;
[0238] Performing sampling rate conversion on the ith input sample point after the decimation rate adjustment based on the ith decimation rate, and outputting the ith output sample point after the decimation rate adjustment, until the decimation rate of the ASRC is adjusted to the target decimation rate;
[0239] Among them, 0≤i≤n; the difference between the i-th decimation rate and the i-1-th decimation rate is the single adjustment decimation rate; the 0th decimation rate is the decimation rate before the adjustment; and the nth decimation rate is the target decimation rate.
[0240] Figure 11-12 The specific implementation of the embodiment can refer to the implementation of the above-mentioned interaction method, and the repeated parts will not be repeated.
[0241] like Fig.13 As shown, based on Fig.11 The same inventive concept as the sampling rate conversion method shown in FIG. 1 is the same inventive concept as the sampling rate conversion method shown in FIG. 1 , the embodiment of the present application provides a first sampling rate conversion device 1300, which is applied to a control node, and the device includes:
[0242] The output control module 1301 is used to control the cache node to output the output samples at a preset output sampling rate after the cache quantity of the output samples in the cache node reaches a preset reference quantity for the first time; wherein the output samples in the cache node are obtained after the ASRC node performs sampling rate conversion on the input samples and transmits them to the cache node;
[0243] A decimation rate determination module 1302, configured to determine a target decimation rate based on the cache quantity;
[0244] The decimation rate control module 1303 is used to control the ASRC node to adjust the decimation rate based on the target decimation rate.
[0245] In some optional implementations, the cache node is provided with redundant areas corresponding to the preset reference quantity; before determining the target extraction rate based on the cache quantity, the extraction rate determination module 1302 is further used to:
[0246] It is determined that the cache quantity is not in the redundant area.
[0247] In some optional implementations, the decimation rate determination module 1302 is specifically configured to:
[0248] Compare the cache quantity with the water level limit, and determine the target adjustment information based on the comparison result; or,
[0249] Determine a quantity difference between the cache quantity and the preset reference quantity, and determine adjustment information corresponding to the quantity difference as target adjustment information based on a preset corresponding relationship; wherein the preset corresponding relationship includes a mapping between a preset difference and the adjustment information;
[0250] A target decimation rate corresponding to the target adjustment information is determined.
[0251] In some optional implementation manners, the water level limit includes an upper water level limit and a lower water level limit; the extraction rate determination module 1302 is specifically used to:
[0252] If the cache quantity is less than the minimum value of the redundant area and greater than the lower limit of the water level, the first preset adjustment information is determined as the target adjustment information;
[0253] If the cache quantity is less than or equal to the lower water level limit, determining the second preset adjustment information as the target adjustment information;
[0254] If the cache quantity is greater than the maximum value of the redundant area and less than the upper watermark limit, determining the third preset adjustment information as the target adjustment information;
[0255] If the cache quantity is greater than or equal to the upper water level limit, determining the fourth preset adjustment information as the target adjustment information;
[0256] Among them, the absolute value of the first preset adjustment information is smaller than the absolute value of the second preset adjustment information; the absolute value of the third preset adjustment information is smaller than the absolute value of the fourth preset adjustment information.
[0257] like Fig.14 As shown, based on Fig.12 The same inventive concept as the sampling rate conversion method shown in FIG. 1 is the same inventive concept as the sampling rate conversion method shown in FIG. 1 , the embodiment of the present application provides a second sampling rate conversion device 1400, which is applied to an ASRC node, and the device includes:
[0258] The conversion module 1401 is used to perform sampling rate conversion on the input samples to obtain output samples;
[0259] The transmission module 1402 is used to transmit the converted output sample points to the cache node, so that the control node controls the cache node to output the output sample points at a preset output sampling rate after the cache quantity of the output sample points in the cache node reaches a preset reference quantity for the first time;
[0260] The sampling rate adjustment module 1403 is used to receive the target decimation rate sent by the control node and adjust the decimation rate based on the target decimation rate; wherein the target decimation rate is determined based on the cache quantity after the control node controls the cache node to output the output sample points at a preset output sampling rate.
[0261] In some optional implementations, the sampling rate adjustment module 1403 is specifically configured to:
[0262] Determining a decimation rate difference between the target decimation rate and the decimation rate before ASRC adjustment;
[0263] Determine a single adjustment decimation rate based on the decimation rate difference and a preset number of adjustments;
[0264] Based on the single adjusted decimation rate, the decimation rate of the ASRC is adjusted to the target decimation rate.
[0265] In some optional implementations, the sampling rate adjustment module 1403 is specifically configured to:
[0266] Based on the (i-1)th decimation rate and the single adjusted decimation rate, obtaining the (i)th decimation rate;
[0267] Performing sampling rate conversion on the ith input sample point after the decimation rate adjustment based on the ith decimation rate, and outputting the ith output sample point after the decimation rate adjustment, until the decimation rate of the ASRC is adjusted to the target decimation rate;
[0268] Among them, 0≤i≤n; the difference between the i-th decimation rate and the i-1-th decimation rate is the single adjustment decimation rate; the 0th decimation rate is the decimation rate before the adjustment; and the nth decimation rate is the target decimation rate.
[0269] Figure 13-14 The specific implementation of the embodiment can refer to the implementation of the above-mentioned interaction method, and the repeated parts will not be repeated.
[0270] Based on the same technical concept, the embodiment of the present application also provides a control node 1500, such as Fig.15 As shown, it includes at least one processor 1501 and a memory 1502 connected to the at least one processor. The specific connection medium between the processor 1501 and the memory 1502 is not limited in the embodiment of the present application. Fig.15 For example, the processor 1501 and the memory 1502 are connected via a bus 1503. The bus can be divided into a path bus, a data bus, a control bus, etc. For ease of representation, Fig.15 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0271] Among them, the processor 1501 is the control center of the control node, and can use various interfaces and lines to connect various parts of the control node, and realize data processing by running or executing instructions stored in the memory 1502 and calling data stored in the memory 1502. Optionally, the processor 1501 may include one or more processing units, and the processor 1501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application program, etc., and the modem processor mainly processes the issued instructions. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1501. In some embodiments, the processor 1501 and the memory 1502 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0272] Processor 1501 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the sampling rate conversion method can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
[0273] Memory 1502, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory 1502 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. Memory 1502 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1502 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0274] In the embodiment of the present application, the memory 1502 stores a computer program. When the program is executed by the processor 1501, the processor 1501 executes:
[0275] After the cache quantity of output sample points in the cache node reaches a preset reference quantity for the first time, the cache node is controlled to output the output sample points at a preset output sampling rate; wherein the output sample points in the cache node are obtained after the ASRC node performs sampling rate conversion on the input sample points and transmitted to the cache node;
[0276] Determining a target decimation rate based on the cache quantity;
[0277] Based on the target decimation rate, the ASRC node is controlled to adjust the decimation rate.
[0278] In some optional implementations, the cache node is provided with redundant areas corresponding to the preset reference quantity; before determining the target extraction rate based on the cache quantity, the processor 1501 further executes:
[0279] It is determined that the cache quantity is not in the redundant area.
[0280] In some optional implementation manners, the processor 1501 specifically performs:
[0281] Compare the cache quantity with the water level limit, and determine the target adjustment information based on the comparison result; or,
[0282] Determine a quantity difference between the cache quantity and the preset reference quantity, and determine adjustment information corresponding to the quantity difference as target adjustment information based on a preset corresponding relationship; wherein the preset corresponding relationship includes a mapping between a preset difference and the adjustment information;
[0283] A target decimation rate corresponding to the target adjustment information is determined.
[0284] In some optional implementation manners, the water level limit includes an upper water level limit and a lower water level limit; the control node, the processor 1501 specifically executes:
[0285] If the cache quantity is less than the minimum value of the redundant area and greater than the lower limit of the water level, the first preset adjustment information is determined as the target adjustment information;
[0286] If the cache quantity is less than or equal to the lower water level limit, determining the second preset adjustment information as the target adjustment information;
[0287] If the cache quantity is greater than the maximum value of the redundant area and less than the upper watermark limit, determining the third preset adjustment information as the target adjustment information;
[0288] If the cache quantity is greater than or equal to the upper water level limit, determining the fourth preset adjustment information as the target adjustment information;
[0289] Among them, the absolute value of the first preset adjustment information is smaller than the absolute value of the second preset adjustment information; the absolute value of the third preset adjustment information is smaller than the absolute value of the fourth preset adjustment information.
[0290] Based on the same technical concept, an embodiment of the present application further provides an ASRC node, including at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes:
[0291] Perform sampling rate conversion on the input sample points to obtain output sample points;
[0292] Transmitting the converted output sample points to the cache node, so that after the cache quantity of the output sample points in the cache node reaches the preset reference quantity for the first time, the control node controls the cache node to output the output sample points at a preset output sampling rate;
[0293] Receive the target decimation rate sent by the control node, and adjust the decimation rate based on the target decimation rate; wherein the target decimation rate is determined by the control node based on the cache quantity after controlling the cache node to output the output sample points at a preset output sampling rate.
[0294] In some optional implementations, the processor specifically performs:
[0295] Determining a decimation rate difference between the target decimation rate and the decimation rate before ASRC adjustment;
[0296] Determine a single adjustment decimation rate based on the decimation rate difference and a preset number of adjustments;
[0297] Based on the single adjusted decimation rate, the decimation rate of the ASRC is adjusted to the target decimation rate.
[0298] In some optional implementations, the processor specifically performs:
[0299] Based on the (i-1)th decimation rate and the single adjusted decimation rate, obtaining the (i)th decimation rate;
[0300] Performing sampling rate conversion on the ith input sample point after the decimation rate adjustment based on the ith decimation rate, and outputting the ith output sample point after the decimation rate adjustment, until the decimation rate of the ASRC is adjusted to the target decimation rate;
[0301] Among them, 0≤i≤n; the difference between the i-th decimation rate and the i-1-th decimation rate is the single adjustment decimation rate; the 0th decimation rate is the decimation rate before the adjustment; and the nth decimation rate is the target decimation rate.
[0302] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program executable by a processor. When the program runs on the processor, the processor executes the steps of the above-mentioned sampling rate conversion method.
[0303] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0304] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0305] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0306] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0307] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0308] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A sampling rate conversion system, characterized in that: It includes asynchronous sampling rate conversion ASRC nodes, cache nodes, monitoring nodes and control nodes; The ASRC node is used to perform sampling rate conversion on the input sample points to obtain output sample points, and transmit the output sample points to the cache node; The cache node is used to cache the output sample points transmitted by the ASRC node; The monitoring node is used to monitor the cache quantity of the output sample points in the cache node and send the cache quantity to the control node; The control node is used to control the cache node to output the output sample points at a preset output sampling rate after the cache quantity reaches a preset reference quantity for the first time; The control node is further configured to determine a target decimation rate based on the cache quantity after controlling the cache node to output the output sample points at a preset output sampling rate, and send the target decimation rate to the ASRC node; The ASRC node is further used to adjust the decimation rate based on the target decimation rate.
2. The system according to claim 1, characterized in that It also includes input nodes and output nodes; The input node is used to transmit the input sample point to the ASRC node; The output node is used to receive the output sample points output by the cache node.
3. The system according to claim 1, characterized in that The cache node is provided with a redundant area corresponding to the preset reference quantity; before determining the target extraction rate based on the cache quantity, the control node is further used to: It is determined that the cache quantity is not in the redundant area.
4. The system according to claim 3, characterized in that The control node is specifically used for: Compare the cache quantity with the water level limit, and determine the target adjustment information based on the comparison result; or, Determine a quantity difference between the cache quantity and the preset reference quantity, and determine adjustment information corresponding to the quantity difference as target adjustment information based on a preset corresponding relationship; wherein the preset corresponding relationship includes a mapping between a preset difference and the adjustment information; A target decimation rate corresponding to the target adjustment information is determined.
5. The system according to claim 4, characterized in that The water level limit includes an upper water level limit and a lower water level limit; the control node is specifically used to: If the cache quantity is less than the minimum value of the redundant area and greater than the lower limit of the water level, the first preset adjustment information is determined as the target adjustment information; If the cache quantity is less than or equal to the lower water level limit, determining the second preset adjustment information as the target adjustment information; If the cache quantity is greater than the maximum value of the redundant area and less than the upper watermark limit, determining the third preset adjustment information as the target adjustment information; If the cache quantity is greater than or equal to the upper water level limit, determining the fourth preset adjustment information as the target adjustment information; Among them, the absolute value of the first preset adjustment information is smaller than the absolute value of the second preset adjustment information; the absolute value of the third preset adjustment information is smaller than the absolute value of the fourth preset adjustment information.
6. The system according to claim 1, wherein: The ASRC node is specifically used for: Determining a decimation rate difference between the target decimation rate and the decimation rate before ASRC adjustment; Determine a single adjustment decimation rate based on the decimation rate difference and a preset number of adjustments; Based on the single adjusted decimation rate, the decimation rate of the ASRC is adjusted to the target decimation rate.
7. The system according to claim 6, characterized in that The ASRC node is specifically used for: Based on the (i-1)th decimation rate and the single adjusted decimation rate, obtaining the (i)th decimation rate; Performing sampling rate conversion on the ith input sample point after the decimation rate adjustment based on the ith decimation rate, and outputting the ith output sample point after the decimation rate adjustment, until the decimation rate of the ASRC is adjusted to the target decimation rate; Among them, 0≤i≤n; the difference between the i-th decimation rate and the i-1-th decimation rate is the single adjustment decimation rate; the 0th decimation rate is the decimation rate before the adjustment; and the nth decimation rate is the target decimation rate.
8. A sampling rate conversion method, characterized in that: Applied to a control node, the method comprises: After the cache quantity of output sample points in the cache node reaches a preset reference quantity for the first time, the cache node is controlled to output the output sample points at a preset output sampling rate; wherein the output sample points in the cache node are obtained after the asynchronous sampling rate conversion ASRC node performs sampling rate conversion on the input sample points and is transmitted to the cache node; Determining a target decimation rate based on the cache quantity; Based on the target decimation rate, the ASRC node is controlled to adjust the decimation rate.
9. A sampling rate conversion method, characterized in that: Applied to an asynchronous sampling rate conversion (ASRC) node, the method comprises: Perform sampling rate conversion on the input sample points to obtain output sample points; Transmitting the converted output sample points to the cache node, so that after the cache quantity of the output sample points in the cache node reaches the preset reference quantity for the first time, the control node controls the cache node to output the output sample points at a preset output sampling rate; Receive the target decimation rate sent by the control node, and adjust the decimation rate based on the target decimation rate; wherein the target decimation rate is determined by the control node based on the cache quantity after controlling the cache node to output the output sample points at a preset output sampling rate.
10. A sampling rate conversion device, characterized in that: Applied to a control node, the device comprises: An output control module, used for controlling the cache node to output the output samples at a preset output sampling rate after the cache quantity of the output samples in the cache node reaches a preset reference quantity for the first time; wherein the output samples in the cache node are obtained after the asynchronous sampling rate conversion ASRC node performs sampling rate conversion on the input samples and transmits them to the cache node; An extraction rate determination module, used to determine a target extraction rate based on the cache quantity; The decimation rate control module is used to control the ASRC node to adjust the decimation rate based on the target decimation rate.
11. A sampling rate conversion device, characterized in that: Applicable to asynchronous sampling rate conversion ASRC node, the device comprises: A conversion module, used for performing sampling rate conversion on input samples to obtain output samples; A transmission module, used for transmitting the converted output sample points to the cache node, so that after the cache quantity of the output sample points in the cache node reaches a preset reference quantity for the first time, the control node controls the cache node to output the output sample points at a preset output sampling rate; A sampling rate adjustment module is used to receive the target decimation rate sent by the control node and adjust the decimation rate based on the target decimation rate; wherein the target decimation rate is determined by the control node based on the cache quantity after controlling the cache node to output the output sample points at a preset output sampling rate.