USB - Battery Charing

Getting to the bottom of USB Battery Charging (了解 USB 電池充電的真相)

如今,幾乎所有帶電池的產品都被期望支持 BC1.2 USB 充電標準。

Today, almost every product with a battery is expected to support the BC1.2 standard for USB charging.

這對消費者來說是個好消息。USB Type-C? Power Delivery 目前支持高達 240W 的充電功率,并且向下兼容。BC1.2 定義的充電端口可使便攜式設備吸收更多電流,這意味著充電速度更快。BC1.2 還為未來的快速充電技術奠定了基礎。不過,這也意味著使用 USB Type-C 插座并支持 Power Delivery 的流行 USB-C 充電器和筆記本電腦的制造商必須確保其產品支持 BC1.2,并通過 BC1.2 認證測試。

That’s good news for consumers. USB Type-C? Power Delivery currently supports charging at up to 240W and is also downward compatible. The BC1.2-defined charging port enables portable devices to absorb more current, which means quicker charging. BC1.2 also lays the foundation for future quick charge technologies. However, it also means that manufacturers of popular USB-C chargers and laptops that use a USB Type-C receptacle and support Power Delivery, must ensure their products support BC1.2 and pass the BC1.2 test for certification.

本文旨在介紹 BC1.2 認證的基本操作原理和測試項目,幫助制造商減少設計中遇到的問題,順利通過測試。

This article is aimed at providing an understanding of the basic operational principles and test items for BC1.2 certification, to help manufacturers reduce the problems encountered in design, and pass tests smoothly.

1,Introduction to BC 1.2 (BC 1.2 介紹)

基于 USB 2.0 的 Vbus 電源可提供 500mA 的最大供電電流。但是,移動電話等便攜設備的充電時間較長。

A Vbus power supply based on USB 2.0 can provide a maximum supply current of 500mA. However, a portable device such as a mobile phone can take a long time to recharge.

2010 年 10 月發布的 USB-IF 電池充電 1.2 規范要求便攜式設備在連接 USB 主機或集線器充電時吸收最大電流 1500mA(相當于 USB 2.0 的三倍)。這樣,設備就能在原來三分之一的時間內完成充電。

The USB-IF’s Battery Charging 1.2 specification, which was issued in October 2010, requires portable devices to absorb a maximum current of 1500mA (equivalent to three times that of USB 2.0) during charging when connecting to a USB host or a hub. This enables the device to be recharged in a third of the original time.

便攜式設備和 USB 主機或集線器都需要支持 BC1.2,通過檢測 USB D+ 和 D- 觸點來確認是否支持BC 1.2。一旦檢測完成并確認支持 BC1.2,Vbus 就會提供 1500mA 的充電電流。

The portable device and USB host or hub both need to support BC1.2, which detects the USB D+ and D- contacts. Once this is complete and support for BC1.2 is confirmed, Vbus provides 1500mA current for recharging.

2,Charging capacity comparison (充電能力比較)

支持 BC1.2 的手機的充電能力會有所不同,這取決于手機是通過標準 USB3 端口(SDP)連接到筆記本電腦,還是通過支持 BC1.2 的 USB3(CDP)連接到筆記本電腦?

The charging capacity of mobile phones supporting BC1.2 varies, depending on whether they connect to laptops via standard USB3 ports (SDP) or laptops with USB3 supporting BC1.2 (CDP)?

當手機連接到帶有標準 USB3 端口(不支持 BC1.2)的筆記本電腦時,最大可吸收電流為 900mA。

When the mobile phone connects to a laptop with standard USB3 ports (not supporting BC1.2), the maximum absorbable current is 900mA.

  • 當手機已連接、未配置且未進入暫停狀態時,最大可吸收電流為 100 mA。

  • 當手機已連接、已配置且未進入暫停狀態時,最大可吸收電流為 900 mA(USB 3.2 為 900 mA,USB 2.0 為 500mA)。

  • 當手機已連接、已配置并進入暫停狀態時,最大可吸收電流為 2.5 mA。

  • When the mobile phone is connected, unconfigured, and has not entered the Suspend state, the maximum absorbable current is 100 mA.

  • When the mobile phone is connected, configured, and has not entered the Suspend state, the maximum absorbable current is 900 mA (900 mA for USB 3.2, 500mA for USB 2.0).

  • When the mobile phone is connected, configured, and has entered the Suspend state, the maximum absorbable current is 2.5 mA.

