XRP對接文檔

XRP對接文檔

技術預研

參考文檔

  • 官方文檔: https://xrpl.org/list-xrp-in-your-exchange.html

  • 官方文檔: https://xrpl.org/list-xrp-as-an-exchange.html#flow-of-funds

  • 交易所對接XRP(內容齊全, 很推薦) https://blog.csdn.net/weixin_40396076/article/details/100202076

  • XRP瑞波幣JAVA接入 https://blog.csdn.net/liu1765686161/article/details/82492937

  • XRP離線簽名JAVA https://blog.csdn.net/liu1765686161/article/details/83347534

OperatorNetworkJSON-RPC URLWebSocket URLNotes
RippleMainnethttps://s1.ripple.com:51234/wss://s1.ripple.com/General purpose server cluster
RippleMainnethttps://s2.ripple.com:51234/wss://s2.ripple.com/Full-history server cluster
RippleTestnethttps://s.altnet.rippletest.net:51234/wss://s.altnet.rippletest.net/Testnet public server
RippleDevnethttps://s.devnet.rippletest.net:51234/wss://s.devnet.rippletest.net/Devnet public server
  • 獲取歷史數據(賬戶歷史交易等):

    https://data.ripple.com

    https://testnet.data.api.ripple.com

幾個關鍵的問題

1.用戶充幣地址如何離線生成?

交易所使用一個地址即可, 用戶充幣時需要填寫 tag, 交易所通過tag區分用戶的充值.

外鏈圖片轉存失敗,源站可能有防盜鏈機制,建議將圖片保存下來直接上傳

如果用戶不填寫標簽, 不能區分是哪個用戶的充幣, 只能人工干預.

ripple提供了一個接口, 來設置賬戶的接收交易, 必須填寫 DestinationTag, 如果不填寫則直接拒絕.

https://xrpl.org/require-destination-tags.html

這樣的確防止了用戶充幣不填寫標簽的情況, 但是是否存在其他問題?

2.交易所的全節點如何搭建?
  • 字節搭建一個節點, 用于交易的廣播, 和其他操作
  • 也可以直接使用ripple官方的接口查詢交易, 和廣播交易
3.用戶充幣如何掃描檢測? 需要注意哪些問題?

https://xrpl.org/list-xrp-as-an-exchange.html#deposit-xrp-into-exchange

  • 獲取測試幣
Address
rpxSrARAeTE2Y699CsY5PwVEJ5v21TDrLi
Secret
ssYt3QxVJtAqtw88REsc7S7X3mHrZ
Balance
1,000 XRP---------------Address
rBQUkC3iBBAXV7XT4DJeCPiMHQM6PVE555
Secret
snTru9VEkoQNwRoKTJzNDVg2TDgQk
Balance
1,000 XRP
  • 查詢賬戶交易歷史: https://github.com/ripple/rippled-historical-database#get-account-transaction-history

GET /v2/accounts/{address}/transactions

FieldValueDescription
startString - TimestampStart time of query range. The default is the earliest date available. 開始時間戳
endString - TimestampEnd time of query range. The default is the current date. 結束時間戳
min_sequenceStringMinimum sequence number to query.
max_sequenceStringMax sequence number to query.
typeStringRestrict results to a specified transaction type. 交易類型, 普通的XRP轉賬類型是 Payment
resultStringRestrict results to a specified transaction result. 交易結果(成功還是失敗), 成功: tesSUCCESS , 其他情況有不同的字符串狀態
binaryBooleanReturn results in binary format. 是否返回十六進制字符串, 默認是false
descendingBooleanIf true, return results in reverse chronological order. The default is false. 按照時間降序排列, 默認是 false
limitIntegerMaximum results per page. The default is 20. Cannot be more than 1,000. 每頁的交易數量
markerStringPagination key from previously returned response. 分頁標志, 請求第二頁以后的頁需要帶上此字段

例如:

