Enterprise knowledge sharing cloud platform based on micro service
By designing a microservice-based enterprise knowledge sharing cloud platform, using microservices/distributed architecture and multiple technical components, it solves the problems of inability to meet user needs, incomplete file uploads, and security of resource use in enterprise knowledge sharing, achieving efficient , secure knowledge sharing and management.
Patent Information
- Application Number
- CN202411371644.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, enterprise knowledge sharing has problems such as inability to meet user needs, incomplete file uploads, and security of resource use.
Design a microservice-based enterprise knowledge sharing cloud platform, adopting a microservice/distributed architecture, including access layer, dynamic and static separation layer, interface layer, service layer and storage layer, using Nginx, Spring Cloud Gateway, Nacos, minIO, Redis With SQL Server and other technologies, it realizes the decoupling and independent deployment of functional modules, supports file fragmented upload, second transmission, and breakpoint transmission, ensuring data privacy and security.
It has achieved the need to meet the diversity and uncertainty of users, ensure the integrity and security of file uploads, and improve the management efficiency of enterprise knowledge sharing and the improvement of employee professional skills.
Smart Images

Figure CN119441166A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information sharing platforms, and in particular to a microservice-based enterprise knowledge sharing cloud platform. Background Art
[0002] In current corporate management, the company's various system documents, training materials and other corporate knowledge resources are currently mainly disseminated offline or accessed through OA. There are problems such as incomplete resource upload, inaccurate classification, and unsupported file types, which greatly hinder corporate employees from obtaining the professional resources they need and affect employees' learning of corporate system documents, professional knowledge and other knowledge resources. At the same time, due to the diversity and uncertainty of user needs and the uncertainty of user identity, offline dissemination or OA access cannot meet user needs and resource security issues.
[0003] Therefore, it is necessary to provide a microservice-based enterprise knowledge sharing cloud platform that can solve the problems of enterprise knowledge sharing in the existing technology that cannot meet user needs, incomplete file upload, and resource usage security. Summary of the invention
[0004] The purpose of the present invention is to provide a microservice-based enterprise knowledge sharing cloud platform, which can solve the problems of enterprise knowledge sharing in the prior art that cannot meet user needs, file upload is incomplete, and resource usage is unsafe.
[0005] The present invention is achieved in that:
[0006] A microservice-based enterprise knowledge sharing cloud platform, wherein the functional architecture of the enterprise knowledge sharing cloud platform includes a professional module, a functional module, a technical platform and a permission module; wherein the architecture of the technical platform includes an access layer, a dynamic and static separation layer, an interface layer, a service layer and a storage layer;
[0007] Among them, the access layer includes the user end, through which users access the enterprise knowledge sharing cloud platform via a browser;
[0008] The dynamic and static separation layer includes the Nginx server, which processes user requests and returns static resources directly to users through static pages;
[0009] The interface layer includes Spring Cloud Gateway. As the unified entrance of the service layer, Spring Cloud Gateway receives dynamic requests from users forwarded by the Nginx server and forwards them to the service layer according to the routing rules.
[0010] The service layer includes Nacos cluster and microservice modules. Nacos cluster is used for service registration and service discovery, so that microservice modules can register their own information with Nacos cluster after startup. Nacos cluster maintains a service list that collects the service contents of microservice modules.
[0011] The storage layer includes minIO, Redis, and SQL Server.
[0012] The microservice module is divided into several independent microservice units, and each microservice unit corresponds to different business service functions. The microservice units are called through OpenFeign; the Spring Cloud Gateway gateway and each microservice unit query the information of other services through the Nacos cluster to realize the call between microservice units.
[0013] The professional sections include the following unit sections: administrative office, planning management, material management, human resources, audit management, product promotion culture, survey and design, scientific and technological research and development, technical management, quality and environment, production management, project manager, marketing, safety management, finance, legal management, business management, information technology, and investment management.
[0014] The functional modules include the following unit modules: system documents, excellent case sharing, talent incubation, and knowledge garden; among them, system documents include group / bureau / company series standardized manuals, planning documents, and management methods; excellent case sharing includes implementation plans, business planning, and legal proceedings; talent incubation includes business training adaptation and internal lecturer training; knowledge garden includes one-minute quality, tax classroom, legal education classroom, and operation manual.
[0015] The authority section includes the following unit sections: data feedback, positive drive, user authentication, resource confidentiality, various forms, shared resources, dedicated release, and quality control; among them, data feedback, positive drive includes views, downloads, and likes; user authentication, resource confidentiality includes unified entrance and identity authentication; various forms, shared resources include documents and videos; dedicated release, quality control includes authority control and content editing.
[0016] The permission blocks are various in form, and the unit blocks of shared resources are used to upload or download files.
[0017] The permission section has various forms, and the process of uploading / downloading files in the unit section of shared resources is:
[0018] Step S1: The user sends a request to upload / download a file through the access layer, and the access layer calculates the MD5 of the file;
[0019] Step S2: The access layer queries the Nginx server of the dynamic and static separation layer to see whether the file to be uploaded / downloaded has been uploaded / downloaded;
[0020] Step S3: The permission section queries the file based on the MD5 and returns the query result to the Nginx server;
[0021] Step S4: The Nginx server determines whether the file to be uploaded / downloaded has been uploaded / downloaded according to the query result. If so, the original file address is returned and the process ends. If not, step S5 is executed.
[0022] Step S5: artificially divide the file to be uploaded / downloaded into slices, and upload / download the slices in sequence, with each slice being uploaded / downloaded using one thread;
[0023] Step S6: Save the fragments;
[0024] Step S7: Return the result of uploading / downloading the file;
[0025] Step S8: Determine whether all segments have been uploaded / downloaded. If so, execute step S9. If not, continue uploading / downloading segments until all segments have been uploaded / downloaded.
[0026] If a network failure occurs during the upload / download process, resulting in an interruption of the upload / download, after the network is restored, the breakpoint resume technology is used to continue uploading / downloading the unfinished part from the breakpoint of the upload / download, instead of starting the upload / download from the beginning;
[0027] Step S9: merge all the shards and return the merge result, that is, whether the merge is successful or failed.
[0028] The operation process of the enterprise knowledge sharing cloud platform includes the following steps:
[0029] Step 1: The user logs in to the enterprise knowledge sharing cloud platform through a browser or client;
[0030] Step 2: The user initiates an access request at the access layer, and the Nginx server at the dynamic and static separation layer receives the access request;
[0031] Step 3: The Nginx server determines the type of access request; if the access request is a static resource request, the static resource is directly returned to the user through a static page; if the access request is a dynamic request, the Nginx server forwards the dynamic request to the Spring Cloud Gateway gateway;
[0032] Step 4: Spring Cloud Gateway forwards the dynamic request to the corresponding microservice unit in the microservice module according to the dynamic request path and routing rules;
[0033] Step 5: The microservice unit returns the business processing results to the Spring Cloud Gateway, which then returns the business processing results to the user.
[0034] In step 4, if other services other than dynamic requests are needed, the corresponding microservice units are discovered through the Nacos cluster and called through OpenFeign; in the process of processing business services, the microservice units can access the storage layer and store the business data in minIO, Redis or SQL Server;
[0035] For new or changed requirements of new users, the service process is:
[0036] Step 4.1: The microservice module performs demand analysis on dynamic requests to determine the user's new or changed requirements and decide whether to add a new microservice unit or modify the microservices of an existing microservice unit;
[0037] Step 4.2: Based on the analysis results, choose to add a new microservice unit or modify the microservice of an existing microservice unit, and ensure that the new or modified microservice complies with the microservice design specifications and implements the corresponding business service logic;
[0038] Step 4.3: If a new microservice is added, it needs to be registered with the registration center of the Nacos cluster when it is started, so that it can be discovered and called by other microservice units;
[0039] If you modify an existing microservice, the modified microservice needs to re-register with the Nacos cluster's registration center when it is started, and update the microservice information;
[0040] Step 4.4: Configure new routing rules in the Spring Cloud Gateway to correctly forward users' dynamic requests to the newly added or modified microservices;
[0041] Step 4.5: Configure and adjust the storage layer's minIO, Redis, or SQL Server accordingly so that the microservice unit can correctly store business data during the business service process;
[0042] Step 4.6: Perform comprehensive testing on the newly added or modified microservices to ensure their functional accuracy and stability under the new requirements, and deploy the corresponding microservices to the production environment after the test passes.
[0043] In step 1, the process of a user logging into the enterprise knowledge sharing cloud platform is:
[0044] Step 1.1: The user enters the application of the enterprise knowledge sharing cloud platform through a browser or a client, and issues a login request through the user authentication and resource confidentiality unit sections in the permission section;
[0045] Step 1.2: The user end distributes the token code to the user and transfers the token code to the cache server Redis of the backend storage layer;
[0046] Step 1.3: Provide a network management module, intercept the user's login request through the network management module, and determine whether the login request is an authentication request, that is, whether the user has completed the authentication. If not, execute step 1.4, and if so, execute step 1.7;
[0047] Step 1.4: The network management module determines whether the user carries a token code. If so, execute step 1.5; if not, execute step 1.6;
[0048] Step 1.5: When the user logs in for the first time, the network management module remotely obtains the employee number of the logged-in user based on the token code, and then queries the complete information of the employee in the local database based on the employee number. If the query is successful, the token code is saved to the cache server Redis and the browser cache to complete the user authentication; if the query fails, that is, the employee information is incomplete, an error reminder is returned to the user, and the login process ends;
[0049] Step 1.6: The network management module intercepts the user's login request and returns an error message, and the login process ends;
[0050] Step 1.7: The network management module takes out the token code cached in the browser and compares it with the token code in the cache server Redis. If the comparison is successful, the verification is passed, the network management module allows the user to log in to the enterprise knowledge sharing cloud platform, and the login process ends; if the comparison fails, the verification fails, the network management module intercepts the user's login request and returns an error message, and the login process ends.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] 1. The present invention divides the sections according to the professional sequences such as enterprise administrative office, human resources, technical management, production management, legal management, etc., establishes knowledge sections such as system documents, excellent case sharing, talent incubation, knowledge garden, etc., to meet the needs of enterprise employees to learn management processes and improve their professional skills, help and help employees improve their professional skills and professional standards, and is conducive to improving the management efficiency of the enterprise.
[0053] 2. At the architectural level, the present invention adopts microservice / distributed architecture design, which is divided into independent functional modules according to functions. Through the mutual decoupling and independence between modules, the functional availability and stability are greatly enhanced. At the same time, using Redis cache and Nacos registration and discovery center, the distributed message gateway and the automatic acquisition and circulation of user master data and business data are realized, which can realize demand-oriented, accurate and rapid feedback and diversion.
[0054] 3. At the application level, the present invention designs and develops software functions such as data acquisition, permission configuration, file upload, and online viewing based on microservice / distributed architecture. At the same time, it adopts file segment upload, instant upload, and breakpoint resume upload technologies to achieve high-speed file transmission and meet the needs of enterprise users.
[0055] 4. In terms of security, the present invention realizes automatic identity verification when users enter the enterprise knowledge sharing cloud platform through user authentication and access restriction functions, thereby ensuring the privacy and security of the enterprise knowledge sharing cloud platform data. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a functional architecture diagram of the microservice-based enterprise knowledge sharing cloud platform of the present invention;
[0057] Figure 2 This is a technical platform architecture diagram of the enterprise knowledge sharing cloud platform based on microservices of the present invention;
[0058] Figure 3 It is a flowchart of file uploading in the microservice-based enterprise knowledge sharing cloud platform of the present invention;
[0059] Figure 4 It is a flow chart of user identity verification in the microservice-based enterprise knowledge sharing cloud platform of the present invention.
[0060] In the figure, 100 professional section, 200 functional section, 300 technical platform, 400 permission section, 1 access layer, 101 user terminal, 2 dynamic and static separation layer, 201Nginx server, 202 static page, 3 interface layer, 301Spring Cloud Gateway gateway, 4 service layer, 401Nacos cluster, 402 microservice module, 5 storage layer, 501minIO, 502Redis, 503SQLServer. DETAILED DESCRIPTION
[0061] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0062] Please see attached Figure 1, a microservice-based enterprise knowledge sharing cloud platform, the functional architecture of the enterprise knowledge sharing cloud platform includes a professional module 100, a functional module 200, a technical platform 300 and a permission module 400; wherein, please refer to the attached Figure 2 The architecture of the technology platform 300 includes an access layer 1, a dynamic and static separation layer 2, an interface layer 3, a service layer 4 and a storage layer 5.
[0063] At the technical architecture level, it is developed based on technical platforms such as Nginx, SQL Server, Nacos, and frameworks such as Spring and VUE to achieve the stability and flexibility of the overall application framework, meet the construction of various sections and permission configuration of the enterprise knowledge sharing cloud platform during the application promotion process, and at the same time strengthen the security of the enterprise's internal learning platform and lay a solid foundation for the architectural construction of the enterprise knowledge sharing cloud platform.
[0064] In response to the diversity and uncertainty of user needs, during the design and development of the software's technical architecture, the high flexibility and low coupling of the software's functional architecture and data architecture will be used to ensure that users' new and changed needs can be realized within the architectural framework of the technology platform 300.
[0065] Specifically, the access layer 1 includes a user terminal 101 , and a user accesses the enterprise knowledge sharing cloud platform via a browser through the user terminal 101 .
[0066] Preferably, the user terminal 101 can be a PC, smart terminal or other device in the prior art.
[0067] The dynamic and static separation layer 2 includes an Nginx server 201, which is responsible for processing user requests and directly returning static resources to users through static pages 202 to improve response speed. Dynamic requests are forwarded to the backend (including the interface layer 3, the service layer 4 and the storage layer 5) service.
[0068] In the dynamic-static separation layer 2, static resources are separated from dynamic resources, and static resources are directly returned through the static page 202, so that the Spring Cloud Gateway 301 of the interface layer 3 is only responsible for processing the user's dynamic requests, thereby reducing the pressure on the Spring Cloud Gateway 301 of the interface layer 3, while optimizing system performance and enhancing flexibility.
[0069] The interface layer 3 includes a Spring Cloud Gateway 301 for implementing the gateway function. As the unified entrance of the service layer 4, the Spring Cloud Gateway 301 receives dynamic requests from users forwarded by the Nginx server 201, and forwards the dynamic requests of users to the corresponding microservice modules in the service layer 4 according to the routing rules.
[0070] At the same time, Spring Cloud Gateway 301 can also implement functions such as load balancing, permission control, and current limiting.
[0071] Spring Cloud Gateway 301 serves as the entrance, uniformly manages and distributes static and dynamic requests of all user terminals 101, and can perform operations such as traffic control, load balancing, routing and forwarding, shielding the specific implementation details of the microservice module 402 of the service layer 4, simplifying the interaction process between the user terminal and the service layer 4, and reducing the degree of coupling.
[0072] The service layer 4 includes a Nacos cluster 401 and a microservice module 402. The Nacos cluster 401 is used for service registration and service discovery, so that the microservice module 402 can register its own information with the Nacos cluster 401 after startup. The Nacos cluster 401 maintains a service list that aggregates the service content of the microservice module 402.
[0073] Among them, the microservice module 402 is divided into several independent microservice units, and each microservice unit corresponds to different business service functions, and the microservice units are called through OpenFeign. Spring Cloud Gateway 301 and each microservice unit can query the information of other services through Nacos cluster 401, so as to realize the call between microservice units.
[0074] In service layer 4, Nacos cluster 401 is used as the center of service registration and service discovery. Each microservice unit registers and discovers other services through Nacos cluster 401, thereby dynamically calling each other's services. This method reduces the coupling between services and improves the flexibility of the system.
[0075] At the same time, by calling the services between each microservice unit through OpenFeign, the decoupling and flexibility between services are enhanced, so that each microservice unit can be independently developed, deployed and expanded.
[0076] The storage layer 5 includes minIO 501, Redis 502 and SQL Server 503, which can meet the storage requirements of different types of business data and further improve the flexibility of the data architecture.
[0077] Among them, minIO 501 is an object storage system for storing files or other unstructured data. Redis 502 is used to cache data, improve the speed of data reading, and reduce the burden on the database. SQL Server 503 is a relational database for storing business data.
[0078] By setting up the storage layer 5, each microservice unit can have its own independent storage, and control the access between data through the API interface.
[0079] The technology platform 300 adopts a microservice / distributed architecture design, which is divided into independent functional modules according to functions. Through the decoupling and independence between modules, the functional availability and stability are greatly enhanced. At the same time, the registration and discovery center of Redis cache and Nacos cluster is used to realize the distributed message gateway and the automatic acquisition and circulation of user master data and business data, which can realize demand-oriented, accurate and rapid feedback and diversion.
[0080] Specifically, decoupling: The enterprise knowledge sharing cloud platform uses the service registration and discovery mechanism through the Nacos cluster to achieve decoupling. Each microservice unit automatically registers its service information with the Nacos cluster when it starts, and other services discover and call services through the Nacos cluster. In this way, there is no need for direct dependence between services, and a service can be replaced or updated at any time without affecting other services; Spring Cloud Gateway 301 further decouples the user end and backend services. The user end does not need to care about the specific service address and call details, and only needs to make dynamic requests through Spring Cloud Gateway 301.
[0081] Independence: Each microservice unit can be deployed and run independently, with its own data storage and business logic. OpenFeign is used to implement inter-service calls and communications. The microservice units can implement OpenFeign's call function through the HTTP interface, allowing them to be independently developed, tested, deployed and expanded; data storage also uses different databases to process different types of data, allowing each microservice unit to independently select the most suitable data storage method according to its needs.
[0082] Direction: Direction control of traffic is achieved through Spring Cloud Gateway 301. Spring Cloud Gateway 301 directs dynamic requests to specific microservice units according to the path, method or other parameters of the request. This method can handle different types of requests more flexibly and achieve precise direction control; Nginx server 201, as a static resource server, directs static page 202 requests to the local cache, thereby reducing the burden on backend microservices.
[0083] Precision: Spring Cloud Gateway 301 of interface layer 3 can accurately distribute and process dynamic requests through routing rules, filters and other technologies. It can accurately route dynamic requests to the corresponding microservice units based on information such as request path, request header, and request parameters, avoiding unnecessary interference in the middle layer; and use OpenFeign for service calls, so that each microservice unit can directly call other service APIs required to achieve accurate internal communication.
[0084] Fast: Dynamic registration and discovery of microservices are realized through Nacos cluster, which improves the response speed of microservices. Nacos cluster can update microservice information in time to ensure the rapidity of microservice calls; static requests are directly processed by Nginx server 201 through static page 202, reducing the load on the backend server and thus speeding up the response speed.
[0085] Feedback: Spring Cloud Gateway 301 can monitor and log the status of each request in real time, and feed back the request to the corresponding microservice unit. This allows problems to be discovered and solved in a timely manner; Redis, as a cache layer, can store hot data, reduce database access pressure, and increase data acquisition speed, realizing a fast feedback mechanism.
[0086] Traffic diversion: The Spring Cloud Gateway 301 of the interface layer 3 has both traffic control and load balancing functions. It can distribute traffic to different microservice units according to preset strategies to ensure the stability and high availability of the system; the Nginx server 201 is responsible for the diversion of static content. Through caching and load balancing technology, static requests and dynamic requests are effectively diverted to optimize the performance of the overall system.
[0087] The professional section 100 includes the following unit sections: administrative office, planning management, material management, human resources, audit management, product promotion culture, survey and design, scientific and technological research and development, technical management, quality environment, production management, project manager, marketing, safety management, finance, legal management, business management, information technology, investment management, etc.
[0088] The unit blocks of the professional block 100 can be adaptively adjusted according to the sharing and usage requirements of different enterprises.
[0089] The functional module 200 includes the following unit modules: system documents, excellent case sharing, talent incubation, knowledge garden, etc. Among them, system documents include group / bureau / company series standardization manuals, planning documents, management methods, etc.; excellent case sharing includes implementation plans, business planning, legal proceedings, etc.; talent incubation includes business training adaptation, internal lecturer training, etc.; knowledge garden includes one-minute quality, tax classroom, legal education classroom, operation manual, etc.
[0090] The unit modules of the functional module 200 can be adaptively adjusted according to the sharing and use requirements of different enterprises.
[0091] The authority module 400 includes the following unit modules: data feedback, positive drive, user authentication, resource confidentiality, various forms, shared resources, dedicated person publishing, quality control, etc. Among them, data feedback, positive drive includes views, downloads, likes, etc.; user authentication, resource confidentiality includes unified entrance, identity verification, etc.; various forms, shared resources include documents, videos, etc.; dedicated person publishing, quality control includes authority control, content editing, etc.
[0092] The unit blocks of the authority block 400 can be adaptively adjusted according to the sharing and use requirements of different enterprises.
[0093] The permission section 400 integrates functions such as data acquisition, permission configuration, file upload, and online viewing. At the same time, combined with file segment upload, instant upload, and breakpoint resume technology, it can achieve a high-speed file transfer rate of 3GB / minute to meet the needs of corporate users.
[0094] The permission blocks 400 are various in form, and the unit blocks of shared resources can be used to upload or download files. Figure 3 , the process of uploading / downloading files is:
[0095] Step S1: The user sends a request to upload / download a file through access layer 1, and access layer 1 performs MD5 calculation on the file.
[0096] Step S2: The access layer 1 requests the Nginx server 201 of the dynamic-static separation layer 2 to inquire whether the file to be uploaded / downloaded has been uploaded / downloaded.
[0097] Step S3: the authority module 400 performs a query based on the file MD5 and returns the query result to the Nginx server 201.
[0098] Step S4: Nginx server 201 determines whether the file to be uploaded / downloaded has been uploaded / downloaded according to the query result. If yes, the original file address is returned and the process ends. That is, the file has been uploaded / downloaded and does not need to be uploaded / downloaded again, which can save user time and server resources of storage layer 5 and realize the function of instant transmission. If no, step S5 is executed.
[0099] Step S5: artificially divide the file to be uploaded / downloaded into pieces, and upload / download the pieces in sequence, with each piece being uploaded / downloaded using one thread.
[0100] Preferably, the entire file can be divided into multiple data blocks, i.e., slices, according to the file size to be uploaded / downloaded and a certain slice size, and multiple data blocks, i.e., slices, can be uploaded / downloaded simultaneously and independently through multiple threads, thereby improving the speed of uploading / downloading files.
[0101] Step S6: Save the fragments. When uploading the fragments, the fragments are saved in the server of the storage layer 5. When downloading the fragments, the fragments are saved in the storage address specified by the user.
[0102] Step S7: Return the result of uploading / downloading the file, that is, whether the upload / download is successful or failed.
[0103] Step S8: Determine whether all segments have been uploaded / downloaded. If so, execute step S9. If not, continue uploading / downloading segments until all segments are uploaded / downloaded.
[0104] If a network failure occurs during the upload / download process, resulting in the interruption of the upload / download, after the network is restored, the breakpoint resume technology can be used to continue uploading / downloading the unfinished part from the breakpoint that has been uploaded / downloaded, without the need to upload / download from the beginning.
[0105] Step S9: merge all the fragments and return the merge result, that is, whether the merge is successful or failed. The file upload / download is completed.
[0106] Preferably, when uploading a file, the Nginx server 201 may send a fragment merge request to the storage layer 5, and the storage layer 5 merges all fragments into a file. When downloading a file, the user may send a merge request to the server of the storage address, and the server merges all fragments into a file.
[0107] The enterprise knowledge sharing cloud platform automatically determines whether the file has been uploaded / downloaded based on the set mechanism. It automatically determines whether the file has been uploaded or downloaded through file MD5 verification and fragmentation records. The judgment logic is mainly in the background, and the front end participates in status checking.
[0108] After all kinds of files are uploaded, a dedicated person can be responsible for reviewing the files, and after passing the review, the files will be published in real time in the corresponding section of the enterprise knowledge sharing cloud platform. Users can browse or download the files after logging into the enterprise knowledge sharing cloud platform.
[0109] The operation process of the enterprise knowledge sharing cloud platform includes the following steps:
[0110] Step 1: The user logs in to the enterprise knowledge sharing cloud platform through a browser or client 101.
[0111] Please see attached Figure 4 In step 1, the process of a user logging into the enterprise knowledge sharing cloud platform is:
[0112] Step 1.1: The user enters the application of the enterprise knowledge sharing cloud platform through a browser or a client 101 and sends a login request through the user authentication and resource confidentiality unit in the authority module 400.
[0113] Step 1.2: The client 101 distributes a token code to the user according to the OAuth2.0 protocol, and at the same time transmits the token code to the cache server Redis 502 of the backend storage layer 5.
[0114] Step 1.3: Provide a network management module, intercept the user's login request through the network management module, and determine whether the login request is an authentication request, that is, whether the user has completed the authentication. If not, execute step 1.4; if so, execute step 1.7.
[0115] Step 1.4: The network management module determines whether the user carries a token code. If so, execute step 1.5; if not, execute step 1.6.
[0116] Step 1.5: When the user logs in for the first time, the network management module remotely obtains the employee number of the logged-in user based on the token code, and then queries the complete information of the employee in the local database based on the employee number. If the query is successful, the token code is saved to the cache server Redis 502 and the browser cache to complete the user authentication; if the query fails, that is, the employee information is incomplete, an error reminder is returned to the user, and the login process ends.
[0117] Step 1.6: The network management module intercepts the user's login request and returns an error message, and the login process ends.
[0118] Step 1.7: The network management module takes out the token code cached in the browser and compares it with the token code in the cache server Redis 502. If the comparison is successful, the verification is passed, the network management module releases it, and the user can log in to the enterprise knowledge sharing cloud platform, and the login process ends; if the comparison fails, the verification fails, the network management module intercepts the user's login request, and returns an error message, and the login process ends.
[0119] Each time a user logs in, the token code cached by the browser is compared with the token code in the cache server Redis 502 to ensure the consistency of the token code and prevent the token code from being tampered with. At the same time, the validity of the token code can be checked to protect the user's session security and effectively reduce the resource consumption of the server. Therefore, comparing the token code on the browser and server side is a reasonable and necessary security measure.
[0120] The token code is transparent to users, allowing them to log in only at the entrance of the enterprise knowledge sharing cloud platform. They cannot log in to the enterprise knowledge sharing cloud platform through a browser by sharing a URL or other methods. Users' identities are automatically verified when they log in, effectively ensuring the security and privacy of data on the enterprise knowledge sharing cloud platform.
[0121] Step 2: The user initiates an access request at the access layer 1, and the Nginx server 201 at the dynamic and static separation layer 2 receives the access request.
[0122] Step 3: Nginx server 201 determines the type of access request; if the access request is a static resource request, the static resource is directly returned to the user through static page 202; if the access request is a dynamic request, Nginx server 201 forwards the dynamic request to Spring Cloud Gateway 301.
[0123] Step 4: Spring Cloud Gateway 301 forwards the dynamic request to the corresponding microservice unit in the microservice module 402 according to the dynamic request path and routing rules.
[0124] In step 4, if other services other than dynamic requests are needed, the corresponding microservice unit is discovered through Nacos cluster 401 and called through OpenFeign.
[0125] In step 4, in the process of processing business services, the microservice unit can access the storage layer 5 and store the business data in minIO 501 or Redis 502 or SQL Server 503.
[0126] In step 4, the service process for new or changed requirements of new users is:
[0127] Step 4.1: The microservice module 402 performs demand analysis on the dynamic request to determine the user's new or changed requirements and decide whether to add a new microservice unit or modify the microservice of an existing microservice unit.
[0128] Step 4.2: Based on the analysis results, the development team can choose to add a new microservice unit or modify the microservices of an existing microservice unit, and ensure that the new or modified microservices comply with the microservice design specifications and implement the corresponding business service logic.
[0129] Step 4.3: If a new microservice is added, the newly added microservice needs to be registered with the registration center of the Nacos cluster 401 when it is started, so that it can be discovered and called by other microservice units.
[0130] If you modify an existing microservice, the modified microservice needs to re-register with the registration center of the Nacos cluster 401 when it is started, and update the microservice information.
[0131] Step 4.4: Configure new routing rules in Spring Cloud Gateway 301 to correctly forward users' dynamic requests to newly added or modified microservices.
[0132] Step 4.5: Configure and adjust the miniO 501 or Redis 502 or SQL Server 503 of the storage layer 5 accordingly, so that the microservice unit can correctly store business data during the business service process.
[0133] Step 4.6: Perform comprehensive testing on the newly added or modified microservices to ensure their functional accuracy and stability under the new requirements, and deploy the corresponding microservices to the production environment after the test passes.
[0134] Step 5: The microservice unit returns the business processing result to Spring Cloud Gateway 301, and Spring Cloud Gateway 301 returns the business processing result to the user.
[0135] Microservices can include business services such as file query, file upload, and file download, and the content and scope of microservices can be adaptively adjusted according to actual usage needs. Users can query the files they need to learn by section, content type, release time, file name, and other conditions, and use microservice functions to browse and download.
[0136] By building an enterprise knowledge sharing cloud platform with professional modules 100, functional modules 200, technical platforms 300 and authority modules 400, users can upload files in real time, review and control the process, browse resources online, and download files at any time. Through the integration of knowledge resources (including files, videos, etc.) of different professional systems and contents in different functional modules, employees' learning needs for management processes and improving professional skills can be met, which is conducive to helping enterprise employees improve their professional skills and professional standards, and is also conducive to meeting the management needs of enterprises and improving business management efficiency. It is suitable for various types of enterprises.
[0137] The enterprise knowledge sharing cloud platform can conduct real-time statistics on the upload volume, browsing volume, download volume, etc. of files, and use the dimensions of real-time data such as upload volume, browsing volume, download volume, etc. to analyze the influence of files, thereby realizing the positive driving application of the enterprise knowledge sharing cloud platform based on real-time data feedback.
[0138] The above are only preferred embodiments of the present invention and are not intended to limit the scope of protection of the invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A microservice-based enterprise knowledge sharing cloud platform, characterized by: The functional architecture of the enterprise knowledge sharing cloud platform includes a professional section (100), a functional section (200), a technical platform (300) and a permission section (400); wherein the architecture of the technical platform (300) includes an access layer (1), a dynamic and static separation layer (2), an interface layer (3), a service layer (4) and a storage layer (5); The access layer (1) includes a user terminal (101), and a user accesses the enterprise knowledge sharing cloud platform via a browser through the user terminal (101); The dynamic and static separation layer (2) includes an Nginx server (201), which processes user requests and directly returns static resources to the user through a static page (202); The interface layer (3) includes a Spring Cloud Gateway (301). The Spring Cloud Gateway (301) serves as a unified entrance of the service layer (4), receives dynamic requests from users forwarded by the Nginx server (201), and forwards the dynamic requests to the service layer (4) according to routing rules. The service layer (4) includes a Nacos cluster (401) and a microservice module (402); the Nacos cluster (401) is used for service registration and service discovery, so that the microservice module (402) can register its own information with the Nacos cluster (401) after startup, and the Nacos cluster (401) maintains a service list that collects the service content of the microservice module (402); The storage layer (5) includes minIO (501), Redis (502) and SQL Server (503).
2. The microservice-based enterprise knowledge sharing cloud platform according to claim 1 is characterized by: The microservice module (402) is divided into a number of independent microservice units, and each microservice unit corresponds to a different business service function. The microservice units are called through OpenFeign; the Spring Cloud Gateway (301) and each microservice unit query the information of other services through the Nacos cluster (401) to realize the call between the microservice units.
3. The microservice-based enterprise knowledge sharing cloud platform according to claim 1 is characterized by: The professional sections (100) include the following unit sections: administrative office, planning management, material management, human resources, audit management, product promotion culture, survey and design, scientific and technological research and development, technical management, quality environment, production management, project manager, marketing, safety management, finance and finance, legal management, business management, information technology, and investment management.
4. The microservice-based enterprise knowledge sharing cloud platform according to claim 1, characterized in that: The functional module (200) includes the following unit modules: system documents, excellent case sharing, talent incubation, and knowledge garden; among them, system documents include group / bureau / company series standardization manuals, planning documents, and management methods; excellent case sharing includes implementation plans, business planning, and legal proceedings; talent incubation includes business training adaptation and internal lecturer training; knowledge garden includes one-minute quality, tax classroom, legal education classroom, and operation manual.
5. The microservice-based enterprise knowledge sharing cloud platform according to claim 1 is characterized by: The authority module (400) includes the following unit modules: data feedback, positive drive, user authentication, resource confidentiality, various forms, shared resources, dedicated person publishing, and quality control; among them, data feedback, positive drive includes views, downloads, and likes; user authentication, resource confidentiality includes unified entry and identity authentication; various forms, shared resources include documents and videos; dedicated person publishing, quality control includes authority control and content editing.
6. The microservice-based enterprise knowledge sharing cloud platform according to claim 5 is characterized by: The permission module (400) has various forms, and the unit module of the shared resource is used to upload or download files.
7. The microservice-based enterprise knowledge sharing cloud platform according to claim 6 is characterized by: The permission panel (400) has various forms, and the process of uploading / downloading files in the unit panel of shared resources is: Step S1: The user sends a request to upload / download a file through the access layer (1), and the access layer (1) performs MD5 calculation on the file; Step S2: The access layer (1) requests the Nginx server (201) of the dynamic / static separation layer (2) to check whether the file to be uploaded / downloaded has been uploaded / downloaded; Step S3: the authority module (400) performs a query based on the file MD5 and returns the query result to the Nginx server (201); Step S4: The Nginx server (201) determines whether the file to be uploaded / downloaded has been uploaded / downloaded according to the query result. If so, the original file address is returned and the process ends. If not, step S5 is executed. Step S5: artificially divide the file to be uploaded / downloaded into slices, and upload / download the slices in sequence, with each slice being uploaded / downloaded using one thread; Step S6: Save the fragments; Step S7: Return the result of uploading / downloading the file; Step S8: Determine whether all segments have been uploaded / downloaded. If so, execute step S9. If not, continue uploading / downloading segments until all segments have been uploaded / downloaded. If a network failure occurs during the upload / download process, resulting in an interruption of the upload / download, after the network is restored, the breakpoint resume technology is used to continue uploading / downloading the unfinished part from the breakpoint of the upload / download, instead of starting the upload / download from the beginning; Step S9: merge all the shards and return the merge result, that is, whether the merge is successful or failed.
8. The microservice-based enterprise knowledge sharing cloud platform according to any one of claims 1 to 7, characterized in that: The operation process of the enterprise knowledge sharing cloud platform includes the following steps: Step 1: A user logs into the enterprise knowledge sharing cloud platform via a browser or a client (101); Step 2: The user initiates an access request at the access layer (1), and the Nginx server (201) at the dynamic and static separation layer (2) receives the access request; Step 3: The Nginx server (201) determines the type of the access request; if the access request is a static resource request, the static resource is directly returned to the user through the static page (202); if the access request is a dynamic request, the Nginx server (201) forwards the dynamic request to the Spring Cloud Gateway (301); Step 4: Spring Cloud Gateway (301) forwards the dynamic request to the corresponding microservice unit in the microservice module (402) according to the dynamic request path and routing rules; Step 5: The microservice unit returns the business processing result to the Spring Cloud Gateway (301), and the Spring Cloud Gateway (301) returns the business processing result to the user.
9. The microservice-based enterprise knowledge sharing cloud platform according to claim 8 is characterized by: In step 4, if other services other than dynamic requests are needed, the corresponding microservice unit is discovered through the Nacos cluster (401) and called through OpenFeign; in the process of processing business services, the microservice unit can access the storage layer (5) and store the business data in minIO (501) or Redis (502) or SQL Server (503); For new or changed requirements of new users, the service process is: Step 4.1: The microservice module (402) performs demand analysis on the dynamic request to determine the user's new or changed requirements and decide whether to add a new microservice unit or modify the microservice of an existing microservice unit; Step 4.2: Based on the analysis results, choose to add a new microservice unit or modify the microservice of an existing microservice unit, and ensure that the new or modified microservice complies with the microservice design specifications and implements the corresponding business service logic; Step 4.3: If a new microservice is added, it needs to be registered with the registration center of the Nacos cluster (401) when it is started, so that it can be discovered and called by other microservice units; If you modify an existing microservice, the modified microservice needs to re-register with the registration center of the Nacos cluster (401) when it is started, and update the microservice information; Step 4.4: Configure new routing rules in Spring Cloud Gateway (301) to correctly forward users' dynamic requests to the newly added or modified microservices; Step 4.5: Configure and adjust the miniO (501) or Redis (502) or SQL Server (503) of the storage layer (5) accordingly, so that the microservice unit can correctly store business data during the business service process; Step 4.6: Perform comprehensive testing on the newly added or modified microservices to ensure their functional accuracy and stability under the new requirements, and deploy the corresponding microservices to the production environment after the test passes.
10. The microservice-based enterprise knowledge sharing cloud platform according to claim 8, characterized in that: In step 1, the process of a user logging into the enterprise knowledge sharing cloud platform is: Step 1.1: The user enters the application of the enterprise knowledge sharing cloud platform through a browser or a user terminal (101), and sends a login request through the user authentication and resource confidentiality unit in the authority section (400); Step 1.2: The user end (101) distributes a token code to the user, and at the same time transmits the token code to the cache server Redis (502) of the backend storage layer (5); Step 1.3: Provide a network management module, intercept the user's login request through the network management module, and determine whether the login request is an authentication request, that is, whether the user has completed the authentication. If not, execute step 1.4, and if so, execute step 1.7; Step 1.4: The network management module determines whether the user carries a token code. If so, execute step 1.5; if not, execute step 1.6; Step 1.5: When the user logs in for the first time, the network management module remotely obtains the employee number of the logged-in user based on the token code, and then searches the local database for complete information about the employee based on the employee number. If the search is successful, the token code is saved to the cache server Redis (502) and the browser cache, completing user authentication. If the query fails, that is, the employee information is incomplete, an error message is returned to the user and the login process ends; Step 1.6: The network management module intercepts the user's login request and returns an error message, and the login process ends; Step 1.7: The network management module takes out the token code cached in the browser and compares it with the token code in the cache server Redis (502). If the comparison is successful, the verification is passed, the network management module allows the user to log in to the enterprise knowledge sharing cloud platform, and the login process ends; if the comparison fails, the verification fails, the network management module intercepts the user's login request and returns an error message, and the login process ends.