根據規范,在未配置的情況下,如果便攜式設備的電池處于 "死電 "或 "弱電 "狀態,最大可吸收電流應為 100 mA。(弱電池狀態意味著可以用最小的能量啟動設備,而死機狀態則意味著無法啟動設備)。

According to the specification, without being configured, if the battery of a portable device is in the Dead or Weak state, the maximum absorbable current should be 100 mA. (a Weak battery state means the device can be started with the minimum of energy, while the Dead state means the device cannot be started)

SDP(標準下游端口)是指不支持 BC1.2 的標準端口。

SDP (Standard Downstream Port) refers to a standard port that does not support BC1.2

CDP(充電下游端口)是指支持 BC1.2 的標準端口。

CDP (Charging Downstream Port) refers to a standard port that supports BC1.2

不過,當手機連接到支持 BC1.2 的 USB3 筆記本電腦時,無需配置即可吸收 1.5 A 的最大電流。

However, when the mobile phone connects to the laptop with USB3 supporting BC1.2, it can absorb a maximum current of 1.5 A without being configured.

3,Common BC 1.2 types (常用BC 1.2 類型)

對于標準 USB 下游端口,Vbus 可提供 500mA (USB2.0)或 900mA (USB3.2)電流,而 BC1.2 充電端口可提供 1.5A 電流。BC1.2 充電端口還可分為支持 USB 數據的 CDP(充電下游端口)和用于充電的 DCP(專用充電端口)。

For standard USB downstream ports, Vbus can supply 500mA (USB2.0) or 900mA (USB 3.2), while a BC1.2 charging port can supply 1.5A. The BC1.2 charging port can also be divided into CDP (Charging Downstream Port) to support USB Data, and DCP (Dedicated Charging Port) for charging.

  • CDP(下游充電端口): 該 USB 端口具有更高的充電能力。它提供 USB 數據傳輸,還能為兼容 BC1.2 的設備提供最大 1.5 A 的電流。

  • DCP(專用充電端口): 該端口是一種不帶 USB 數據傳輸功能的 CDP,可為 BC1.2 便攜式設備提供 4.75V-5.5V 的電壓和 1.5A 的充電電流。DCP 將在 D+ 和 D- 之間橋接一個電阻 R。

  • ACA(附件充電器適配器): ACA 有一個用于充電的充電器端口、一個用于便攜設備的 OTG 端口和一個用于其他設備的附件端口。ACA 可使便攜設備在充電的同時連接其他設備。

  • ACA-Dock: ACA-Dock 有一個上游端口(Micro-A 插頭)和多個或沒有下游端口。當連接到 ACA-Dock 上游端口時,便攜式設備可吸收的最大電流為 1.5 A。ACA 和 ACA-Dock 的最大區別在于 ACA 支持 OTG 端口,可以作為 A 設備或 B 設備連接便攜設備。

  • CDP (Charging Downstream Port): This USB Port has a higher charging capacity. It offers USB data transmission and is also capable of supplying a maximum current of 1.5 A to a BC1.2 compatible device.

  • DCP (Dedicated Charging Port): A CDP without USB data transmission, this port can supply a voltage of 4.75V-5.5V and a charging current of 1.5A to a BC1.2 portable device. A DCP will have a resistance R bridged between D+ and D-.

  • ACA (Accessory Charger Adaptor): ACA has one Charger Port for charging, one OTG Port for a portable device and one Accessory Port for other devices. ACA enables the portable device to connect to other devices while being recharged.

  • ACA-Dock: ACA-Dock has one Upstream Port (Micro-A plug) and more than one or no Downstream Ports. The portable device can absorb a maximum current of 1.5 A when connected to an ACA-Dock Upstream Port. The biggest difference between ACA and ACA-Dock is that ACA supports an OTG Port and can connect to a portable device as an A-Device or a B-Device.

4,SDP, CDP and DCP Comparison (充電對比表)

5,Five Steps to Check for BC1.2 Charging Support (檢查 BC1.2 充電支持的五個步驟)

支持 BC1.2 的手機如何知道自己連接的是支持 BC1.2 的 SDP、CDP 還是 DCP?圖 1(如下)展示了一個簡單的流程,圖 2 則提供了更詳細的說明。