https://data.ripple.com/v2/accounts/r3Vh1bZbktiWRyJBe6BB9H3okW577u37BE/transactions?limit=2&start=1564642511&end=1565101720{"result": "success","count": 2,"transactions": [{"hash": "37554EEC36B8E76593387380752994E5017843000EA401BEEDAABD2294F0899F","ledger_index": 49050181,"date": "2019-08-01T14:55:11+00:00","tx": {"TransactionType": "Payment","Flags": 2147483648,"Sequence": 238920,"Amount": "99900000","Fee": "1000","SigningPubKey": "02820C6D08111F0AE73F1ED0463C5B50D0E45BF3DB4A36B1FCF5B2C8FBD9BB3EE6","TxnSignature": "304402206ACF8B1C44098C6B3AE9F1266DDDC3D1EF18438849BCA6CA531B60617DBB9E660220092B01BBC60866ACC7713D5CA67618739FB04A0B35A5AB524887ECD54372F6A5","Account": "rfexLLNpC6dqyLagjV439EyvfqdYNHsWSH","Destination": "r3Vh1bZbktiWRyJBe6BB9H3okW577u37BE"},"meta": {"TransactionIndex": 4,"AffectedNodes": [{"CreatedNode": {"LedgerEntryType": "AccountRoot","LedgerIndex": "5C0CAE11030D79C566101617FAEEA165B7D9A1342A2B4FD06309CA3578B65F4F","NewFields": {"Sequence": 1,"Balance": "99900000","Account": "r3Vh1bZbktiWRyJBe6BB9H3okW577u37BE"}}},{"ModifiedNode": {"LedgerEntryType": "AccountRoot","PreviousTxnLgrSeq": 49050173,"PreviousTxnID": "077DAEBEE3031E5001DA890F442F5AAC944B0B26EDC0A5025848B42E099A851C","LedgerIndex": "74A1C26DB171CE0528DA9230BA0E567BB6023FD07C6544BAC97E953605760CB8","PreviousFields": {"Sequence": 238920,"Balance": "1671679385"},"FinalFields": {"Flags": 131072,"Sequence": 238921,"OwnerCount": 0,"Balance": "1571778385","Account": "rfexLLNpC6dqyLagjV439EyvfqdYNHsWSH"}}}],"TransactionResult": "tesSUCCESS","delivered_amount": "99900000"}},{"hash": "1535E53D3C74A3F03A325BE43BE134367FCDC425015E8CEA706767186672A65C","ledger_index": 49160675,"date": "2019-08-06T14:28:40+00:00","tx": {"TransactionType": "Payment","Flags": 2147483648,"SourceTag": 102889,"Sequence": 1,"DestinationTag": 102889,"Amount": "75000000","Fee": "5000","SigningPubKey": "02ED0A3DC98978AE75835F403B5BC79A994DBD41874A8A6BD2498E8FC1AD48BDF4","TxnSignature": "304402206DCF74EBF05C15D5F6ECB5CF18DB02E62D0C003C48D087E9BF18D8AB0269AF7502205080B6D155F95AB021A575277CD089898688C221F178826105C757FC48D771BA","Account": "r3Vh1bZbktiWRyJBe6BB9H3okW577u37BE","Destination": "rardRtq3DWjqgxLpEoHPcFv7dSuv4FgbSN"},"meta": {"TransactionIndex": 4,"AffectedNodes": [{"ModifiedNode": {"LedgerEntryType": "AccountRoot","PreviousTxnLgrSeq": 49050181,"PreviousTxnID": "37554EEC36B8E76593387380752994E5017843000EA401BEEDAABD2294F0899F","LedgerIndex": "5C0CAE11030D79C566101617FAEEA165B7D9A1342A2B4FD06309CA3578B65F4F","PreviousFields": {"Sequence": 1,"Balance": "99900000"},"FinalFields": {"Flags": 0,"Sequence": 2,"OwnerCount": 0,"Balance": "24895000","Account": "r3Vh1bZbktiWRyJBe6BB9H3okW577u37BE"}}},{"ModifiedNode": {"LedgerEntryType": "AccountRoot","PreviousTxnLgrSeq": 49158980,"PreviousTxnID": "490ACD5C7B198581EDB1384FB58EBEEA5CF41E309C569E1E7EAEB7EFA7741F81","LedgerIndex": "9DDD6B3B7E3902EE1B3D27461CD2DB73AFC5A6C0F292DED496AD6B403BFE376A","PreviousFields": {"Balance": "20000000"},"FinalFields": {"Flags": 131072,"Sequence": 360,"OwnerCount": 0,"Balance": "95000000","Account": "rardRtq3DWjqgxLpEoHPcFv7dSuv4FgbSN"}}}],"TransactionResult": "tesSUCCESS","delivered_amount": "75000000"}}]}
4.如何轉賬(離線簽名)?
  • 獲取余額 GET /v2/accounts/{address}/balances

  • 手續費 : /v2/network/fees?interval=day&limit=3&descending=true

  • 獲取賬戶信息(Sequence)

  //請求{"method": "account_info","params": [{"account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn","strict": true,"ledger_index": "current","queue": true}]}//返回{"result": {"account_data": {"Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn","Balance": "362981155","Flags": 1179648,"LedgerEntryType": "AccountRoot","OwnerCount": 0,"PreviousTxnID": "A9F85C8B6578F543034DB03EBBEA05D814D5AD0BEEFC7173B0F774F022AC273C","PreviousTxnLgrSeq": 2360169,"RegularKey": "rJ6pSBmfPHFjsd6aog3Qz8f8tGC7XLDKE1","Sequence": 219,"index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"},"ledger_current_index": 2742581,"queue_data": {"txn_count": 0},"status": "success","validated": false}}
  • 交易廣播
POST    https://s.altnet.rippletest.net:51234//請求{"method": "submit","params": [{"tx_blob": "1200002280000000240000000861400000000000000568400000000000000C7321028DEF81438DCDE390BE352C8BAA877CED55BBB193FE10E4C713D4CBF7E6DDA02E74473045022100B1F8F907F6576B8EB11E8691FCE29557D09D62D703DA2891381B38AA72D09251022063C2613D63535F89E2A36A0F3F3C7C27D263B494CFBD4891910F7AF94F8A3F0381141573E2D9EC61FBB6DFB2C5D64C111E9AEEF6F91083147214A2B8C4F87C65102156B3FE3EEC0B1DB23482"}]}//返回{"result": {"engine_result": "tesSUCCESS","engine_result_code": 0,"engine_result_message": "The transaction was applied. Only final in a validated ledger.","status": "success","tx_blob": "1200002280000000240000000861400000000000000568400000000000000C7321028DEF81438DCDE390BE352C8BAA877CED55BBB193FE10E4C713D4CBF7E6DDA02E74473045022100B1F8F907F6576B8EB11E8691FCE29557D09D62D703DA2891381B38AA72D09251022063C2613D63535F89E2A36A0F3F3C7C27D263B494CFBD4891910F7AF94F8A3F0381141573E2D9EC61FBB6DFB2C5D64C111E9AEEF6F91083147214A2B8C4F87C65102156B3FE3EEC0B1DB23482","tx_json": {"Account": "rpxSrARAeTE2Y699CsY5PwVEJ5v21TDrLi","Amount": "5","Destination": "rBQUkC3iBBAXV7XT4DJeCPiMHQM6PVE555","Fee": "12","Flags": 2147483648,"Sequence": 8,"SigningPubKey": "028DEF81438DCDE390BE352C8BAA877CED55BBB193FE10E4C713D4CBF7E6DDA02E","TransactionType": "Payment","TxnSignature": "3045022100B1F8F907F6576B8EB11E8691FCE29557D09D62D703DA2891381B38AA72D09251022063C2613D63535F89E2A36A0F3F3C7C27D263B494CFBD4891910F7AF94F8A3F03","hash": "90C4B383D76861E317449DD0D6018F340AD9D6B4C05222983791569AE1F771E3"}}}
  • XRP的Sequence機制

    XRP的sequence機制和ETH的sequence不同, XRP的sequence不支持大于當前sequence的交易, 如果使用大于當前的sequence的值構造交易, 那么就會出現 terPRE_SEQ的錯誤, 如下:

    外鏈圖片轉存失敗,源站可能有防盜鏈機制,建議將圖片保存下來直接上傳

離線簽名方案

方案1: 導出 rippled中的簽名相關的函數(主要是序列化相關的)

此方案非常繁瑣

rippled 源碼支持 x64, 與我在項目中使用的 x86 不相符, 就算導出成功 , 也需要解決兼容問題

方案2: 將序列化的工作交易python服務端

此方案應作為首選方案

離線簽名只負責簽名序列化后的交易, 廣播的時候再由Python服務端進行內容的進一步組裝和序列化.

方案3: 自己針對 Payment交易類型, 實現序列化庫

此方案難度不大

可以參考 rippled 或 ripple-lib 或 ripple-lib-python 實現一個簡單的序列化庫(僅針對 Payment交易類型)

方案4 : 使用 rippled自帶的 sign 接口

此方案是最簡單的.

直接使用 rippled的自帶簽名接口, 當然需要編譯 rippled.exe(windows編譯比較麻煩, 按照官方的文檔可以編譯成功), 如果是linux 直接安裝即可

配置 rippled的配置文件rippled.cfg, 設置 signing_supporttrue就可以支持 signsign_for

[signing_support]
true

外鏈圖片轉存失敗,源站可能有防盜鏈機制,建議將圖片保存下來直接上傳

在cmd中啟動

rippled.exe  --net --silent --conf ./rippled.cfg

請求例子

POST  https://192.168.10.114:5005{"method": "sign","params": [{"secret": "ssYt3QxVJtAqtw88REsc7S7X3mHrZ","offline":true,"tx_json": {"TransactionType": "Payment","Account": "rpxSrARAeTE2Y699CsY5PwVEJ5v21TDrLi","Destination": "rBQUkC3iBBAXV7XT4DJeCPiMHQM6PVE555","Amount": "5100000","Sequence": 10,"SigningPubKey": "","Fee": "12"}}]
}//curl 測試[root@demo ~]# 
[root@demo ~]# curl -H "Content-Type: application/json" -X POST  --data '{"method": "sign","params": [{"secret":"ssYt3QxVJtAqtw88REsc7S7X3mHrZ","offline":true,"tx_json":{"TransactionType":"Payment","Account":"rpxSrARAeTE2Y699CsY5PwVEJ5v21TDrLi","Destination":"rBQUkC3iBBAXV7XT4DJeCPiMHQM6PVE555","Amount":"5100000","Sequence":10,"SigningPubKey":"","Fee":"12"}}]}' http://127.0.0.1:5005
{"result":{"deprecated":"This command has been deprecated and will be removed in a future version of the server. Please migrate to a standalone signing tool.","status":"success","tx_blob":"1200002280000000240000000A6140000000004DD1E068400000000000000C7321028DEF81438DCDE390BE352C8BAA877CED55BBB193FE10E4C713D4CBF7E6DDA02E74473045022100F5EF279E894462443A67A44134789FAA56F3DEF1EF0F4E582B6703FF4612990502200257E31D7A5A102B2BD363E819B199B5B09CD32BCEF4552EB3C8E4DBB3ABC7AA81141573E2D9EC61FBB6DFB2C5D64C111E9AEEF6F91083147214A2B8C4F87C65102156B3FE3EEC0B1DB23482","tx_json":{"Account":"rpxSrARAeTE2Y699CsY5PwVEJ5v21TDrLi","Amount":"5100000","Destination":"rBQUkC3iBBAXV7XT4DJeCPiMHQM6PVE555","Fee":"12","Flags":2147483648,"Sequence":10,"SigningPubKey":"028DEF81438DCDE390BE352C8BAA877CED55BBB193FE10E4C713D4CBF7E6DDA02E","TransactionType":"Payment","TxnSignature":"3045022100F5EF279E894462443A67A44134789FAA56F3DEF1EF0F4E582B6703FF4612990502200257E31D7A5A102B2BD363E819B199B5B09CD32BCEF4552EB3C8E4DBB3ABC7AA","hash":"107120D4E131189A4BCF8D771CDB308A64FF5EED5B805C106F3CA41089CD06AC"}}}[root@demo ~]# 

完整的配置文件

  • rippled.cfg
