Journal of Computer Applications ›› 2026, Vol. 46 ›› Issue (7): 2074-2084.DOI: 10.11772/j.issn.1001-9081.2026010107
• Artificial intelligence • Previous Articles
Linkai ZHU1, Lu YANG1, Hongjie ZHANG1, Zijin WU2, Lu LIU3(
)
Received:2026-02-04
Revised:2026-03-20
Accepted:2026-04-09
Online:2026-04-23
Published:2026-07-10
Contact:
Lu LIU
About author:ZHU Linkai, born in 1989, Ph. D., lecturer. His research interests include smart contract engineering, large language models.Supported by:通讯作者:
刘璐
作者简介:朱林凯(1989—),男,浙江义乌人,讲师,博士,主要研究方向:智能合约工程、大语言模型基金资助:CLC Number:
Linkai ZHU, Lu YANG, Hongjie ZHANG, Zijin WU, Lu LIU. Smart contract generation framework driven by LLM and SWRL for cross-border data compliance across heterogeneous blockchains[J]. Journal of Computer Applications, 2026, 46(7): 2074-2084.
朱林凯, 杨璐, 张弘杰, 吴子衿, 刘璐. LLM与SWRL驱动的跨境数据合规异构跨链智能合约生成框架[J]. 《计算机应用》唯一官方网站, 2026, 46(7): 2074-2084.
Add to citation manager EndNote|Ris|BibTeX
URL: https://www.joca.cn/EN/10.11772/j.issn.1001-9081.2026010107
| 合规依据 | SWRL 条件 | 智能合约逻辑 | 结果/事件 |
|---|---|---|---|
| 充分性认定(AD) | AdequateCountry(?C) → 允许传输,无需额外保障 | 检查destCountry是否在链上充分性国家和地区列表中 | 若为真,标记为“ADEQUACY”模式下的已批准传输,并触发TransferApproved |
| 标准合同条款(SCC) | ¬Adequacy∧hasSCC(?T)∧ValidSCC(?T) → 允许传输 | 验证源与目的地间的有效 SCC记录及签名状态 | 若验证通过,标记为“SCC”模式下的已批准传输,并触发 TransferApproved |
| 具有约束力的公司规则(BCR) | ¬Adequacy ∧ withinSameGroup(?s, ?d) ∧ BCRApproved(group) → 允许传输 | 检查双方是否共享经批准的 BCR_ID且均为注册成员 | 若满足条件,标记为“BCR”模式下的已批准传输,并触发TransferApproved |
| 明确同意 | ¬Adequacy/safeguard ∧ hasConsent(?S,?T)∧ ValidConsent → 允许传输 | 检查数据主体的链上同意记录且未被撤销 | 若存在有效同意,标记为“CONSENT”模式下的已批准传输,并触发 TransferApproved |
| 无合法依据 | 以上条件均不满足→ 不允许传输 | 所有验证结果为假 | 标记为拒绝状态,触发 TransferDenied(reason="No legal basis") |
Tab. 1 Mapping between SWRL representations of legal bases for compliance and smart contract logic
| 合规依据 | SWRL 条件 | 智能合约逻辑 | 结果/事件 |
|---|---|---|---|
| 充分性认定(AD) | AdequateCountry(?C) → 允许传输,无需额外保障 | 检查destCountry是否在链上充分性国家和地区列表中 | 若为真,标记为“ADEQUACY”模式下的已批准传输,并触发TransferApproved |
| 标准合同条款(SCC) | ¬Adequacy∧hasSCC(?T)∧ValidSCC(?T) → 允许传输 | 验证源与目的地间的有效 SCC记录及签名状态 | 若验证通过,标记为“SCC”模式下的已批准传输,并触发 TransferApproved |
| 具有约束力的公司规则(BCR) | ¬Adequacy ∧ withinSameGroup(?s, ?d) ∧ BCRApproved(group) → 允许传输 | 检查双方是否共享经批准的 BCR_ID且均为注册成员 | 若满足条件,标记为“BCR”模式下的已批准传输,并触发TransferApproved |
| 明确同意 | ¬Adequacy/safeguard ∧ hasConsent(?S,?T)∧ ValidConsent → 允许传输 | 检查数据主体的链上同意记录且未被撤销 | 若存在有效同意,标记为“CONSENT”模式下的已批准传输,并触发 TransferApproved |
| 无合法依据 | 以上条件均不满足→ 不允许传输 | 所有验证结果为假 | 标记为拒绝状态,触发 TransferDenied(reason="No legal basis") |
| 模型 | ComPass( | VulRate( | SafeAvail( | FuncRate( | FullRate( |
|---|---|---|---|---|---|
| Qwen2.5-7B | 66.0 | 37.7 | 62.3 | 59.0 | 61.6 |
| Qwen2.5-Coder-3B | 61.3 | 41.0 | 59.0 | 57.3 | 58.8 |
| LLaMA-3-8B-Instruct | 70.2 | 39.2 | 60.8 | 49.5 | 57.5 |
| CodeLlama-7B | 68.0 | 42.3 | 57.7 | 38.0 | 50.4 |
| CodeLlama-13B | 53.3 | 40.7 | 59.3 | 37.3 | 46.8 |
| Gemma-7B-Instruct | 60.3 | 44.3 | 55.7 | 29.3 | 43.7 |
| Mistral-7B-Instruct | 51.7 | 54.3 | 45.7 | 31.0 | 39.8 |
| Zephyr-7B-Instruct | 44.0 | 63.7 | 36.3 | 25.0 | 32.6 |
| DeepSeek-R1 | 75.3 | 26.2 | 73.8 | 75.2 | 74.9 |
| DeepSeek-V3 | 87.8 | 31.0 | 69.0 | 67.3 | 72.9 |
| Fine-tuned | 76.2 | 25.0 | 75.0 | 76.7 | 76.1 |
Tab. 2 Model evaluation results on SWRL rule-smart contract code dataset
| 模型 | ComPass( | VulRate( | SafeAvail( | FuncRate( | FullRate( |
|---|---|---|---|---|---|
| Qwen2.5-7B | 66.0 | 37.7 | 62.3 | 59.0 | 61.6 |
| Qwen2.5-Coder-3B | 61.3 | 41.0 | 59.0 | 57.3 | 58.8 |
| LLaMA-3-8B-Instruct | 70.2 | 39.2 | 60.8 | 49.5 | 57.5 |
| CodeLlama-7B | 68.0 | 42.3 | 57.7 | 38.0 | 50.4 |
| CodeLlama-13B | 53.3 | 40.7 | 59.3 | 37.3 | 46.8 |
| Gemma-7B-Instruct | 60.3 | 44.3 | 55.7 | 29.3 | 43.7 |
| Mistral-7B-Instruct | 51.7 | 54.3 | 45.7 | 31.0 | 39.8 |
| Zephyr-7B-Instruct | 44.0 | 63.7 | 36.3 | 25.0 | 32.6 |
| DeepSeek-R1 | 75.3 | 26.2 | 73.8 | 75.2 | 74.9 |
| DeepSeek-V3 | 87.8 | 31.0 | 69.0 | 67.3 | 72.9 |
| Fine-tuned | 76.2 | 25.0 | 75.0 | 76.7 | 76.1 |
| [1] | Hinds J, Williams E J, Joinson A N. “It wouldn't happen to me”: privacy concerns and perspectives following the Cambridge Analytica scandal [J]. International Journal of Human-Computer Studies, 2020, 143: No.102498. |
| [2] | Tehrani P M, Sabaruddin J S B H, Ramanathan D A P. Cross border data transfer: complexity of adequate protection and its exceptions [J]. Computer Law and Security Review, 2018, 34(3): 582-594. |
| [3] | Sinha A. Client-server computing [J]. Communications of the ACM, 1992, 35(7): 77-98. |
| [4] | Urovi V. Transparency of personal health data sharing and the Digital Services Act [M]// VERDUYN P. SEM policy brief collection: digitalisation: EU digital services act. Maastricht: Maastricht University Press, 2025: 44-53. |
| [5] | Rong K, Ling Y, Yang T, et al. Cross-border data transfer: patterns and discrepancies [J]. Journal of International Business Policy, 2025, 8(1): 10-32. |
| [6] | Zyskind G, Nathan O, Pentland A S. Decentralizing privacy: using blockchain to protect personal data [C]// S&P Workshops 2015. Piscataway: IEEE, 2015: 180-184. |
| [7] | Yang L, Zou W, Wang J, et al. EdgeShare: a blockchain-based edge data-sharing framework for industrial Internet of Things [J]. Neurocomputing, 2022, 485: 219-232. |
| [8] | Li T, Wang H, He D, et al. Blockchain-based privacy-preserving and rewarding private data sharing for IoT [J]. IEEE Internet of Things Journal, 2022, 9(16): 15138-15149. |
| [9] | Zhang J, Yang Y, Liu X, et al. An efficient blockchain-based hierarchical data sharing for healthcare Internet of Things [J]. IEEE Transactions on Industrial Informatics, 2022, 18(10): 7139-7150. |
| [10] | Regulation (EU) 2016/679 Protection of natural persons with regard to the proceedings of personal data and on the free movement of such data, and repealing Directive 95/46/EC (General Data Protection Regulation) [S]. |
| [11] | Cooper J C, Kobayashi B H. Unreasonable: a strict liability solution to the FTC's data security problem [J]. Michigan Technology Law Review, 2022, 28: 257-304. |
| [12] | Yaraghi N, Gopal R D. The role of HIPAA omnibus rules in reducing the frequency of medical data breaches: insights from an empirical study [J]. The Milbank Quarterly, 2018, 96(1): 144-166. |
| [13] | Crepax T. Global privacy control and portability of privacy preferences through browser settings: a comparative study of techno-legal challenges under the CCPA/CPRA and the GDPR [EB/OL]. (2024-01-30) [2025-11-20]. . |
| [14] | Kaufmann J, Hilgert F, Wohlthat R. The proposed American Data Privacy and Protection Act in comparison with GDPR: does the current U.S. bill of the ADPPA converge towards the “gold standard” concepts under the EU GDPR — or not? [J]. Computer Law Review International, 2022, 23(5): 146-152. |
| [15] | Phillips B. UK further education sector journey to compliance with the general data protection regulation and the data protection act 2018 [J]. Computer Law and Security Review, 2021, 42: No.105586. |
| [16] | Paltiel M. Recent amendments to the Australian Privacy Act [J]. Journal of Bioethical Inquiry, 2023, 20(2): 161-167. |
| [17] | Alhababi H H. Cross-border data transfer between the GCC data protection laws and the GDPR [J]. Global Journal of Comparative Law, 2024, 13(2): 178-200. |
| [18] | Albahar M, Thanoon M. Privacy regulations in the Middle East: challenges & solutions [J]. International Transaction Journal of Engineering, Management, and Applied Sciences and Technologies, 2022, 13(5): 1-11. |
| [19] | Ali M, Dhamotharan R, Khan E, et al. SeDaSC: secure data sharing in clouds [J]. IEEE Systems Journal, 2017, 11(2): 395-440. |
| [20] | Bermudez I, Traverso S, Mellia M, et al. Exploring the cloud from passive measurements: the Amazon AWS case [C]// INFOCOM 2013. Piscataway: IEEE, 2013: 230-234. |
| [21] | Chappell D. Introducing the Azure services platform: an early look at windows Azure, servicesnet, servicesSQL, and live services [EB/OL]. (2008-10) [2025-11-12]. . |
| [22] | Bisong E. An overview of Google cloud platform services [M]// Building machine learning and deep learning models on Google Cloud Platform: a comprehensive guide for beginners. Berkeley: Apress, 2019: 7-10. |
| [23] | Shen J, Yang H, Vijayakumar P, et al. A privacy-preserving and untraceable group data sharing scheme in cloud computing [J]. IEEE Transactions on Dependable and Secure Computing, 2022, 19(4): 2198-2210. |
| [24] | Miyachi K, Mackey T K. hOCBS: A privacy-preserving blockchain framework for healthcare data leveraging an on-chain and off-chain system design [J]. Information Processing and Management, 2021, 58(3): No.102535. |
| [25] | Zou R, Lv X, Zhao J, et al. SPChain: blockchain-based medical data sharing and privacy-preserving eHealth system [J]. Information Processing and Management, 2021, 58(4): No.102604. |
| [26] | Frimpong S A, Han M, Boahen E K, et al. RecGuard: an efficient privacy-preservation blockchain-based system for online social network users [J]. Blockchain: Research and Applications, 2023, 4(1): No.100111. |
| [27] | Augusto A, Belchior R, Correia M, et al. SoK: security and privacy of blockchain interoperability [C]// S&P 2024. Piscataway: IEEE, 2024: 3840-3865. |
| [28] | Kumar V, Budhiraja I, Jabbari A, et al. Efficient blockchain interoperability design for cross-chain transactions in future internet-of-value [J]. Peer-to-Peer Networking and Applications, 2025, 18(3): No.110. |
| [29] | Monika, Bhatia R, Jain A, et al. Hash time locked contract based asset exchange solution for probabilistic public blockchains [J]. Cluster Computing, 2022, 25(6): 4189-4201. |
| [30] | Kwon J, Buchman E. Cosmos whitepaper: a network of distributed ledgers [R/OL]. (2020-12-19) [2025-11-12]. . |
| [31] | Wood G. Polkadot: vision for a heterogeneous multi-chain framework [R/OL]. [2025-11-12]. . |
| [32] | Campanile L, Iacono M, Marulli F, et al. Designing a GDPR compliant blockchain-based IoV distributed information tracking system [J]. Information Processing and Management, 2021, 58(3): No.102511. |
| [33] | 李重,施超煊,潘敏学,等.基于语义重排序的代码注释生成方法[J].软件学报,2026,37(2):601-620. |
| LI C, SHI C X, PAN M X, et al. Code comment generation method based on semantic reranking[J]. Journal of Software, 2026, 37(2): 601-620.. |
| [1] | Jiahang LI, Qilong HAN, Lijie LI, Hui ZHANG. Large language model-driven method for qualifier enhancement in hyper-relational knowledge graphs [J]. Journal of Computer Applications, 2026, 46(7): 2043-2053. |
| [2] | Didi HOU, Shaodong HONG, Yujie FU, Yunhe CUI, Guowei SHEN. Cybersecurity named entity recognition method based on large language model linking [J]. Journal of Computer Applications, 2026, 46(7): 2064-2073. |
| [3] | Yadian CHENG, Yingying LI, Ping ZHANG, Fangbing QIU, Xiaonan CHAI, Yuqiao SHU. Dual-role interaction mechanism-based large language model for psychological health [J]. Journal of Computer Applications, 2026, 46(7): 2054-2063. |
| [4] | Yusheng YI, Zhaohao HUANG, Zihao DENG, Leilei KONG, Haoliang QI. CORER: collaborative multi-knowledge large language model prompt framework for IT application innovation database migration [J]. Journal of Computer Applications, 2026, 46(6): 1811-1817. |
| [5] | Taixin CAI, Fengfeng WEI. Large language model-enhanced ant colony optimization for multi-solution traveling salesman problems [J]. Journal of Computer Applications, 2026, 46(6): 1712-1720. |
| [6] | Jintao WANG, Zhilin GAO, Qixiang MENG, Fanliang BU. Legal case retrieval method via case information reformulation using large language model [J]. Journal of Computer Applications, 2026, 46(6): 1785-1792. |
| [7] | Longyu XIONG, Shengdong DU, Haochen SHI, Jie HU, Yan YANG, Tianrui LI. Government affairs hotline question answering system based on knowledge-enhanced large language model architecture [J]. Journal of Computer Applications, 2026, 46(6): 1721-1727. |
| [8] | Junling WANG, Junjun BIAN, Jianian LIU, Zhiqiang XU. Markov chain model and profit analysis of two-selfish-miner strategy in ethereum classic network [J]. Journal of Computer Applications, 2026, 46(5): 1526-1533. |
| [9] | Qianfei WANG, Yang LI, Deyu LI, Suge WANG. Dual-channel feature fusion representation method for short-text clustering based on large language model [J]. Journal of Computer Applications, 2026, 46(5): 1441-1449. |
| [10] | Xing SHENG, Sunxian WENG, Kuosong CHEN, Zhongping WANG, Ruifeng REN, Yong LIU. Deep learning-based patent value evaluation for power grid enterprises [J]. Journal of Computer Applications, 2026, 46(5): 1468-1474. |
| [11] | Jiali ZHENG, Gang ZHOU, Jing CHEN, Shunhang LI. Adaptive multi-feature fusion detection method for AI-generated text [J]. Journal of Computer Applications, 2026, 46(5): 1433-1440. |
| [12] | Wei SHE, Kong CHENG, Shuhui ZHANG, Jiawei MA, Chenhong QI, Guangjun ZAI. Covert communication model assisted by smart contracts [J]. Journal of Computer Applications, 2026, 46(4): 1182-1190. |
| [13] | Xiaoyu WANG, Xin LI, Di XUE, Zhangtao JIANG, Wei WANG, Yanjun XIAO. Vulnerability classification framework for video surveillance network security based on large language models [J]. Journal of Computer Applications, 2026, 46(4): 1158-1170. |
| [14] | Kaizhou SHI, Xuan HE, Guoyi HOU, Gen LI, Shuanggao LI, Xiang HUANG. Airborne product metrological traceability knowledge graph construction method based on large language models [J]. Journal of Computer Applications, 2026, 46(4): 1086-1095. |
| [15] | Haoyang ZHANG, Liping ZHANG, Sheng YAN, Na LI, Xuefei ZHANG. Review of large language model methods for knowledge graph completion [J]. Journal of Computer Applications, 2026, 46(3): 683-695. |
| Viewed | ||||||
|
Full text |
|
|||||
|
Abstract |
|
|||||