소스 검색

存临时文件

523096025 1 년 전
부모
커밋
3ae82eca92
28개의 변경된 파일5241개의 추가작업 그리고 26개의 파일을 삭제
  1. 145 0
      huimv-env-input/c/0513.model
  2. 1 0
      huimv-env-input/c/config.txt
  3. BIN
      huimv-env-input/c/libpredict_free.so
  4. 273 0
      huimv-env-input/c/main.c
  5. 7 0
      huimv-env-input/c/main.h
  6. 182 0
      huimv-env-input/c/main_old.c
  7. 16 0
      huimv-env-input/c/make.sh
  8. 0 0
      huimv-env-input/c/predict
  9. 604 0
      huimv-env-input/c/predict.c
  10. 15 0
      huimv-env-input/c/predict.h
  11. 3316 0
      huimv-env-input/c/svm.cpp
  12. 123 0
      huimv-env-input/c/svm.h
  13. 2 0
      huimv-env-input/c/temp_input.txt
  14. 1 0
      huimv-env-input/c/temp_output.txt
  15. 10 0
      huimv-env-input/c/test.cpp
  16. 9 0
      huimv-env-input/c/test.h
  17. 1 0
      huimv-env-input/src/main/java/com/huimv/env/input/c/MyNativeClass.java
  18. 15 14
      huimv-env-input/src/main/java/com/huimv/env/input/config/WeChatMessage.java
  19. 128 7
      huimv-env-input/src/main/java/com/huimv/env/input/controller/BaseFarmController.java
  20. 20 0
      huimv-env-input/src/main/java/com/huimv/env/input/controller/SysAccountMultilevelController.java
  21. 145 0
      huimv-env-input/src/main/java/com/huimv/env/input/entity/SysAccountMultilevel.java
  22. 16 0
      huimv-env-input/src/main/java/com/huimv/env/input/mapper/SysAccountMultilevelMapper.java
  23. 135 5
      huimv-env-input/src/main/java/com/huimv/env/input/server/EnvInputServerHandler.java
  24. 16 0
      huimv-env-input/src/main/java/com/huimv/env/input/service/ISysAccountMultilevelService.java
  25. 20 0
      huimv-env-input/src/main/java/com/huimv/env/input/service/impl/SysAccountMultilevelServiceImpl.java
  26. 4 0
      huimv-env-input/src/main/resources/application-prod.yml
  27. BIN
      huimv-env-input/src/main/resources/c/libpredict_free.so
  28. 37 0
      huimv-env-input/src/main/resources/mapper/SysAccountMultilevelMapper.xml

+ 145 - 0
huimv-env-input/c/0513.model

