CN111324589A - Log sending method and device based on similarity degree value and computer equipment - Google Patents

Log sending method and device based on similarity degree value and computer equipment Download PDF

Info

Publication number
CN111324589A
CN111324589A CN202010093511.8A CN202010093511A CN111324589A CN 111324589 A CN111324589 A CN 111324589A CN 202010093511 A CN202010093511 A CN 202010093511A CN 111324589 A CN111324589 A CN 111324589A
Authority
CN
China
Prior art keywords
picture
preset
pictures
log
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010093511.8A
Other languages
Chinese (zh)
Inventor
杨开国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202010093511.8A priority Critical patent/CN111324589A/en
Publication of CN111324589A publication Critical patent/CN111324589A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/242Aligning, centring, orientation detection or correction of the image by image rotation, e.g. by 90 degrees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Computer Hardware Design (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The application discloses a log sending method, a log sending device, computer equipment and a storage medium based on a similarity degree value, wherein the method comprises the following steps: receiving a log acquisition request sent by a client terminal; rotating the identity verification picture to be placed according to a standard posture to obtain a first intermediate picture; carrying out partial region cutting processing on the first intermediate picture so as to obtain n second intermediate pictures with round holes; respectively penetrating n second middle pictures with round holes by using n virtual cylinders; respectively carrying out image acquisition on the n virtual cylinders so as to obtain n third intermediate pictures; calculating the similarity degree value of the third intermediate picture and the appointed comparison picture; if only one of the n similarity degree values is larger than a preset similarity threshold value, acquiring a specified diameter; and acquiring a specified strategy corresponding to the specified diameter, and sending a log to the client terminal according to the specified strategy. Thereby improving information security.

Description

Log sending method and device based on similarity degree value and computer equipment
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for sending a log based on a similarity degree value, a computer device, and a storage medium.
Background
The service terminal log reflects the operation condition of the service terminal, and the service terminal log is required to be acquired in the actual development, operation and maintenance and other processes. Accordingly, however, the information security and the information security of the log of the service terminal also need to be improved. In the traditional technology, the log of the service terminal is generally authenticated by adopting a simple authority authentication scheme through modes such as a digital certificate and the like, so that the log is easy to steal and forge. Therefore, the conventional technology has disadvantages in the aspects of information confidentiality and information security of the log.
Disclosure of Invention
The application mainly aims to provide a log sending method, a log sending device, a computer device and a storage medium based on a similarity degree value, and aims to improve the information confidentiality and the information security of logs.
In order to achieve the above object, the present application provides a log sending method based on a similarity value, which is applied to a service terminal, and includes:
receiving a log acquisition request sent by a client terminal, wherein the log acquisition request is attached with an identity authentication picture;
according to a preset picture rotating method, rotating the identity verification picture to be placed according to a preset standard posture to obtain a first intermediate picture;
carrying out partial region cutting processing on the first intermediate picture so as to obtain n second intermediate pictures with round holes;
in n preset virtual three-dimensional spaces, n virtual cylinders respectively penetrate through the round holes in the n second intermediate pictures, wherein the virtual three-dimensional spaces conform to the principle of linear light propagation;
in the n virtual three-dimensional spaces, n identical appointed positioning positions are obtained by using a preset position positioning method, and the n virtual cylinders are respectively subjected to image acquisition at the appointed positioning positions, so that n third intermediate pictures are correspondingly obtained;
calculating similarity degree values of the third intermediate picture and a preset appointed reference picture by using a preset similarity calculation method, thereby obtaining n similarity degree values respectively corresponding to the n third intermediate pictures, and judging whether only one of the n similarity degree values is greater than a preset similarity threshold value;
if only one of the n similarity degree values is larger than a preset similarity threshold, recording the similarity degree value larger than the similarity threshold as an appointed similarity degree value, and acquiring an appointed diameter corresponding to the appointed similarity degree value according to a corresponding relation of preset diameter of the circular part, a second middle picture, a third middle picture and the similarity degree value;
and acquiring an appointed strategy corresponding to the appointed diameter according to the corresponding relation between the preset diameter and a log sending strategy, and sending the log to the client terminal according to the appointed strategy.
Further, the step of rotating the authentication picture to be placed according to a preset standard posture according to a preset picture rotating method to obtain a first intermediate picture includes:
inputting the identity verification picture into a preset face characteristic point recognition model to obtain first characteristic points recognized by the face characteristic point recognition model, and counting the number of the first characteristic points, wherein the face characteristic point recognition model is obtained by training a preset neural network model by using specified sample data; the specified sample data only comprises pre-collected face pictures placed in standard postures, wherein human face characteristic points are pre-labeled in the face pictures;
judging whether the number of the first characteristic points is greater than a preset first threshold value or not;
if the number of the first feature points is not larger than a preset first threshold value, rotating the identity verification picture by 90 degrees, 180 degrees or 270 degrees anticlockwise;
inputting the rotated authentication picture into the face characteristic point identification model to obtain second characteristic points identified by the face characteristic point identification model, and counting the number of the second characteristic points;
judging whether the number of the second feature points is larger than the first threshold value or not;
and if the number of the second feature points is larger than the first threshold value, recording the rotated authentication picture as a first intermediate picture.
Further, the step of rotating the authentication picture by 90 degrees, 180 degrees or 270 degrees counterclockwise includes:
judging whether a symmetric point pair exists in the first characteristic points, wherein the symmetric point pair refers to two first characteristic points which take the perpendicular bisector of the same edge of the identity verification picture as a symmetric axis;
if the first characteristic point has a symmetric point pair, counting the number of the symmetric point pair, and judging whether the number of the symmetric point pair is smaller than a preset second threshold value, wherein the second threshold value is smaller than the first threshold value;
and if the number of the symmetrical point pairs is not less than a preset second threshold value, rotating the identity verification picture by 180 degrees anticlockwise.
Further, the receiving a log obtaining request sent by a client terminal, where the log obtaining request is attached with an authentication picture, includes:
acquiring n initial pictures, and cutting the n initial pictures once respectively to obtain a picture with a round hole and n-1 circular pictures respectively, wherein the picture with the round hole and the n-1 circular pictures can form a nested relation;
nesting the pictures with the round holes and the n-1 circular pictures to obtain nested pictures;
and recording the nested pictures as identity verification pictures, sending the identity verification pictures to the client terminal, and deleting the n initial pictures, the pictures with the round holes, the n-1 circular pictures and the nested pictures in the service terminal.
Further, before the step of recording the nested picture as an authentication picture and sending the authentication picture to the client terminal, the method includes:
carrying out partial region cutting processing on the nested pictures so as to obtain n temporary pictures with round holes;
in n preset virtual three-dimensional spaces, n virtual cylinders are used for respectively penetrating through the n temporary pictures, wherein the virtual three-dimensional spaces accord with a light linear transmission principle;
in the n virtual three-dimensional spaces, n identical designated positioning positions are obtained by using a preset position positioning method, and the n virtual cylinders are respectively subjected to image acquisition at the designated positioning positions, so that n comparison pictures are correspondingly obtained.
Further, the step of calculating the similarity value between the third intermediate picture and the preset designated reference picture by using a preset similarity calculation method includes:
modifying the color value of the pixel point in the third intermediate picture into a first numerical value or a second numerical value by using a preset color value modification method, and modifying the color value of the pixel point in the appointed comparison picture into the first numerical value or the second numerical value; the color value modification method comprises the steps of setting pixel points with color values not smaller than a preset numerical value as a first numerical value, and setting pixel points with color values smaller than the preset numerical value as a second numerical value;
calculating the proportion R1 of the pixel points with the first numerical value in the third intermediate picture, and calculating the proportion R2 of the pixel points with the first numerical value in the appointed comparison picture;
according to the formula:
Figure BDA0002384503380000041
and calculating the similarity degree value D of the third intermediate picture and a preset appointed comparison picture.
Further, the log obtaining request is a request sent based on a websocket protocol, the specified policy is a real-time synchronization policy, and the step of sending the log to the client terminal according to the specified policy includes:
finishing one-time handshake based on the log acquisition request based on the websocket protocol, thereby establishing a websocket connection channel with the client terminal;
sending the current log to the client terminal by using the websocket connecting channel;
detecting the logs in real time so as to obtain the number of rows of the newly added logs, and judging whether the number of rows of the newly added logs is greater than a preset number-of-rows threshold value or not;
and if the line number of the newly added log is larger than the preset line number threshold, the newly added log is sent to the client terminal by using the websocket connecting channel.
The application provides a log sending device based on similarity value, is applied to service terminal, includes:
the system comprises a log acquisition request receiving unit, a log acquisition request processing unit and a log processing unit, wherein the log acquisition request receiving unit is used for receiving a log acquisition request sent by a client terminal, and the log acquisition request is attached with an identity authentication picture;
the first intermediate picture acquisition unit is used for rotating the identity verification picture to be placed according to a preset standard posture according to a preset picture rotation method to obtain a first intermediate picture;
the second intermediate picture acquisition unit is used for carrying out partial region cutting processing on the first intermediate picture so as to obtain n second intermediate pictures with round holes;
the second intermediate picture penetrating unit is used for penetrating the round holes in the n second intermediate pictures respectively by using n virtual cylinders in n preset virtual three-dimensional spaces, wherein the virtual three-dimensional spaces accord with a light linear propagation principle;
a third intermediate picture obtaining unit, configured to obtain n identical designated positioning positions in the n virtual three-dimensional spaces by using a preset position positioning method, and perform image acquisition on the n virtual cylinders at the designated positioning positions, so as to obtain n third intermediate pictures correspondingly;
a similarity degree value obtaining unit, configured to calculate, by using a preset similarity calculation method, similarity degree values of a third intermediate picture and a preset specified reference picture, so as to obtain n similarity degree values respectively corresponding to the n third intermediate pictures, and determine whether only one of the n similarity degree values is greater than a preset similarity threshold;
a designated similarity value obtaining unit, configured to record, if only one of the n similarity values is greater than a preset similarity threshold, the similarity value greater than the similarity threshold as a designated similarity value, and obtain, according to a correspondence between a preset diameter of the circular portion, the second intermediate picture, the third intermediate picture, and the similarity value, a designated diameter corresponding to the designated similarity value;
and the log sending unit is used for acquiring the appointed strategy corresponding to the appointed diameter according to the corresponding relation between the preset diameter and the log sending strategy and sending the log to the client terminal according to the appointed strategy.
The present application provides a computer device comprising a memory storing a computer program and a processor implementing the steps of any of the above methods when the processor executes the computer program.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of any of the above.
The log sending method and device based on the similarity degree value, the computer equipment and the storage medium receive a log obtaining request sent by a client terminal; rotating the identity verification picture to be placed according to a preset standard posture to obtain a first intermediate picture; carrying out partial region cutting processing on the first intermediate picture so as to obtain n second intermediate pictures with round holes; respectively penetrating the round holes in the n second intermediate pictures by using n virtual cylinders; respectively carrying out image acquisition on the n virtual cylinders so as to correspondingly obtain n third intermediate pictures; calculating the similarity degree value of the third intermediate picture and a preset appointed reference picture; if only one of the n similarity degree values is larger than a preset similarity threshold value, acquiring a specified diameter corresponding to the specified similarity degree value; and acquiring a specified strategy corresponding to the specified diameter, and sending a log to the client terminal according to the specified strategy. Thereby improving information security.
Drawings
Fig. 1 is a schematic flowchart of a log sending method based on a similarity value according to an embodiment of the present application;
FIG. 2 is a block diagram illustrating a structure of a log sending apparatus based on a similarity value according to an embodiment of the present disclosure;
fig. 3 is a block diagram illustrating a structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, an embodiment of the present application provides a log sending method based on a similarity value, which is applied to a service terminal, and includes:
s1, receiving a log acquisition request sent by a client terminal, wherein the log acquisition request is attached with an identity authentication picture;
s2, according to a preset picture rotating method, rotating the identity verification picture to be placed according to a preset standard posture to obtain a first intermediate picture;
s3, carrying out partial region cutting processing on the first intermediate picture to obtain n second intermediate pictures with round holes;
s4, in n preset virtual three-dimensional spaces, using n virtual cylinders to respectively penetrate through the round holes in the n second intermediate pictures, wherein the virtual three-dimensional spaces accord with a light linear propagation principle;
s5, acquiring n identical appointed positioning positions in the n virtual three-dimensional spaces by using a preset position positioning method, and respectively carrying out image acquisition on the n virtual cylinders at the appointed positioning positions so as to correspondingly obtain n third intermediate pictures;
s6, calculating similarity degree values of the third intermediate picture and a preset appointed comparison picture by using a preset similarity calculation method, thereby obtaining n similarity degree values respectively corresponding to the n third intermediate pictures, and judging whether only one of the n similarity degree values is larger than a preset similarity threshold value;
s7, if only one of the n similarity degree values is larger than a preset similarity threshold, recording the similarity degree value larger than the similarity threshold as an appointed similarity degree value, and acquiring an appointed diameter corresponding to the appointed similarity degree value according to the corresponding relation of the preset diameter of the circular part, the second middle picture, the third middle picture and the similarity degree value;
s8, according to the corresponding relation between the preset diameter and the log sending strategy, obtaining the appointed strategy corresponding to the appointed diameter, and sending the log to the client terminal according to the appointed strategy.
According to the method, through the identity authentication pictures, n second middle pictures, n virtual cylinders, n third middle pictures and the similarity degree value, the information confidentiality and the information security of the log are improved, and the management of the authority is facilitated (namely the log sending strategy is that the authority of the terminal needs to be adjusted, and only the similarity threshold value and the appointed reference picture need to be correspondingly modified).
As described in step S1 above, a log obtaining request sent by the client terminal is received, and the log obtaining request is accompanied by an authentication picture. And the identity authentication picture is used for authenticating the identity of the client terminal. The authentication picture can be any feasible picture, such as a face picture.
As described in step S2, according to a preset image rotation method, the authentication image is rotated to be placed in a preset standard posture, so as to obtain a first intermediate image. The placement of the pictures is possible in many ways, for example, for a rectangular picture, there are four kinds of positional relationships of the rectangular picture relative to a reference line with respect to one reference line: 0 degree placement (i.e., standard pose placement), 90 degree placement, 180 degree placement, and 270 degree placement. In the application, the picture with the accurate posture needs to be acquired, so that the identity verification picture is rotated to be placed according to the preset standard posture, and a first intermediate picture is obtained. When the identity verification picture is a rectangular face picture, the identity verification picture is rotated to be placed according to a preset standard posture, and a first intermediate picture is obtained, for example, in the following manner: inputting the identity verification picture into a preset face characteristic point recognition model to obtain first characteristic points recognized by the face characteristic point recognition model, and counting the number of the first characteristic points, wherein the face characteristic point recognition model is obtained by training a preset neural network model by using specified sample data; the specified sample data only comprises pre-collected face pictures placed in standard postures, wherein human face characteristic points are pre-labeled in the face pictures; judging whether the number of the first characteristic points is greater than a preset first threshold value or not; if the number of the first feature points is not larger than a preset first threshold value, rotating the identity verification picture by 90 degrees, 180 degrees or 270 degrees anticlockwise; inputting the rotated authentication picture into the face characteristic point identification model to obtain second characteristic points identified by the face characteristic point identification model, and counting the number of the second characteristic points; judging whether the number of the second feature points is larger than the first threshold value or not; and if the number of the second feature points is larger than the first threshold value, recording the rotated authentication picture as a first intermediate picture.
As described in step S3, the first intermediate picture is subjected to the partial region removal processing, so as to obtain n second intermediate pictures with round holes. The partial region cutting process includes, for example, sequentially cutting a first circular portion, a second circular portion, a. Wherein the center of the circle part can be at any feasible position, for example, coinciding with the center of the authentication picture.
As described in the above step S4, in n preset virtual three-dimensional spaces, n virtual cylinders respectively penetrate through the circular holes in the n second intermediate pictures, where the virtual three-dimensional spaces conform to the light straight-line propagation principle. The diameters of the n virtual cylinders are correspondingly equal to the diameters of the n second middle pictures with the round holes, and the surfaces of the n virtual cylinders are smooth, so that the patterns of the second middle pictures can be reflected on the virtual cylinders. The virtual three-dimensional space may be generated by any feasible method, such as a 3D modeling tool, or the like. Because the virtual three-dimensional space conforms to the principle of light linear propagation and the surfaces of the virtual cylinders are smooth, the pattern of each second intermediate picture can be reflected on the corresponding virtual cylinder. At this time, the original two-dimensional second intermediate picture is mapped to a three-dimensional graph on the virtual cylindrical surface.
As described in step S5, in the n virtual three-dimensional spaces, n identical designated positioning positions are obtained by using a preset position positioning method, and image acquisition is performed on the n virtual cylinders at the designated positioning positions, so that n third intermediate pictures are correspondingly obtained. Since the obtained designated positioning positions are the same in different virtual three-dimensional spaces, the collected n third intermediate pictures have correlation, which is beneficial to authority management (i.e. log sending policy management). Since the partial pattern of the third intermediate picture is reflected on the cylinder, the confirmation of the specified positioning position has an influence on the generation of the third intermediate picture, so that the possibility of being forged is lower, and the information security is further improved. At this time, the third intermediate picture is obtained, that is, the conversion from the three-dimensional graphics to the two-dimensional picture is completed.
As described in step S6, the similarity degree values between the third intermediate picture and the preset designated reference picture are calculated by using a preset similarity calculation method, so as to obtain n similarity degree values respectively corresponding to the n third intermediate pictures, and determine whether only one of the n similarity degree values is greater than a preset similarity threshold. The designated reference picture is the basis for authentication and, further, for sending policy confirmation. If the identity verification picture is real, only one of the n similarity degree values should be far greater than the others, and accordingly, identity verification can be performed by judging whether only one of the n similarity degree values is greater than a preset similarity threshold. The preset similarity calculation method includes, for example: modifying the color value of the pixel point in the third intermediate picture into a first numerical value or a second numerical value by using a preset color value modification method, and modifying the color value of the pixel point in the appointed comparison picture into the first numerical value or the second numerical value; the color value modification method comprises the steps of setting pixel points with color values not smaller than a preset numerical value as a first numerical value, and setting pixel points with color values smaller than the preset numerical value as a second numerical value; calculating the proportion R1 of the pixel points with the first numerical value in the third intermediate picture, and calculating the proportion R2 of the pixel points with the first numerical value in the appointed comparison picture; according to the formula:
Figure BDA0002384503380000091
and calculating the similarity degree value D of the third intermediate picture and a preset appointed comparison picture.
As described in step S7, if only one of the n similarity values is greater than the preset similarity threshold, the similarity value greater than the similarity threshold is recorded as the designated similarity value, and the designated diameter corresponding to the designated similarity value is obtained according to the corresponding relationship between the preset diameter of the circular portion, the second intermediate picture, the third intermediate picture and the similarity value. In the present application, the diameter of the circular portion, the second intermediate picture, the third intermediate picture, and the similarity value have a direct correlation, so that the corresponding specified diameter can be inverted by the similarity value.
As described in step S8, according to the correspondence between the preset diameter and the log sending policy, the specified policy corresponding to the specified diameter is obtained, and the log is sent to the client terminal according to the specified policy. The diameter of the application corresponds to the log sending strategy, so that the modification of the authority (namely the modification of the sending strategy) can be realized by modifying the diameter (namely modifying the corresponding similar threshold and the related reference picture), and the authority management is facilitated. The log obtaining request is, for example, a request sent based on a websocket protocol, the specified policy is, for example, a real-time synchronization policy, and sending the log to the client terminal according to the specified policy is, for example: finishing one-time handshake based on the log acquisition request based on the websocket protocol, thereby establishing a websocket connection channel with the client terminal; sending the current log to the client terminal by using the websocket connecting channel; detecting the logs in real time so as to obtain the number of rows of the newly added logs, and judging whether the number of rows of the newly added logs is greater than a preset number-of-rows threshold value or not; and if the line number of the newly added log is larger than the preset line number threshold, the newly added log is sent to the client terminal by using the websocket connecting channel. Therefore, the log sending is completed on the premise of ensuring the confidentiality and the safety of the log.
In one embodiment, the step S2 of rotating the authentication picture to be placed in a preset standard posture according to a preset picture rotation method to obtain a first intermediate picture includes:
s201, inputting the identity verification picture into a preset face characteristic point recognition model to obtain first characteristic points recognized by the face characteristic point recognition model, and counting the number of the first characteristic points, wherein the face characteristic point recognition model is obtained by training a preset neural network model by using specified sample data; the specified sample data only comprises pre-collected face pictures placed in standard postures, wherein human face characteristic points are pre-labeled in the face pictures;
s202, judging whether the number of the first characteristic points is larger than a preset first threshold value or not;
s203, if the number of the first feature points is not larger than a preset first threshold value, rotating the identity verification picture by 90 degrees, 180 degrees or 270 degrees anticlockwise;
s204, inputting the rotated authentication picture into the face characteristic point recognition model to obtain second characteristic points recognized by the face characteristic point recognition model, and counting the number of the second characteristic points;
s205, judging whether the number of the second feature points is larger than the first threshold value;
and S206, if the number of the second feature points is larger than the first threshold value, recording the rotated authentication picture as a first intermediate picture.
As described above, the authentication picture is rotated to be placed according to the preset standard posture according to the preset picture rotation method, so that the first intermediate picture is obtained. Because the identity verification picture is a rectangular face picture, a face characteristic point recognition model is correspondingly adopted. The face feature point recognition model is a special model, and is trained by using specified sample data, and the specified sample data only includes pre-collected face pictures placed in a standard posture, wherein the face pictures are pre-labeled with face feature points, so that the face feature point recognition model can only recognize faces placed in the standard posture, but cannot recognize pictures placed in other postures (for example, rotated by 90 degrees), and accordingly, the face feature point recognition model can be used as a basis for picture rotation. Therefore, whether the number of the first feature points is larger than a preset first threshold value is judged; if the number of the first feature points is not larger than a preset first threshold value, rotating the identity verification picture by 90 degrees, 180 degrees or 270 degrees anticlockwise; judging whether the number of the second feature points is larger than the first threshold value or not; if the number of the second feature points is larger than the first threshold value, the rotated authentication picture is recorded as a first intermediate picture, so that the authentication picture is rotated into the first intermediate picture placed according to the standard posture.
In one embodiment, the step S203 of rotating the authentication picture by 90 degrees, 180 degrees, or 270 degrees counterclockwise includes:
s2031, judging whether a symmetric point pair exists in the first characteristic points, wherein the symmetric point pair refers to two first characteristic points which take the perpendicular bisector of the same edge of the identity verification picture as a symmetric axis;
s2032, if a symmetric point pair exists in the first feature points, counting the number of the symmetric point pairs, and judging whether the number of the symmetric point pairs is smaller than a preset second threshold value, wherein the second threshold value is smaller than the first threshold value;
s2033, if the number of the symmetrical point pairs is not less than a preset second threshold value, rotating the identity verification picture counterclockwise by 180 degrees.
As described above, the authentication picture is rotated by 180 degrees counterclockwise, so as to reduce the number of rotations. The human face is characterized in that the human face is a human face, and the human face is provided with a plurality of symmetrical feature points. Accordingly, whether a symmetric point pair exists in the first characteristic points is judged, wherein the symmetric point pair refers to two first characteristic points which take the perpendicular bisector of the same edge of the identity verification picture as a symmetric axis; if the first characteristic point has a symmetric point pair, counting the number of the symmetric point pair, and judging whether the number of the symmetric point pair is smaller than a preset second threshold value, wherein the second threshold value is smaller than the first threshold value; and if the number of the symmetrical point pairs is not less than a preset second threshold value, rotating the identity verification picture by 180 degrees anticlockwise. Since the number of the symmetric point pairs is not less than the second threshold (if less than the second threshold, it may be false detection), it is known that the authentication picture should be rotated by 180 degrees (since if it should be rotated by 90 degrees or 270 degrees, the number of the symmetric point pairs should be close to 0). Therefore, the optimized rotation is realized, the rotation times are reduced, and the calculation efficiency is improved.
In one embodiment, the receiving a log obtaining request sent by a client terminal, where the log obtaining request is attached with an authentication picture before step S1, includes:
s01, acquiring n initial pictures, and cutting the n initial pictures once respectively to obtain a picture with a round hole and n-1 circular pictures respectively, wherein the picture with the round hole and the n-1 circular pictures can form a nested relation;
s02, nesting the picture with the round hole and the n-1 circular pictures to obtain nested pictures;
s03, recording the nested pictures as identity verification pictures, sending the identity verification pictures to the client terminal, and deleting the n initial pictures, the pictures with the round holes, the n-1 circular pictures and the nested pictures in the service terminal.
As described above, the sending of the authentication picture to the client terminal is realized. Acquiring n initial pictures, and cutting the n initial pictures once respectively to obtain a picture with a round hole and n-1 circular pictures respectively, wherein the diameter of the round hole is equal to that of the n circular part, the inner diameter of the i circular picture is equal to that of the i circular part, and the outer diameter of the i circular picture is equal to that of the i +1 circular part; the pictures with the round holes and the n-1 circular pictures are nested, so that a nested picture mode is obtained, special nested pictures are set, and the corresponding n third middle pictures are obviously different, so that the possibility of miscalculation during similarity calculation is reduced. And deleting the n initial pictures, the pictures with the round holes, the n-1 circular pictures and the nested pictures in the service terminal, thereby preventing information leakage in the service terminal. If the partial region is cut off, for example, a first circular portion, a second circular portion, a circle center, and an n-th circular portion in the authentication picture are cut off in sequence, the circle centers of the first circular portion, the second circular portion, the circle center, and the circle center of the n-th circular portion coincide, and the diameters of the first circular portion, the second circular portion, the circle center, and the circle center of the n-th circular portion increase in sequence, then the diameter of the circular hole is equal to the diameter of the n-th circular portion, the inner diameter of the i-th circular picture is equal to the diameter of the i-th circular portion, the outer diameter of the i-th circular picture is equal to the diameter of the i + 1-th circular portion, and i is an integer greater than 0 and less than n, so that the picture with the circular hole and the n-1 circular pictures can form a nested relationship.
In one embodiment, before the step S03 of recording the nested picture as an authentication picture and sending the authentication picture to the client terminal, the method includes:
s021, carrying out partial region cutting processing on the nested picture to obtain n temporary pictures with round holes;
s022, respectively penetrating the n temporary pictures by using n virtual cylinders in n preset virtual three-dimensional spaces, wherein the virtual three-dimensional spaces conform to a light linear propagation principle;
s023, acquiring n same appointed positioning positions in the n virtual three-dimensional spaces by using a preset position positioning method, and respectively carrying out image acquisition on the n virtual cylinders at the appointed positioning positions so as to correspondingly obtain n comparison pictures.
As described above, the correspondence of n pieces of the map sheets is realized. The appointed comparison picture is one of the n comparison pictures, and the adjustment of the log playing strategy can be realized according to the selection of different comparison pictures, so that the authority management is facilitated. The generation process of the n pieces of the comparison pictures is the same as that of the n pieces of the third intermediate pictures, so that the subsequent similarity calculation is realized. Further, after obtaining n pieces of map sheets correspondingly, the method may further include: deleting the n temporary pictures B1, B2, B n, thereby further ensuring the safety of information. Further, the partial region cutting processing is to cut out a first circular portion, a second circular portion, a. Further, the diameters of the n virtual cylinders are equal to the diameters of the n temporary pictures correspondingly, and the surfaces of the n virtual cylinders are smooth, so that the patterns of the temporary pictures can be mapped on the virtual cylinders. Thereby enabling subsequent similarity calculations to be performed.
In one embodiment, the step S6 of calculating the similarity value between the third intermediate picture and the preset designated reference picture by using a preset similarity calculation method includes:
s601, modifying the color value of the pixel point in the third intermediate picture into a first numerical value or a second numerical value by using a preset color value modification method, and modifying the color value of the pixel point in the appointed reference picture into the first numerical value or the second numerical value; the color value modification method comprises the steps of setting pixel points with color values not smaller than a preset numerical value as a first numerical value, and setting pixel points with color values smaller than the preset numerical value as a second numerical value;
s602, calculating the proportion R1 of the pixel points with the first numerical value in the third intermediate picture, and calculating the proportion R2 of the pixel points with the first numerical value in the appointed comparison picture;
s603, according to a formula:
Figure BDA0002384503380000131
and calculating the similarity degree value D of the third intermediate picture and a preset appointed comparison picture.
As described above, it is realized that the similarity degree value of the third intermediate picture and the preset specified reference picture is calculated by using the preset similarity calculation method. The method and the device have the advantages that multiple times of dimension conversion are adopted, so that the tolerance degree on the color value is high during the similar calculation. Therefore, the color value of the pixel point in the third intermediate picture is modified to be the first numerical value or the second numerical value by using a preset color value modification method, and the color value of the pixel point in the appointed reference picture is modified to be the first numerical value or the second numerical value; the color value modification method is characterized in that pixel points with color values not smaller than a preset numerical value are set to be a first numerical value, and pixel points with color values smaller than the preset numerical value are set to be a second numerical value, so that the calculation pressure is reduced. Then calculating the proportion R1 of the pixel points with the first numerical value in the third intermediate picture, and calculating the proportion R2 of the pixel points with the first numerical value in the appointed comparison picture; according to the formula:
Figure BDA0002384503380000132
and calculating the similarity degree value D of the third intermediate picture and a preset appointed comparison picture. So as to take the similarity degree value of the third intermediate picture and the preset appointed reference picture as the proportion of the pixel pointsThe form of the similarity degree is reflected, so that the calculation pressure is relieved on the basis of ensuring the credibility of the similar calculation.
In one embodiment, the log obtaining request is a request sent based on a websocket protocol, the specified policy is a real-time synchronization policy, and the step S8 of sending the log to the client terminal according to the specified policy includes:
s811, finishing one handshake based on the log acquisition request based on the websocket protocol, thereby establishing a websocket connection channel with the client terminal;
s812, sending the current log to the client terminal by using the websocket connecting channel;
s813, detecting the log in real time so as to obtain the line number of the newly added log, and judging whether the line number of the newly added log is greater than a preset line number threshold value or not;
s814, if the number of lines of the newly added log is larger than a preset number of lines threshold, the newly added log is sent to the client terminal by using the websocket connecting channel.
As described above, the log sending is completed only through one-time handshake, and the additional communication overhead caused by the need of three-time handshake of the common protocol is avoided. The websocket protocol is a communication protocol, which makes data exchange between the client terminal and the service terminal simpler, and only needs to complete one handshake, and the client terminal and the service terminal can directly establish persistent connection and perform bidirectional data transmission. Thereby providing the possibility to employ a real-time synchronization policy (which requires maintaining a persistent connection). Therefore, the websocket connecting channel is used for sending the current log to the client terminal; detecting the logs in real time so as to obtain the number of rows of the newly added logs, and judging whether the number of rows of the newly added logs is greater than a preset number-of-rows threshold value or not; if the line number of the newly added log is larger than the preset line number threshold, the newly added log is sent to the client terminal by using the websocket connecting channel, the current log with large numerical value is sent to the client terminal, and then the newly added log is synchronized to the client terminal in real time by using the persistent websocket connecting channel. Therefore, the requirement of log acquisition is met, and the communication overhead is reduced.
The log sending method based on the similarity value receives a log obtaining request sent by a client terminal; rotating the identity verification picture to be placed according to a preset standard posture to obtain a first intermediate picture; carrying out partial region cutting processing on the first intermediate picture so as to obtain n second intermediate pictures with round holes; respectively penetrating the round holes in the n second intermediate pictures by using n virtual cylinders; respectively carrying out image acquisition on the n virtual cylinders so as to correspondingly obtain n third intermediate pictures; calculating the similarity degree value of the third intermediate picture and a preset appointed reference picture; if only one of the n similarity degree values is larger than a preset similarity threshold value, acquiring a specified diameter corresponding to the specified similarity degree value; and acquiring a specified strategy corresponding to the specified diameter, and sending a log to the client terminal according to the specified strategy. Thereby improving information security.
Referring to fig. 2, an embodiment of the present application provides a log sending apparatus based on a similarity value, which is applied to a service terminal, and includes:
a log obtaining request receiving unit 10, configured to receive a log obtaining request sent by a client terminal, where the log obtaining request is accompanied by an authentication picture;
a first intermediate picture obtaining unit 20, configured to rotate the authentication picture to be placed in a preset standard posture according to a preset picture rotation method, so as to obtain a first intermediate picture;
a second intermediate picture obtaining unit 30, configured to perform partial region removal processing on the first intermediate picture, so as to obtain n second intermediate pictures with circular holes;
a second intermediate picture penetrating unit 40, configured to use n virtual cylinders to penetrate through the circular holes in the n second intermediate pictures respectively in n preset virtual three-dimensional spaces, where the virtual three-dimensional spaces conform to a light linear propagation principle;
a third intermediate picture obtaining unit 50, configured to obtain n identical designated positioning positions in the n virtual three-dimensional spaces by using a preset position positioning method, and perform image acquisition on the n virtual cylinders at the designated positioning positions, so as to obtain n third intermediate pictures correspondingly;
a similarity degree value obtaining unit 60, configured to calculate, by using a preset similarity calculation method, similarity degree values of a third intermediate picture and a preset specified reference picture, so as to obtain n similarity degree values respectively corresponding to the n third intermediate pictures, and determine whether only one of the n similarity degree values is greater than a preset similarity threshold;
a designated similarity degree value obtaining unit 70, configured to record, if only one of the n similarity degree values is greater than a preset similarity threshold, the similarity degree value greater than the similarity threshold as a designated similarity degree value, and obtain, according to a correspondence relationship between a preset diameter of the circular portion, the second intermediate picture, the third intermediate picture, and the similarity degree value, a designated diameter corresponding to the designated similarity degree value;
and the log sending unit 80 is configured to obtain an appointed policy corresponding to the appointed diameter according to a corresponding relationship between a preset diameter and a log sending policy, and send a log to the client terminal according to the appointed policy.
The operations executed by the above units are respectively in one-to-one correspondence with the steps of the log sending method based on the similarity degree value in the foregoing embodiment, and are not described herein again.
In one embodiment, the authentication picture is a rectangular face picture, and the first intermediate picture obtaining unit 20 includes:
the first feature point quantity counting subunit is used for inputting the identity verification picture into a preset face feature point recognition model to obtain first feature points recognized by the face feature point recognition model, and counting the quantity of the first feature points, wherein the face feature point recognition model is obtained by training a preset neural network model by using specified sample data; the specified sample data only comprises pre-collected face pictures placed in standard postures, wherein human face characteristic points are pre-labeled in the face pictures;
a first feature point quantity judging subunit, configured to judge whether the first feature point quantity is greater than a preset first threshold;
the counterclockwise rotation subunit is configured to rotate the authentication picture counterclockwise by 90 degrees, 180 degrees, or 270 degrees if the number of the first feature points is not greater than a preset first threshold;
the second feature point quantity counting subunit is used for inputting the rotated authentication picture into the face feature point identification model to obtain second feature points identified by the face feature point identification model, and counting the quantity of the second feature points;
a second feature point quantity judgment subunit, configured to judge whether the second feature point quantity is greater than the first threshold value;
and the first intermediate picture marking subunit is used for marking the rotated authentication picture as a first intermediate picture if the number of the second feature points is greater than the first threshold value.
The operations executed by the sub-units respectively correspond to the steps of the log sending method based on the similarity degree value in the foregoing embodiment one by one, and are not described herein again.
In one embodiment, the counter-clockwise rotation subunit comprises:
a symmetric point pair judgment module, configured to judge whether a symmetric point pair exists in the first feature points, where the symmetric point pair refers to two first feature points that use a perpendicular bisector of the same edge of the authentication picture as a symmetry axis;
a symmetric point pair number judgment module, configured to count the number of symmetric point pairs if a symmetric point pair exists in the first feature point, and judge whether the number of symmetric point pairs is smaller than a preset second threshold, where the second threshold is smaller than the first threshold;
and the 180-degree rotation module is used for rotating the identity verification picture by 180 degrees anticlockwise if the number of the symmetrical point pairs is not less than a preset second threshold value.
The operations executed by the modules correspond to the steps of the log sending method based on the similarity degree value in the foregoing embodiment one by one, and are not described herein again.
In one embodiment, the apparatus comprises:
the image cutting unit is used for obtaining n initial images and cutting the n initial images once respectively to obtain an image with a round hole and n-1 circular images, wherein the image with the round hole and the n-1 circular images can form a nested relation;
the nesting processing unit is used for nesting the picture with the round hole and the n-1 circular pictures to obtain nested pictures;
and the identity verification picture sending unit is used for recording the nested pictures as identity verification pictures, sending the identity verification pictures to the client terminal, and deleting the n initial pictures, the pictures with the round holes, the n-1 circular pictures and the nested pictures in the service terminal.
The operations executed by the above units are respectively in one-to-one correspondence with the steps of the log sending method based on the similarity degree value in the foregoing embodiment, and are not described herein again.
In one embodiment, the apparatus comprises:
the region cutting processing unit is used for carrying out partial region cutting processing on the nested pictures so as to obtain n temporary pictures with round holes;
the temporary picture penetrating unit is used for penetrating the n temporary pictures by using n virtual cylinders in n preset virtual three-dimensional spaces respectively, wherein the virtual three-dimensional spaces conform to a light linear propagation principle;
and the comparison picture acquisition unit is used for acquiring n same appointed positioning positions in the n virtual three-dimensional spaces by using a preset position positioning method, and respectively carrying out image acquisition on the n virtual cylinders at the appointed positioning positions so as to correspondingly obtain n comparison pictures.
The operations executed by the above units are respectively in one-to-one correspondence with the steps of the log sending method based on the similarity degree value in the foregoing embodiment, and are not described herein again.
In one embodiment, the similarity degree value obtaining unit 60 includes:
a color value modification subunit, configured to modify, by using a preset color value modification method, the color value of the pixel point in the third intermediate picture to a first numerical value or a second numerical value, and modify the color value of the pixel point in the specified reference picture to the first numerical value or the second numerical value; the color value modification method comprises the steps of setting pixel points with color values not smaller than a preset numerical value as a first numerical value, and setting pixel points with color values smaller than the preset numerical value as a second numerical value;
a pixel proportion calculating subunit, configured to calculate a proportion R1 of the pixels with the first value in the third intermediate picture, and calculate a proportion R2 of the pixels with the first value in the designated reference picture;
a similarity value D calculating subunit, configured to:
Figure BDA0002384503380000181
and calculating the similarity degree value D of the third intermediate picture and a preset appointed comparison picture.
The operations executed by the sub-units respectively correspond to the steps of the log sending method based on the similarity degree value in the foregoing embodiment one by one, and are not described herein again.
In one embodiment, the log obtaining request is a request sent based on a websocket protocol, the specified policy is a real-time synchronization policy, and the log sending unit 80 includes:
a connection channel establishing subunit, configured to complete a handshake based on the log acquisition request based on a websocket protocol, so as to establish a websocket connection channel with the client terminal;
the current log sending subunit is used for sending the current log to the client terminal by using the websocket connecting channel;
the line number threshold judging subunit is used for detecting the log in real time so as to obtain the line number of the newly added log and judging whether the line number of the newly added log is greater than a preset line number threshold;
and the newly added log sending subunit is used for sending the newly added log to the client terminal by using the websocket connecting channel if the line number of the newly added log is greater than a preset line number threshold value.
The operations executed by the sub-units respectively correspond to the steps of the log sending method based on the similarity degree value in the foregoing embodiment one by one, and are not described herein again.
The log sending device based on the similarity value receives a log obtaining request sent by a client terminal; rotating the identity verification picture to be placed according to a preset standard posture to obtain a first intermediate picture; carrying out partial region cutting processing on the first intermediate picture so as to obtain n second intermediate pictures with round holes; respectively penetrating the round holes in the n second intermediate pictures by using n virtual cylinders; respectively carrying out image acquisition on the n virtual cylinders so as to correspondingly obtain n third intermediate pictures; calculating the similarity degree value of the third intermediate picture and a preset appointed reference picture; if only one of the n similarity degree values is larger than a preset similarity threshold value, acquiring a specified diameter corresponding to the specified similarity degree value; and acquiring a specified strategy corresponding to the specified diameter, and sending a log to the client terminal according to the specified strategy. Thereby improving information security.
Referring to fig. 3, an embodiment of the present invention further provides a computer device, where the computer device may be a server, and an internal structure of the computer device may be as shown in the figure. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for storing data used by the log sending method based on the similarity degree value. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for log transmission based on a similarity value.
The processor executes the log sending method based on the similarity degree value, wherein the steps included in the method correspond to the steps of executing the log sending method based on the similarity degree value in the foregoing embodiment one to one, and are not described herein again.
It will be understood by those skilled in the art that the structures shown in the drawings are only block diagrams of some of the structures associated with the embodiments of the present application and do not constitute a limitation on the computer apparatus to which the embodiments of the present application may be applied.
The computer equipment receives a log acquisition request sent by a client terminal; rotating the identity verification picture to be placed according to a preset standard posture to obtain a first intermediate picture; carrying out partial region cutting processing on the first intermediate picture so as to obtain n second intermediate pictures with round holes; respectively penetrating the round holes in the n second intermediate pictures by using n virtual cylinders; respectively carrying out image acquisition on the n virtual cylinders so as to correspondingly obtain n third intermediate pictures; calculating the similarity degree value of the third intermediate picture and a preset appointed reference picture; if only one of the n similarity degree values is larger than a preset similarity threshold value, acquiring a specified diameter corresponding to the specified similarity degree value; and acquiring a specified strategy corresponding to the specified diameter, and sending a log to the client terminal according to the specified strategy. Thereby improving information security.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored thereon, and when the computer program is executed by a processor, the log sending method based on the similarity degree value is implemented, where steps included in the method are respectively in one-to-one correspondence with steps of executing the log sending method based on the similarity degree value in the foregoing embodiment, and are not described herein again.
The computer-readable storage medium of the application receives a log acquisition request sent by a client terminal; rotating the identity verification picture to be placed according to a preset standard posture to obtain a first intermediate picture; carrying out partial region cutting processing on the first intermediate picture so as to obtain n second intermediate pictures with round holes; respectively penetrating the round holes in the n second intermediate pictures by using n virtual cylinders; respectively carrying out image acquisition on the n virtual cylinders so as to correspondingly obtain n third intermediate pictures; calculating the similarity degree value of the third intermediate picture and a preset appointed reference picture; if only one of the n similarity degree values is larger than a preset similarity threshold value, acquiring a specified diameter corresponding to the specified similarity degree value; and acquiring a specified strategy corresponding to the specified diameter, and sending a log to the client terminal according to the specified strategy. Thereby improving information security.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A log sending method based on similarity degree value is characterized in that the log sending method is applied to a service terminal and comprises the following steps:
receiving a log acquisition request sent by a client terminal, wherein the log acquisition request is attached with an identity authentication picture;
according to a preset picture rotating method, rotating the identity verification picture to be placed according to a preset standard posture to obtain a first intermediate picture;
carrying out partial region cutting processing on the first intermediate picture so as to obtain n second intermediate pictures with round holes;
in n preset virtual three-dimensional spaces, n virtual cylinders respectively penetrate through the round holes in the n second intermediate pictures, wherein the virtual three-dimensional spaces conform to the principle of linear light propagation;
in the n virtual three-dimensional spaces, n identical appointed positioning positions are obtained by using a preset position positioning method, and the n virtual cylinders are respectively subjected to image acquisition at the appointed positioning positions, so that n third intermediate pictures are correspondingly obtained;
calculating similarity degree values of the third intermediate picture and a preset appointed reference picture by using a preset similarity calculation method, thereby obtaining n similarity degree values respectively corresponding to the n third intermediate pictures, and judging whether only one of the n similarity degree values is greater than a preset similarity threshold value;
if only one of the n similarity degree values is larger than a preset similarity threshold, recording the similarity degree value larger than the similarity threshold as an appointed similarity degree value, and acquiring an appointed diameter corresponding to the appointed similarity degree value according to a corresponding relation of preset diameter of the circular part, a second middle picture, a third middle picture and the similarity degree value;
and acquiring an appointed strategy corresponding to the appointed diameter according to the corresponding relation between the preset diameter and a log sending strategy, and sending the log to the client terminal according to the appointed strategy.
2. The log sending method based on the similarity value according to claim 1, wherein the authentication picture is a rectangular face picture, and the step of rotating the authentication picture to be placed in a preset standard posture according to a preset picture rotating method to obtain a first intermediate picture comprises:
inputting the identity verification picture into a preset face characteristic point recognition model to obtain first characteristic points recognized by the face characteristic point recognition model, and counting the number of the first characteristic points, wherein the face characteristic point recognition model is obtained by training a preset neural network model by using specified sample data; the specified sample data only comprises pre-collected face pictures placed in standard postures, wherein human face characteristic points are pre-labeled in the face pictures;
judging whether the number of the first characteristic points is greater than a preset first threshold value or not;
if the number of the first feature points is not larger than a preset first threshold value, rotating the identity verification picture by 90 degrees, 180 degrees or 270 degrees anticlockwise;
inputting the rotated authentication picture into the face characteristic point identification model to obtain second characteristic points identified by the face characteristic point identification model, and counting the number of the second characteristic points;
judging whether the number of the second feature points is larger than the first threshold value or not;
and if the number of the second feature points is larger than the first threshold value, recording the rotated authentication picture as a first intermediate picture.
3. The log sending method based on the similarity value according to claim 2, wherein the step of rotating the authentication picture by 90 degrees, 180 degrees or 270 degrees counterclockwise comprises:
judging whether a symmetric point pair exists in the first characteristic points, wherein the symmetric point pair refers to two first characteristic points which take the perpendicular bisector of the same edge of the identity verification picture as a symmetric axis;
if the first characteristic point has a symmetric point pair, counting the number of the symmetric point pair, and judging whether the number of the symmetric point pair is smaller than a preset second threshold value, wherein the second threshold value is smaller than the first threshold value;
and if the number of the symmetrical point pairs is not less than a preset second threshold value, rotating the identity verification picture by 180 degrees anticlockwise.
4. The log sending method based on the similarity value according to claim 1, wherein the receiving a log obtaining request sent by a client terminal, the log obtaining request being accompanied by an authentication picture, comprises:
acquiring n initial pictures, and cutting the n initial pictures once respectively to obtain a picture with a round hole and n-1 circular pictures respectively, wherein the picture with the round hole and the n-1 circular pictures can form a nested relation;
nesting the pictures with the round holes and the n-1 circular pictures to obtain nested pictures;
and recording the nested pictures as identity verification pictures, sending the identity verification pictures to the client terminal, and deleting the n initial pictures, the pictures with the round holes, the n-1 circular pictures and the nested pictures in the service terminal.
5. The log sending method based on the similarity value according to claim 4, wherein before the step of recording the nested picture as the authentication picture and sending the authentication picture to the client terminal, the method comprises:
carrying out partial region cutting processing on the nested pictures so as to obtain n temporary pictures with round holes;
in n preset virtual three-dimensional spaces, n virtual cylinders are used for respectively penetrating through the n temporary pictures, wherein the virtual three-dimensional spaces accord with a light linear transmission principle;
in the n virtual three-dimensional spaces, n identical designated positioning positions are obtained by using a preset position positioning method, and the n virtual cylinders are respectively subjected to image acquisition at the designated positioning positions, so that n comparison pictures are correspondingly obtained.
6. The log sending method based on the similarity value according to claim 1, wherein the step of calculating the similarity value between the third intermediate picture and the preset designated reference picture by using a preset similarity calculation method comprises:
modifying the color value of the pixel point in the third intermediate picture into a first numerical value or a second numerical value by using a preset color value modification method, and modifying the color value of the pixel point in the appointed comparison picture into the first numerical value or the second numerical value; the color value modification method comprises the steps of setting pixel points with color values not smaller than a preset numerical value as a first numerical value, and setting pixel points with color values smaller than the preset numerical value as a second numerical value;
calculating the proportion R1 of the pixel points with the first numerical value in the third intermediate picture, and calculating the proportion R2 of the pixel points with the first numerical value in the appointed comparison picture;
according to the formula:
Figure FDA0002384503370000031
and calculating the similarity degree value D of the third intermediate picture and a preset appointed comparison picture.
7. The log sending method based on the similarity value according to claim 1, wherein the log obtaining request is a request sent based on a websocket protocol, the specified policy is a real-time synchronization policy, and the step of sending the log to the client terminal according to the specified policy includes:
finishing one-time handshake based on the log acquisition request based on the websocket protocol, thereby establishing a websocket connection channel with the client terminal;
sending the current log to the client terminal by using the websocket connecting channel;
detecting the logs in real time so as to obtain the number of rows of the newly added logs, and judging whether the number of rows of the newly added logs is greater than a preset number-of-rows threshold value or not;
and if the line number of the newly added log is larger than the preset line number threshold, the newly added log is sent to the client terminal by using the websocket connecting channel.
8. A log sending device based on similarity degree value is characterized in that the log sending device is applied to a service terminal and comprises:
the system comprises a log acquisition request receiving unit, a log acquisition request processing unit and a log processing unit, wherein the log acquisition request receiving unit is used for receiving a log acquisition request sent by a client terminal, and the log acquisition request is attached with an identity authentication picture;
the first intermediate picture acquisition unit is used for rotating the identity verification picture to be placed according to a preset standard posture according to a preset picture rotation method to obtain a first intermediate picture;
the second intermediate picture acquisition unit is used for carrying out partial region cutting processing on the first intermediate picture so as to obtain n second intermediate pictures with round holes;
the second intermediate picture penetrating unit is used for penetrating the round holes in the n second intermediate pictures respectively by using n virtual cylinders in n preset virtual three-dimensional spaces, wherein the virtual three-dimensional spaces accord with a light linear propagation principle;
a third intermediate picture obtaining unit, configured to obtain n identical designated positioning positions in the n virtual three-dimensional spaces by using a preset position positioning method, and perform image acquisition on the n virtual cylinders at the designated positioning positions, so as to obtain n third intermediate pictures correspondingly;
a similarity degree value obtaining unit, configured to calculate, by using a preset similarity calculation method, similarity degree values of a third intermediate picture and a preset specified reference picture, so as to obtain n similarity degree values respectively corresponding to the n third intermediate pictures, and determine whether only one of the n similarity degree values is greater than a preset similarity threshold;
a designated similarity value obtaining unit, configured to record, if only one of the n similarity values is greater than a preset similarity threshold, the similarity value greater than the similarity threshold as a designated similarity value, and obtain, according to a correspondence between a preset diameter of the circular portion, the second intermediate picture, the third intermediate picture, and the similarity value, a designated diameter corresponding to the designated similarity value;
and the log sending unit is used for acquiring the appointed strategy corresponding to the appointed diameter according to the corresponding relation between the preset diameter and the log sending strategy and sending the log to the client terminal according to the appointed strategy.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010093511.8A 2020-02-14 2020-02-14 Log sending method and device based on similarity degree value and computer equipment Pending CN111324589A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010093511.8A CN111324589A (en) 2020-02-14 2020-02-14 Log sending method and device based on similarity degree value and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010093511.8A CN111324589A (en) 2020-02-14 2020-02-14 Log sending method and device based on similarity degree value and computer equipment

Publications (1)

Publication Number Publication Date
CN111324589A true CN111324589A (en) 2020-06-23

Family

ID=71163448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010093511.8A Pending CN111324589A (en) 2020-02-14 2020-02-14 Log sending method and device based on similarity degree value and computer equipment

Country Status (1)

Country Link
CN (1) CN111324589A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107026842A (en) * 2016-11-24 2017-08-08 阿里巴巴集团控股有限公司 A kind of method and device of generation and the authentication of safety problem
CN109919754A (en) * 2019-01-24 2019-06-21 北京迈格威科技有限公司 A kind of data capture method, device, terminal and storage medium
WO2019192121A1 (en) * 2018-04-04 2019-10-10 平安科技(深圳)有限公司 Dual-channel neural network model training and human face comparison method, and terminal and medium
CN110619274A (en) * 2019-08-14 2019-12-27 深圳壹账通智能科技有限公司 Identity verification method and device based on seal and signature and computer equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107026842A (en) * 2016-11-24 2017-08-08 阿里巴巴集团控股有限公司 A kind of method and device of generation and the authentication of safety problem
WO2019192121A1 (en) * 2018-04-04 2019-10-10 平安科技(深圳)有限公司 Dual-channel neural network model training and human face comparison method, and terminal and medium
CN109919754A (en) * 2019-01-24 2019-06-21 北京迈格威科技有限公司 A kind of data capture method, device, terminal and storage medium
CN110619274A (en) * 2019-08-14 2019-12-27 深圳壹账通智能科技有限公司 Identity verification method and device based on seal and signature and computer equipment

Similar Documents

Publication Publication Date Title
CN110598823B (en) Signature method and device based on virtual three-dimensional seal and computer equipment
CN106709963B (en) The method and apparatus of the authentication image true and false
CN113259311B (en) Decentralized identity authentication system based on block chain
CN111680672B (en) Face living body detection method, system, device, computer equipment and storage medium
CN111612476B (en) Secondary check anti-counterfeiting method, device, equipment and storage medium
CN111382414A (en) Information processing method and platform based on block chain and electronic equipment
CN111581605A (en) Block chain-based multi-person participation BIM drawing copyright protection system and method
CN113536284B (en) Digital certificate verification method, device, equipment and storage medium
CN111130769A (en) Internet of things terminal encryption method and device
CN112929349A (en) Method and device for sharing private data based on block chain and electronic equipment
CN110311783B (en) User attribution verification method and device based on group signature and computer equipment
CN114302389B (en) Authentication and key agreement method, gateway, sensor and electronic equipment
KR20090063563A (en) Security system and method for security certification thereof, method for generating relative character information, terminal system, and smart card
CN116232579A (en) Privacy security intersection method and system based on random OT protocol
CN113872990B (en) VPN network certificate authentication method and device based on SSL protocol and computer equipment
CN115333809A (en) Data desensitization and restoration method based on symmetric encryption
CN111324589A (en) Log sending method and device based on similarity degree value and computer equipment
CN111541543B (en) Information verification method, information verification device, computer equipment and storage medium
CN111835755A (en) Mutual authentication method and equipment for Internet of things equipment and Internet of things service system
CN115801277A (en) Multi-mode fusion identity authentication method and system for handheld operation and maintenance terminal considering multiple factors
CN109933974A (en) Cryptographic initialization method, apparatus, computer equipment and storage medium
CN114257419B (en) Device authentication method, device, computer device and storage medium
CN114817903A (en) Vaccination verification system, method and contract platform based on intelligent contract
CN110717157B (en) User authentication method, device, computer equipment and storage medium
CN110084329A (en) The set code method of centre letter code

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination