CN108551484B - User information synchronization method, device, computer device and storage medium - Google Patents

User information synchronization method, device, computer device and storage medium Download PDF

Info

Publication number
CN108551484B
CN108551484B CN201810368075.3A CN201810368075A CN108551484B CN 108551484 B CN108551484 B CN 108551484B CN 201810368075 A CN201810368075 A CN 201810368075A CN 108551484 B CN108551484 B CN 108551484B
Authority
CN
China
Prior art keywords
user
synchronized
information
operating environment
environment
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.)
Active
Application number
CN201810368075.3A
Other languages
Chinese (zh)
Other versions
CN108551484A (en
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 Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co 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 Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810368075.3A priority Critical patent/CN108551484B/en
Priority to PCT/CN2018/099774 priority patent/WO2019205345A1/en
Publication of CN108551484A publication Critical patent/CN108551484A/en
Application granted granted Critical
Publication of CN108551484B publication Critical patent/CN108551484B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

The invention provides a user information synchronization method, which comprises the following steps: acquiring user information of each operating environment in the multi-activity system; matching the acquired user information in different operating environments to obtain a user to be synchronized and an operating environment to be synchronized corresponding to the user to be synchronized; and simulating the user to be synchronized to register in the running environment to be synchronized. The invention also discloses a user information synchronization device, a computer device and a computer readable storage medium. The invention can keep the consistency of the basic information of the user in the remote multi-activity system.

Description

User information synchronization method, device, computer device and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for synchronizing user information, a computer apparatus, and a storage medium.
Background
With the development of technology, the number of users on an application system (such as a social platform, a shopping platform, and the like) is increasing, and when a hardware environment such as a server is deployed, the deployment can be performed through a multi-active architecture, so that the deployment cost can be increased, and the advantages of disaster tolerance and the like can be taken into consideration. However, for off-site multi-living system architectures, there are usually multiple sets of operating environments running simultaneously. When logging in a multi-active system, logging in is usually performed through a load balancer. The load balancer may distribute network requests among the available servers in the server cluster, assigning the most appropriate server to respond to the network request. Therefore, when a user registers for the first time, the multi-active system randomly designates a set of most suitable operating environment for the user to log in at the client, the client is not different, the actual user logs in a certain operating environment in the multi-active system, information during user registration is only kept in a certain operating environment, and the user does not have information registered by the user in other operating environments, so that the problem of inconsistency of user basic data can be caused, and further synchronization of other data of the user (such as synchronization of user reports) is influenced.
Disclosure of Invention
In view of the foregoing, there is a need to provide a user information synchronization method, device, computer device and storage medium, which can maintain the consistency of user basic information in a remote multi-session system.
The invention provides a user information synchronization method, which comprises the following steps:
acquiring user information of each operating environment in the multi-activity system;
matching the acquired user information in different operating environments to obtain a user to be synchronized and an operating environment to be synchronized corresponding to the user to be synchronized;
and simulating the user to be synchronized to register in the running environment to be synchronized.
In a preferred embodiment of the present invention, the method further comprises:
acquiring log information of the multi-activity system;
and if the log information contains information of user login failure, executing the step of acquiring the user information of each operating environment in the multi-active system.
In a preferred embodiment of the present invention, the method further comprises:
acquiring a running process of the multi-activity system;
when the number of the running processes is lower than the preset number of the processes and/or the running processes do not comprise the specified processes, executing the step of acquiring the user information of each running environment in the multi-active system; or
And when the number of the running processes is lower than the preset number of the processes and/or the running processes do not contain the specified processes, executing the step of simulating the registration of the user to be synchronized in the running environment to be synchronized.
In a preferred implementation of the present invention, the preset number of processes and/or the designated process is determined according to hardware resources of the multi-active system.
In a preferred implementation of the present invention, the matching the acquired user information in different operating environments to obtain the user to be synchronized and the operating environment to be synchronized corresponding to the user to be synchronized includes:
comparing the user information in the first operating environment of the multi-active system with the user information in other operating environments except the first operating environment;
and when the information of the first user in the first operating environment does not exist in the other operating environments, determining that the first user is a user to be synchronized, and determining that the operating environment without the information of the first user is a to-be-synchronized operating environment.
In a preferred embodiment of the present invention, the matching the acquired user information in different operating environments to obtain the user to be synchronized and the operating environment to be synchronized corresponding to the user to be synchronized includes:
comparing the user information in the first operating environment of the multi-active system with the user information in other operating environments except the first operating environment;
acquiring user information which exists in each operating environment and is inconsistent;
and determining users corresponding to the inconsistent user information existing in each operating environment as the users to be synchronized, and determining the operating environment to be synchronized according to the specified information of the users to be synchronized.
In a preferred embodiment of the invention, the method further comprises:
acquiring system time of the multi-activity system;
and determining whether to execute the step of acquiring the user information of each operating environment in the multi-activity system according to the system time.
The invention also provides a user information synchronization device, which comprises:
the acquisition module is used for acquiring user information of each operating environment in the multi-activity system;
the matching module is used for matching the acquired user information in different operating environments to obtain a user to be synchronized and an operating environment to be synchronized corresponding to the user to be synchronized;
and the synchronization module is used for simulating the registration of the user to be synchronized in the running environment to be synchronized.
In a preferred embodiment of the present invention, the apparatus further comprises:
the log obtaining module is used for obtaining log information of the multi-activity system;
and the first triggering module is used for triggering the acquisition module to acquire the user information of each operating environment in the multi-active system if the log information contains the information of user login failure.
In a preferred embodiment of the present invention, the apparatus further comprises:
the process acquisition module is used for acquiring the running process of the multi-active system;
the second triggering module is used for triggering the acquisition module to acquire the user information of each running environment in the multi-active system when the number of the running processes is lower than the preset number of the processes and/or the running processes do not comprise the specified processes; or triggering the synchronization module to simulate the user to be synchronized to register in the running environment to be synchronized.
In a preferred embodiment of the present invention, the preset number of processes and/or the designated process is determined according to hardware resources of the multi-active system.
In a preferred embodiment of the present invention, the matching module is specifically configured to:
comparing the user information in the first operating environment of the multi-active system with the user information in other operating environments except the first operating environment;
and when the information of the first user in the first operating environment does not exist in the other operating environments, determining that the first user is a user to be synchronized, and determining that the operating environment without the information of the first user is a to-be-synchronized operating environment.
In a preferred embodiment of the present invention, the matching module is specifically configured to:
comparing the user information in the first operating environment of the multi-active system with the user information in other operating environments except the first operating environment;
acquiring user information which exists in each operating environment and is inconsistent;
and determining users corresponding to the inconsistent user information existing in each operating environment as the users to be synchronized, and determining the operating environment to be synchronized according to the specified information of the users to be synchronized.
In a preferred embodiment of the present invention, the identification module is specifically configured to:
the time acquisition module is used for acquiring the system time of the multi-activity system;
and the third triggering module is used for determining whether to trigger the acquisition module to acquire the user information of each operating environment in the multi-activity system according to the system time.
The invention also provides a computer device, which comprises a memory and a processor, wherein the memory is used for storing at least one instruction, and the processor is used for executing the at least one instruction to realize the user information synchronization method in any embodiment.
The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and the at least one instruction, when executed by a processor, implements the user information synchronization method described in any of the embodiments.
According to the technical scheme, the user information of each operating environment in the multi-activity system is acquired; matching the acquired user information in different operating environments to obtain a user to be synchronized and an operating environment to be synchronized corresponding to the user to be synchronized; and simulating the user to be synchronized to register in the running environment to be synchronized. The user to be synchronized and the corresponding user environment to be synchronized are obtained, and the registration of the user to be synchronized in the corresponding running environment to be synchronized is simulated, so that the registration information of the user to be synchronized is also provided in the running environment to be synchronized, and the consistency of the basic information of the user can be kept in a multi-active system in different places. Meanwhile, the method is beneficial to synchronizing other information besides the basic information of the user, so that the user data can be kept consistent in a multi-active system in different places.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a user information synchronization method according to an embodiment of the present invention;
FIG. 2 is a functional block diagram of a user information synchronization apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a computer apparatus for implementing a user information synchronization method according to a preferred embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
As shown in fig. 1, fig. 1 is a flowchart of a user information synchronization method according to an embodiment of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
And S10, acquiring user information of each operating environment in the multi-activity system.
The multi-living system of the invention refers to a system architecture of the system which is a multi-living system architecture. Specifically, the system may be a remote multi-living system architecture. By remote multi-activity, it is meant that data centers are deployed in a distributed manner in a geographic space, and each data center maintains a certain independence. Meanwhile, a plurality of centers work cooperatively to provide service for service access in parallel, and under the condition that one data center fails, other data centers can normally operate to keep the normal operation of the service.
For example, Cognos (Comgno) system of multi-living line architecture, which is a BI (Business Intelligence) reporting system. The BI report system can integrate the existing data in the enterprise and provide reports, help the operator of the enterprise to know the information of the enterprise fast, and then make decisions.
In practical applications, the multi-activity system may comprise at least two sets of operating environments. For example, a multi-activity system includes two sets of operating environments, which may be referred to as dual activities in different places. For another example, a multi-activity system may include three operating environments.
The user information may be a name of the user or a number of the user, and may also be one or more basic information that is filled in when a plurality of users register, including the name of the user, the number of the user, the registration time of the user, the user identity, and the like.
For example, the multi-active system includes an a operating environment and a B operating environment, obtains a name of a user and a number of the user included in the a operating environment, and obtains a name of a user and a number of the user included in the B operating environment.
For another example, the multi-active system includes an a operation environment, a B operation environment, and a C operation environment, obtains the name and the number of the user included in the a operation environment, obtains the name and the number of the user included in the B operation environment, and obtains the name and the number of the user included in the C operation environment.
Optionally, in another embodiment of the present invention, before the step S10, the method may further include:
acquiring log information of the multi-activity system; if the log information includes information of user login failure, the step S10 is executed to obtain user information of each operating environment in the multi-active system.
The log information of the multi-active system may include abnormal information or error information of the multi-active system during operation.
Specifically, log information within a specified time can be acquired. The value of the designated time may be set as needed, for example, to acquire log information within 3 hours.
When judging whether the log information contains the information of the user login failure, the judgment can be carried out by judging the type of the information, and then the judgment can be carried out by the name of the information, so that the required information can be quickly positioned from the log information.
In this embodiment, if the log information includes information of a user login failure, it indicates that the user cannot log in, and at this time, step S10 may be executed to synchronize the user information, so that the user basic information is kept consistent among the operating environments, and the success rate of user login is improved.
Further, in other embodiments of the present invention, if the log information includes information of a user login failure, the reason of the user login failure is obtained, and the step S10 of obtaining the user information of each operating environment in the multi-active system is executed according to the reason of the user login failure.
The reason for the user login failure is not limited to the user data being asynchronous, and may be a user password input error. Therefore, if the user login failure reason is that the user does not exist in the system, step S10 may be executed, so that the user basic information is kept consistent among the operating environments, thereby preventing the user from being unable to log in due to inconsistent operating environment data, and improving the reliability of the system.
Optionally, in another embodiment of the present invention, before the step S10, the method may further include:
acquiring a running process of the multi-activity system;
when the number of the running processes is less than the preset number of processes and/or the running processes do not include a designated process, the step S10 is executed to acquire user information of each running environment in the multi-active system.
The preset process number can be set according to needs. Similarly, the above-described designation process may be set as necessary.
In this embodiment, step S10 may be executed only when the number of processes currently running in the system is small or no process is specified, so that the user information synchronization method described in the present invention may be performed quickly without affecting the running of other tasks currently running in the system.
Further, the preset process number and/or the designated process are determined according to hardware resources of the multi-active system.
Due to different hardware resources, the conditions for keeping the current system to run smoothly are different. For example, different hardware resources may allocate different hardware resources to a process, thereby supporting different numbers of processes or different process tasks. Therefore, the process quantity is set according to different hardware resources, and the smoothness and the stability of the operation of the multi-activity system can be ensured.
Optionally, in another embodiment of the present invention, before the step S10, the method may further include:
acquiring system time of the multi-activity system;
and determining whether to execute the step S10 to acquire the user information of each operating environment in the multi-active system according to the system time.
The system time of the multi-active system refers to the current system time of the multi-active system, and may be the system time for acquiring any one operating environment in the multi-active system. Because the operating environments in the multi-activity system work together, the system time of any operating environment is consistent with the system time of other systems.
Specifically, it may be determined whether the current system time is a specified time, for example, whether the current system time is 8 pm, if yes, step S10 is executed.
Alternatively, it may be determined whether the current system time is the hour time, for example, whether the current system time is 14 hours or 15 hours, if yes, step S10 is executed, and at this time, step S10 is executed every hour, that is, every 1 hour.
Further, if the current system time is the hour time, executing the user information of each operating environment in all the operating environments in the multi-activity system. In addition, when the user information of each operating environment is acquired, only the user information increased within one hour in each operating environment of the multi-activity system can be acquired. At this time, repeated matching is not performed on the previously matched user information, and only newly added user information is matched, so that operation redundancy can be reduced, and the operating efficiency of the system can be improved.
And S20, matching the acquired user information in different operating environments to obtain the user to be synchronized and the operating environment to be synchronized corresponding to the user to be synchronized.
Specifically, the obtained user information of each operating environment may be respectively matched, so as to obtain the user to be synchronized and the operating environment to be synchronized corresponding to the user to be synchronized.
Further, the step S20 matches the obtained user information in different operating environments to obtain the to-be-synchronized user and the to-be-synchronized operating environment corresponding to the to-be-synchronized user, which may include:
comparing the user information in the first operating environment of the multi-active system with the user information in other operating environments except the first operating environment;
and when the information of the first user in the first operating environment does not exist in the other operating environments, determining that the first user is a user to be synchronized, and determining that the operating environment without the information of the first user is a to-be-synchronized operating environment.
In this embodiment, the user whose information is not covered in each operating environment is selected as the user to be synchronized.
The first operating environment may be any operating environment in a multi-active system. The first user may be any one of the users in the first operating environment.
Specifically, if the multi-active system includes three operating environments, each user in the first operating environment may be respectively matched with each user in the other operating environments.
Then, each user in the second operating environment in the multi-active system is respectively matched with each user in other operating environments, and each user in the third operating environment is respectively matched with each user in other operating environments, so that the information of the user which does not completely exist in each operating environment is obtained.
For example, the user names included in the obtained a running environment are called x user, y user, and z user, the user names included in the B running environment are called x user and z user, the matching result is that the B running environment does not include y user, the user to be synchronized is y user, and the running environment to be synchronized corresponding to the y user is B running environment, that is, in the a running environment and the B running environment, the information of the y user is inconsistent, and the information of the y user needs to be synchronized to the B running environment.
For another example, the user names obtained in the running environment a are called x user, y user, and z user, the user names obtained in the running environment B are called x user and z user, and the user names obtained in the running environment C are called x user. The user names in the running environment a and the running environment B and the running environment C are matched respectively. The method comprises the steps of obtaining that users to be synchronized are y users and z users, the running environments to be synchronized corresponding to the y users are B running environments and C running environments, and the running environments to be synchronized corresponding to the z users are C running environments, namely in the A running environment, the B running environment and the C running environment, information of the y users and information of the z users are inconsistent, the information of the y users needs to be synchronized to the C running environment and the C running environment, and the information of the z users needs to be synchronized to the C running environment.
In other embodiments, the step S20 matches the obtained user information in different operating environments to obtain the user to be synchronized and the operating environment to be synchronized corresponding to the user to be synchronized, and may further include:
comparing the user information in the first operating environment of the multi-active system with the user information in other operating environments except the first operating environment;
acquiring user information which exists in each operating environment and is inconsistent;
and determining users corresponding to the inconsistent user information existing in each operating environment as the users to be synchronized, and determining the operating environment to be synchronized according to the specified information of the users to be synchronized.
In the embodiment, the user whose information exists in each operating environment but is not completely consistent with the information is determined to be the user to be synchronized.
Specifically, in practical applications, the information of the same user existing in different operating environments may be consistent or may not be completely consistent. For example, the registration information of x users exists in both the a runtime environment and the B runtime environment, and the registration information of x users is different in the a runtime environment and the B runtime environment. At this time, the information of the x users is inconsistent in different operating environments, and the x users are determined to be the users to be synchronized.
The above-mentioned specifying information is used as a reference for determining the operating environment to be synchronized. Specifically, the specific information of the user to be synchronized may be information of a data entry party of the user to be synchronized, or information of the size of data that is not to be synchronized, or information of the registration time of the data to be synchronized. The information specified by the user to be synchronized may also be a combination of the above information or other information not mentioned above.
For example, in the a operating environment, the registration time of the x user is 6 months, and 6 months generate other operational data related to the user, while in the B operating environment, the registration time of the x user is 3 months, and in the B operating environment, in 3-6 months and other operational data related to the user, it is determined that the to-be-synchronized operating environment of the to-be-synchronized user x is the B environment, that is, the information of the x user in the a operating environment is not completely consistent with the information of the x user in the B operating environment, and the information of the x user needs to be synchronized into the B operating environment.
S30, simulating the user to be synchronized to register in the running environment to be synchronized.
Specifically, the simulation registration can be completed by a pre-developed SDK (Software Development Kit) interface program.
In specific implementation, each to-be-synchronized operation environment in the multi-active system can be accessed through the SDK interface program, and corresponding to-be-synchronized users are registered in the to-be-synchronized operation environment.
For example, the SDK interface program may include a Cognos (congolo) interface application or the like. Each to-be-synchronized operation environment in a Cognos system of a remote multi-living-body system architecture is accessed through a Cognos interface application, and a to-be-synchronized user is simulated to register in the to-be-synchronized operation environment. At this time, the same user-related information is available in each set of operating environment of the Cognos system of the remote multi-living system architecture.
When the user registration is simulated, the registration information of the user is the basic information of the user in the system, and at the moment, the basic information of the user exists in each environment of the multi-activity system.
Optionally, in another embodiment of the present invention, before the step S30, the method may further include:
acquiring a running process of the multi-activity system;
and when the number of the running processes is lower than the preset number of processes and/or the running processes do not include a specified process, executing the step S30 to simulate the user to be synchronized to register in the running environment to be synchronized.
In this embodiment, step S30 may be executed only when the number of processes currently running in the system is small or no process is specified, so that the operation of simulating user registration may be performed quickly without affecting the running of other tasks currently running in the system.
In other embodiments of the present invention, after synchronizing the user basic data of each operating environment of the multi-active system, when the user logs in any operating environment through the load balancer again, the information of the user exists in the operating environment, that is, as long as the user is registered, the user can log in any operating environment through the load balancer successfully and can execute operations.
For example, after the users of the Cognos system of the multi-living system architecture are simulated and registered, a profile file of each user may be created in any operating environment, and the profile file may serve as a basis for the synchronization of the report data of each user (for example, the report data of the user is synchronized through the profile file), so as to achieve the purpose of providing a basis for the synchronization of other data of the user between different operating environments.
The user information synchronization method provided by the invention obtains the user information of each operating environment in the multi-activity system; matching the acquired user information in different operating environments to obtain a user to be synchronized and an operating environment to be synchronized corresponding to the user to be synchronized; and simulating the user to be synchronized to register in the running environment to be synchronized. The user to be synchronized and the corresponding user environment to be synchronized are obtained, and the registration of the user to be synchronized in the corresponding running environment to be synchronized is simulated, so that the registration information of the user to be synchronized is also provided in the running environment to be synchronized, and the consistency of the basic information of the user can be kept in a multi-active system in different places. Meanwhile, the method is beneficial to synchronizing other information besides the basic information of the user, so that the user data can be kept consistent in a multi-active system in different places.
As shown in fig. 2, fig. 2 is a functional block diagram of a user information synchronization apparatus according to an embodiment of the present invention. The user information synchronization apparatus includes an acquisition module 210, a matching module 220, and a synchronization module 230. The module referred to in the present invention refers to a series of computer program segments capable of being executed by a processor of a computer device and performing a fixed function, which are stored in a memory of the computer device. In the present embodiment, the functions of the modules will be described in detail in the following embodiments.
The obtaining module 210 is configured to obtain user information of each operating environment in the multi-active system.
The multi-living system of the invention refers to a system architecture of the system which is a multi-living system architecture. Specifically, the system may be a remote multi-living system architecture. By remote multi-activity, it is meant that data centers are deployed in a distributed manner in a geographic space, and each data center maintains a certain independence. Meanwhile, a plurality of centers work cooperatively to provide service for service access in parallel, and under the condition that one data center fails, other data centers can normally operate to keep the normal operation of the service.
For example, Cognos (Comgno) system of multi-living line architecture, which is a BI (Business Intelligence) reporting system. The BI report system can integrate the existing data in the enterprise and provide reports, help the operator of the enterprise to know the information of the enterprise fast, and then make decisions.
In practical applications, the multi-activity system may comprise at least two sets of operating environments. For example, a multi-activity system includes two sets of operating environments, which may be referred to as dual activities in different places. For another example, a multi-activity system may include three operating environments.
The user information may be a name of the user or a number of the user, and may also be one or more basic information that is filled in when a plurality of users register, including the name of the user, the number of the user, the registration time of the user, the user identity, and the like.
For example, the multi-active system includes an a operating environment and a B operating environment, obtains a name of a user and a number of the user included in the a operating environment, and obtains a name of a user and a number of the user included in the B operating environment.
For another example, the multi-active system includes an a operation environment, a B operation environment, and a C operation environment, obtains the name and the number of the user included in the a operation environment, obtains the name and the number of the user included in the B operation environment, and obtains the name and the number of the user included in the C operation environment.
Optionally, in another embodiment of the present invention, the apparatus further includes a log obtaining module and a first triggering module. Specifically, the method comprises the following steps:
and the log acquisition module is used for acquiring the log information of the multi-activity system.
And the first triggering module is used for triggering the acquisition module to acquire the user information of each operating environment in the multi-active system if the log information contains the information of user login failure.
The log information of the multi-active system may include abnormal information or error information of the multi-active system during operation.
Specifically, log information within a specified time can be acquired. The value of the designated time may be set as needed, for example, to acquire log information within 3 hours.
When judging whether the log information contains the information of the user login failure, the judgment can be carried out by judging the type of the information, and then the judgment can be carried out by the name of the information, so that the required information can be quickly positioned from the log information.
In this embodiment, if the log information includes information of a user login failure, it indicates that a user cannot log in, and at this time, the obtaining module 210 may be triggered to obtain the user information of each operating environment in the multi-active system, and synchronize the user information, so that the user basic information is kept consistent among the operating environments, and the success rate of user login is improved.
Further, in other embodiments of the present invention, if the log information includes information of a user login failure, the cause of the user login failure is obtained, and the obtaining module 210 is triggered to obtain the user information of each operating environment in the multi-active system according to the cause of the user login failure.
The reason for the user login failure is not limited to the user data being asynchronous, and may be a user password input error. Therefore, if the user does not exist in the system due to the reason that the user login fails, the trigger acquisition module 210 can be executed to execute the operation, so that the basic information of the user is kept consistent among the operating environments, the user is prevented from being unable to log in due to inconsistent operating environment data, and the reliability of the system is improved.
Optionally, in another embodiment of the present invention, the apparatus of the present invention may include a performing module and a second triggering module. Specifically, the method comprises the following steps:
the process acquisition module is used for acquiring the running process of the multi-active system;
and the second triggering module is used for triggering the acquisition module to acquire the user information of each running environment in the multi-active system when the number of the running processes is lower than the preset number of the processes and/or the running processes do not comprise the specified processes.
The preset process number can be set according to needs. Similarly, the above-described designation process may be set as necessary.
In this embodiment, the triggering obtaining module 210 may be executed to execute the operation only when the number of processes currently running in the system is small or no process is specified, so that the user information synchronization method described in the present invention may be performed quickly without affecting the running of other tasks currently running in the system.
Further, the preset process number and/or the designated process are determined according to hardware resources of the multi-active system.
Due to different hardware resources, the conditions for keeping the current system to run smoothly are different. For example, different hardware resources may allocate different hardware resources to a process, thereby supporting different numbers of processes or different process tasks. Therefore, the process quantity is set according to different hardware resources, and the smoothness and the stability of the operation of the multi-activity system can be ensured.
Optionally, in another embodiment of the present invention, the apparatus of the present invention may further include a time obtaining module and a third triggering module. Specifically, the method comprises the following steps:
and the time acquisition module is used for acquiring the system time of the multi-activity system.
And the third triggering module is used for determining whether to trigger the acquisition module to acquire the user information of each operating environment in the multi-activity system according to the system time.
The system time of the multi-active system refers to the current system time of the multi-active system, and may be the system time for acquiring any one operating environment in the multi-active system. Because the operating environments in the multi-activity system work together, the system time of any one operating environment is consistent with the system time of other systems.
Specifically, it may be determined whether the current system time is a specified time, for example, whether the current system time is 8 pm, and if yes, the obtaining module 210 is triggered to execute the operation.
Alternatively, it may be determined whether the current system time is an hour time, for example, whether the current system time is 14 hours or 15 hours, if so, the obtaining module 210 is triggered to perform the operation, and at this time, the obtaining module 210 is triggered to perform the operation every hour time, that is, every 1 hour interval.
Further, if the current system time is the hour time, the obtaining module 210 is triggered to execute the operation. In addition, when the user information of each operating environment is acquired, only the user information increased within one hour in each operating environment of the multi-activity system can be acquired. At this time, repeated matching is not performed on the previously matched user information, and only newly added user information is matched, so that operation redundancy can be reduced, and the operating efficiency of the system can be improved.
The matching module 220 is configured to match the acquired user information in different operating environments to obtain a user to be synchronized and a to-be-synchronized operating environment corresponding to the user to be synchronized.
Specifically, the obtained user information of each operating environment may be respectively matched, so as to obtain the user to be synchronized and the operating environment to be synchronized corresponding to the user to be synchronized.
Further, the matching module 220 may be specifically configured to:
comparing the user information in the first operating environment of the multi-active system with the user information in other operating environments except the first operating environment; and when the information of the first user in the first operating environment does not exist in the other operating environments, determining that the first user is a user to be synchronized, and determining that the operating environment without the information of the first user is a to-be-synchronized operating environment.
In this embodiment, the user whose information is not covered in each operating environment is selected as the user to be synchronized.
The first operating environment may be any operating environment in a multi-active system. The first user may be any one of the users in the first operating environment.
Specifically, if the multi-active system includes three operating environments, each user in the first operating environment may be respectively matched with each user in the other operating environments.
Then, each user in the second operating environment in the multi-active system is respectively matched with each user in other operating environments, and each user in the third operating environment is respectively matched with each user in other operating environments, so that the information of the user which does not completely exist in each operating environment is obtained.
For example, the user names included in the obtained a running environment are called x user, y user, and z user, the user names included in the B running environment are called x user and z user, the matching result is that the B running environment does not include y user, the user to be synchronized is y user, and the running environment to be synchronized corresponding to the y user is B running environment, that is, in the a running environment and the B running environment, the information of the y user is inconsistent, and the information of the y user needs to be synchronized to the B running environment.
For another example, the user names obtained in the running environment a are called x user, y user, and z user, the user names obtained in the running environment B are called x user and z user, and the user names obtained in the running environment C are called x user. The user names in the running environment a and the running environment B and the running environment C are matched respectively. The method comprises the steps of obtaining that users to be synchronized are y users and z users, the running environments to be synchronized corresponding to the y users are B running environments and C running environments, and the running environments to be synchronized corresponding to the z users are C running environments, namely in the A running environment, the B running environment and the C running environment, information of the y users and information of the z users are inconsistent, the information of the y users needs to be synchronized to the C running environment and the C running environment, and the information of the z users needs to be synchronized to the C running environment.
In other embodiments, the matching module 220 may be specifically configured to:
comparing the user information in the first operating environment of the multi-active system with the user information in other operating environments except the first operating environment; acquiring user information which exists in each operating environment and is inconsistent; and determining users corresponding to the inconsistent user information existing in each operating environment as the users to be synchronized, and determining the operating environment to be synchronized according to the specified information of the users to be synchronized.
In the embodiment, the user whose information exists in each operating environment but is not completely consistent with the information is determined to be the user to be synchronized.
Specifically, in practical applications, the information of the same user existing in different operating environments may be consistent or may not be completely consistent. For example, the registration information of x users exists in both the a runtime environment and the B runtime environment, and the registration information of x users is different in the a runtime environment and the B runtime environment. At this time, the information of the x users is inconsistent in different operating environments, and the x users are determined to be the users to be synchronized.
The above-mentioned specifying information is used as a reference for determining the operating environment to be synchronized. Specifically, the specific information of the user to be synchronized may be information of a data entry party of the user to be synchronized, or information of the size of data that is not to be synchronized, or information of the registration time of the data to be synchronized. The information specified by the user to be synchronized may also be a combination of the above information or other information not mentioned above.
For example, in the a operating environment, the registration time of the x user is 6 months, and 6 months generate other operational data related to the user, while in the B operating environment, the registration time of the x user is 3 months, and in the B operating environment, in 3-6 months and other operational data related to the user, it is determined that the to-be-synchronized operating environment of the to-be-synchronized user x is the B environment, that is, the information of the x user in the a operating environment is not completely consistent with the information of the x user in the B operating environment, and the information of the x user needs to be synchronized into the B operating environment.
A synchronization module 230, configured to simulate that the user to be synchronized registers in the running environment to be synchronized.
Specifically, the simulation registration can be completed by a pre-developed SDK (Software Development Kit) interface program.
In specific implementation, each to-be-synchronized operation environment in the multi-active system can be accessed through the SDK interface program, and corresponding to-be-synchronized users are registered in the to-be-synchronized operation environment.
For example, the SDK interface program may include a Cognos (congolo) interface application or the like. Each to-be-synchronized operation environment in a Cognos system of a remote multi-living-body system architecture is accessed through a Cognos interface application, and a to-be-synchronized user is simulated to register in the to-be-synchronized operation environment. At this time, the same user-related information is available in each set of operating environment of the Cognos system of the remote multi-living system architecture.
When the user registration is simulated, the registration information of the user is the basic information of the user in the system, and at the moment, the basic information of the user exists in each environment of the multi-activity system.
Optionally, in another embodiment of the present invention, the method of the present invention may further include a process obtaining module and a second triggering module. Specifically, the method comprises the following steps:
the process acquisition module is used for acquiring the running process of the multi-active system;
and the second triggering module is used for triggering the synchronization module to simulate the user to be synchronized to register in the running environment to be synchronized when the number of the running processes is lower than the preset number of the processes and/or the running processes do not contain the specified processes.
In this embodiment, the synchronization module 230 may be triggered to execute the operation only when the number of processes currently running in the system is small or no process is specified, so that the operation of simulating user registration may be performed quickly without affecting the running of other tasks currently running in the system.
In other embodiments of the present invention, after synchronizing the user basic data of each operating environment of the multi-active system, when the user logs in any operating environment through the load balancer again, the information of the user exists in the operating environment, that is, as long as the user is registered, the user can log in any operating environment through the load balancer successfully and can execute operations.
For example, after the users of the Cogons system with a multi-living system architecture are simulated and registered, a profile file of each user may be created in any operating environment, and the profile file may serve as a basis for the synchronization of the report data of each user (for example, the report data of the user is synchronized through the profile file), so as to achieve the purpose of providing a basis for the synchronization of other data of the user between different operating environments.
The user information synchronization device provided by the invention obtains the user information of each operating environment in the multi-activity system through the obtaining module; the matching module matches the acquired user information in different operating environments to obtain a user to be synchronized and a to-be-synchronized operating environment corresponding to the user to be synchronized; and the synchronization module simulates the user to be synchronized to register in the running environment to be synchronized. The user to be synchronized and the corresponding user environment to be synchronized are obtained, and the registration of the user to be synchronized in the corresponding running environment to be synchronized is simulated, so that the registration information of the user to be synchronized is also provided in the running environment to be synchronized, and the consistency of the basic information of the user can be kept in a multi-active system in different places. Meanwhile, the method is beneficial to synchronizing other information besides the basic information of the user, so that the user data can be kept consistent in a multi-active system in different places.
The integrated unit implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention.
Fig. 3 is a schematic structural diagram of a computer device according to a preferred embodiment of the method for synchronizing user information according to the present invention. The computer means comprise at least one transmitting means 31, at least one memory 32, at least one processor 33, at least one receiving means 34 and at least one communication bus. Wherein the communication bus is used for realizing connection communication among the components.
The computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like. The computer apparatus may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network servers, wherein Cloud Computing is one of distributed Computing, a super virtual computer consisting of a collection of loosely coupled computers.
The computer device may be, but is not limited to, any electronic product capable of performing human-computer interaction with a user through a keyboard, a touch pad, a voice control device, or the like.
The Network in which the computer device is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
The receiving device 34 and the transmitting device 31 may be wired transmitting ports, or may be wireless devices, for example, including antenna devices, for performing data communication with other devices.
The memory 32 is used to store program code. The Memory 32 may be a circuit having a storage function, such as a RAM (Random-Access Memory), a FIFO (First In First Out), or the like, which is not In a physical form In the integrated circuit. Alternatively, the memory 32 may be a memory in a physical form, such as a memory bank, a TF Card (Trans-flash Card), a smart media Card (smart media Card), a secure digital Card (secure digital Card), a flash memory Card (flash Card), and so on.
The processor 33 may comprise one or more microprocessors, digital processors. The processor 33 may call program code stored in the memory 32 to perform the associated functions. For example, the units shown in fig. 3 are program codes stored in the memory 32 and executed by the processor 33 to implement a user information synchronization method. The processor 33 is also called a Central Processing Unit (CPU), and is an ultra-large scale integrated circuit, which is an operation Core (Core) and a Control Core (Control Unit).
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (9)

1. A method for synchronizing user information, the method comprising:
acquiring log information of a multi-activity system;
if the log information contains information of user login failure, acquiring the reason of the user login failure, and acquiring user information of each operating environment in the multi-active system according to the reason of the user login failure, wherein the user information is a plurality of items of basic information filled in when a user registers;
matching the acquired user information in different operating environments to obtain a user to be synchronized and an operating environment to be synchronized corresponding to the user to be synchronized;
acquiring a running process of the multi-activity system;
and simulating the user to be synchronized to register in the running environment to be synchronized when the number of the running processes is lower than the preset number of the processes and/or the running processes do not comprise the specified processes.
2. The method of claim 1, wherein the method further comprises:
acquiring a running process of the multi-activity system;
and when the number of the running processes is lower than the preset number of the processes and/or the running processes do not contain the specified processes, executing the step of acquiring the user information of each running environment in the multi-active system.
3. The method of claim 2, wherein the preset number of processes and/or the designated process is determined according to hardware resources of the multi-active system.
4. The method according to any one of claims 1 to 3, wherein the matching the acquired user information in the different operating environments to obtain the user to be synchronized and the operating environment to be synchronized corresponding to the user to be synchronized comprises:
comparing the user information in the first operating environment of the multi-active system with the user information in other operating environments except the first operating environment;
and when the information of the first user in the first operating environment does not exist in the other operating environments, determining that the first user is a user to be synchronized, and determining that the operating environment without the information of the first user is a to-be-synchronized operating environment.
5. The method according to any one of claims 1 to 3, wherein the matching the acquired user information in the different operating environments to obtain the user to be synchronized and the operating environment to be synchronized corresponding to the user to be synchronized comprises:
comparing the user information in the first operating environment of the multi-active system with the user information in other operating environments except the first operating environment;
acquiring user information which exists in each operating environment and is inconsistent;
and determining users corresponding to the inconsistent user information existing in each operating environment as the users to be synchronized, and determining the operating environment to be synchronized according to the specified information of the users to be synchronized.
6. The method of any of claims 1 to 3, further comprising:
acquiring system time of the multi-activity system;
and determining whether to execute the step of acquiring the user information of each operating environment in the multi-activity system according to the system time.
7. An apparatus for synchronizing user information, the apparatus comprising:
the acquisition module is used for acquiring the log information of the multi-activity system;
the obtaining module is further configured to obtain a reason for the user login failure if the log information includes information of the user login failure, and obtain user information of each operating environment in the multi-active system according to the reason for the user login failure, where the user information is multiple items of basic information filled in when the user registers;
the matching module is used for matching the acquired user information in different operating environments to obtain a user to be synchronized and an operating environment to be synchronized corresponding to the user to be synchronized;
the acquiring module is further configured to acquire an in-operation process of the multi-active system;
and the synchronization module is used for simulating the registration of the user to be synchronized in the running environment to be synchronized when the number of the running processes is lower than the preset number of the processes and/or the running processes do not contain the specified processes.
8. A computer device, comprising a memory for storing at least one instruction and a processor for executing the at least one instruction to implement the user information synchronization method of any one of claims 1 to 6.
9. A computer-readable storage medium having stored thereon computer instructions, characterized in that: the computer instructions, when executed by a processor, implement the user information synchronization method of any of claims 1 to 6.
CN201810368075.3A 2018-04-23 2018-04-23 User information synchronization method, device, computer device and storage medium Active CN108551484B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810368075.3A CN108551484B (en) 2018-04-23 2018-04-23 User information synchronization method, device, computer device and storage medium
PCT/CN2018/099774 WO2019205345A1 (en) 2018-04-23 2018-08-10 User information synchronization method, device, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810368075.3A CN108551484B (en) 2018-04-23 2018-04-23 User information synchronization method, device, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN108551484A CN108551484A (en) 2018-09-18
CN108551484B true CN108551484B (en) 2021-04-20

Family

ID=63512030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810368075.3A Active CN108551484B (en) 2018-04-23 2018-04-23 User information synchronization method, device, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN108551484B (en)
WO (1) WO2019205345A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116820624B (en) * 2023-08-29 2023-12-01 阿里健康科技(中国)有限公司 Method, device, equipment and medium for sending and processing operation instruction

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254094A (en) * 2016-07-19 2016-12-21 中国银联股份有限公司 A kind of method of data synchronization and system
CN106802790A (en) * 2015-11-26 2017-06-06 华为技术有限公司 Method, equipment and system that application user use information based on cloud platform is managed
CN106980625A (en) * 2016-01-18 2017-07-25 阿里巴巴集团控股有限公司 A kind of method of data synchronization, apparatus and system
CN107391314A (en) * 2017-07-31 2017-11-24 郑州云海信息技术有限公司 A kind of data consistency keeping method and device for supporting dual-active

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7260795B2 (en) * 2004-12-20 2007-08-21 Synopsys, Inc. Method and apparatus for integrating a simulation log into a verification environment
EP3439267A1 (en) * 2011-06-03 2019-02-06 UC Group Limited Systems and methods for managing chargeback requests
US9131475B2 (en) * 2013-06-27 2015-09-08 Qualcomm Incorporated Fast acquisition in multi-subscriber identity module (SIM) devices
WO2015023841A1 (en) * 2013-08-16 2015-02-19 Intuitive Surgical Operations, Inc. System and method for logging and replay among heterogeneous devices
US10534795B2 (en) * 2016-07-18 2020-01-14 Hewlett Packard Enterprise Development Lp Maintaining consistent subscriber data on geo-redundant subscriber databases
CN107453872B (en) * 2017-06-27 2020-08-04 北京溢思得瑞智能科技研究院有限公司 Unified security authentication method and system based on Mesos container cloud platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106802790A (en) * 2015-11-26 2017-06-06 华为技术有限公司 Method, equipment and system that application user use information based on cloud platform is managed
CN106980625A (en) * 2016-01-18 2017-07-25 阿里巴巴集团控股有限公司 A kind of method of data synchronization, apparatus and system
CN106254094A (en) * 2016-07-19 2016-12-21 中国银联股份有限公司 A kind of method of data synchronization and system
CN107391314A (en) * 2017-07-31 2017-11-24 郑州云海信息技术有限公司 A kind of data consistency keeping method and device for supporting dual-active

Also Published As

Publication number Publication date
CN108551484A (en) 2018-09-18
WO2019205345A1 (en) 2019-10-31

Similar Documents

Publication Publication Date Title
CN105556475A (en) Request processing techniques
US10972537B2 (en) Protecting in-flight transaction requests
WO2017131774A1 (en) Log event summarization for distributed server system
US10901863B2 (en) Unified data layer backup system
US9507676B2 (en) Cluster creation and management for workload recovery
CN111444992B (en) User information checking method and system based on information code
US10025671B2 (en) Smart virtual machine snapshotting
CN114095567B (en) Data access request processing method and device, computer equipment and medium
US11474905B2 (en) Identifying harmful containers
CN112035350B (en) Test method and device for block chain system and computer equipment
CN111338834B (en) Data storage method and device
CN113778442A (en) System menu generating method, device, equipment and storage medium
CN115757611A (en) Big data cluster switching method and device, electronic equipment and storage medium
US10789273B1 (en) Resource identifier allocation during network partitions
CN108551484B (en) User information synchronization method, device, computer device and storage medium
WO2021053422A1 (en) Correspondence of external operations to containers and mutation events
US10176059B2 (en) Managing server processes with proxy files
US10165088B2 (en) Providing unit of work continuity in the event initiating client fails over
US11501014B2 (en) Secure data replication in distributed data storage environments
US10606714B2 (en) Stopping central processing units for data collection based on event categories of events
CN107644043B (en) Internet bank quick navigation setting method and system
US11818208B1 (en) Adaptive data protocol for IoT devices
US11163635B2 (en) Tracking cluster image mutation events
CN116743589B (en) Cloud host migration method and device and electronic equipment
US11381496B1 (en) Testing a two-phase commit protocol conformance of a cloud based online transaction processing platform

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
GR01 Patent grant
GR01 Patent grant