How can a mobile phone that supports BC1.2 know whether it is connected to an SDP, a CDP or a DCP supporting BC1.2? Figure 1 (below) illustrates a simple flow, while Figure 2 offers a more detailed description.

圖1:Simple Steps to Check for BC1.2 Charging Support (檢查是否支持 BC1.2 充電的簡單步驟)

圖2:?Detailed Steps to Check for BC1.2 Charging Support (檢查是否支持 BC1.2 充電的詳細步驟)

5.1?VBUS Detect (VBUS檢測):

手機連接到 USB 充電端口。當檢測到 Vbus 電壓大于內部有效電壓閾值時,表示手機連接到了有效電路。

The mobile phone connects to a USB charging port. When it detects a Vbus voltage which is greater than the internal effective voltage threshold, it means that the mobile phone is connected to an effective circuit.

5.2 Data Contact Detect (DCD) (數據觸點檢測 ):

手機檢測所連接的充電端口是否支持 BC1.2。手機在 D+ 上輸出電流(IDP_SRC),然后檢測 D- 上的電壓值,以確認 D+/D- 引腳是否成功連接。由于不要求手機支持 DCD,因此采用了另一種機制:手機將在一段時間(TDCD_TIMEOUT)后進入步驟 3 進行檢測。DCD 的優點是,手機可以在判斷連接成功后立即進入步驟 3 進行檢測,從而減少等待時間。

The mobile phone detects whether the connected charging port supports BC1.2. The phone outputs current on D+ (IDP_SRC) and then detects the voltage value on D- to confirm whether the D+/D- pins are successfully connected. As the mobile phone is not required to support DCD, another mechanism is used: the mobile phone will enter Step 3 for detection after a period of time (TDCD_TIMEOUT). The advantage of DCD is that the mobile phone can enter Step 3 for detection immediately after judging that connection is successful, thus reducing waiting time.

判斷適配器是否完全接入手機USB座子。判斷完VBUS接入后,隨后即是判斷數據信號的連接是否到位。當Attached時,手機端的D+的IDP_SRC(大概10uA)打開,因為D+端接了一個電阻RDP_DWN(20K左右)下地,所以D+會存在一定的小電壓200mV,當電壓小于參考值時,說明USB接入良好。所以在波形上看D+最前端存在一個非常小的電壓起伏。

然而DCD的檢測并不是必須要執行,如果沒有執行DCD的檢測,協議會在VBUS有效后的T DCD_TIMEOUT開始執行后面的步驟(后面的波形是沒有執行DCD檢測的情況)。

5.3 Primary Detection(主要檢測):

手機會檢測所連接的充電端口是否支持 BC1.2。也就是說,手機會檢測所連接的是 SDP、CDP 還是 DCP。手機將在 D+ 上提供一個電壓(VDP_SRC),然后比較 D- 上的 VDM 和 VDAT_REF。

The mobile phone detects whether the charging port connected supports BC1.2. That is to say, the mobile phone detects whether it is connected to an SDP, CDP or DCP. The mobile phone will supply a voltage (VDP_SRC) on D+ and then compare VDM and VDAT_REF on D-.

如果 VDM 大于 VDAT_REF,則可能連接的是 CDP 或 DCP,然后繼續執行步驟 4。

如果 VDM 小于 VDAT_REF,則肯定連接的是 SDP,過程結束。

If VDM is greater than VDAT_REF, it may be connected to a CDP or a DCP, and proceed to Step 4 for

If VDM is less than VDAT_REF, it is definitely connected to an SDP and the process is complete.

5.4?Secondary Detection(二次檢測):

二次檢測確認與手機連接的 BC1.2 充電端口是否支持 USB 數據傳輸(DCP 或 CDP)。手機將在 D- 端提供一個電壓(VDM_SRC),然后比較 D+ 端的 VDP 和 VDAT_REF。

Secondary detection confirms whether the BC1.2 charging port connected to the mobile phone support USB Data transmission (DCP or CDP). The mobile phone will supply a voltage (VDM_SRC) on D-, and then compare VDP and VDAT_REF on D+.

a,如果 VDP 大于 VDAT_REF,則連接到 DCP。

b,如果 VDP 小于 VDAT_REF,則連接至 CDP

a. If VDP is greater than VDAT_REF, it is connected to a DCP

b. If VDP is less than VDAT_REF, it is connected to a CDP

5.5 ACA Detection (ACA檢測):