[server]
port_rpc_admin_local
port_peer
port_ws_admin_local
#port_ws_public
#ssl_key = /etc/ssl/private/server.key
#ssl_cert = /etc/ssl/certs/server.crt[port_rpc_admin_local]
port = 5005
#ip = 127.0.0.1
ip=0.0.0.0
admin = 127.0.0.1
protocol = http[port_peer]
port = 51235
ip = 0.0.0.0
# alternatively, to accept connections on IPv4 + IPv6, use:
#ip = ::
protocol = peer[port_ws_admin_local]
port = 6006
ip = 127.0.0.1
admin = 127.0.0.1
protocol = ws#[port_ws_public]
#port = 6005
#ip = 127.0.0.1
#protocol = wss#-------------------------------------------------------------------------------[node_size]
tiny
#medium# This is primary persistent datastore for rippled.  This includes transaction
# metadata, account states, and ledger headers.  Helpful information can be
# found here: https://ripple.com/wiki/NodeBackEnd
# delete old ledgers while maintaining at least 2000. Do not require an
# external administrative command to initiate deletion.
[node_db]
type=RocksDB
path=./db/rocksdb
open_files=2000
filter_bits=12
cache_mb=256
file_size_mb=8
file_size_mult=2
online_delete=2000
advisory_delete=0# This is the persistent datastore for shards. It is important for the health
# of the ripple network that rippled operators shard as much as practical.
# NuDB requires SSD storage. Helpful information can be found here
# https://ripple.com/build/history-sharding
#[shard_db]
#path=/var/lib/rippled/db/shards/nudb
#max_size_gb=500[database_path]
./db# This needs to be an absolute directory reference, not a relative one.
# Modify this value as required.
[debug_logfile]
./debug.log[sntp_servers]
time.windows.com
time.apple.com
time.nist.gov
pool.ntp.org# To use the XRP test network (see https://ripple.com/build/xrp-test-net/),
# use the following [ips] section:
# [ips]
# r.altnet.rippletest.net 51235# File containing trusted validator keys or validator list publishers.
# Unless an absolute path is specified, it will be considered relative to the
# folder in which the rippled.cfg file is located.
[validators_file]
validators.txt# Turn down default logging to save disk space in the long run.
# Valid values here are trace, debug, info, warning, error, and fatal
[rpc_startup]
{ "command": "log_level", "severity": "warning" }# If ssl_verify is 1, certificates will be validated.
# To allow the use of self-signed certificates for development or internal use,
# set to ssl_verify to 0.
[ssl_verify]
0[signing_support]
true[peer_private]
1[peers_max]
0[overlay]
ip_limit = 0[fetch_depth]
0
  • validators.txt 默認的即可
## Default validators.txt
#
# A list of domains to bootstrap a nodes UNLs or for clients to indirectly
# locate IPs to contact the Ripple network.
#
# This file is UTF-8 with Dos, UNIX, or Mac style end of lines.
# Blank lines and lines starting with a '#' are ignored.
# All other lines should be hankos or domain names.
#
#
#
# [validators]
#
#   List of the validation public keys of nodes to always accept as validators.
#
#   Manually listing validator keys is not recommended for production networks.
#   See validator_list_sites and validator_list_keys below.
#
#   Examples:
#    n9KorY8QtTdRx7TVDpwnG9NvyxsDwHUKUEeDLY3AkiGncVaSXZi5
#    n9MqiExBcoG19UXwoLjBJnhsxEhAZMuWwJDRdkyDz1EkEkwzQTNt
#
# [validator_list_sites]
#
#   List of URIs serving lists of recommended validators.
#
#   The latest list of recommended validator sites can be
#   obtained from https://ripple.com/ripple.txt
#
#   Examples:
#    https://vl.ripple.com
#    http://127.0.0.1:8000
#    file:///etc/opt/ripple/vl.txt
#
# [validator_list_keys]
#
#   List of keys belonging to trusted validator list publishers.
#   Validator lists fetched from configured sites will only be considered
#   if the list is accompanied by a valid signature from a trusted
#   publisher key.
#   Validator list keys should be hex-encoded.
#
#   The latest list of recommended validator keys can be
#   obtained from https://ripple.com/ripple.txt
#
#   Examples:
#    ed499d732bded01504a7407c224412ef550cc1ade638a4de4eb88af7c36cb8b282
#    0202d3f36a801349f3be534e3f64cfa77dede6e1b6310a0b48f40f20f955cec945
#    02dd8b7075f64d77d9d2bdb88da364f29fcd975f9ea6f21894abcc7564efda8054
## The default validator list publishers that the rippled instance
# trusts.
#
# WARNING: Changing these values can cause your rippled instance to see a
#          validated ledger that contradicts other rippled instances'
#          validated ledgers (aka a ledger fork) if your validator list(s)
#          do not sufficiently overlap with the list(s) used by others.
#          See: https://arxiv.org/pdf/1802.07242.pdf[validator_list_sites]
https://vl.ripple.com[validator_list_keys]
ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734# To use the XRP test network (see https://ripple.com/build/xrp-test-net/),
# use the following configuration instead:
#
# [validator_list_sites]
# https://vl.altnet.rippletest.net
#
# [validator_list_keys]
# ED264807102805220DA0F312E71FC2C69E1552C9C5790F6C25E3729DEB573D5860

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

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

