User identity synchronization method and system, terminal equipment and computer storage medium
By receiving and parsing system log messages, the user identity synchronization between devices in the networking environment is achieved, which solves the problem of identity authentication between devices and improves user experience and administrator maintenance convenience.
Patent Information
- Application Number
- CN202411439787.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-10
AI Technical Summary
In a networking environment, user identity information between devices is not shared, resulting in users requiring multiple authentications on multiple devices, which has poor user experience and is not conducive to administrator maintenance.
By receiving and parsing system log messages, obtaining user identity authentication information, and using the syslog protocol to send this information to other terminal devices, the user identity synchronization is achieved and repeated authentication is avoided on each device.
It realizes the synchronization of user identity between devices in the networking environment, improves the user experience, reduces multiple authentication steps, and facilitates administrator network maintenance.
Smart Images

Figure CN119299188A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer network technology, and in particular to a user identity synchronization method, system, terminal equipment and computer storage medium. Background Art
[0002] In a networking environment, multiple devices with different functions are usually deployed according to different business needs, such as gateway devices for user access control, firewall devices for preventing network attacks, and devices with functions such as preventing users from circumventing the firewall and preventing users from sharing. User identity information is not shared between different devices, and the user's terminal IP is usually used to represent the user's identity.
[0003] In the existing networking environment, except for the device that performs user identity authentication, other devices cannot perform user real-name authentication. It is difficult to identify and distinguish the user's real identity information when viewing user behavior. If the user identity authentication function is enabled on different devices separately, the user needs to perform multiple authentications, which leads to a poor user experience and is not conducive to administrator network maintenance.
[0004] It can be seen that the prior art has a technical problem of troublesome authentication for user identity authentication of devices in a networking environment. Summary of the invention
[0005] In view of this, it is necessary to provide a user identity synchronization method, system, terminal device and computer storage medium to solve the technical problem that the prior art has trouble in authenticating the user identity of devices in a networking environment.
[0006] In order to solve the above problem, the present invention provides a user identity synchronization method, which is applied to a second terminal device in a networking environment, comprising: Receiving a system log message sent by a first terminal device in the networking environment, wherein the system log message includes identity authentication information input by a user and received by the first terminal device; Parsing the system log message to obtain the identity authentication information; The identity authentication information is used to perform user authentication.
[0007] In a possible implementation, parsing the system log message includes: Configure system log message parsing parameters, and parse the system log message based on the system log message parsing parameters.
[0008] In a possible implementation manner, the system log message parsing parameters include a target source address, a target destination port, a target data type, and a target user feature.
[0009] In a possible implementation, parsing the system log message based on the system log message parsing parameter includes: Extracting the source address and the destination port in the system log message, and filtering the system log message when the source address and the destination port in the system log message do not match the target source address and the target destination port; When the source address and the destination port in the system log message match the target source address and the target destination port, extract the data type in the system log message; when the data type is different from the target data type, filter the system log message; When the data type is the same as the target data type, user features in the system log message are extracted; when the user features are the same as the target user features, identity authentication information in the system log message is extracted.
[0010] In a possible implementation manner, the identity authentication information includes a user name, a user IP address, and a user MAC address, and the user authentication using the identity authentication information includes: A local user object is created based on the user name, user IP and user MAC, the user IP is associated with the local terminal IP, and the local terminal IP is used to complete user authentication.
[0011] The present invention also provides a user identity synchronization method, which is applied to a first terminal device in a networking environment, comprising: Receive identity authentication information input by the user, and store the identity authentication information in the system log; The identity authentication information is sent to a second terminal device in the networking environment using a system log message.
[0012] In a possible implementation manner, the identity authentication information includes the IP address, MAC address, and user name of the first terminal device, and the using of a system log message to send the identity authentication information to the second terminal device in the networking environment includes: A system log message is sent through a system log protocol, wherein the system log message includes the IP address, MAC address and user name of the first terminal device.
[0013] The present invention further provides a user identity synchronization system, comprising a first terminal device and at least one second terminal device as described in any of the above embodiments, wherein: The first terminal device is used to receive identity authentication information input by a user, store the identity authentication information in a system log, and send the identity authentication information to a second terminal device in the networking environment using a system log message; The second terminal device is used to receive the system log message, parse the system log message, obtain the identity authentication information, and use the identity authentication information to perform user authentication.
[0014] The present invention also provides a terminal device, comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the user identity synchronization method described in any one of the above embodiments.
[0015] The present invention also provides a computer-readable storage medium, characterized in that it is used to store computer-readable programs or instructions, and when the program or instructions are executed by a processor, the steps in the user identity synchronization method described in any of the above embodiments can be implemented.
[0016] The beneficial effects of the present invention are as follows: the user identity synchronization method provided by the present invention receives a system log message sent by a first terminal device in a networking environment, parses the system log message, and obtains the identity authentication information; uses the identity authentication information to perform user authentication, and after receiving the user identity authentication information through the first terminal device, uses the system log to send the identity authentication information to the second terminal device in the networking, and the second terminal device parses the system log to obtain the identity authentication information, and uses the identity authentication information to perform user authentication, thereby completing the user identity synchronization between the first terminal device and the second terminal device in the networking environment, without the need for the user to perform identity authentication on each device, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0018] FIG1 is a schematic flow chart of a method for synchronizing a user identity applied to a second terminal device provided by an embodiment of the present invention; Figure 2 A schematic diagram of a flow chart of a message parsing method provided by an embodiment of the present invention; Figure 3 is a flowchart of a user identity synchronization method applied to a first terminal device provided by an embodiment of the present invention; Figure 4 It is a structural diagram of a user identity synchronization system provided by an embodiment of the present invention.
[0019] Figure 5 A timing diagram of a user identity synchronization system provided by an embodiment of the present invention; Figure 6 A schematic diagram of the structure of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of the present invention and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0021] The descriptions of "first", "second", etc. involved in the embodiments of the present invention are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the technical features defined as "first" and "second" may explicitly or implicitly include at least one of the features.
[0022] Reference to an "embodiment" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0023] A specific embodiment of the present invention, as Figure 1 As shown, a user identity synchronization method is disclosed, which is applied to a second terminal device in a networking environment, including: S101, receiving a system log message sent by a first terminal device in a networking environment, where the system log message includes identity authentication information input by a user and received by the first terminal device; S102, parsing the system log message to obtain identity authentication information; S103, using the identity authentication information to perform user authentication.
[0024] In an embodiment of the present invention, the networking environment includes a first terminal device and a second terminal device, wherein the user can perform identity authentication directly on the first terminal device but cannot perform identity authentication directly on the second terminal device, and the user identity synchronization method provided by the present invention is applied to the second terminal device.
[0025] In an embodiment of the present invention, a system log message refers to a log message sent via the syslog protocol. The log protocol syslog is widely used in computer systems and is a standard protocol. The syslog protocol uses UDP (User Datagram Protocol) as a transmission protocol and communicates through port 514. The second terminal device is used to receive a system log message sent by a first terminal device in a networking environment. Furthermore, the system log message includes user authentication information, which is received by the first terminal device.
[0026] Further, after receiving the system log message, the second terminal device needs to parse the system log message to obtain the identity authentication information in the system log message, and then use the identity authentication information to perform user authentication. The specific parsing method of the system log message and the user authentication process will be described later in the present invention.
[0027] The user identity synchronization method provided by the present invention receives a system log message sent by a first terminal device in a networking environment, parses the system log message, and obtains identity authentication information; uses the identity authentication information to perform user authentication, and after the first terminal device receives the user identity authentication information, uses the system log to send the identity authentication information to a second terminal device in the networking, and the second terminal device parses the system log to obtain the identity authentication information, and uses the identity authentication information to perform user authentication, thereby completing the user identity synchronization between the first terminal device and the second terminal device in the networking environment, without the need for the user to perform identity authentication on each device, thereby improving the user experience.
[0028] As a possible implementation manner of the present invention, in this implementation manner, parsing the system log message includes: Configure system log message parsing parameters and parse system log messages based on the system log message parsing parameters.
[0029] In an embodiment of the present invention, the second terminal device needs to first enable the same-source user synchronization function and configure the corresponding system log message parsing parameters. After receiving the system log message sent by the first terminal device, the system log message is parsed based on the system log message parsing parameters to obtain the identity authentication information in the system log message.
[0030] Furthermore, the system log message parsing parameters include a target source address, a target destination port, a target data type, and a target user characteristic.
[0031] In an embodiment of the present invention, the target source address refers to the source address of the first terminal device, the target destination port refers to the destination port of the first terminal device, the target data type refers to the data type of the data storing the user's identity authentication information, and the target user characteristics include user name characteristics, IP characteristics and MAC address characteristics.
[0032] Further, such as Figure 2 As shown, the system log message is parsed based on the system log message parsing parameters, including: S201, extracting the source address and destination port in the system log message, and filtering the system log message when the source address and destination port in the system log message do not match the target source address and target destination port; S202, when the source address and destination port in the system log message match the target source address and target destination port, extract the data type in the system log message, and when the data type is different from the target data type, filter the system log message; S203, when the data type is the same as the target data type, extract the user features in the system log message; when the user features are the same as the target user features, extract the identity authentication information in the system log message.
[0033] In an embodiment of the present invention, after receiving the system log message sent by the first terminal device, the second terminal device parses the system log message based on the system log message parsing parameters set in advance. Specifically, the source address and destination port in the system log message are first extracted, the source address in the system log message is compared with the preset target source address, and the destination port is compared with the preset target destination port. When the source address in the system log message is different from the preset target source address and / or the destination port is different from the preset target destination port, it indicates that the system log message is not a message containing user identity authentication information, and the system log message is filtered out. When the source address in the system log message is the same as the preset target source address and the destination port is the same as the preset target destination port, the content in the system log message is extracted, and the data type of the log content is obtained, and the data type is compared with the preset target data type. When the data type is different from the preset target data type, it means that the system log message is not a message containing user identity authentication information, and the system log message is filtered out. When the data type is the same as the preset target data type, user features in the system log message are extracted, including but not limited to user name extraction features, IP extraction features, and MAC extraction features, and the extracted user name features, IP features, and MAC features are matched with the preset user features. When no match can be made, it means that the system log message is not a message containing user identity authentication information, and the system log message is filtered out. When the match is successful, it means that the system log message is a log message containing user identity authentication information, and the user name, IP, and MAC information in the system log message are extracted.
[0034] The embodiment of the present invention determines the system log message containing the user identity authentication information through a multi-level filtering method, ensures that the user identity authentication information can be obtained after the message is parsed, and prevents unnecessary operations.
[0035] As a possible implementation mode of the present invention, in this implementation mode, the identity authentication information includes a user name, a user IP, and a user MAC, and the user authentication is performed using the identity authentication information, including: Create a local user object based on the user name, user IP, and user MAC, associate the user IP with the local terminal IP, and use the local terminal IP to complete user authentication.
[0036] In the embodiment of the present invention, after the system log message is parsed to obtain the identity authentication information, the user authentication of the local device is performed based on the identity authentication information. Specifically, the identity authentication information includes the user name, user IP and user MAC, and a local user object is created based on the user name, user IP and user MAC, and the IP of the local device is associated with the user IP, so that the session, log and other information generated by the local terminal device IP user completes the user real name.
[0037] Furthermore, an embodiment of the present invention also provides a user identity synchronization method, which is applied to a first terminal device in a networking environment, such as Figure 3 As shown, including: S301, receiving identity authentication information input by a user, and storing the identity authentication information in a system log; S302: Use a system log message to send the identity authentication information to a second terminal device in the networking environment.
[0038] In an embodiment of the present invention, in a networking environment, a first terminal device is provided with a user authentication function, which can receive authentication information input by a user, including but not limited to account password, face recognition, fingerprint recognition, etc. When the user needs to perform authentication, the authentication information input by the user is received, and the authentication information is stored in a system log, and then the authentication information is sent to at least one second terminal device in the networking environment in the form of a system log message.
[0039] Optionally, the identity authentication information includes an IP address, a MAC address, and a user name of the first terminal device, and using a system log message to send the identity authentication information to a second terminal device in the networking environment includes: The system log message is sent through the system log protocol, and the system log message includes the IP, MAC address and user name of the first terminal device.
[0040] In an embodiment of the present invention, as in the aforementioned embodiment, the system log protocol syslog may be used as a transmission protocol to transmit the system log message including the IP, MAC address and user name to the second terminal device.
[0041] The embodiment of the present invention synchronizes the real-name information of homologous user authentication through syslog logs. There is no need to enable user identity authentication functions on different devices respectively, and multi-device user real-name authentication can be achieved without multiple authentications. The user experience is good and it is convenient for administrators to maintain the network.
[0042] The embodiment of the present invention also provides a user identity synchronization system, such as Figure 4 As shown, it includes a first terminal device 401 and at least one second terminal device 402 in any of the above embodiments, wherein: The first terminal device 401 is used to receive the identity authentication information input by the user, store the identity authentication information in the system log, and send the identity authentication information to the second terminal device 402 in the networking environment using the system log message; The second terminal device 402 is used to receive the system log message, parse the system log message, obtain identity authentication information, and use the identity authentication information to perform user authentication.
[0043] In the embodiment of the present invention, Figure 5 As shown, it is a timing diagram of the user identity synchronization system, and the networking environment includes a first terminal device 401 and multiple second terminal devices 402, wherein the first terminal device 401 enables the user authentication function and the log sending function, and the second user terminal 402 enables the same-source user synchronization function. The user can perform user authentication on the first terminal device 401. After receiving the identity authentication information input by the user, the first terminal device 401 sends the identity authentication information to the second terminal device 402 in the form of a system log message. The second terminal device 402 parses the system log message to obtain the user's identity authentication information, and creates a user object based on the identity authentication information to perform user information association and user authentication.
[0044] The user identity synchronization system provided by the embodiment of the present invention shares user authentication identity information between different devices. It is easy to identify and distinguish the user's real identity information when viewing user behavior. There is no need to enable user identity authentication functions on different devices respectively, and multiple authentications are not required to achieve real-name user authentication on multiple devices. The user experience is good and it is convenient for administrators to maintain the network.
[0045] like Figure 6 As shown, the present invention also provides an electronic device 600. The electronic device 600 includes a processor 601, a memory 602 and a display 603. Figure 6 Only some components of the electronic device 600 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0046] In some embodiments, the processor 601 may be a central processing unit (CPU), a microprocessor or other data processing chip, and is used to run program codes or process data stored in the memory 602, such as the user identity synchronization method of the present invention.
[0047] In some embodiments, the processor 601 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, the processor 601 may be local or remote. In some embodiments, the processor 601 may be implemented in a cloud platform. In some embodiments, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-cloud, etc., or any combination thereof.
[0048] In some embodiments, the memory 602 may be an internal storage unit of the electronic device 600, such as a hard disk or memory of the electronic device 600. In other embodiments, the memory 602 may also be an external storage device of the electronic device 600, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 600.
[0049] Furthermore, the memory 602 may include both an internal storage unit of the electronic device 600 and an external storage device. The memory 602 is used to store application software installed in the electronic device 600 and various data.
[0050] In some embodiments, the display 603 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 603 is used to display information of the electronic device 600 and to display a visual user interface. The components 601-603 of the electronic device 600 communicate with each other through a system bus.
[0051] In some embodiments, when the processor 601 executes the user identity synchronization program in the memory 602, the following steps may be implemented: Receiving a system log message sent by a first terminal device in a networking environment, wherein the system log message includes identity authentication information input by a user and received by the first terminal device; Parse system log messages to obtain identity authentication information; Use identity authentication information to authenticate the user. Or Receive the identity authentication information entered by the user and store the identity authentication information in the system log; The identity authentication information is sent to the second terminal device in the networking environment using a system log message.
[0052] It should be understood that: when the processor 601 executes the user identity synchronization program in the memory 602, in addition to the above functions, other functions may also be implemented, and details may refer to the description of the above corresponding method embodiments.
[0053] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 600 mentioned, and the electronic device 600 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 600 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0054] Correspondingly, an embodiment of the present invention also provides a computer-readable storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by a processor, the steps or functions in the user identity synchronization method provided by the above-mentioned method embodiments can be implemented.
[0055] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0056] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A user identity synchronization method, applied to a second terminal device in a networking environment, characterized in that: include: Receiving a system log message sent by a first terminal device in the networking environment, wherein the system log message includes identity authentication information input by a user and received by the first terminal device; Parsing the system log message to obtain the identity authentication information; The identity authentication information is used to perform user authentication.
2. The user identity synchronization method according to claim 1, characterized in that: The parsing of the system log message includes: Configure system log message parsing parameters, and parse the system log message based on the system log message parsing parameters.
3. The user identity synchronization method according to claim 2, characterized in that: The system log message parsing parameters include target source address, target destination port, target data type and target user characteristics.
4. The user identity synchronization method according to claim 3, characterized in that: The parsing of the system log message based on the system log message parsing parameter includes: Extracting the source address and the destination port in the system log message, and filtering the system log message when the source address and the destination port in the system log message do not match the target source address and the target destination port; When the source address and the destination port in the system log message match the target source address and the target destination port, extract the data type in the system log message; when the data type is different from the target data type, filter the system log message; When the data type is the same as the target data type, user features in the system log message are extracted; when the user features are the same as the target user features, identity authentication information in the system log message is extracted.
5. The user identity synchronization method according to claim 4, characterized in that: The identity authentication information includes a user name, a user IP address, and a user MAC address. The user authentication using the identity authentication information includes: A local user object is created based on the user name, user IP and user MAC, the user IP is associated with the local terminal IP, and the local terminal IP is used to complete user authentication.
6. A user identity synchronization method, applied to a first terminal device in a networking environment, characterized in that: include: Receive identity authentication information input by the user, and store the identity authentication information in the system log; The identity authentication information is sent to a second terminal device in the networking environment using a system log message.
7. The user identity synchronization method according to claim 6, characterized in that: The identity authentication information includes the IP address, MAC address and user name of the first terminal device, and the using of a system log message to send the identity authentication information to the second terminal device in the networking environment includes: A system log message is sent through a system log protocol, wherein the system log message includes the IP address, MAC address and user name of the first terminal device.
8. A user identity synchronization system, characterized in that: The method comprises a first terminal device and at least one second terminal device as claimed in any one of claims 1 to 7, wherein: The first terminal device is used to receive identity authentication information input by a user, store the identity authentication information in a system log, and send the identity authentication information to a second terminal device in the networking environment using a system log message; The second terminal device is used to receive the system log message, parse the system log message, obtain the identity authentication information, and use the identity authentication information to perform user authentication.
9. A terminal device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the user identity synchronization method described in any one of claims 1 to 7 above.
10. A computer-readable storage medium, characterized in that: Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the user identity synchronization method described in any one of claims 1 to 7 above.