ACA 檢測僅針對帶有 Micro-AB 接口的便攜式設備。便攜式設備會檢測是否連接到 ACA 充電端口,并確定設備類型。它主要通過檢測 ID 引腳上的五個不同電阻來進行判斷。

ACA Detection is conducted only for a portable device with a Micro-AB socket. The portable device detects whether it is connected to an ACA charging port and determines the device type. It mainly makes this determination by detecting the five different resistances on the ID pin.

6,?How BC1.2 Mobile Phones Determine If They Are Connected via SDP, CDP or DCP?

[ BC1.2 移動電話如何確定連接的是 SDP、CDP 或 DCP ]

6.1?Case (I) BC1.2 mobile phone connects to SDP (no BC1.2 support)

[ 第一種情況,BC1.2 移動電話連接到 SDP(不支持 BC1.2) ]

a. 手機(便攜設備)連接至 SDP 并檢測到與 VBUS 的連接(VBUS > VOTG_SESS_VLD)。

b. DCD 檢測超時

c. 移動電話在 D+ 上提供電壓 VDP_SRC (0.5V - 0.7V),通過 SDP 上的 RDP_DWN (14.25 - 24.8kΩ)連接到地,然后比較 D- 上的 VDM 和 VDAT_REF。

?? ?如果 VDM(0V)小于 VDAT_REF(0.25V - 0.4V),則表示它已連接到 SDP,過程完成。

a. The mobile phone (Portable Device) connects to SDP and detects connection to VBUS (VBUS > VOTG_SESS_VLD)

b. DCD detection timeout

c. The mobile phone supplies a voltage VDP_SRC (0.5V - 0.7V) on D+, connects to ground via RDP_DWN (14.25 - 24.8k?) on SDP, and then compares VDM and VDAT_REF on D-

At this time, if VDM =0 V. If VDM (0V) is less than VDAT_REF (0.25V - 0.4V), it means it is connected to SDP, and that the process is complete

6.2?Case (II) BC1.2 mobile phone connects to CDP?

[?第二種情況,BC1.2 移動電話連接到 CDP?]

圖4: Primary Detection, CDP and Secondary Detection, CDP

a. 手機連接到 CDP 并檢測到 V BUS(V BUS > V OTG_SESS_VLD )連接

b. DCD 檢測超時

c. 初級檢測(圖 4 - 左): 手機在 D+ 上提供電壓 VDP_SRC (0.5V - 0.7V),并通過 CDP 上的 RDP_DWN (14.25 - 24.8kΩ) 與地連接

? ? i.?CDP 檢測 D+=VDP_SRC (0.5V-0.7V),然后啟用 CDP 的 VDM_SRC (0.5V-0.7V)

? ? ii.?如果手機檢測到 D-=VDM_SRC (0.5V-0.7V),大于 VDAT_REF (0.25V-0.4V),則連接至 CDP 或 DCP

d. 二次檢測(圖 4 - 右): 手機在 D- 上提供一個電壓 VDM_SRC(0.5V-0.7V)。

? ? i.?此時,D+ ≈0 V,如果手機 DCP_DET 檢測到 D+ 小于 VDAT_REF(0.25V-0.4V),則將其連接至 CDP。

? ? ii.?然后,手機禁用 VDP_SRC 和 VDM_SRC,并將 D+ 和 D- 保持在低電位。

a. The mobile phone connects to CDP and detects a V BUS (V BUS > V OTG_SESS_VLD ) connection

b. DCD detection timeout

c. Primary detection (Figure 4 – left): The mobile phone supplies a voltage VDP_SRC (0.5V - 0.7V) on D+, and connects to ground via RDP_DWN (14.25 - 24.8k?) on CDP

? ? i. CDP detects D+=VDP_SRC (0.5V-0.7V), and then enables VDM_SRC (0.5V-0.7V) of CDP

? ? ii. If the mobile phone detects D-=VDM_SRC (0.5V-0.7V), greater than VDAT_REF (0.25V-0.4V), it is connected to CDP or DCP

d. Secondary detection (Figure 4 – Right): The mobile phone supplies a voltage VDM_SRC (0.5V-0.7V) on D-

? ? i. At this time, D+ ≈0 V, if the mobile phone DCP_DET detects that D+ is less than VDAT_REF (0.25V-0.4V), it is connected to CDP

? ? ii. Then the mobile phone disables VDP_SRC and VDM_SRC, and keeps D+ and D- at low potential