相關文章

基于51單片機的籃球計時器Proteus仿真

文章目錄 一、籃球計時器1.題目要求2.思路3.仿真圖3.1 未仿真時3.2 仿真開始3.3 A隊進分3.4 B隊進分3.5 比賽結束 4.仿真程序4.1 主函數4.2 時間顯示4.3 比分顯示4.4 按鍵掃描 二、總結 一、籃球計時器 1.題目要求 以51單片機為核心,設計并制作籃球計時器 基本功…

代碼托管平臺詳解與比較

1. Gitee 1.1 平臺簡介 Gitee是中國本土的一個代碼托管平臺,類似于GitHub。它提供了版本控制、項目管理和代碼托管等服務,特別適合中國的開發者和企業。 1.2 主要特點 1. 本地化支持:Gitee提供中文界面和文檔,適合中國開發者使用…

電子游戲 - 星際爭霸技術提高

提高《星際爭霸》的勝率需要綜合考慮多方面的因素,包括宏觀管理、微操技巧、策略制定和游戲意識。以下是一些具體的建議,可以幫助你打好《星際爭霸》并提高勝率: 1. 加強資源管理和經濟發展(Macro) * 快速擴張&#x…

python實現符文加、解密

在歷史悠久的加密技術中,愷撒密碼以其簡單卻有效的原理聞名。通過固定的字母位移,明文可以被轉換成密文,而解密則是逆向操作。這種技術不僅適用于英文字母,還可以擴展到其他語言的字符體系,如日語的平假名或漢語的拼音…

醫院管理系統帶萬字文檔醫院預約掛號管理系統基于spingboot和vue的前后端分離java項目java課程設計java畢業設計

文章目錄 倉庫管理系統一、項目演示二、項目介紹三、萬字項目文檔四、部分功能截圖五、部分代碼展示六、底部獲取項目源碼帶萬字文檔(9.9¥帶走) 倉庫管理系統 一、項目演示 醫院管理系統 二、項目介紹 基于springbootvue的前后端分離醫院管…

SOLR數據導入和導出

情景 1、solr中的類型修改導致solr的core無法加載,只能刪除core,重新創建。但是solr中的數據,只能從core心中導出,在導入新建的核心中。 2、試了幾種方案,還是通過第三方freedev / solr-import-export-json的組件更加…

Spring框架(二)——IoC

1、什么是IoC IoC—Inverse of Control,控制反轉,將對象的創建權力反轉給Spring框架控制反轉是為了降低程序耦合度,提高程序擴展力,達到OCP原則,達到DIP原則 OCP開閉原則:在軟件開發過程中應當對擴展開放&…

跨阻放大器

#創作靈感# 最近涉及到微電流的監測項目,而里面的核心就是跨阻放大器,所以這里做一個簡單的介紹,后續等項目完成了,再做一個實例的介紹。 #正文# 跨阻放大器(Transimpedance Amplifier, TIA)是一種將輸入電…

Milvus Cloud集成 DSPy:搭建高效 RAG Pipeline

引言 大語言模型(LLM)為行業帶來變革,具備強大的生成能力,在與知識庫和檢索器等工具相結合時,能夠高效推動聊天機器人和 Agent 等高級生成式 AI(GenAI)應用的發展。與 LLMs 互動的過程中,最核心的部分是提示(prompt)。Prompt 是指用于指導這些模型執行特定任務的命令…