@@ -0,0 +1,145 @@
+svm_type one_class
+kernel_type rbf
+gamma 2.6699999999999998e-06
+nr_class 2
+total_sv 138
+rho 16.702674174783283
+SV
+1 1:126 2:43 3:182 4:60.554443 5:99.42956 6:151.38611 7:84.77975 8:242.21777 9:41.188825 10:333.04944 11:21.654038 12:454.15833 13:22.442997 14:756.93054 15:10.53742 16:938.59387 17:10.682771 
+1 1:125 2:47 3:182 4:60.554443 5:101.55044 6:151.38611 7:86.223847 8:242.21777 9:41.446588 10:333.04944 11:22.287838 12:454.15833 13:23.44612 
+1 1:127 2:43 3:183 4:60.554443 5:110.84562 6:151.38611 7:107.15502 8:242.21777 9:45.90342 10:363.32666 11:26.721852 12:454.15833 13:29.568101 14:726.65332 15:10.871863 16:938.59387 17:10.58158 18:1029.4255 19:10.052983 
+1 1:126 2:42 3:185 4:60.554443 5:102.49122 6:151.38611 7:85.427815 8:242.21777 9:43.654681 10:333.04944 11:20.822238 12:454.15833 13:22.868751 14:544.98999 15:12.020001 16:756.93054 17:12.698464 18:1150.5344 19:10.417066 
+0.40065788078824133 1:163 2:60 3:252 4:60.554443 5:167.53016 6:151.38611 7:168.00371 8:242.21777 9:84.770298 10:363.32666 11:40.893478 12:454.15833 13:50.182318 14:544.98999 15:36.338779 16:666.09888 17:18.201347 18:756.93054 19:22.210897 20:847.76221 21:21.408766 
+1 1:127 2:43 3:184 4:60.554443 5:100.88062 6:151.38611 7:82.434678 8:242.21777 9:43.656636 10:333.04944 11:19.696454 12:454.15833 13:22.535376 14:544.98999 15:10.02988 16:938.59387 17:10.833847 18:1029.4255 19:10.127173 
+1 1:88 2:11 3:143 
+1 1:128 2:44 3:186 4:60.554443 5:110.23927 6:151.38611 7:106.04997 8:242.21777 9:50.961319 10:363.32666 11:18.745891 12:454.15833 13:28.413001 14:544.98999 15:21.23594 16:635.82166 17:13.427983 18:1150.5344 19:11.462157 20:1241.3661 21:13.705061 22:1332.1978 23:12.278811 
+1 1:131 2:44 3:185 4:60.554443 5:101.81902 6:151.38611 7:84.234863 8:242.21777 9:42.387694 10:333.04944 11:22.733967 12:454.15833 13:22.610763 14:756.93054 15:11.417988 16:938.59387 17:10.739879 18:1241.3661 19:10.32859 
+1 1:126 2:44 3:182 4:60.554443 5:114.16549 6:151.38611 7:106.50517 8:242.21777 9:48.680914 10:363.32666 11:24.143564 12:454.15833 13:31.257077 14:544.98999 15:14.355098 16:666.09888 17:11.283778 18:756.93054 19:14.053749 20:1332.1978 21:10.167714 
+1 1:130 2:42 3:183 4:60.554443 5:105.98705 6:151.38611 7:102.15257 8:242.21777 9:48.049963 10:363.32666 11:19.316791 12:454.15833 13:30.949497 14:544.98999 15:20.406788 16:635.82166 17:15.420259 18:726.65332 19:10.911879 20:1241.3661 21:10.602115 
+1 1:49 2:20 3:92 4:60.554443 5:100.07044 6:151.38611 7:91.36063 8:242.21777 9:56.01195 10:333.04944 11:36.68523 12:454.15833 13:35.333314 14:544.98999 15:29.45936 16:635.82166 17:16.271862 18:726.65332 19:13.897489 20:847.76221 21:15.317978 22:938.59387 23:13.074852 
+1 1:130 2:45 3:185 4:60.554443 5:102.22745 6:151.38611 7:84.414206 8:242.21777 9:43.511163 10:333.04944 11:21.040228 12:454.15833 13:20.223289 14:756.93054 15:10.881412 
+1 1:126 2:44 3:183 4:60.554443 5:104.30654 6:151.38611 7:86.911245 8:242.21777 9:44.980778 10:333.04944 11:19.409533 12:454.15833 13:18.536043 
+1 1:125 2:44 3:182 4:60.554443 5:99.602407 6:151.38611 7:82.860838 8:242.21777 9:43.53336 10:333.04944 11:21.353505 12:454.15833 13:21.954325 14:756.93054 15:10.235126 16:938.59387 17:10.281251 
+1 1:114 2:10 3:123 4:60.554443 5:123.27321 6:242.21777 7:27.186066 
+1 1:120 2:26 3:170 4:60.554443 5:128.99991 6:151.38611 7:115.99134 8:242.21777 9:28.984198 10:454.15833 11:24.769796 12:544.98999 13:36.823532 14:635.82166 15:26.984505 16:847.76221 17:18.767202 18:1211.0889 19:23.418952 20:1332.1978 21:44.399724 22:1513.8611 23:36.137488 
+1 1:90 2:12 3:149 4:60.554443 5:71.015389 6:151.38611 7:78.640549 8:242.21777 9:53.439857 10:363.32666 11:29.852789 12:454.15833 13:16.558183 14:544.98999 15:14.044134 16:635.82166 17:19.147918 18:726.65332 19:10.592816 20:847.76221 21:10.301368 
+0.87274368388395585 1:116 2:7 3:124 4:60.554443 5:118.76435 6:242.21777 7:29.57766 8:333.04944 9:10.276761 
+1 1:127 2:43 3:183 4:60.554443 5:101.30932 6:151.38611 7:83.83194 8:242.21777 9:40.473603 10:333.04944 11:20.236946 12:454.15833 13:23.444162 14:756.93054 15:12.238104 16:938.59387 17:10.169195 
+1 1:85 2:12 3:143 4:60.554443 5:75.906094 6:151.38611 7:85.981003 8:242.21777 9:58.92815 10:363.32666 11:27.481543 12:454.15833 13:28.413669 14:544.98999 15:25.941546 16:635.82166 17:21.175009 18:726.65332 19:10.53582 20:847.76221 21:10.953722 
+1 1:125 2:44 3:181 4:60.554443 5:114.188 6:151.38611 7:103.84035 8:242.21777 9:48.127407 10:363.32666 11:20.360865 12:454.15833 13:31.132059 14:544.98999 15:19.264668 16:635.82166 17:13.36332 18:1150.5344 19:10.934713 20:1241.3661 21:13.057424 22:1332.1978 23:10.000113 
+1 1:162 2:60 3:252 4:60.554443 5:168.83433 6:151.38611 7:167.4241 8:242.21777 9:83.271364 10:363.32666 11:42.785586 12:454.15833 13:48.011411 14:544.98999 15:33.258285 16:756.93054 17:20.745964 18:847.76221 19:18.600252 
+1 1:67 2:27 3:124 4:60.554443 5:106.24684 6:151.38611 7:98.326118 8:242.21777 9:54.837136 10:363.32666 11:30.859816 12:544.98999 13:25.309429 14:635.82166 15:22.197832 16:847.76221 17:15.477855 18:938.59387 19:13.655004 
+0.26837180267928995 1:123 2:44 3:183 4:60.554443 5:104.78792 6:151.38611 7:91.187188 8:242.21777 9:33.372733 10:333.04944 11:24.118122 12:454.15833 13:17.880656 14:544.98999 15:13.519778 16:756.93054 17:13.98535 18:1029.4255 19:10.583924 
+1 1:113 2:6 3:123 4:60.554443 5:106.69296 6:151.38611 7:58.626127 8:242.21777 9:17.566026 10:363.32666 11:10.605631 
+0.4211704939686694 1:162 2:61 3:253 4:60.554443 5:164.61874 6:151.38611 7:146.67881 8:242.21777 9:72.231109 10:333.04944 11:42.971656 12:454.15833 13:34.559337 14:544.98999 15:41.311577 16:635.82166 17:18.165112 18:756.93054 19:16.442797 20:847.76221 21:16.27172 
+1 1:128 2:48 3:186 4:60.554443 5:113.95387 6:151.38611 7:108.25954 8:242.21777 9:45.024594 10:363.32666 11:25.118767 12:454.15833 13:27.654685 14:726.65332 15:11.833445 16:938.59387 17:11.386614 18:1029.4255 19:11.768116 20:1332.1978 21:10.113485 
+1 1:150 2:34 3:197 4:60.554443 5:141.27219 6:151.38611 7:114.7927 8:242.21777 9:93.120695 10:333.04944 11:67.784714 12:454.15833 13:52.340114 14:544.98999 15:55.002007 16:635.82166 17:38.352056 18:726.65332 19:20.324827 20:847.76221 21:13.324595 22:1513.8611 23:13.534098 
+1 1:127 2:43 3:184 4:60.554443 5:107.81436 6:151.38611 7:84.196219 8:242.21777 9:41.762631 10:333.04944 11:22.025878 12:454.15833 13:21.152558 
+1 1:86 2:11 3:143 4:60.554443 5:72.852903 6:151.38611 7:76.067128 8:242.21777 9:49.625403 10:363.32666 11:25.213614 12:454.15833 13:16.633246 14:544.98999 15:12.493415 16:635.82166 17:17.897563 18:726.65332 19:10.18494 20:847.76221 21:10.613925 
+1 1:126 2:43 3:182 4:60.554443 5:113.14013 6:151.38611 7:107.52387 8:242.21777 9:45.160894 10:363.32666 11:23.189838 12:454.15833 13:28.271788 14:726.65332 15:11.568819 16:1029.4255 17:11.063227 
+1 1:249 2:52 3:308 4:60.554443 5:1563.9296 6:151.38611 7:1040.5484 8:242.21777 9:470.57016 10:333.04944 11:141.92736 12:454.15833 13:88.103753 14:544.98999 15:112.58536 16:635.82166 17:103.03249 18:726.65332 19:30.837096 20:938.59387 21:26.691648 22:1120.2572 23:25.851443 
+1 1:127 2:41 3:183 4:60.554443 5:119.68179 6:151.38611 7:106.0231 8:242.21777 9:46.970378 10:363.32666 11:21.21362 12:454.15833 13:31.760351 14:544.98999 15:20.158438 16:635.82166 17:13.083191 18:1150.5344 19:11.053524 20:1241.3661 21:12.792554 
+1 1:126 2:43 3:183 4:60.554443 5:118.7556 6:151.38611 7:107.83699 8:242.21777 9:44.850632 10:363.32666 11:24.924487 12:454.15833 13:27.012222 14:726.65332 15:12.180447 16:938.59387 17:10.571583 18:1029.4255 19:10.614144 20:1241.3661 21:10.149077 
+1 1:85 2:10 3:143 4:60.554443 5:63.487871 6:151.38611 7:70.723641 8:242.21777 9:52.048488 10:333.04944 11:29.398075 12:454.15833 13:16.529363 14:544.98999 15:14.395658 16:635.82166 17:13.302818 18:756.93054 19:10.007395 
+0.23415156233335113 1:126 2:44 3:181 4:60.554443 5:103.55758 6:151.38611 7:86.955223 8:242.21777 9:37.569467 10:333.04944 11:24.249811 12:454.15833 13:24.206781 
+1 1:287 2:98 3:444 4:60.554443 5:312.73657 6:151.38611 7:331.75517 8:242.21777 9:200.34628 10:333.04944 11:86.04148 12:454.15833 13:85.128354 14:544.98999 15:59.580461 16:635.82166 17:13.647979 18:726.65332 19:10.894134 20:847.76221 21:15.027671 22:938.59387 23:22.237491 
+1 1:286 2:98 3:443 4:60.554443 5:308.1941 6:151.38611 7:321.79677 8:242.21777 9:179.68636 10:363.32666 11:77.785929 12:454.15833 13:103.36477 14:544.98999 15:68.89958 16:756.93054 17:20.760558 18:1029.4255 19:20.369277 20:1332.1978 21:19.386827 22:1423.0294 23:14.825551 
+1 1:127 2:45 3:184 4:60.554443 5:97.665144 6:151.38611 7:84.628116 8:242.21777 9:45.332416 10:333.04944 11:20.194687 12:454.15833 13:21.432782 14:544.98999 15:12.064514 16:938.59387 17:10.100931 
+1 1:125 2:46 3:185 4:60.554443 5:100.45776 6:151.38611 7:85.212719 8:242.21777 9:45.379179 10:333.04944 11:19.167059 12:454.15833 13:20.827283 14:544.98999 15:12.9682 16:635.82166 17:10.121609 18:1029.4255 19:10.115569 
+1 1:125 2:43 3:182 4:60.554443 5:108.50931 6:151.38611 7:82.653907 8:242.21777 9:43.514503 10:333.04944 11:22.536386 12:454.15833 13:23.474889 14:756.93054 15:11.519359 
+0.18790058284392383 1:114 2:8 3:123 4:60.554443 5:108.38873 6:151.38611 7:58.51636 8:242.21777 9:17.58544 10:363.32666 11:10.673452 
+1 1:126 2:45 3:182 4:60.554443 5:104.02633 6:151.38611 7:85.667165 8:242.21777 9:42.145054 10:363.32666 11:20.390644 12:454.15833 13:21.893838 14:756.93054 15:10.994195 
+1 1:287 2:98 3:443 4:60.554443 5:312.19384 6:151.38611 7:329.37714 8:242.21777 9:200.66539 10:333.04944 11:87.488559 12:454.15833 13:79.249822 14:544.98999 15:52.599506 16:938.59387 17:16.520751 18:1029.4255 19:13.827875 20:1150.5344 21:17.032639 22:1241.3661 23:17.804699 
+0.21761102797414811 1:72 2:28 3:129 4:60.554443 5:100.81362 6:151.38611 7:100.45981 8:242.21777 9:57.287471 10:333.04944 11:30.635717 12:544.98999 13:26.036665 14:635.82166 15:20.525526 16:847.76221 17:10.769292 
+1 1:126 2:43 3:182 4:60.554443 5:116.20232 6:151.38611 7:101.0234 8:242.21777 9:47.640061 10:363.32666 11:19.843022 12:454.15833 13:29.281524 14:544.98999 15:18.891912 16:635.82166 17:13.381651 18:726.65332 19:10.484033 20:1241.3661 21:10.870278 
+1 1:113 2:7 3:123 4:60.554443 5:125.34148 6:242.21777 7:30.674159 
+0.35882305112580481 1:128 2:44 3:185 4:60.554443 5:110.982 6:151.38611 7:101.68903 8:242.21777 9:47.87465 10:363.32666 11:19.840015 12:454.15833 13:29.602812 14:544.98999 15:20.11616 16:635.82166 17:13.30119 18:726.65332 19:10.425335 20:1241.3661 21:10.210009 
+1 1:288 2:98 3:444 4:60.554443 5:313.31845 6:151.38611 7:329.09382 8:242.21777 9:202.72507 10:333.04944 11:88.013665 12:454.15833 13:81.327549 14:544.98999 15:54.441882 16:938.59387 17:17.883257 18:1029.4255 19:13.979125 20:1150.5344 21:18.46882 22:1241.3661 23:20.099505 
+1 1:113 2:9 3:123 4:60.554443 5:118.64338 6:242.21777 7:28.075376 8:333.04944 9:10.298885 
+1 1:116 2:10 3:125 4:60.554443 5:128.07925 6:242.21777 7:30.147681 
+1 1:127 2:43 3:183 4:60.554443 5:100.54629 6:151.38611 7:85.940576 8:242.21777 9:41.405724 10:333.04944 11:19.494543 12:454.15833 13:21.27199 14:938.59387 15:11.545395 
+1 1:125 2:44 3:181 4:60.554443 5:114.37491 6:151.38611 7:106.32116 8:242.21777 9:49.297457 10:363.32666 11:23.184673 12:454.15833 13:30.447654 14:544.98999 15:13.724069 16:756.93054 17:12.119248 18:1029.4255 19:11.384346 20:1332.1978 21:10.184855 
+1 1:160 2:60 3:252 4:60.554443 5:150.68897 6:151.38611 7:138.50792 8:242.21777 9:76.3954 10:363.32666 11:36.647839 12:454.15833 13:46.962642 14:544.98999 15:36.721613 16:635.82166 17:18.906866 18:756.93054 19:25.250639 20:847.76221 21:23.511995 22:1544.1383 23:10.147889 
+1 1:126 2:44 3:182 4:60.554443 5:117.72542 6:151.38611 7:98.721206 8:242.21777 9:44.438756 10:363.32666 11:21.37135 12:454.15833 13:31.946783 14:544.98999 15:20.647192 16:635.82166 17:16.175488 18:726.65332 19:11.111809 20:1241.3661 21:12.127028 22:1544.1383 23:10.769736 
+1 1:114 2:8 3:123 4:60.554443 5:126.28584 6:242.21777 7:31.318267 
+1 1:287 2:97 3:443 4:60.554443 5:315.68437 6:151.38611 7:330.2245 8:242.21777 9:199.30222 10:333.04944 11:87.454413 12:454.15833 13:80.546073 14:544.98999 15:53.408328 16:938.59387 17:19.149897 18:1029.4255 19:15.613099 20:1150.5344 21:18.774424 22:1241.3661 23:18.885107 
+1 1:129 2:43 3:184 4:60.554443 5:103.11534 6:151.38611 7:85.581804 8:242.21777 9:42.160642 10:363.32666 11:19.472858 12:454.15833 13:22.178916 14:756.93054 15:10.836541 
+1 1:124 2:42 3:182 4:60.554443 5:110.78895 6:151.38611 7:99.977355 8:242.21777 9:46.650308 10:363.32666 11:24.136918 12:454.15833 13:33.917356 14:544.98999 15:22.587365 16:635.82166 17:15.862654 18:726.65332 19:10.505066 20:1241.3661 21:10.703431 
+1 1:126 2:44 3:182 4:60.554443 5:113.00838 6:151.38611 7:104.96221 8:242.21777 9:48.455106 10:363.32666 11:20.018633 12:454.15833 13:31.154894 14:544.98999 15:21.012266 16:635.82166 17:13.686757 18:1150.5344 19:10.551999 20:1241.3661 21:12.126674 22:1332.1978 23:10.146326 
+1 1:128 2:45 3:184 4:60.554443 5:101.54442 6:151.38611 7:84.039017 8:242.21777 9:42.519867 10:363.32666 11:18.555016 12:454.15833 13:20.716738 14:756.93054 15:10.280949 
+1 1:116 2:9 3:124 4:60.554443 5:102.64034 6:151.38611 7:61.136527 8:242.21777 9:17.398255 10:363.32666 11:10.920343 
+1 1:287 2:99 3:445 4:60.554443 5:314.31234 6:151.38611 7:333.56574 8:242.21777 9:203.89448 10:333.04944 11:86.911793 12:454.15833 13:81.818411 14:544.98999 15:57.244769 16:635.82166 17:10.962469 18:726.65332 19:10.600287 20:847.76221 21:11.783033 22:938.59387 23:19.583873 
+1 1:123 2:44 3:180 4:60.554443 5:104.77979 6:151.38611 7:85.554911 8:242.21777 9:40.401533 10:363.32666 11:22.133981 12:454.15833 13:23.594813 14:756.93054 15:12.519241 
+1 1:125 2:45 3:182 4:60.554443 5:105.12979 6:151.38611 7:86.578603 8:242.21777 9:37.953699 10:333.04944 11:26.910302 12:454.15833 13:24.69502 14:544.98999 15:12.207513 16:1241.3661 17:10.466116 
+1 1:128 2:41 3:183 4:60.554443 5:112.81575 6:151.38611 7:106.3992 8:242.21777 9:44.418717 10:363.32666 11:26.209299 12:454.15833 13:27.490949 14:726.65332 15:11.682859 16:938.59387 17:12.443495 18:1029.4255 19:11.563219 20:1241.3661 21:11.183738 
+1 1:126 2:46 3:182 4:60.554443 5:115.0447 6:151.38611 7:108.71259 8:242.21777 9:47.414859 10:363.32666 11:23.857486 12:454.15833 13:26.173584 14:726.65332 15:11.873906 16:1029.4255 17:10.846034 
+1 1:128 2:46 3:185 4:60.554443 5:99.167081 6:151.38611 7:82.005225 8:242.21777 9:43.394244 10:333.04944 11:19.609491 12:454.15833 13:21.581448 14:544.98999 15:11.258863 16:938.59387 17:10.038061 
+1 1:288 2:98 3:445 4:60.554443 5:312.58273 6:151.38611 7:337.02724 8:242.21777 9:203.26621 10:333.04944 11:84.756432 12:454.15833 13:82.860694 14:544.98999 15:59.10737 16:635.82166 17:11.401535 18:726.65332 19:10.892076 20:847.76221 21:15.888738 22:938.59387 23:22.995319 
+1 1:116 2:8 3:124 4:60.554443 5:121.81117 6:242.21777 7:26.014246 
+1 1:127 2:44 3:182 4:60.554443 5:99.233857 6:151.38611 7:87.713551 8:242.21777 9:42.489523 10:333.04944 11:22.575972 12:454.15833 13:21.129817 
+1 1:129 2:39 3:183 4:60.554443 5:98.350797 6:151.38611 7:86.778235 8:242.21777 9:42.783258 10:333.04944 11:18.391987 12:454.15833 13:21.066713 
+1 1:48 2:20 3:92 4:60.554443 5:99.697916 6:151.38611 7:91.640796 8:242.21777 9:56.630934 10:333.04944 11:37.348983 12:454.15833 13:35.726259 14:544.98999 15:29.72314 16:635.82166 17:18.020054 18:726.65332 19:14.183016 20:847.76221 21:17.8846 22:938.59387 23:14.266463 
+1 1:126 2:41 3:182 4:60.554443 5:103.40481 6:151.38611 7:86.634214 8:242.21777 9:41.09975 10:363.32666 11:20.806141 12:454.15833 13:23.60572 14:544.98999 15:10.01866 16:756.93054 17:13.304721 18:1150.5344 19:10.006963 
+1 1:128 2:45 3:182 4:60.554443 5:111.67174 6:151.38611 7:101.45568 8:242.21777 9:47.598342 10:363.32666 11:21.185028 12:454.15833 13:32.070254 14:544.98999 15:20.138868 16:635.82166 17:13.779142 18:1150.5344 19:10.431265 20:1241.3661 21:12.012143 22:1332.1978 23:10.393749 
+0.28424475722949399 1:287 2:98 3:443 4:60.554443 5:312.58078 6:151.38611 7:331.66395 8:242.21777 9:200.3093 10:333.04944 11:85.118361 12:454.15833 13:83.407073 14:544.98999 15:57.558701 16:635.82166 17:11.672444 18:726.65332 19:11.348889 20:847.76221 21:13.55262 22:938.59387 23:21.490178 
+1 1:126 2:45 3:184 4:60.554443 5:98.707907 6:151.38611 7:84.189202 8:242.21777 9:43.737909 10:333.04944 11:22.216266 12:454.15833 13:22.299598 14:544.98999 15:10.962246 16:1029.4255 17:10.135537 
+1 1:127 2:44 3:185 4:60.554443 5:109.81651 6:151.38611 7:109.77629 8:242.21777 9:51.379326 10:363.32666 11:22.12138 12:454.15833 13:26.490728 14:544.98999 15:13.445952 16:756.93054 17:12.577619 18:1029.4255 19:12.294554 20:1332.1978 21:11.234082 
+1 1:49 2:20 3:93 4:60.554443 5:98.323387 6:151.38611 7:89.331757 8:242.21777 9:57.239264 10:333.04944 11:36.722647 12:454.15833 13:34.502208 14:544.98999 15:28.965944 16:635.82166 17:15.920774 18:726.65332 19:13.327307 20:847.76221 21:15.669058 22:938.59387 23:12.767282 
+1 1:286 2:97 3:441 4:60.554443 5:310.69512 6:151.38611 7:328.4105 8:242.21777 9:199.7725 10:333.04944 11:88.190352 12:454.15833 13:81.501854 14:544.98999 15:53.94253 16:938.59387 17:15.872406 18:1059.7028 19:13.892828 20:1150.5344 21:18.59611 22:1241.3661 23:19.757888 
+1 1:87 2:12 3:144 4:60.554443 5:59.443708 6:151.38611 7:72.316601 8:242.21777 9:51.706045 10:333.04944 11:26.85127 12:454.15833 13:14.677114 14:544.98999 15:15.402788 16:635.82166 17:13.64282 18:756.93054 19:10.444581 
+1 1:287 2:98 3:445 4:60.554443 5:310.90985 6:151.38611 7:333.36391 8:242.21777 9:203.98617 10:333.04944 11:87.351121 12:454.15833 13:81.158115 14:544.98999 15:57.133444 16:938.59387 17:15.06684 18:1029.4255 19:13.235308 20:1150.5344 21:18.882689 22:1241.3661 23:17.238311 
+1 1:189 2:31 3:229 4:60.554443 5:137.29665 6:151.38611 7:116.37652 8:242.21777 9:73.611564 10:333.04944 11:59.316902 12:454.15833 13:46.28172 14:544.98999 15:46.099796 16:635.82166 17:36.467552 18:726.65332 19:19.023538 20:847.76221 21:14.916793 22:1513.8611 23:16.117099 
+1 1:163 2:27 3:212 4:60.554443 5:140.25189 6:151.38611 7:103.92488 8:242.21777 9:86.041184 10:333.04944 11:68.453597 12:454.15833 13:47.351337 14:544.98999 15:47.471123 16:635.82166 17:36.632798 18:726.65332 19:19.889337 20:1332.1978 21:11.179919 22:1513.8611 23:13.406152 
+0.12782239066435511 1:115 2:8 3:124 4:60.554443 5:126.92899 6:242.21777 7:31.293299 
+1 1:287 2:99 3:444 4:60.554443 5:303.63537 6:151.38611 7:309.87949 8:242.21777 9:176.5495 10:363.32666 11:73.669813 12:454.15833 13:105.379 14:544.98999 15:76.002896 16:635.82166 17:26.115453 18:726.65332 19:18.285747 20:817.48499 21:11.391927 22:938.59387 23:18.187519 
+1 1:128 2:45 3:185 4:60.554443 5:108.88789 6:151.38611 7:110.62394 8:242.21777 9:52.791771 10:363.32666 11:20.835316 12:454.15833 13:28.191876 14:544.98999 15:16.369218 16:756.93054 17:12.769459 18:1029.4255 19:10.720638 20:1332.1978 21:10.156975 
+1 1:287 2:97 3:444 4:60.554443 5:310.95576 6:151.38611 7:335.93589 8:242.21777 9:202.71381 10:333.04944 11:86.26773 12:454.15833 13:83.187063 14:544.98999 15:57.727143 16:938.59387 17:17.355457 18:1029.4255 19:16.796882 20:1150.5344 21:21.169472 22:1241.3661 23:20.333484 
+0.5508481461841761 1:128 2:43 3:183 4:60.554443 5:102.01703 6:151.38611 7:83.447902 8:242.21777 9:43.572165 10:333.04944 11:18.848674 12:454.15833 13:20.550394 14:756.93054 15:10.927793 
+1 1:126 2:44 3:183 4:60.554443 5:112.67628 6:151.38611 7:107.64276 8:242.21777 9:48.612405 10:363.32666 11:23.755343 12:454.15833 13:27.433705 14:726.65332 15:12.577654 16:938.59387 17:11.493732 18:1029.4255 19:12.472406 20:1332.1978 21:10.497762 
+0.89737595168171735 1:91 2:13 3:150 4:60.554443 5:77.732825 6:151.38611 7:80.352915 8:242.21777 9:50.944604 10:363.32666 11:28.534594 12:454.15833 13:16.960676 14:544.98999 15:12.750164 16:635.82166 17:18.350945 18:726.65332 19:10.204101 20:847.76221 21:11.254675 
+1 1:113 2:8 3:123 4:60.554443 5:120.36179 6:242.21777 7:27.359476 8:333.04944 9:10.961822 
+1 1:115 2:7 3:123 4:60.554443 5:121.67001 6:242.21777 7:27.289465 8:333.04944 9:10.024073 
+1 1:116 2:9 3:124 4:60.554443 5:112.05771 6:151.38611 7:56.999097 8:272.495 9:14.235526 10:454.15833 11:10.435947 
+1 1:127 2:44 3:183 4:60.554443 5:104.65259 6:151.38611 7:85.247424 8:242.21777 9:37.003543 10:333.04944 11:24.489382 12:454.15833 13:24.147503 14:635.82166 15:12.451711 16:1029.4255 17:10.307614 
+1 1:111 2:10 3:123 4:60.554443 5:116.58552 6:242.21777 7:25.84985 8:333.04944 9:10.135413 
+1 1:124 2:39 3:181 4:60.554443 5:108.92909 6:151.38611 7:106.31177 8:242.21777 9:46.013554 10:363.32666 11:24.209507 12:454.15833 13:26.492489 14:726.65332 15:12.176995 16:938.59387 17:10.475553 18:1029.4255 19:10.356576 20:1241.3661 21:10.28892 
+0.668665032129234 1:126 2:41 3:182 4:60.554443 5:106.64693 6:151.38611 7:89.158939 8:242.21777 9:34.969779 10:333.04944 11:26.755451 12:454.15833 13:20.869476 14:544.98999 15:13.073399 16:938.59387 17:10.322498 
+1 1:129 2:40 3:182 4:60.554443 5:110.9401 6:151.38611 7:107.27642 8:242.21777 9:48.027772 10:363.32666 11:26.487766 12:454.15833 13:26.560052 14:726.65332 15:12.402137 16:1029.4255 17:10.416058 
+1 1:126 2:45 3:185 4:60.554443 5:114.59569 6:151.38611 7:104.48313 8:242.21777 9:48.134513 10:363.32666 11:20.873053 12:454.15833 13:30.120826 14:544.98999 15:19.055474 16:635.82166 17:14.252481 18:1241.3661 19:12.708805 
+1 1:127 2:45 3:184 4:60.554443 5:104.88121 6:151.38611 7:86.12051 8:242.21777 9:35.619845 10:333.04944 11:26.566505 12:454.15833 13:22.208932 14:544.98999 15:12.958887 16:938.59387 17:11.238634 
+1 1:124 2:44 3:183 4:60.554443 5:101.80978 6:151.38611 7:84.909365 8:242.21777 9:43.792961 10:333.04944 11:20.347875 12:454.15833 13:20.540827 14:756.93054 15:10.789382 
+1 1:127 2:47 3:183 4:60.554443 5:109.55251 6:151.38611 7:104.518 8:242.21777 9:50.420985 10:363.32666 11:19.029781 12:454.15833 13:29.98863 14:544.98999 15:21.423838 16:635.82166 17:13.383271 18:1150.5344 19:11.204502 20:1241.3661 21:12.252685 22:1332.1978 23:10.563134 
+1 1:48 2:20 3:93 4:60.554443 5:98.953456 6:151.38611 7:90.486239 8:242.21777 9:58.766757 10:333.04944 11:38.245697 12:454.15833 13:35.386397 14:544.98999 15:28.897652 16:635.82166 17:18.043249 18:726.65332 19:14.707716 20:847.76221 21:16.832564 22:938.59387 23:12.969631 
+1 1:49 2:20 3:93 4:60.554443 5:96.388961 6:151.38611 7:92.685495 8:242.21777 9:57.864866 10:333.04944 11:34.53836 12:454.15833 13:35.330693 14:544.98999 15:28.951535 16:635.82166 17:16.981897 18:726.65332 19:12.510736 20:847.76221 21:16.97304 22:938.59387 23:13.235417 
+0.88430010879111798 1:128 2:44 3:184 4:60.554443 5:101.77712 6:151.38611 7:84.731875 8:242.21777 9:40.904336 10:363.32666 11:22.510034 12:454.15833 13:22.79814 14:756.93054 15:13.869529 16:847.76221 17:10.474848 
+1 1:127 2:46 3:183 4:60.554443 5:103.4037 6:151.38611 7:85.780687 8:242.21777 9:41.732525 10:363.32666 11:19.779453 12:454.15833 13:20.751153 14:756.93054 15:10.923688 
+1 1:157 2:32 3:199 4:60.554443 5:148.51271 6:151.38611 7:124.48971 8:242.21777 9:39.185435 10:454.15833 11:30.450971 12:544.98999 13:41.247553 14:635.82166 15:31.252882 16:847.76221 17:21.011452 18:1241.3661 19:22.869807 20:1332.1978 21:39.072027 22:1513.8611 23:37.33898 
+1 1:126 2:44 3:182 4:60.554443 5:110.73523 6:151.38611 7:97.044896 8:242.21777 9:35.051858 10:333.04944 11:21.6551 12:635.82166 13:12.941192 
+1 1:285 2:98 3:443 4:60.554443 5:301.3856 6:151.38611 7:309.80418 8:242.21777 9:178.82705 10:363.32666 11:73.341666 12:454.15833 13:107.44505 14:544.98999 15:80.824952 16:635.82166 17:29.391479 18:726.65332 19:19.395303 20:817.48499 21:11.323979 22:938.59387 23:18.044337 
+1 1:163 2:61 3:253 4:60.554443 5:163.20828 6:151.38611 7:148.12144 8:242.21777 9:70.719735 10:333.04944 11:41.526144 12:454.15833 13:33.068701 14:544.98999 15:41.366625 16:635.82166 17:23.794392 18:756.93054 19:19.960968 20:847.76221 21:20.689341 
+1 1:288 2:99 3:445 4:60.554443 5:306.01329 6:151.38611 7:306.4756 8:242.21777 9:172.15241 10:363.32666 11:77.445035 12:454.15833 13:103.82961 14:544.98999 15:73.416147 16:635.82166 17:23.922323 18:726.65332 19:20.393562 20:817.48499 21:12.539936 22:938.59387 23:15.370054 
+0.82387756692031999 1:125 2:42 3:183 4:60.554443 5:99.850402 6:151.38611 7:84.769882 8:242.21777 9:41.152048 10:333.04944 11:20.496663 12:454.15833 13:22.496184 14:756.93054 15:11.360072 
+1 1:127 2:41 3:183 4:60.554443 5:113.05525 6:151.38611 7:88.633512 8:242.21777 9:34.546089 10:333.04944 11:26.263708 12:454.15833 13:20.543103 14:544.98999 15:12.696431 16:938.59387 17:10.862341 
+1 1:288 2:100 3:447 4:60.554443 5:310.93751 6:151.38611 7:328.21691 8:242.21777 9:203.83364 10:333.04944 11:87.933618 12:454.15833 13:89.761512 14:544.98999 15:64.565198 16:635.82166 17:17.644821 18:726.65332 19:11.404531 20:847.76221 21:11.545481 22:938.59387 23:22.54795 
+1 1:161 2:60 3:251 4:60.554443 5:153.51758 6:151.38611 7:135.73829 8:242.21777 9:73.844615 10:333.04944 11:43.52715 12:454.15833 13:49.167262 14:544.98999 15:37.459003 16:635.82166 17:21.033944 18:726.65332 19:17.526621 20:847.76221 21:22.812798 
+0.72256190302484846 1:285 2:98 3:441 4:60.554443 5:312.07411 6:151.38611 7:327.59194 8:242.21777 9:201.35349 10:333.04944 11:91.029344 12:454.15833 13:80.381163 14:544.98999 15:56.038241 16:938.59387 17:16.93823 18:1029.4255 19:15.684615 20:1150.5344 21:16.799228 22:1241.3661 23:18.210756 
+0.68275269369662783 1:85 2:13 3:142 4:60.554443 5:64.04804 6:151.38611 7:69.944612 8:242.21777 9:53.22713 10:333.04944 11:26.778265 12:454.15833 13:17.592078 14:544.98999 15:14.949657 16:635.82166 17:13.478249 18:756.93054 19:10.078648 
+1 1:114 2:10 3:123 4:60.554443 5:127.33309 6:242.21777 7:24.92071 
+1 1:115 2:9 3:124 4:60.554443 5:123.56575 6:242.21777 7:26.822282 
+0.4538485081159922 1:286 2:97 3:443 4:60.554443 5:300.55395 6:151.38611 7:310.5074 8:242.21777 9:175.94251 10:363.32666 11:75.416265 12:454.15833 13:106.04861 14:544.98999 15:77.561369 16:635.82166 17:25.951321 18:726.65332 19:18.215329 20:817.48499 21:11.439681 22:938.59387 23:19.367751 
+1 1:129 2:46 3:184 4:60.554443 5:103.81094 6:151.38611 7:85.859336 8:242.21777 9:40.314679 10:333.04944 11:23.790018 12:454.15833 13:21.651492 14:756.93054 15:11.165858 
+1 1:127 2:41 3:185 4:60.554443 5:108.58148 6:151.38611 7:105.83363 8:242.21777 9:48.902733 10:363.32666 11:21.359331 12:454.15833 13:29.286374 14:544.98999 15:21.568138 16:635.82166 17:13.308571 18:1150.5344 19:11.87264 20:1241.3661 21:10.952703 
+1 1:126 2:43 3:182 4:60.554443 5:111.05299 6:151.38611 7:101.39384 8:242.21777 9:46.532717 10:363.32666 11:20.331019 12:454.15833 13:32.460806 14:544.98999 15:20.453288 16:635.82166 17:14.308661 18:1150.5344 19:10.241417 20:1241.3661 21:10.529966 
+1 1:130 2:42 3:182 4:60.554443 5:113.6295 6:151.38611 7:103.58532 8:242.21777 9:46.184 10:363.32666 11:20.260321 12:454.15833 13:30.214015 14:544.98999 15:18.381445 16:635.82166 17:14.147649 18:1241.3661 19:12.100089 
+1 1:127 2:41 3:182 4:60.554443 5:114.41953 6:151.38611 7:106.64779 8:242.21777 9:45.638748 10:363.32666 11:23.289774 12:454.15833 13:26.383196 14:726.65332 15:10.93037 16:938.59387 17:10.538192 18:1029.4255 19:10.595515 
+1 1:163 2:33 3:203 4:60.554443 5:160.44941 6:151.38611 7:100.85968 8:333.04944 9:27.323875 10:454.15833 11:38.433958 12:544.98999 13:44.558914 14:635.82166 15:29.647647 16:847.76221 17:21.63409 18:1029.4255 19:19.503785 20:1241.3661 21:19.907755 22:1332.1978 23:50.601703 
+1 1:126 2:43 3:182 4:60.554443 5:94.438379 6:151.38611 7:85.423482 8:242.21777 9:42.857817 10:333.04944 11:18.537944 12:454.15833 13:21.230686 
+1 1:121 2:28 3:184 4:60.554443 5:107.46613 6:151.38611 7:107.59016 8:242.21777 9:78.311272 10:333.04944 11:63.313068 12:454.15833 13:48.130861 14:544.98999 15:43.704648 16:635.82166 17:33.862945 18:726.65332 19:17.314653 20:847.76221 21:15.455568 22:1513.8611 23:19.710978 
+0.78972120311217819 1:49 2:20 3:92 4:60.554443 5:99.776584 6:151.38611 7:91.450631 8:242.21777 9:58.486689 10:333.04944 11:35.757989 12:454.15833 13:34.417497 14:544.98999 15:26.98879 16:635.82166 17:17.37881 18:726.65332 19:13.283633 20:847.76221 21:15.049607 22:938.59387 23:10.97117 
+0.24365165285256571 1:129 2:42 3:183 4:60.554443 5:115.86845 6:151.38611 7:107.05551 8:242.21777 9:47.789212 10:363.32666 11:25.620222 12:454.15833 13:30.111624 14:544.98999 15:13.877382 16:756.93054 17:12.989099 18:1029.4255 19:12.068163 20:1332.1978 21:11.304234 
+1 1:126 2:45 3:183 4:60.554443 5:100.68777 6:151.38611 7:84.86233 8:242.21777 9:43.873591 10:333.04944 11:21.206732 12:454.15833 13:19.894837 14:544.98999 15:10.611687 16:726.65332 17:10.204926 18:1029.4255 19:10.056755 
+1 1:125 2:46 3:181 4:60.554443 5:98.162914 6:151.38611 7:83.420648 8:242.21777 9:41.811104 10:333.04944 11:20.784062 12:454.15833 13:19.986532 14:938.59387 15:10.115839 
+1 1:49 2:20 3:92 4:60.554443 5:98.743652 6:151.38611 7:93.103961 8:242.21777 9:57.020148 10:333.04944 11:34.471783 12:454.15833 13:32.586146 14:544.98999 15:27.38162 16:635.82166 17:15.595048 18:726.65332 19:12.740676 20:847.76221 21:15.373617 22:938.59387 23:12.961295 
+1 1:129 2:43 3:185 4:60.554443 5:115.0805 6:151.38611 7:98.230532 8:242.21777 9:35.146611 10:454.15833 11:17.455263 12:544.98999 13:12.001915 14:635.82166 15:11.798498 16:756.93054 17:13.343577 18:847.76221 19:11.818394 
+1 1:145 2:28 3:196 4:60.554443 5:131.73211 6:151.38611 7:126.76007 8:242.21777 9:103.3429 10:333.04944 11:72.776097 12:454.15833 13:50.916443 14:544.98999 15:55.246814 16:635.82166 17:46.904743 18:726.65332 19:26.719375 20:1332.1978 21:10.960319 22:1423.0294 23:10.661478 
+1 1:162 2:62 3:254 4:60.554443 5:170.26125 6:151.38611 7:170.86211 8:242.21777 9:87.26885 10:363.32666 11:43.406973 12:454.15833 13:47.755647 14:544.98999 15:32.688104 16:666.09888 17:18.004379 18:1029.4255 19:11.879461 

+ 1 - 0
huimv-env-input/c/config.txt

@@ -0,0 +1 @@
+model_path = ./0513.model

BIN
huimv-env-input/c/libpredict_free.so


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 273 - 0
huimv-env-input/c/main.c


+ 7 - 0
huimv-env-input/c/main.h

@@ -0,0 +1,7 @@
+#ifndef MAIN_H_
+#define MAIN_H_
+
+  int current_detection(int *last,int *current,int *subtraction);
+
+#endif
+

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 182 - 0
huimv-env-input/c/main_old.c


+ 16 - 0
huimv-env-input/c/make.sh

@@ -0,0 +1,16 @@
+
+#!/bin/bash
+# Shell脚本部分
+echo "开始执行Shell脚本"
+arm-linux-gnueabihf-gcc -lpthread -I ../libtq/include/tquart/ -I ../libtq/include/tqcommon/ -L ../libtq/lib -ltq detection_main.c predict.c svm.cpp -lm -lstdc++ -o detection_main
+# 嵌套Expect脚本部分
+expect  <<- EOF
+    	# Expect脚本内容
+	spawn scp ./detection_main root@192.168.1.102:/opt/svm_detection
+	expect "*password:"
+	send "embedsky\n"
+	expect eof
+EOF
+ 
+echo "Shell脚本执行完毕"
+