6.3?Case (III) BC1.2 mobile phone connects to DCP?

[?第三種情況,BC1.2 移動電話連接到 DCP ]

圖5:?Primary Detection, DCP and Secondary Detection, DCP

a. 手機連接到 DCP 并檢測到 V BUS(V BUS > V OTG_SESS_VLD )連接

b. DCD 檢測超時

c. 初級檢測(圖 5 - 左): 手機在 D+ 上提供電壓 VDP_SRC (0.5V-0.7V),并通過 DCP 上的 RDCP_DAT (<200Ω) 連接到 D-

? ? i.?如果手機檢測到 D- ≈ VDP_SRC (0.5V-0.7V) 大于 VDAT_REF (0.25V-0.4V),則連接至 CDP 或 DCP(RDCP_DAT 的最大壓降為 200Ω x 175μA= 0.035V)

d. 二次檢測(圖 5 - 右): 手機在 D- 上提供電壓 VDM_SRC (0.5V-0.7V),通過 DCP 上的 RDCP_DAT (<200Ω) 連接到 D-,并啟用 IDP_SINK (25μA -175μA)

? ? i.?如果手機檢測到 D+ ≈ VDM_SRC (0.5V-0.7V) 大于 VDAT_REF (0.25V-0.4V),則將其連接至 DCP(RDCP_DAT 的最大壓降為 200Ω x 175μA= 0.035V)。

? ? ii.?然后,手機啟用 VDP_SRC。

a. The mobile phone connects to DCP and detects to V BUS (V BUS > V OTG_SESS_VLD ) connection

b. DCD detect timeout

c. Primary Detect (Figure 5 – Left): The mobile phone supplies a voltage VDP_SRC (0.5V-0.7V) on D+, and connects to D- via RDCP_DAT (<200?) on DCP

? ? i. If the mobile phone detects D- ≈ VDP_SRC (0.5V-0.7V) greater than VDAT_REF (0.25V-0.4V), it is connected to CDP or DCP (maximum voltage drop of RDCP_DAT is 200? x 175μA= 0.035V)

d. Secondary Detect (Figure 5 –Right): The mobile phone supplies a voltage VDM_SRC (0.5V-0.7V) on D-, connects to D- via RDCP_DAT (<200?) on DCP and enables IDP_SINK (25μA -175μA)

? ? i. If the mobile phone detects D+ ≈ VDM_SRC (0.5V-0.7V) greater than VDAT_REF (0.25V-0.4V), it is connected to DCP (maximum voltage drop of RDCP_DAT is 200? x 175μA= 0.035V)

? ? ii. Then the mobile phone enables VDP_SRC.

總結,根據波形總結,在識別階段,Primary Detect由D+發起,Secondary Detect由D-發起。SDP DCP CDP三者在波形上的區別,SDP在Primary Detect就被識別,所有永遠只有一次位于D+的高電平。DCP由于D+ D-被電阻短接在一起,所以D+與D-永遠保持一樣的電平狀態,兩次都位于高電平狀態。CDP則是看為二者的波形中和,D+只存在一次高電平,D-存在兩次高電平。

7,BC 1.2 Test Items (BC 1.2測試項)

BC1.2 測試的主要目的是確認 BC1.2 通信的正確性和 Vbus 電源的質量。

The BC1.2 test is conducted mainly to confirm correct BC1.2 communication and Vbus power supply quality.?

7.1 CDP test items for certification (CDP 認證測試項目):

7.2 DCP test items for certification(DCP 認證測試項目):

8,Conclusion (結論)

USB Type-C Power Delivery 的快速充電支持既能滿足現代效率需求,又能向下兼容便攜式設備。BC1.2 規定的充電端口允許便攜式設備消耗更多電流,從而加快充電速度。通過了解 BC1.2 的基本工作原理和測試項目,制造商可以最大限度地減少設計問題,生產出符合現代市場需求的產品。

USB Type-C Power Delivery's fast charging support meets modern needs of efficiency while also providing downwards compatibility with portable devices. Having a charging port defined by BC1.2 allows portable devices to draw more current to facilitate faster charging. By understanding the basic operating principles and test items surrounding BC1.2, manufacturers can minimize design problems and produce products that are in line with modern market demands.

9,References (參考)

  • Battery Charging Specification, Revision 1.2, March 15, 2012

  • USB Battery Charging 1.2 Compliance Plan, Revision 1.2, September 30, 2013

