Say two words
At present, there are few complete cases of knowledge map construction on the Internet. Our developers have no idea about how to build it. There are basically two construction methods of knowledge map: Method 1 neo4j map database; Method 2. Eckarts atlas plug-in. I think method 2 is relatively simple and easy.
Let's take you to the construction of visual knowledge map of traditional Chinese medicine, familiarize you with how to develop knowledge map and share technical knowledge for free
How to develop knowledge map
User information management: new user registration, existing account login, user logout and user information modification.
2. Chinese herbal medicine information query: users can click the information given by the system or query by code or drug properties, or enter the information they want to query through the search box to query Chinese herbal medicine.
3. Chinese herbal medicine information community: after entering, there is recommendation consultation at the top of the home page for browsing. It relies on the content-based recommendation algorithm (that is, the recommendation algorithm model is formed based on the relevant information between the user and the subject matter and the user's operation behavior on the subject matter to provide recommendation services for users) to consult and recommend in real time. Below are the latest reviewed and approved information, ranked according to the release time. After clicking to enter the information, you can pay attention to the author of the information, like or collect the information. You can comment, reply and like comments at the bottom of the information. The second page is the user's message and comment management, which can receive system messages, reply to others' comments and delete their own comments. The last page is information release and deletion. Users can edit their own articles by using graphics and video, and then submit them for approval. After being approved by the administrator, they can be successfully released. Whether the publication is successful or not, users can choose to delete their published articles.
4. Visualization of the origin of Chinese herbal medicines: it contains the distribution map of Chinese herbal medicines in provinces across the country (similar to the epidemic map). Users can click on the province to view the number and details of Chinese herbal medicines in the province, and jump to; And the statistical pie chart and histogram of the distribution of traditional Chinese medicine in all provinces of the country; After jumping to the details page, you can click different regions in the province to view the details of the output types of medicinal materials. If the information is wrong, the user can send an error correction application to the background administrator.
Administrator information management: administrator login, user logout, administrator personal information modification.
2. User information management: the administrator can query the user information, modify and reset the user's password (the initial password is 123456 by default), or log off the user.
3. Information management of traditional Chinese medicine: the administrator can click the search box to input and query independently, and can also add, delete and modify the information of traditional Chinese medicine.
4. Chinese herbal medicine information community management: administrators can publish Chinese herbal medicine information; Be responsible for the review of users' articles. Only approved users' articles can be successfully published; Administrators can also view a series of information statistics, query and delete information.
5. Visualization of origin of traditional Chinese medicine: in addition to basic browsing, the administrator also has the information management authority of maps and charts, and can review and process the user's error correction application, so as to modify some data information.
Knowledge map construction technology
- Visual portal (Vue + Bootstrap)
- Manage back office websites (Vue + ElementUI)
- Server (Springboot + Mybatis)
One background of the server can drag two front ends. The ports of the front end are different and can be started at the same time
key technology
The relationship diagram and medicinal material map are encapsulated by using the components in Apache Echarts 5
- The origin map supports the drilling in at the county level
Attention
- The origin of medicinal materials can be entered. After entering, you need to click the refresh button in origin management. After refreshing, the data will be updated, and then the query will be displayed on the map
- The relationship map comes from the prescription. As long as the prescription is added and the medicinal materials in the prescription have been added in the system, it will be drawn automatically, and the node size and position are random
Development process sharing
The implementation code is as follows:
package com.university.demo.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.university.demo.common.ServerResponse; import com.university.demo.common.UserLoginToken; import com.university.demo.entity.Admin; import com.university.demo.entity.request.PasswordVO; import com.university.demo.entity.request.UserLoginRequest; import com.university.demo.service.AdminService; import com.university.demo.service.impl.TokenService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.HashMap; import java.util.Map; /** * @author lequal * @since 2020-03-06 */ @RestController @RequestMapping("/admin") public class AdminController { @Autowired private AdminService adminService; @Autowired private TokenService tokenService; /** * Administrator login * @param adminLoginRequest * @return */ //@SysLog("test") @PostMapping("/login") public ServerResponse login(@RequestBody UserLoginRequest adminLoginRequest) throws Exception{ Map<String, Object> map = new HashMap(); Admin admin = adminService.adminLogin(adminLoginRequest.getUsername(), adminLoginRequest.getPassword()); if (admin != null){ String token = tokenService.getToken(admin); admin.setToken(token); adminService.saveOrUpdate(admin); map.put("admin", admin); map.put("token", token); return ServerResponse.ofSuccess(map); } return ServerResponse.ofError("Wrong user name or password!"); } @PostMapping("/logout") public ServerResponse logout(@RequestBody UserLoginRequest request) { Map<String, Object> map = new HashMap(); Integer ret = adminService.adminLogout(request.getToken()); System.out.println("ret==>" + ret); return ServerResponse.ofSuccess("Logout succeeded"); } @GetMapping("/info") public ServerResponse info(@RequestParam String token) { Map<String, Object> map = new HashMap(); Admin admin = adminService.info(token); if (admin != null){ map.put("userinfo", admin); return ServerResponse.ofSuccess(map); } return ServerResponse.ofError("token invalid!"); } /** * Administrator update profile * @return */ //@UserLoginToken @PostMapping("/modify") public ServerResponse modify(@RequestBody Admin admin) { return adminService.updateById(admin) ? ServerResponse.ofSuccess("Update succeeded!") : ServerResponse.ofError("Update failed!"); } /** * Query administrator information according to ID * @param id * @return */ @GetMapping("/{id}") public ServerResponse queryAdmin(@PathVariable("id") Integer id) { return ServerResponse.ofSuccess(adminService.getById(id)); } /** * Administrator changes password * @param passwordVO * @return */ @PostMapping("/password") public ServerResponse updatePass(@RequestBody PasswordVO passwordVO) { System.out.println(passwordVO + "======"); QueryWrapper<Admin> wrapper = new QueryWrapper(); wrapper.eq("id", passwordVO.getId()); wrapper.eq("password", passwordVO.getOldPass()); Admin admin = adminService.getOne(wrapper); if (admin == null) { return ServerResponse.ofError("Old password error"); } // Otherwise, enter the password modification process admin.setPassword(passwordVO.getNewPass()); boolean b = adminService.updateById(admin); if (b) { return ServerResponse.ofSuccess("Password modified successfully"); } return ServerResponse.ofError("Password update failed"); } }
The implementation code is as follows:
'use strict' const merge = require('webpack-merge') const prodEnv = require('./prod.env') module.exports = merge(prodEnv, { NODE_ENV: '"development"' })
Technical summary
After analysis, we should be able to develop the knowledge map. My purpose is to help you learn springboot + Vue JS combinatorial development knowledge map, Ollie, the future can be expected