+ 0 - 0
huimv-env-input/c/predict


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 604 - 0
huimv-env-input/c/predict.c


+ 15 - 0
huimv-env-input/c/predict.h

@@ -0,0 +1,15 @@
+
+#ifndef _PREDICT_H
+#define _PREDICT_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+int run_predict(int *arr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _LIBSVM_H */

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3316 - 0
huimv-env-input/c/svm.cpp


+ 123 - 0
huimv-env-input/c/svm.h

@@ -0,0 +1,123 @@
+#ifndef _LIBSVM_H
+#define _LIBSVM_H
+
+#define LIBSVM_VERSION 332
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int libsvm_version;
+
+
+// /*�����ṹ������*/
+// typedef struct {
+// 	double realPart;
+// 	double imaginaryPart;
+// }complexNumber;
+
+// void fastFourierOperation(complexNumber* x, complexNumber* W);//���ٸ���Ҷ�任�㷨 
+// //void initRotationFactor(complexNumber* W);  //������ת�������� 
+// void changePosition(complexNumber* x);      //ż��任�㷨 
+// //void outputArray();         //�����������
+// void add(complexNumber, complexNumber, complexNumber*); //�����ӷ� 
+// void mul(complexNumber, complexNumber, complexNumber*); //�����˷� 
+// void sub(complexNumber, complexNumber, complexNumber*); //�������� 
+// double* calculateMagnitude(complexNumber* x);
+// double* get_feature(double* arr, int win, int hold, int count);
+
+
+struct svm_node
+{
+	int index;
+	double value;
+};
+
+struct svm_problem
+{
+	int l;
+	double *y;
+	struct svm_node **x;
+};
+
+enum { C_SVC, NU_SVC, ONE_CLASS, EPSILON_SVR, NU_SVR };	/* svm_type */
+enum { LINEAR, POLY, RBF, SIGMOID, PRECOMPUTED }; /* kernel_type */
+
+struct svm_parameter
+{
+	int svm_type;
+	int kernel_type;
+	int degree;	/* for poly */
+	double gamma;	/* for poly/rbf/sigmoid */
+	double coef0;	/* for poly/sigmoid */
+
+	/* these are for training only */
+	double cache_size; /* in MB */
+	double eps;	/* stopping criteria */
+	double C;	/* for C_SVC, EPSILON_SVR and NU_SVR */
+	int nr_weight;		/* for C_SVC */
+	int *weight_label;	/* for C_SVC */
+	double* weight;		/* for C_SVC */
+	double nu;	/* for NU_SVC, ONE_CLASS, and NU_SVR */
+	double p;	/* for EPSILON_SVR */
+	int shrinking;	/* use the shrinking heuristics */
+	int probability; /* do probability estimates */
+};
+
+//
+// svm_model
+//
+struct svm_model
+{
+	struct svm_parameter param;	/* parameter */
+	int nr_class;		/* number of classes, = 2 in regression/one class svm */
+	int l;			/* total #SV */
+	struct svm_node **SV;		/* SVs (SV[l]) */
+	double **sv_coef;	/* coefficients for SVs in decision functions (sv_coef[k-1][l]) */
+	double *rho;		/* constants in decision functions (rho[k*(k-1)/2]) */
+	double *probA;		/* pariwise probability information */
+	double *probB;
+	double *prob_density_marks;	/* probability information for ONE_CLASS */
+	int *sv_indices;        /* sv_indices[0,...,nSV-1] are values in [1,...,num_traning_data] to indicate SVs in the training set */
+
+	/* for classification only */
+
+	int *label;		/* label of each class (label[k]) */
+	int *nSV;		/* number of SVs for each class (nSV[k]) */
+				/* nSV[0] + nSV[1] + ... + nSV[k-1] = l */
+	/* XXX */
+	int free_sv;		/* 1 if svm_model is created by svm_load_model*/
+				/* 0 if svm_model is created by svm_train */
+};
+
+struct svm_model *svm_train(const struct svm_problem *prob, const struct svm_parameter *param);
+void svm_cross_validation(const struct svm_problem *prob, const struct svm_parameter *param, int nr_fold, double *target);
+
+int svm_save_model(const char *model_file_name, const struct svm_model *model);
+struct svm_model *svm_load_model(const char *model_file_name);
+
+int svm_get_svm_type(const struct svm_model *model);
+int svm_get_nr_class(const struct svm_model *model);
+void svm_get_labels(const struct svm_model *model, int *label);
+void svm_get_sv_indices(const struct svm_model *model, int *sv_indices);
+int svm_get_nr_sv(const struct svm_model *model);
+double svm_get_svr_probability(const struct svm_model *model);
+
+double svm_predict_values(const struct svm_model *model, const struct svm_node *x, double* dec_values);
+double svm_predict(const struct svm_model *model, const struct svm_node *x);
+double svm_predict_probability(const struct svm_model *model, const struct svm_node *x, double* prob_estimates);
+
+void svm_free_model_content(struct svm_model *model_ptr);
+void svm_free_and_destroy_model(struct svm_model **model_ptr_ptr);
+void svm_destroy_param(struct svm_parameter *param);
+
+const char *svm_check_parameter(const struct svm_problem *prob, const struct svm_parameter *param);
+int svm_check_probability_model(const struct svm_model *model);
+
+void svm_set_print_string_function(void (*print_func)(const char *));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _LIBSVM_H */