10, 詳情請見文檔及資料:

https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ApplicationNotes/ApplicationNotes/00001722C.pdf

Battery Charging v1.2 Spec and Adopters Agreement | USB-IF

11,TI 網站的介紹

What is USB BC 1.2? | Video | TI.com

可下載PPT和字幕。

參考:

1,Labs

Getting to the bottom of USB Battery Charging | GraniteRiverLabs

USB Battery Charging 1.2 測試介紹 | GraniteRiverLabs Taiwan

2,CSDN

簡單聊一聊手機端口的識別協議-BC1.2-CSDN博客

3, Microchip

Microchip Lightning Support

4,Wiki

https://en.wikipedia.org/wiki/USB#USB_Battery_Charging

5,擴展閱讀

Overview of USB Battery Charging Revision 1.2 and the Important Role of Charger Detectors | Analog Devices

Microchip Lightning Support

Battery Charging with USB - Developer Help

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/712153.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/712153.shtml
英文地址,請注明出處:http://en.pswp.cn/news/712153.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

詳解字符串函數<string.h>(上)

1. strlen函數的使用和模擬實現 size_t strlen(const char* str); 1.1 函數功能以及用法 字符串長度 strlen函數的功能是計算字符串的長度。在使用時&#xff0c;要求用戶傳入需要計算長度的字符串的起始位置&#xff0c;并返回字符串的長度。 #include <stdio.h> #…

基于SSM醫院電子病歷管理系統的設計與實現(源代碼+數據庫腳本+萬字文檔+PPT)

系統介紹 醫院電子病歷管理系統主要是借助計算機&#xff0c;通過對醫院電子病歷管理系統所需的信息管理&#xff0c;增加用戶的選擇&#xff0c;同時也方便對廣大用戶信息的及時查詢、修改以及對用戶信息的及時了解。醫院電子病歷管理系統 對用戶帶來了更多的便利&#xff0c…

Python GUI自動化定位代碼參考

一、pyautogui原始邏輯 import pyautogui # 獲取指定圖片在屏幕上的位置 image_path path/to/image.png target_position pyautogui.locateCenterOnScreen(image_path) if target_position is not None: # 獲取偏移量 offset_x 10 offset_y 10 # 計算實際點…

一文讀懂ZKFair PFP-CyberArmy的參與價值與潛力

3月2日&#xff0c;ZKFair PFP-CyberArmy 將在 Element 上正式開始Public Sale。

文件基礎和文件fd

文章目錄 預備知識C語言的文件接口系統調用文件fd 正文開始前給大家推薦個網站&#xff0c;前些天發現了一個巨牛的 人工智能學習網站&#xff0c; 通俗易懂&#xff0c;風趣幽默&#xff0c;忍不住分享一下給大家。 點擊跳轉到網站。 預備知識 我們平時說文件就是說文件里…

1_Springboot(一)入門

Springboot&#xff08;一&#xff09;——入門 本章重點&#xff1a; 1.什么是Springboot; 2.使用Springboot搭建web項目&#xff1b; 一、Springboot 1.Springboot產生的背景 Servlet->Struts2->Spring->SpringMVC&#xff0c;技術發展過程中&#xff0c;對使…

大模型量化技術原理-SmoothQuant

近年來&#xff0c;隨著Transformer、MOE架構的提出&#xff0c;使得深度學習模型輕松突破上萬億規模參數&#xff0c;從而導致模型變得越來越大&#xff0c;因此&#xff0c;我們需要一些大模型壓縮技術來降低模型部署的成本&#xff0c;并提升模型的推理性能。 模型壓縮主要分…

強化學習(六)時序差分

時序差分&#xff08;TD&#xff09;是強化學習的核心&#xff0c;其是蒙特卡羅&#xff08;MC&#xff09;和動態規劃&#xff08;DP&#xff09;的結合。 1、TD 預測 TD 和 MC 都是利用經驗來解決預測問題。一種非平穩環境的一般訪問蒙特卡羅方法是 V ( S t ) ← V ( S t …

Python GUI開發庫之nicegui使用詳解

概要 在 Python 中,創建圖形用戶界面(GUI)應用程序通常需要大量的代碼和時間。然而,隨著 Python 生態系統的不斷發展,出現了一些簡化 GUI 開發過程的工具和庫。其中之一就是 NiceGUI 庫。本文將深入探討 NiceGUI 庫的功能、用法以及如何利用它來創建漂亮而功能豐富的 GUI…

