Enterprises operating across borders often face conflicting data protection regulations and must address coordinated execution across heterogeneous blockchains, making compliant cross-border data transfer complex and risky. Therefore, a smart contract generation framework driven by Large Language Model (LLM) and Semantic Web Rule Language (SWRL) was proposed for cross-border data compliance across heterogeneous blockchains. First, centering on formalized rule definition-driven access control, cross-chain interoperability between two heterogeneous blockchains was achieved by cooperating with notarization services. Additionally, the data subject's latest authorization was injected into access decisions in real-time by utilizing an integrated consent module. Second, a rule matching framework based on finite-state decision process was constructed to decompose Semantic Web Rule Language (SWRL) compliance rules into reusable and modular logical units. Finally, a fine-tuned LLM was introduced to complete the SWRL rules semantically, which were automatically converted into executable smart contract code on the blockchain. Experimental results show that in the smart contract code generation task, the fine-tuned LLM achieves a comprehensive code generation success rate (FullRate) of 76.1%, which is improved by 18.6, 3.2, and 1.2 percentage points compared to that of the baseline models LLaMA-3-8B-Instruct, DeepSeek-V3, and DeepSeek-R1, respectively. Furthermore, the performance of the prototype system was evaluated under varying network node counts and adjustable channel configurations, demonstrating that it meets enterprise-level scalability requirements. The proposed framework significantly enhances the efficiency of smart contract generation while maintaining high security and logical correctness, demonstrating the practical feasibility and engineering application value of the framework in efficient and compliant cross-border data sharing scenarios.
To address the issue of unauthorized forgery or tampering of facial images, an active defense method based on attention mask and feature extraction was proposed. This method was designed to take offensive measures to interfere with forgery models by adding adversarial examples into the image, so that the image was prevented forgery from the source and the visual quality of the protected image was enhanced. Firstly, an improved gradient descent method was employed to generate and add adversarial perturbations to the original image, resulting in the generation of a blurred false image after forgery processing the original image. At the same time, the attention mask was incorporated into the generator to enhance key feature channels, thereby reducing the influence of complex backgrounds and lighting. Additionally, the VGG16 pre-trained network was utilized to extract image features, thereby improving the visual quality of adversarial images at feature map level. Experimental results on CelebFaces Attributes (CelebA) dataset and Radboud Faces Database (RaFD) dataset show that, for StarGAN, the defense success rates of the proposed model are 99.80% and 99.63% respectively. Compared with the baseline method based on spread-spectrum adversarial attack, the proposed method has the visual quality of generated adversarial images improved by 30.86% and 26.63% respectively on Structure Similarity Index Measure (SSIM), and the Peak Signal-to-Noise Ratio (PSNR) improved by 34.80% and 36.15% respectively. The above indicates that the proposed method defends against face image forgery effectively while enhancing the visual quality of adversarial images.
In the advanced assisted driving device, machine vision technology was used to process the video of vehicles in front in real time to dynamically recognize and predict the posture and behavior of vehicle. Concerning low precision and large delay of this kind of recognition algorithm, a deep learning algorithm for vehicle behavior dynamic recognition based on Long Short-Term Memory (LSTM) was proposed. Firstly, the key frames in vehicle behavior video were extracted. Secondly, a dual convolutional network was introduced to analyze the feature information of key frames in parallel, and then LSTM network was used to sequence the extracted characteristic information. Finally, the output predicted score was used to determine the behavior type of vehicle. The experimental results show that the proposed algorithm has an accuracy of 95.6%, and the recognition time of a single video is only 1.72 s. The improved dual convolutional network algorithm improves the accuracy by 8.02% compared with ordinary convolutional network and increases by 6.36% compared with traditional vehicle behavior recognition algorithm based on a self-built dataset.
Electrocardiogram (ECG) signal has attracted widespread interest for the potential use in biometrics due to its ease-of-monitoring and individual uniqueness. To address the accuracy and real-time performance problem of human identification, a fast and robust ECG-based identification algorithm was proposed in this study, which was particularly suitable for miniaturized embedded platforms. Firstly, a dynamic-threshold method was used to extract stable ECG waveforms as template samples and test samples; then, based on a modified Dynamic Time Warping (DTW) method, the degree of difference between matching samples was calculated to reach a result of recognition. Considering that ECG is a kind of time-varying and non-stationary signals, ECG template database should be dynamically updated to ensure the consistency of the template and body status and further improve recognition accuracy and robustness. The analysis results with MIT-BIH Arrhythmia database and own experimental data show that the proposed algorithm has an accuracy rate at 98.6%. On the other hand, the average running times of dynamic threshold setting and optimized DTW algorithms on Android mobile terminals are about 59.5 ms and 26.0 ms respectively, which demonstrates a significantly improved real-time performance.