+ 2 - 0
huimv-env-input/c/temp_input.txt

@@ -0,0 +1,2 @@
+2,0,222,-5,-6,-8,-4,-2,-7,-2,-4,-5,-5,-7,-6,-2,-4,-7,0,-5,-5,-1,0,-2,-4,-6,-4,-2,-6,-5,-6,-3,-4,-6,-7,-6,1,-5,-7,-4,-5,-7,-4,-3,-3,-6,-5,-6,-7,-1,0,-5,-6,-4,-8,-7,-6,-5,-7,-5,-4,-5,-5,-5,-6,-3,-5,-4,-6,-6,-7,-4,-6,-5,-7,-6,-7,-12,1,-8,-6,-6,-4,-6,-5,-5,-4,-4,-4,-6,-4,-8,-11,-5,-2,-6,-5,-3,-7,-4,-6,-5,-5,-6,-7,-5,0,-3,-5,-3,-6,-4,-6,-6,-7,-5,-5,-4,-6,-3,-7,-7,-5,-6,-3,-6,-9,-6,-4,-7,-4
+110,22,178,3,-6,-8,-4,-5,-4,-6,-7,-7,-6,-8,-4,-7,-7,-8,-5,-12,-6,-8,-6,-5,-8,-5,-8,-8,-7,-4,-8,-169,-479,-389,-380,-336,-247,-191,-151,-137,-117,-85,-16,-5,-2,-6,-3,-4,-2,-7,-2,-4,-4,-8,-6,-3,-5,-4,-3,-3,-2,-3,-6,-3,-5,-3,-1,-4,-3,1,144,468,409,363,328,238,179,148,124,108,75,6,-7,-3,-6,-5,-3,-5,-8,-5,-7,-7,-7,-7,-1,-3,-5,-5,-9,-6,0,-12,-9,-4,-10,-6,-6,-6,-10,-132,-469,-446,-367,-334,-251,-191,-153,-133,-113,-89,-20,0,-3,-2,-6,-4,-4,-4,-3,-6,-4

+ 1 - 0
huimv-env-input/c/temp_output.txt

@@ -0,0 +1 @@
+1

+ 10 - 0
huimv-env-input/c/test.cpp

@@ -0,0 +1,10 @@
+#include"test.h"
+#include <iostream>
+using namespace std;
+int showChar(const char* c)
+{
+	cout<<"This is C++ program!!!!"<<endl;
+	cout<<c<<endl;
+	return 0;
+}
+

+ 9 - 0
huimv-env-input/c/test.h

@@ -0,0 +1,9 @@
+#ifndef TEST_H_
+#define TEST_H_
+extern "C"{
+   int showChar(const char* c);
+}  
+
+  int showChar(const char* c);
+#endif
+

+ 1 - 0
huimv-env-input/src/main/java/com/huimv/env/input/c/MyNativeClass.java

@@ -11,6 +11,7 @@ public class MyNativeClass {
 
         LibraryshowChar LIBRARY_CHAR = Native.load("/c/libpredict_free.so", LibraryshowChar.class);
         int current_detection( int[] lastData , int[] curretData);
+//        int current_detection();
     }
 
 }

+ 15 - 14
huimv-env-input/src/main/java/com/huimv/env/input/config/WeChatMessage.java