如何使用css實現一個加載動畫

如何使用css實現一個加載動畫 有四個點 初始化為同一個顏色 每個階段 不同的透明度 刷新也不會影響初始化 <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><meta name"viewport" content"widthd…

List 集合遍歷過程中刪除元素避坑指南。

文章目錄 1. 遍歷2. 遍歷過程中刪除元素2.1 for 簡單循環正向遍歷方式2.2 for 簡單循環反向遍歷方式2.3 foreach 方式遍歷刪除2.4 Iterator的remove()方法2.5 <font color green> removeIf() &#xff08;推薦&#xff09;<green>2.6 Strem 方式 作為一名后端開發…

python之計算CPI

CPI&#xff0c;即消費者物價指數&#xff08;Consumer Price Index&#xff09;&#xff0c;是一個反映居民家庭一般所購買的消費品和服務項目價格水平變動情況的宏觀經濟指標。它是在特定時段內度量一組代表性消費商品及服務項目的價格水平隨時間而變動的相對數&#xff0c;通…

網絡測試相關

前言 網絡測試通常是指在網絡環境比較復雜&#xff0c;而且有較多限制時&#xff0c;就需要清楚網絡的走向和途徑的節點&#xff0c;便于在出現問題時進行排查和優化網絡性能&#xff0c;相關知識大多是計算機網絡的 測試工具 抓包 wireshark 路由探測 traceroute/tracert 這…

云快充充電樁系統設計書

充電樁系統設計書 一、系統設計概述 隨著新能源汽車市場的快速發展&#xff0c;充電樁作為電動汽車的重要配套設施&#xff0c;其市場需求日益增長。本系統旨在提供一套穩定、高效、易用的充電樁解決方案&#xff0c;以滿足市場上新能源充電樁的主流需求。通過實現云快充V1.6協…

nginx使用詳解--動靜分離

什么是動靜分離&#xff1f; 為了提高網站的響應速度&#xff0c;減輕程序服務器&#xff08;Tomcat&#xff0c;Jboss等&#xff09;的負載&#xff0c;對于靜態資源&#xff0c;如圖片、js、css等文件&#xff0c;可以在反向代理服務器中進行緩存&#xff0c;這樣瀏覽器在請…

如何選擇激活函數?

選擇神經網絡的激活函數是一個重要的決策&#xff0c;因為激活函數的選擇會影響到網絡的收斂速度以及能否有效地訓練。不同的激活函數適用于不同的任務和網絡架構。以下是選擇激活函數時可以考慮的一些指導原則和常用的激活函數&#xff1a; 指導原則 問題類型&#xff1a; 二…

LLM小記

RAG 參考 檢索增強生成(RAG)概念及優化 主流模型 llama系列 1. 背景&#xff1a;模型參數量級的積累&#xff0c;或者訓練數據的增加&#xff0c;哪個對性能提升幫助更大&#xff1f; 最近的 “Training Compute-Optimal Large Language Models” 這篇論文提出一種縮放定…

Java:PDF圖片抽取的兩種方法

圖片和PDF是我們日常生活和工作中經常接觸到的文檔格式。PDF是人們日常使用最多的跨平臺文檔&#xff0c;是一種用獨立于應用程序、硬件、操作系統的方式呈現文檔的文件格式。每個PDF文件包含固定布局的平面文檔的完整描述&#xff0c;包括文本、字形、圖形及其他需要顯示的信息…

如何利用HubSpot海外獲客系統實現海外市場擴張?

在當今全球化的時代&#xff0c;企業面臨著越來越激烈的競爭&#xff0c;而海外市場則被視為獲取更多增長機會的重要途徑之一。針對這一挑戰&#xff0c;企業需要建立一個完整的海外獲客系統&#xff0c;而HubSpot軟件的應用則成為了關鍵。作為HubSpot的合作伙伴&#xff0c;我…

librtmp源碼分析

閱讀了librtmp的源碼&#xff0c;簡單記錄下。 首先補充下AMF格式基本知識 1 AMF格式 AMF是Action Message Format(動作消息格式)的簡寫&#xff0c;它是一種二進制的數據格式。它的設計是為了把actionscript里面的數據(包括Object, Array, Boolean, Number等)序列化成二進制…