NCBI Virus 幫助文檔

What is NCBI Virus?(什么是NCBI病毒) 主要功能: Compare your sequence to those in the NCBI Virus database using NCBI BLAST algorithm. 使用NCBI BLAST算法將您的序列與NCBI病毒數據庫中的序列進行比較。Search, view and download …

Oracle PL/SQL 教程 第一部分

PL / SQL代表“過程語言擴展到結構化查詢語言”。 SQL用于查詢和更新關系數據庫。 PL / SQL與SQL緊密集成。 PL / SQL是SQL的Oracle過程擴展,是一種便攜式,高性能的事務處理語言。 使用PL / SQL,可以使用所有SQL數據操作,游標…

威聯通 NAS 磁盤擴容 更換大容量磁盤具體操作以以TS-532X為例

第一步 檢查磁盤狀態 打開存儲與快照總管,選左側磁盤查看磁盤狀態,應該是就緒狀態。 三塊磁盤都是就緒狀態。 上面截圖是更換過程中的截圖 具體操作 然后點擊存儲/快照 ,選管理 選逐一更換磁盤,這里raid組需要注意&#xff0…

【LeetCode】 740. 刪除并獲得點數

這真是一道好題!這道題不僅考察了抽象思維,還考察了分析能力、化繁為簡的能力,同時還有對基本功的考察。想順利地做出這道題還挺不容易!我倒在了第一步與第二步:抽象思維和化繁為簡。題目的要求稍微復雜一些&#xff0…

Spring Session與分布式會話管理詳解

隨著微服務架構的普及,分布式系統中的會話管理變得尤為重要。傳統的單點會話管理已經不能滿足現代應用的需求。本文將深入探討Spring Session及其在分布式會話管理中的應用。 什么是Spring Session? Spring Session是一個用于管理HttpSession的Spring框…

數據恢復篇:如何在電腦上恢復已刪除和丟失的音樂文件

盡管流媒體網絡非常流行,但許多人仍然選擇將音樂下載并保存在 PC 本地。這會使文件面臨丟失或意外刪除的風險。 幸運的是,您可以使用數據恢復軟件恢復已刪除的音樂和其他文件類型。這篇文章討論了這些解決方案以及如何使用奇客數據恢復檢索丟失的音樂文…

02.Linux下安裝FFmpeg

目錄 一、下載FFmpeg的編譯源碼 二、編譯源碼 三、ffmpeg工具結構解析 1、bin目錄 2、include庫 3、lib庫 四、注意事項 五、可能出現的一些問題 1、某些工具未安裝/版本過久 2、缺少pkg-config工具 3、缺少ffmplay FFmpeg 是一個開源的跨平臺音視頻處理工具集&…

揭秘銀行理財產品:高收益背后的秘密

一、按幣種分類 人民幣理財產品:主要投資于人民幣計價的金融工具,如國債、金融債、央行票據等。此類產品風險較低,收益穩定。外幣理財產品:按照投資的本金風險分類,可分為本金100%保障、部分本金保障及不保本的外匯理…

華為OD機考題HJ24 合唱隊

前言 應廣大同學要求,開始以OD機考題作為練習題,看看算法和數據結構掌握情況。有需要練習的可以關注下。 描述 N 位同學站成一排,音樂老師要請最少的同學出列,使得剩下的 K 位同學排成合唱隊形。 設𝐾K位同學從左到…

科普文:八大排序算法(JAVA實現)+ 自制動畫 (袁廚的算法小屋)

我將我倉庫里的排序算法給大家匯總整理了一下,寫的非常非常細,還對每個算法制作了動畫,一定能夠對大家有所幫助,歡迎大家閱讀。另外我也對 leetcode 上面可以用排序算法秒殺的算法題進行了總結,會在后面的文章中進行發…

物聯網協議都包含哪些協議?

物聯網協議是物聯網生態系統中不可或缺的組成部分,它們負責處理和協調物聯網設備之間的通信。具體介紹如下: Ethernet:以太網是一種有線網絡協議,廣泛應用于局域網絡(LAN)中,提供穩定的高速數據傳輸。Wi-Fi&#xff1…