@@ -6,6 +6,7 @@ import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
 import org.springframework.stereotype.Component;
 
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 
@@ -26,17 +27,17 @@ public class WeChatMessage {
 //    private String templateId;
     private static  final  String  appId= "wx7982c391ad9c00b3";
     private static  final  String  secret= "87f5a2f00478fbe39ec1e6c832f11068";
-    private static  final  String  templateId= "E2HW7OE74SRRY1vd7O9ONv4AQ1D_Kk-Go6cOcSb6TCQ";
+    private static  final  String  templateId= "E2HW7OE74SRRY1vd7O9ONp93RU8cUtqg3v4xLFQInmE";
 
-    public void sendMsg(String deviceName,String warningContent, Date uploadDate,String warningReason,String location,String openId){
+    public static  void sendMsg( Date uploadDate,String warningReason,String location,String zhanDian,String openId){
         //1:获取token(接口调用凭证)
         String token = queryToken();
         //2:发送订阅消息
-        send(token,deviceName,warningContent,uploadDate,warningReason,location,openId);
+        send(token,uploadDate,warningReason,location,zhanDian,openId);
     }
 
     // 1: 获取 access_token  (2h过期)
-    public String queryToken(){
+    public static String queryToken(){
         String tokenUrl="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";
         tokenUrl = tokenUrl + "&appid=" + appId + "&secret=" + secret;
         String result = HttpUtil.get(tokenUrl);
@@ -46,7 +47,7 @@ public class WeChatMessage {
         return token;
     }
 
-    public void send(String token,String deviceName,String warningContent, Date uploadDate,String warningReason,String location,String openId){
+    public static void send(String token,Date uploadDate,String warningReason,String location,String zhanDian ,String openId){
         String msgUrl="https://api.weixin.qq.com/cgi-bin/message/subscribe/send";
         msgUrl = msgUrl + "?access_token=" + token;
         // 设置模板参数
@@ -57,15 +58,15 @@ public class WeChatMessage {
         // 设置data 模板内容
         HashMap<String, Object> data = new HashMap<>();
         //报警设备
-        data.put("thing1", formatParam(deviceName));
+        data.put("thing2", formatParam(warningReason));
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 定义日期和时间的格式
         //报警类型
-        data.put("thing2", formatParam(warningContent));
-        //报警时间
-        data.put("time3", formatParam(uploadDate.toString()));
-        //报警原因
-        data.put("time4", formatParam(warningReason));
-        //报警地点
-        data.put("thing5", formatParam(location));
+        data.put("time3", formatParam(sdf.format(uploadDate)));
+//        //报警时间
+        data.put("thing5",formatParam(location));
+//        //报警原因
+        data.put("thing19", formatParam(zhanDian));
+//        //报警地点
         paramMap.put("data", data);
         // 转json字符串
         String jsonObject = JSONUtil.toJsonStr(paramMap);
@@ -73,7 +74,7 @@ public class WeChatMessage {
         System.out.println(result);
     }
 
-    public HashMap<String, Object> formatParam(String value){
+    public static HashMap<String, Object> formatParam(String value){
         HashMap<String, Object> data = new HashMap<>();
         data.put("value", value);
         return data;

+ 128 - 7
huimv-env-input/src/main/java/com/huimv/env/input/controller/BaseFarmController.java

@@ -8,6 +8,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.web.bind.annotation.RestController;
 
+import java.io.*;
+import java.nio.file.*;
+import java.util.Arrays;
+
 /**
  * <p>
  *  前端控制器
@@ -39,13 +43,17 @@ public class BaseFarmController {
 //              Object res = func.invoke(Integer.class, new Object[]{lastData,curretData});
 //              System.out.println( i+"-->"+res);
 //          }
-
-            for (int i = 0; i < 10000; i++) {
-                int[] lastData = new int[]{2,0,222,-5,-6,-8,-4,-2,-7,-2,-4,-5,-5,-7,-6,-2,-4,-7,0,-5,-5,-1,0,-2,-4,-6,-4,-2,-6,-5,-6,-3,-4,-6,-7,-6,1,-5,-7,-4,-5,-7,-4,-3,-3,-6,-5,-6,-7,-1,0,-5,-6,-4,-8,-7,-6,-5,-7,-5,-4,-5,-5,-5,-6,-3,-5,-4,-6,-6,-7,-4,-6,-5,-7,-6,-7,-12,1,-8,-6,-6,-4,-6,-5,-5,-4,-4,-4,-6,-4,-8,-11,-5,-2,-6,-5,-3,-7,-4,-6,-5,-5,-6,-7,-5,0,-3,-5,-3,-6,-4,-6,-6,-7,-5,-5,-4,-6,-3,-7,-7,-5,-6,-3,-6,-9,-6,-4,-7,-4};
-                int[] curretData = new int[]{110,22,178,3,-6,-8,-4,-5,-4,-6,-7,-7,-6,-8,-4,-7,-7,-8,-5,-12,-6,-8,-6,-5,-8,-5,-8,-8,-7,-4,-8,-169,-479,-389,-380,-336,-247,-191,-151,-137,-117,-85,-16,-5,-2,-6,-3,-4,-2,-7,-2,-4,-4,-8,-6,-3,-5,-4,-3,-3,-2,-3,-6,-3,-5,-3,-1,-4,-3,1,144,468,409,363,328,238,179,148,124,108,75,6,-7,-3,-6,-5,-3,-5,-8,-5,-7,-7,-7,-7,-1,-3,-5,-5,-9,-6,0,-12,-9,-4,-10,-6,-6,-6,-10,-132,-469,-446,-367,-334,-251,-191,-153,-133,-113,-89,-20,0,-3,-2,-6,-4,-4,-4,-3,-6,-4};
-                int num =  MyNativeClass.LibraryshowChar.LIBRARY_CHAR.current_detection(lastData, curretData);
+           int[] lastData = new int[]{2,0,222,-5,-6,-8,-4,-2,-7,-2,-4,-5,-5,-7,-6,-2,-4,-7,0,-5,-5,-1,0,-2,-4,-6,-4,-2,-6,-5,-6,-3,-4,-6,-7,-6,1,-5,-7,-4,-5,-7,-4,-3,-3,-6,-5,-6,-7,-1,0,-5,-6,-4,-8,-7,-6,-5,-7,-5,-4,-5,-5,-5,-6,-3,-5,-4,-6,-6,-7,-4,-6,-5,-7,-6,-7,-12,1,-8,-6,-6,-4,-6,-5,-5,-4,-4,-4,-6,-4,-8,-11,-5,-2,-6,-5,-3,-7,-4,-6,-5,-5,-6,-7,-5,0,-3,-5,-3,-6,-4,-6,-6,-7,-5,-5,-4,-6,-3,-7,-7,-5,-6,-3,-6,-9,-6,-4,-7,-4};
+           int[] curretData = new int[]{110,22,178,3,-6,-8,-4,-5,-4,-6,-7,-7,-6,-8,-4,-7,-7,-8,-5,-12,-6,-8,-6,-5,-8,-5,-8,-8,-7,-4,-8,-169,-479,-389,-380,-336,-247,-191,-151,-137,-117,-85,-16,-5,-2,-6,-3,-4,-2,-7,-2,-4,-4,-8,-6,-3,-5,-4,-3,-3,-2,-3,-6,-3,-5,-3,-1,-4,-3,1,144,468,409,363,328,238,179,148,124,108,75,6,-7,-3,-6,-5,-3,-5,-8,-5,-7,-7,-7,-7,-1,-3,-5,-5,-9,-6,0,-12,-9,-4,-10,-6,-6,-6,-10,-132,-469,-446,-367,-334,-251,-191,-153,-133,-113,-89,-20,0,-3,-2,-6,-4,-4,-4,-3,-6,-4};
+           System.out.println(lastData);
+           System.out.println(curretData);
+           for (int i = 0; i < 10000; i++) {
+                 int num =  MyNativeClass.LibraryshowChar.LIBRARY_CHAR.current_detection(lastData, curretData);
+//                 int num =  MyNativeClass.LibraryshowChar.LIBRARY_CHAR.current_detection();
                 // 0没测到 1检测到
                 if (num == -1){
+                    System.out.println(lastData);
+                    System.out.println(curretData);
                     System.out.println( i+"-->"+num);
                 }
             }
@@ -55,8 +63,121 @@ public class BaseFarmController {
     @GetMapping("/test1")
     public  String add2() throws InterruptedException {
 
-        String add = add();
-        return add;
+        // 步骤1: 将两个数组写入临时文件
+        int[] array1 = new int[]{2,0,222,-5,-6,-8,-4,-2,-7,-2,-4,-5,-5,-7,-6,-2,-4,-7,0,-5,-5,-1,0,-2,-4,-6,-4,-2,-6,-5,-6,-3,-4,-6,-7,-6,1,-5,-7,-4,-5,-7,-4,-3,-3,-6,-5,-6,-7,-1,0,-5,-6,-4,-8,-7,-6,-5,-7,-5,-4,-5,-5,-5,-6,-3,-5,-4,-6,-6,-7,-4,-6,-5,-7,-6,-7,-12,1,-8,-6,-6,-4,-6,-5,-5,-4,-4,-4,-6,-4,-8,-11,-5,-2,-6,-5,-3,-7,-4,-6,-5,-5,-6,-7,-5,0,-3,-5,-3,-6,-4,-6,-6,-7,-5,-5,-4,-6,-3,-7,-7,-5,-6,-3,-6,-9,-6,-4,-7,-4};
+        int[] array2 = new int[]{110,22,178,3,-6,-8,-4,-5,-4,-6,-7,-7,-6,-8,-4,-7,-7,-8,-5,-12,-6,-8,-6,-5,-8,-5,-8,-8,-7,-4,-8,-169,-479,-389,-380,-336,-247,-191,-151,-137,-117,-85,-16,-5,-2,-6,-3,-4,-2,-7,-2,-4,-4,-8,-6,-3,-5,-4,-3,-3,-2,-3,-6,-3,-5,-3,-1,-4,-3,1,144,468,409,363,328,238,179,148,124,108,75,6,-7,-3,-6,-5,-3,-5,-8,-5,-7,-7,-7,-7,-1,-3,-5,-5,-9,-6,0,-12,-9,-4,-10,-6,-6,-6,-10,-132,-469,-446,-367,-334,-251,-191,-153,-133,-113,-89,-20,0,-3,-2,-6,-4,-4,-4,-3,-6,-4};
+
+        String tempInputFile = "temp_input.txt";
+        try (BufferedWriter writer = new BufferedWriter(new FileWriter(tempInputFile))) {
+            String array1String = String.join(",", Arrays.stream(array1).mapToObj(String::valueOf).toArray(String[]::new));
+            writer.write(array1String);
+            writer.newLine(); // 换行
+
+            // 写入第二个数组
+            String array2String = String.join(",", Arrays.stream(array2).mapToObj(String::valueOf).toArray(String[]::new));
+            writer.write(array2String);
+            writer.newLine(); // 换行
+        } catch (IOException e) {
+            e.printStackTrace();
+            return e.toString();
+        }
+
+        // 步骤2: 调用C程序
+        String cProgramPath = "/root/svm_detection_c/predict"; // 替换为你的C程序的实际路径
+        String tempOutputFile = "temp_output.txt"; // 假设C程序将结果写入此文件
+        ProcessBuilder processBuilder = new ProcessBuilder(cProgramPath, tempInputFile, tempOutputFile);
+        try {
+            Process process = processBuilder.start();
+            int exitCode = process.waitFor();
+            if (exitCode != 0) {
+                System.err.println("C program execution failed with exit code: " + exitCode);
+                return "C program execution failed with exit code: " + exitCode;
+            }
+        } catch (IOException | InterruptedException e) {
+            e.printStackTrace();
+            return e.toString();
+        }
+
+        // 步骤3: 读取结果文件
+        try (BufferedReader reader = new BufferedReader(new FileReader(tempOutputFile))) {
+            String line;
+            while ((line = reader.readLine()) != null) {
+                System.out.println(line); // 或者你可以将结果存储到某个变量或集合中
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        // 步骤4: 删除所有文件
+//        Path inputFilePath = Paths.get(tempInputFile);
+//        Path outputFilePath = Paths.get(tempOutputFile);
+//        try {
+//            Files.deleteIfExists(inputFilePath);
+//            Files.deleteIfExists(outputFilePath);
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//        }
+        return "成功";
+    }
+
+    @GetMapping("/test5")
+    public  String add5() throws InterruptedException {
+
+        // 步骤1: 将两个数组写入临时文件
+        int[] array2 = new int[]{2,0,222,-5,-6,-8,-4,-2,-7,-2,-4,-5,-5,-7,-6,-2,-4,-7,0,-5,-5,-1,0,-2,-4,-6,-4,-2,-6,-5,-6,-3,-4,-6,-7,-6,1,-5,-7,-4,-5,-7,-4,-3,-3,-6,-5,-6,-7,-1,0,-5,-6,-4,-8,-7,-6,-5,-7,-5,-4,-5,-5,-5,-6,-3,-5,-4,-6,-6,-7,-4,-6,-5,-7,-6,-7,-12,1,-8,-6,-6,-4,-6,-5,-5,-4,-4,-4,-6,-4,-8,-11,-5,-2,-6,-5,-3,-7,-4,-6,-5,-5,-6,-7,-5,0,-3,-5,-3,-6,-4,-6,-6,-7,-5,-5,-4,-6,-3,-7,-7,-5,-6,-3,-6,-9,-6,-4,-7,-4};
+        int[] array1 = new int[]{110,22,178,3,-6,-8,-4,-5,-4,-6,-7,-7,-6,-8,-4,-7,-7,-8,-5,-12,-6,-8,-6,-5,-8,-5,-8,-8,-7,-4,-8,-169,-479,-389,-380,-336,-247,-191,-151,-137,-117,-85,-16,-5,-2,-6,-3,-4,-2,-7,-2,-4,-4,-8,-6,-3,-5,-4,-3,-3,-2,-3,-6,-3,-5,-3,-1,-4,-3,1,144,468,409,363,328,238,179,148,124,108,75,6,-7,-3,-6,-5,-3,-5,-8,-5,-7,-7,-7,-7,-1,-3,-5,-5,-9,-6,0,-12,-9,-4,-10,-6,-6,-6,-10,-132,-469,-446,-367,-334,-251,-191,-153,-133,-113,-89,-20,0,-3,-2,-6,-4,-4,-4,-3,-6,-4};
+
+        String tempInputFile = "temp_input.txt";
+        try (BufferedWriter writer = new BufferedWriter(new FileWriter(tempInputFile))) {
+            String array1String = String.join(",", Arrays.stream(array1).mapToObj(String::valueOf).toArray(String[]::new));
+            writer.write(array1String);
+            writer.newLine(); // 换行
+
+            // 写入第二个数组
+            String array2String = String.join(",", Arrays.stream(array2).mapToObj(String::valueOf).toArray(String[]::new));
+            writer.write(array2String);
+            writer.newLine(); // 换行
+        } catch (IOException e) {
+            e.printStackTrace();
+            return e.toString();
+        }
+
+        // 步骤2: 调用C程序
+        String cProgramPath = "/root/svm_detection_c/predict"; // 替换为你的C程序的实际路径
+        String tempOutputFile = "temp_output.txt"; // 假设C程序将结果写入此文件
+        ProcessBuilder processBuilder = new ProcessBuilder(cProgramPath, tempInputFile, tempOutputFile);
+        try {
+            Process process = processBuilder.start();
+            int exitCode = process.waitFor();
+            if (exitCode != 0) {
+                System.err.println("C program execution failed with exit code: " + exitCode);
+                return "C program execution failed with exit code: " + exitCode;
+            }
+        } catch (IOException | InterruptedException e) {
+            e.printStackTrace();
+            return e.toString();
+        }
+
+        // 步骤3: 读取结果文件
+        try (BufferedReader reader = new BufferedReader(new FileReader(tempOutputFile))) {
+            String line;
+            while ((line = reader.readLine()) != null) {
+                System.out.println(line); // 或者你可以将结果存储到某个变量或集合中
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        // 步骤4: 删除所有文件
+//        Path inputFilePath = Paths.get(tempInputFile);
+//        Path outputFilePath = Paths.get(tempOutputFile);
+//        try {
+//            Files.deleteIfExists(inputFilePath);
+//            Files.deleteIfExists(outputFilePath);
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//        }
+        return "成功";
     }
 
 

+ 20 - 0
huimv-env-input/src/main/java/com/huimv/env/input/controller/SysAccountMultilevelController.java

@@ -0,0 +1,20 @@
+package com.huimv.env.input.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author author
+ * @since 2024-05-29
+ */
+@RestController
+@RequestMapping("/sys-account-multilevel")
+public class SysAccountMultilevelController {
+
+}

+ 145 - 0
huimv-env-input/src/main/java/com/huimv/env/input/entity/SysAccountMultilevel.java

@@ -0,0 +1,145 @@
+package com.huimv.env.input.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author author
+ * @since 2024-05-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("sys_account_multilevel")
+public class SysAccountMultilevel implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 账号
+     */
+    private String account;
+
+    /**
+     * 父级
+     */
+    private Integer pid;
+
+    /**
+     * 多级父级
+     */
+    private String pids;
+
+    /**
+     * 状态 1启用,0未启用
+     */
+    private Integer accountStatus;
+
+    /**
+     * 所属牧场
+     */
+    private String farmIds;
+
+    private String color;
+
+    private Boolean mode;
+
+    private Integer lastFarmId;
+
+    private String userName;
+
+    private String farmNames;
+
+    /**
+     * 0管理员,1 场长 2 紧急进程审核员  ,3生物安全负责人 ,4 pcr 检测人员,5洗消站点工作人员 , 6员工,7访客
+     */
+    private Integer type;
+
+    /**
+     * 工作地点
+     */
+    private String workLocation;
+
+    /**
+     * 1人员初级洗消站 2净区 3人员二级洗消站 4场内 5生产区 6车辆初级洗消站 7车辆二级洗消站 8中转料塔外围 9车辆三级洗消站 10销售中转站 11环保区洗消中心 12环保区净区 13洗消中心净区
+     */
+    private Integer workLocationType;
+
+    /**
+     * 工作岗位 1 场长 2 紧急进程审核员  ,3生物安全负责人 ,4 pcr 检测人员,5洗消站点工作人员 , 6员工
+     */
+    private Integer workPost;
+
+    /**
+     * 手机号
+     */
+    private String phone;
+
+    /**
+     * 头像图片
+     */
+    private String imgUrl;
+
+    /**
+     * 单位名称
+     */
+    private String workName;
+
+    /**
+     * 证件类型 0身份证 ,1护照
+     */
+    private Integer papersType;
+
+    /**
+     * 密码
+     */
+    private String password;
+
+    /**
+     * 证件号码
+     */
+    private String papersCode;
+
+    /**
+     * 车牌号
+     */
+    private String carNum;
+
+    private String lng;
+
+    private String lat;
+
+    /**
+     * 微信标识
+     */
+    private String wechatId;
+
+    /**
+     * 是否订阅消息
+     */
+    private Integer subscribe;
+
+    /**
+     * 微信头像
+     */
+    private String avatarUrl;
+
+    /**
+     * 微信昵称
+     */
+    private String nickName;
+
+
+}

+ 16 - 0
huimv-env-input/src/main/java/com/huimv/env/input/mapper/SysAccountMultilevelMapper.java

@@ -0,0 +1,16 @@
+package com.huimv.env.input.mapper;
+
+import com.huimv.env.input.entity.SysAccountMultilevel;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author author
+ * @since 2024-05-29
+ */
+public interface SysAccountMultilevelMapper extends BaseMapper<SysAccountMultilevel> {
+
+}

+ 135 - 5
huimv-env-input/src/main/java/com/huimv/env/input/server/EnvInputServerHandler.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.huimv.env.input.c.MyNativeClass;
+import com.huimv.env.input.config.WeChatMessage;
 import com.huimv.env.input.entity.*;
 import com.huimv.env.input.mapper.TerminalPortMapper;
 import com.huimv.env.input.service.*;
@@ -20,7 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ObjectUtils;
 
-import java.io.IOException;
+import java.io.*;
 import java.math.BigDecimal;
 import java.text.DecimalFormat;
 import java.text.ParseException;
@@ -32,6 +33,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
+import java.util.stream.Stream;
 
 /**
  * @Project : huimv.shiwan
@@ -70,6 +72,9 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
 
     @Autowired
     private IHeartInfoService heartInfoService;
+
+    @Autowired
+    private ISysAccountMultilevelService sysAccountMultilevelService;
     //
     public void appendClientAsk(String text) {
         if (this.askTextSb == null) {
@@ -215,7 +220,8 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
                 portChangeData.setBeforeElectricCurrent(eleData);
                 portChangeDataService.updateById(portChangeData);
                 if(changeDataIsAll(portChangeData)){
-                    int i  = getStatusEle(portChangeData);
+//                    int i  = getStatusEle(portChangeData);
+                    int i  = getStatusEle2(portChangeData);
                     TerminalPort deviceCode = terminalPortService.getOne(new QueryWrapper<TerminalPort>().eq("device_code", portChangeData.getTerminalPortCode()));
                     System.out.println("---->"+i);
                     if (i == 1){
@@ -236,6 +242,87 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
             log.error(e);
         }
     }
+    private int getStatusEle2(PortChangeData portChangeData) {
+        // 前有功功率	前无功功率	前视在功率  +  前 128个电流值
+        String[] lastEleData = portChangeData.getBeforeElectricCurrent().split(",");
+        String[] lastGlData =new String[]{String.valueOf(portChangeData.getBeforeActivePower()),String.valueOf(portChangeData.getBeforeReactivePower()),String.valueOf(portChangeData.getBeforeApparentPower())};
+
+        // 有功功率	无功功率	视在功率  +  128个电流值
+        String[] curretEleData = portChangeData.getElectricCurrent().split(",");
+        String[] curretGlData =new String[]{String.valueOf(portChangeData.getActivePower()),String.valueOf(portChangeData.getReactivePower()),String.valueOf(portChangeData.getApparentPower())};
+
+        Object[] ints = Stream.concat( Arrays.stream(lastGlData),Arrays.stream(lastEleData)).toArray();
+        Object[] ints1 = Stream.concat(Arrays.stream(curretGlData) ,Arrays.stream(curretEleData)).toArray();
+
+//        return MyNativeClass.LibraryshowChar.LIBRARY_CHAR.current_detection(ints,ints1 );
+        return add2(ints,ints1 );
+//        return MyNativeClass.LibraryshowChar.LIBRARY_CHAR.current_detection( );
+    }
+
+    public  int add2(Object[] array1 ,  Object[] array2)   {
+
+        // 步骤1: 将两个数组写入临时文件
+        String tempInputFile = "temp_input.txt";
+        try (BufferedWriter writer = new BufferedWriter(new FileWriter(tempInputFile))) {
+            String array1String = Arrays.stream(array1)
+                    .map(Object::toString) // 使用 Object 的 toString 方法转换为 String
+                    .collect(Collectors.joining(","));
+            writer.write(array1String);
+            writer.newLine(); // 换行
+
+            // 写入第二个数组
+            String array2String = Arrays.stream(array2)
+                    .map(Object::toString) // 使用 Object 的 toString 方法转换为 String
+                    .collect(Collectors.joining(","));
+            writer.write(array2String);
+            writer.newLine(); // 换行
+        } catch (IOException e) {
+            e.printStackTrace();
+            return 0;
+        }
+
+        // 步骤2: 调用C程序
+        String cProgramPath = "/root/svm_detection_c/predict"; // 替换为你的C程序的实际路径
+        String tempOutputFile = "temp_output.txt"; // 假设C程序将结果写入此文件
+        ProcessBuilder processBuilder = new ProcessBuilder(cProgramPath, tempInputFile, tempOutputFile);
+        try {
+            Process process = processBuilder.start();
+            int exitCode = process.waitFor();
+            if (exitCode != 0) {
+                System.err.println("C program execution failed with exit code: " + exitCode);
+                return 0;
+            }
+        } catch (IOException | InterruptedException e) {
+            e.printStackTrace();
+            return 0;
+        }
+
+        // 步骤3: 读取结果文件
+        try (BufferedReader reader = new BufferedReader(new FileReader(tempOutputFile))) {
+            String line;
+            String str ="1";
+            while ((line = reader.readLine()) != null) {
+                System.out.println("line"+line); // 或者你可以将结果存储到某个变量或集合中
+                str = line;
+            }
+            return Integer.parseInt(str);
+        } catch (IOException e) {
+            e.printStackTrace();
+            return 0;
+        }
+
+        // 步骤4: 删除所有文件
+//        Path inputFilePath = Paths.get(tempInputFile);
+//        Path outputFilePath = Paths.get(tempOutputFile);
+//        try {
+//            Files.deleteIfExists(inputFilePath);
+//            Files.deleteIfExists(outputFilePath);
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//        }
+    }
+
+
 
     private  synchronized void saveElectric2(String askText, String[] dataArray, ChannelHandlerContext ctx) {
         String ans = "hm+4+1+end";
@@ -339,13 +426,14 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
         }
         System.out.println();
         return MyNativeClass.LibraryshowChar.LIBRARY_CHAR.current_detection(ints,ints1 );
+//        return MyNativeClass.LibraryshowChar.LIBRARY_CHAR.current_detection( );
 
     }
 
     private void saveChargingWarning(PortChangeData portChangeData ,TerminalPort deviceCode) {
 
         BasePigpen basePigpen = basePigpenService.getById(deviceCode.getLocationId());
-
+        BasePigpen basePigpen1= basePigpenService.getById(basePigpen.getOther2().split(",")[1]);
         PortWarningInfo portWarningInfo = new PortWarningInfo();
         portWarningInfo.setGatwayCode(portChangeData.getGatwayCode());
 
@@ -354,10 +442,18 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
         portWarningInfo.setLocationId(deviceCode.getLocationId());
         portWarningInfo.setFarmId(deviceCode.getFarmId());
         portWarningInfo.setWarningType(2);
-        portWarningInfo.setCreateTime(new Date());
+        Date now = new Date();
+        portWarningInfo.setCreateTime(now);
         portWarningInfo.setContent(String.format("%s 充电预警",basePigpen.getBuildName()));
         portWarningInfo.setWarningType(2);
         portWarningInfoService.save(portWarningInfo);
+
+        List<SysAccountMultilevel> list = sysAccountMultilevelService.list(new QueryWrapper<SysAccountMultilevel>().eq("last_farm_id", deviceCode.getFarmId()).eq("subscribe", 1));
+        for (SysAccountMultilevel sysAccountMultilevel : list) {
+            WeChatMessage.sendMsg(now,"充电预警",basePigpen1.getBuildName(),basePigpen.getBuildName().substring(basePigpen1.getBuildName().length()),sysAccountMultilevel.getWechatId());
+            sysAccountMultilevel.setSubscribe(0);
+            sysAccountMultilevelService.updateById(sysAccountMultilevel);
+        }
         WebsocketWorkerUtil.sendWarningMessage(deviceCode.getFarmId(),String.format("%s 充电预警",basePigpen.getBuildName()));
     }
 
@@ -422,7 +518,7 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
         Integer locationId = terminalPort.getLocationId();
 
         BasePigpen basePigpen = basePigpenService.getById(locationId);
-
+        BasePigpen basePigpen1= basePigpenService.getById(basePigpen.getOther2().split(",")[1]);
         if (ObjectUtils.isEmpty(basePigpen)){
             log.info(String.format("无栋舍数据--> %s" ,terminalPort.toString()));
             return;
@@ -440,12 +536,25 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
             portWarningInfo.setContent(String.format("%s 高温预警",basePigpen.getBuildName()));
             portWarningInfo.setWarningType(1);
             portWarningInfoService.save(portWarningInfo);
+            List<SysAccountMultilevel> list = sysAccountMultilevelService.list(new QueryWrapper<SysAccountMultilevel>().eq("last_farm_id", farmId).eq("subscribe", 1));
+            for (SysAccountMultilevel sysAccountMultilevel : list) {
+               WeChatMessage.sendMsg(now,"充电预警",basePigpen1.getBuildName(),basePigpen.getBuildName().substring(basePigpen1.getBuildName().length()),sysAccountMultilevel.getWechatId());
+                sysAccountMultilevel.setSubscribe(0);
+                sysAccountMultilevelService.updateById(sysAccountMultilevel);
+            }
             WebsocketWorkerUtil.sendWarningMessage(farmId,String.format("%s 高温预警",basePigpen.getBuildName()));
         }
         if (splitStatus[1] == 1){
             portWarningInfo.setContent(String.format("%s 漏电预警",basePigpen.getBuildName()));
             portWarningInfo.setWarningType(3);
             portWarningInfoService.save(portWarningInfo);
+
+            List<SysAccountMultilevel> list = sysAccountMultilevelService.list(new QueryWrapper<SysAccountMultilevel>().eq("last_farm_id", farmId).eq("subscribe", 1));
+            for (SysAccountMultilevel sysAccountMultilevel : list) {
+                WeChatMessage.sendMsg(now,"充电预警",basePigpen1.getBuildName(),basePigpen.getBuildName().substring(basePigpen1.getBuildName().length()),sysAccountMultilevel.getWechatId());
+                sysAccountMultilevel.setSubscribe(0);
+                sysAccountMultilevelService.updateById(sysAccountMultilevel);
+            }
             WebsocketWorkerUtil.sendWarningMessage(farmId,String.format("%s 漏电预警",basePigpen.getBuildName()));
         }
     }
@@ -682,6 +791,7 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
         Integer locationId = terminalPort.getLocationId();
         BaseFarm baseFarm = baseFarmService.getById(farmId);
         BasePigpen basePigpen = basePigpenService.getById(locationId);
+
         if (ObjectUtils.isEmpty(baseFarm)){
             log.info(String.format("无小区数据--> %s" ,terminalPort.toString()));
             return;
@@ -690,6 +800,7 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
             log.info(String.format("无栋舍数据--> %s" ,terminalPort.toString()));
             return;
         }
+        BasePigpen basePigpen1= basePigpenService.getById(basePigpen.getOther2().split(",")[1]);
         PortWarningInfo portWarningInfo = new PortWarningInfo();
         portWarningInfo.setGatwayCode(gateWayCode);
 
@@ -704,6 +815,13 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
             portWarningInfo.setContent(String.format("%s 高温预警",basePigpen.getBuildName()));
             portWarningInfo.setWarningType(1);
             portWarningInfoService.save(portWarningInfo);
+
+            List<SysAccountMultilevel> list = sysAccountMultilevelService.list(new QueryWrapper<SysAccountMultilevel>().eq("last_farm_id", farmId).eq("subscribe", 1));
+            for (SysAccountMultilevel sysAccountMultilevel : list) {
+                WeChatMessage.sendMsg(now,"充电预警",basePigpen1.getBuildName(),basePigpen.getBuildName().substring(basePigpen1.getBuildName().length()),sysAccountMultilevel.getWechatId());
+                sysAccountMultilevel.setSubscribe(0);
+                sysAccountMultilevelService.updateById(sysAccountMultilevel);
+            }
             WebsocketWorkerUtil.sendWarningMessage(farmId,String.format("%s 高温预警",basePigpen.getBuildName()));
         }
 
@@ -711,12 +829,24 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
             portWarningInfo.setContent(String.format("%s 充电预警",basePigpen.getBuildName()));
             portWarningInfo.setWarningType(2);
             portWarningInfoService.save(portWarningInfo);
+            List<SysAccountMultilevel> list = sysAccountMultilevelService.list(new QueryWrapper<SysAccountMultilevel>().eq("last_farm_id", farmId).eq("subscribe", 1));
+            for (SysAccountMultilevel sysAccountMultilevel : list) {
+                WeChatMessage.sendMsg(now,"充电预警",basePigpen1.getBuildName(),basePigpen.getBuildName().substring(basePigpen1.getBuildName().length()),sysAccountMultilevel.getWechatId());
+                sysAccountMultilevel.setSubscribe(0);
+                sysAccountMultilevelService.updateById(sysAccountMultilevel);
+            }
             WebsocketWorkerUtil.sendWarningMessage(farmId,String.format("%s 充电预警",basePigpen.getBuildName()));
         }
         if (splitStatus[2] == 1){
             portWarningInfo.setContent(String.format("%s 漏电预警",basePigpen.getBuildName()));
             portWarningInfo.setWarningType(3);
             portWarningInfoService.save(portWarningInfo);
+            List<SysAccountMultilevel> list = sysAccountMultilevelService.list(new QueryWrapper<SysAccountMultilevel>().eq("last_farm_id", farmId).eq("subscribe", 1));
+            for (SysAccountMultilevel sysAccountMultilevel : list) {
+                WeChatMessage.sendMsg(now,"充电预警",basePigpen1.getBuildName(),basePigpen.getBuildName().substring(basePigpen1.getBuildName().length()),sysAccountMultilevel.getWechatId());
+                sysAccountMultilevel.setSubscribe(0);
+                sysAccountMultilevelService.updateById(sysAccountMultilevel);
+            }
             WebsocketWorkerUtil.sendWarningMessage(farmId,String.format("%s 漏电预警",basePigpen.getBuildName()));
         }
     }

+ 16 - 0
huimv-env-input/src/main/java/com/huimv/env/input/service/ISysAccountMultilevelService.java

@@ -0,0 +1,16 @@
+package com.huimv.env.input.service;
+
+import com.huimv.env.input.entity.SysAccountMultilevel;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author author
+ * @since 2024-05-29
+ */
+public interface ISysAccountMultilevelService extends IService<SysAccountMultilevel> {
+
+}

+ 20 - 0
huimv-env-input/src/main/java/com/huimv/env/input/service/impl/SysAccountMultilevelServiceImpl.java

@@ -0,0 +1,20 @@
+package com.huimv.env.input.service.impl;
+
+import com.huimv.env.input.entity.SysAccountMultilevel;
+import com.huimv.env.input.mapper.SysAccountMultilevelMapper;
+import com.huimv.env.input.service.ISysAccountMultilevelService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author author
+ * @since 2024-05-29
+ */
+@Service
+public class SysAccountMultilevelServiceImpl extends ServiceImpl<SysAccountMultilevelMapper, SysAccountMultilevel> implements ISysAccountMultilevelService {
+
+}

+ 4 - 0
huimv-env-input/src/main/resources/application-prod.yml

@@ -18,6 +18,10 @@ spring:
     database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
     open-in-view: true
 
+#mybatis-plus:
+#  configuration:
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
   #配置rabbitMq 服务器
 #  rabbitmq:
 #    host: 10.0.0.4

BIN
huimv-env-input/src/main/resources/c/libpredict_free.so


+ 37 - 0
huimv-env-input/src/main/resources/mapper/SysAccountMultilevelMapper.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.huimv.env.input.mapper.SysAccountMultilevelMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.huimv.env.input.entity.SysAccountMultilevel">
+        <id column="id" property="id" />
+        <result column="account" property="account" />
+        <result column="pid" property="pid" />
+        <result column="pids" property="pids" />
+        <result column="account_status" property="accountStatus" />
+        <result column="farm_ids" property="farmIds" />
+        <result column="color" property="color" />
+        <result column="mode" property="mode" />
+        <result column="last_farm_id" property="lastFarmId" />
+        <result column="user_name" property="userName" />
+        <result column="farm_names" property="farmNames" />
+        <result column="type" property="type" />
+        <result column="work_location" property="workLocation" />
+        <result column="work_location_type" property="workLocationType" />
+        <result column="work_post" property="workPost" />
+        <result column="phone" property="phone" />
+        <result column="img_url" property="imgUrl" />
+        <result column="work_name" property="workName" />
+        <result column="papers_type" property="papersType" />
+        <result column="password" property="password" />
+        <result column="papers_code" property="papersCode" />
+        <result column="car_num" property="carNum" />
+        <result column="lng" property="lng" />
+        <result column="lat" property="lat" />
+        <result column="wechat_id" property="wechatId" />
+        <result column="subscribe" property="subscribe" />
+        <result column="avatar_url" property="avatarUrl" />
+        <result column="nick_name" property="nickName" />
+    </resultMap>
+
+</mapper>