Disclosure of Invention
In view of the above problems, the present invention aims to provide a research service system based on a microservice system and a multi-tenant technology.
The purpose of the invention is realized by adopting the following technical scheme:
the invention discloses a research service system based on a micro-service system and a multi-tenant technology, which comprises the following steps: gateway module, login verification module, authority management module and 2 at least investigation modules: wherein
The gateway module is used for receiving a user login request sent by a user terminal and forwarding the received user login request to the login verification module;
the login verification module is used for performing identity verification on the received user login request, and allowing the user to log in the research service system after the verification is passed;
the authority management module is used for limiting the access authority of the user according to the identity information of the login user so that the user can access the investigation module within the authority range of the user;
each investigation module comprises a corresponding investigation questionnaire, and the investigation module is used for acquiring filling information fed back by the investigation object, wherein the filling information is specifically filling information which is obtained by the investigation object through a user terminal accessing the investigation module to acquire the corresponding investigation questionnaire and fed back according to the investigation questionnaire.
Preferably, the research service system further includes a storage module, configured to perform classified storage and management on the filling information of the obtained research questionnaire.
Preferably, the research service system further includes a publishing module, which is used for an administrator to publish new research questionnaire data in the research service system and establish a research module corresponding to the research questionnaire.
Preferably, the investigation module comprises:
the display unit is used for displaying the questionnaire data corresponding to the investigation module;
and the interaction unit is used for acquiring filling information which is fed back by the investigation object and aims at the investigation questionnaire.
Preferably, the investigation module further comprises:
the image acquisition unit is used for acquiring a face image of the investigation object in real time in the process of filling the investigation questionnaire in the investigation object, wherein the face image of the investigation object is acquired by the user terminal in real time in the process of filling the investigation questionnaire in the investigation object and is uploaded to the investigation business system;
and the detection unit is used for carrying out face detection on the acquired face image, detecting face information of a target area in the face image, and sending a locking instruction to the interaction unit when the face information does not exist in the target area in the face image, wherein the locking instruction is used for locking the interaction unit so that the interaction unit stops acquiring filling information of the investigation object.
Preferably, the detection unit further comprises:
performing face detection on a preset target area in the face image aiming at the acquired face image, and outputting a current face image verification result as correct when a face is detected to exist in the target area; when the fact that no human face exists in the target area or more than one human face exists in the target area is detected, the current human face image verification result is output to be abnormal, and when the fact that the verification results output in continuous time periods are all abnormal is detected, a locking instruction is sent to the interaction unit, so that the interaction unit stops obtaining filling information of the investigation object.
The invention has the beneficial effects that: according to the invention, the investigation business system is established based on the micro-service system, different types of investigation businesses are distributed to different investigation modules, and meanwhile, the management system for the investigation businesses is intensively established, so that the investigation businesses of all regions and all units can be uniformly managed, the investigation business data can be conveniently shared and unified, and the intelligent level of the investigation business system is improved.
Detailed Description
The invention is further described in connection with the following application scenarios.
Referring to fig. 1, the embodiment of the invention shows a research service system based on a micro-service system and a multi-tenant technology, which includes: the system comprises a gateway module, a login verification module, a permission management module and a plurality of investigation modules: wherein
The gateway module is used for receiving a user login request sent by a user terminal and forwarding the received user login request to the login verification module;
the login verification module is used for performing identity verification on the received user login request, and allowing the user to log in the research service system after the verification is passed;
the authority management module is used for limiting the access authority of the user according to the identity information of the login user so that the user can access the investigation module within the authority range of the user;
each research module comprises a corresponding research questionnaire, and the research module is used for acquiring filling information of the research questionnaire fed back by a research subject, wherein the filling information of the research questionnaire is fed back to the research module through the user terminal after the research subject accesses the research module through the user terminal to acquire the corresponding research questionnaire.
The research business system is established based on the micro-service system, different types of research businesses are distributed to different research modules, each research module corresponds to one micro-service, each research module can operate independently, a plurality of research modules can be matched to complete corresponding research businesses, a management system for the research businesses is established in a centralized mode, the research businesses of all regions and all units can be managed in a unified mode, the research business data can be shared and unified conveniently, and the intelligent level of the research business system is improved.
Each research module is established based on different objects of different services in different regions, and each research module comprises a targeted research questionnaire, so that a user can obtain related research questionnaire data after accessing the research module, the research objects complete the related research questionnaire, and corresponding filling information is obtained for unified management and recording, development of research services is facilitated, and the use is very convenient.
Meanwhile, authority management based on identity information is carried out on the users logging in the research service system, and the research service system can be helped to distribute different authorities for different users. Meanwhile, the administrator can carry out overall management on the research service system, obtain related research service data and contribute to further analysis and processing of the obtained research service data.
In one scenario, the user terminal corresponds to a user, where the user includes a basic research staff or research organization who develops research services, the research staff or the research organization logs in a research service system through a terminal device thereof, after logging in, the research staff or the research organization can obtain access rights of a research module corresponding to the rights and access the corresponding research module to obtain a corresponding research questionnaire, and the research staff or the research organization provides the terminal device to a research object, so that the research object fills the research questionnaire in the terminal device, and uploads filling information to the research service system for unified management after filling, which is helpful for managing filling results of the research questionnaire on one hand and management of development conditions of the research services of the research staff or the research organization on the other hand.
Preferably, the system further comprises a storage module, configured to perform classified storage and management on the obtained filling information of the questionnaire.
Preferably, the system further comprises an issuing module for an administrator to issue new questionnaire data in the research service system and establish a corresponding research module.
Preferably, the investigation module comprises:
the display unit is used for displaying the questionnaire data corresponding to the investigation module;
and the interaction unit is used for acquiring filling information which is fed back by the investigation object and aims at the investigation questionnaire.
Aiming at the problem that in the prior art, in the process of research, research staff or research organizations easily fill or compile research questionnaires in order to complete tasks, so that the authenticity level of research services cannot be guaranteed, the following implementation mode provides the method which can ensure that research data can be traced by research objects through the acquisition of human face images of the research objects in the process of filling the research questionnaires by using user terminal equipment, and also ensures the authenticity level of the research service system for acquiring the filling information of the research questionnaires.
Preferably, the investigation module further comprises:
the image acquisition unit is used for acquiring a face image of the investigation object in real time in the process of filling the investigation questionnaire in the investigation object, wherein the face image of the investigation object is acquired by the user terminal in real time in the process of filling the investigation questionnaire in the investigation object and is uploaded to the investigation business system;
and the detection unit is used for carrying out face detection on the acquired face image, detecting face information of a target area in the face image, and sending a locking instruction to the interaction unit to lock the interaction unit when detecting that the target area in the face image does not have the face information so as to enable the interaction unit to stop acquiring filling information of the investigation object.
The intelligent terminal equipment for logging in the research service system by a user is provided with a camera unit and is used for acquiring a face image of a research object in real time in the process of filling a research questionnaire in the research object and uploading the acquired face image to the research service system.
Preferably, the detection unit further comprises:
performing face detection on a preset target area in the face image aiming at the acquired face image, and outputting a current face image verification result as correct when a face is detected to exist in the target area; when the fact that no human face exists in the target area or more than one human face exists in the target area is detected, the current human face image verification result is output to be abnormal, and when the fact that the verification results output in continuous time periods are all abnormal is detected, a locking instruction is sent to the interaction unit, so that the interaction unit stops obtaining filling information of the investigation object.
When the verification results output in the continuous time periods are detected to be normal, an activation instruction is sent to the interaction unit, so that the interaction unit is reactivated and normally acquires filling information of the investigation object.
Preferably, in the detection unit, for the acquired face image, the face detection is performed in a target area preset in the image, and the method further includes:
performing face detection on the acquired face image at the current moment at a set time interval T aiming at the acquired face image, wherein the detection time period at the current moment is recorded as T (n), n represents the number of cycles of the detection unit which have been subjected to face detection till the current moment, and T (n) represents the time period between the moment of performing face detection last time and the moment of performing face detection in the current period; when the time length between the current moment and the moment of last face detection exceeds a time period T (n), face detection is carried out on the obtained face image at the current moment;
wherein the current time interval t (n) is obtained by the function:
wherein, T (n) represents the current time period, wherein tx (n) represents the adjustment function, T (n-1) represents the time period of last human face detection, n represents the current period number, γ represents the set adjustment factor, β represents the set sensitivity factor, W1 and W2 represent the set lower threshold value and upper threshold value of the time period, respectively, T (n) represents the current time period, y represents the set adjustment factor, β represents the set sensitivity factor, T (n) represents the upper threshold value and the lower threshold value of the time period, and T (n) represents the upper threshold value and the lower threshold value of the time periodμIndicating the set adjustment time, and Y indicating the number of times that the detection unit has issued a lock instruction to the interaction unit in the process of completing the questionnaire for the current investigation object.
Since the access amount of the research service system may be very large, and the computation resources that can be allocated by each research module are very limited, in the above-mentioned technical solution for detecting the authenticity of the research object based on the face image, a technical solution for setting the period for detecting the face image is proposed, in which the length of the time period for detecting the face image can be gradually increased as the research object goes retired after completing the time period of the research questionnaire, so as to save part of the computation resources, but at the same time, the number of times of locking the interaction unit for the abnormal condition detected by the research object is added to the acquisition function of the time interval to reflect the stability of the research object during processing the research questionnaire, and the time period for detecting is further adjusted on the basis of the above-mentioned length of time period, so that the time period can be adaptively set from the dimension of saving resources and improving the detection quality, the reliability is strong.
Preferably, in the detection unit, for the acquired face image, the face detection is performed in a target area preset in the image, and the method further includes:
preprocessing the acquired face image, comprising:
carrying out gray level equalization processing on the obtained face image:
sequentially traversing each pixel point in the face image by adopting a 3X 3 processing window phi, wherein in the traversing process of the processing window phi, gray stretching processing is sequentially carried out on central pixel points of the processing window phi, wherein the adopted gray stretching function is as follows:
in the formula (I), the compound is shown in the specification,
when the central pixel point of the processing window is (x, y), the gray value of the pixel point (x, y) after gray stretching processing is carried out, H (x, y) represents the gray value of the pixel point (x, y) before gray stretching processing,
mean value of gray scale, omega, representing a face image
1And ω
2Respectively, represent the set adjustment factors, respectively,
representing a processing function, wherein
When the temperature of the water is higher than the set temperature,
is taken to be a value in which the gray scale value in the processing window is greater than
The gray level mean value of the pixel points; when in use
When the temperature of the water is higher than the set temperature,
is that the grey value in the processing window is less than
The gray level mean value of the pixel points; when in use
When the temperature of the water is higher than the set temperature,
is taken as
In the traversal process, the gray values of the pixel points contained in the processing window phi related to the gray stretching function are all based on the gray value before gray stretching processing;
sequentially obtaining gray values of all pixel points in the face image after gray stretching processing, and further obtaining a face image A after gray stretching processing;
carrying out gray level normalization processing on the face image subjected to gray level stretching processing, wherein the adopted gray level normalization function is as follows:
in the formula, h (x, y) represents the gray value of the pixel point (x, y) after normalization processing,
representing the gray value of the pixel point (x, y) in the face image after the gray stretching processing,
and
respectively representing the maximum value and the minimum value of the gray scale in the face image after the gray scale stretching processing;
and forming a face image after normalization processing according to the gray values of the pixel points after normalization processing, and taking the face image as the acquired face image.
In the foregoing embodiment, a technical solution for preprocessing a face image is further provided, in which, in a process of filling a questionnaire in a research subject, a face image acquired by a terminal device of a user in real time is sent to a research service system, and a research module determines whether the research subject completing the questionnaire is real according to the acquired face image. The detection unit is used for preprocessing the acquired face image firstly by adopting the technical scheme, so that the brightness information of the face image can be effectively enhanced, the resolution level of the face image is improved, and the accuracy of judging whether the object to be researched is real or not by the detection unit through carrying out face detection subsequently according to the acquired face image is improved.
It should be noted that, functional units/modules in the embodiments of the present invention may be integrated into one processing unit/module, or each unit/module may exist alone physically, or two or more units/modules are integrated into one unit/module. The integrated units/modules may be implemented in the form of hardware, or may be implemented in the form of software functional units/modules.
From the above description of embodiments, it is clear for a person skilled in the art that the embodiments described herein can be implemented in hardware, software, firmware, middleware, code or any appropriate combination thereof. For a hardware implementation, a processor may be implemented in one or more of the following units: an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, other electronic units designed to perform the functions described herein, or a combination thereof. For a software implementation, some or all of the procedures of an embodiment may be performed by a computer program instructing associated hardware. In practice, the program may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. Computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the protection scope of the present invention, although the present invention is described in detail with reference to the preferred embodiments, it should be analyzed by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.