WO2019205345A1 - 用户信息同步方法、装置、计算机装置及存储介质 - Google Patents
用户信息同步方法、装置、计算机装置及存储介质 Download PDFInfo
- Publication number
- WO2019205345A1 WO2019205345A1 PCT/CN2018/099774 CN2018099774W WO2019205345A1 WO 2019205345 A1 WO2019205345 A1 WO 2019205345A1 CN 2018099774 W CN2018099774 W CN 2018099774W WO 2019205345 A1 WO2019205345 A1 WO 2019205345A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- user
- synchronized
- information
- environment
- running
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Definitions
- the present application relates to the field of communications technologies, and in particular, to a user information synchronization method, apparatus, computer apparatus, and storage medium.
- the multi-live system randomly specifies a set of the most suitable operating environment for the user to log in on the client, and the client does not have any difference, and the actual user logs in to a certain operating environment in the multi-live system.
- the information when the user registers is only kept in a certain running environment. In other operating environments, the user does not have the information registered by the user, which may result in inconsistent user basic data, thereby affecting the synchronization of other data of the user (for example, user reports). Synchronization, etc.).
- the application provides a user information synchronization method, and the method includes:
- the user information in the different running environments is matched to obtain the to-be-synchronized user and the to-be-synchronized running environment corresponding to the user to be synchronized;
- the application also provides a user information synchronization device, the device comprising:
- An acquisition module configured to obtain user information of each operating environment in the multi-active system
- the matching module is configured to match the obtained user information in the different running environments, and obtain the to-be-synchronized user and the to-be-synchronized running environment corresponding to the user to be synchronized;
- a synchronization module configured to simulate that the user to be synchronized is registered in the to-be-synchronized running environment.
- the application also provides a computer device comprising a memory and a processor, the memory for storing at least one instruction, the processor for executing the at least one instruction to implement a user as described in any embodiment Information synchronization method.
- the present application also provides a non-volatile readable storage medium, wherein the non-volatile readable storage medium stores at least one instruction, which is implemented in any embodiment when executed by a processor The user information synchronization method.
- the present application obtains the user information of each operating environment in the multi-active system, and matches the obtained user information in different operating environments to obtain the to-be-synchronized user and the to-be-synchronized user corresponding to the synchronous operation.
- Environment simulating the user to be synchronized to register in the to-be-synchronized running environment. Since the user to be synchronized and the corresponding user environment to be synchronized are obtained, and the user to be synchronized is simulated to be registered in the corresponding running environment to be synchronized, the registration information of the user to be synchronized is also available in the environment to be synchronized, which may be different in different places. Maintain consistency of user basic information in a live system. At the same time, it is also beneficial to synchronize other information than the basic information of the user, so that the user data can be consistent in the remote living system.
- FIG. 1 is a flowchart of a method for synchronizing user information according to an embodiment of the present application
- FIG. 2 is a functional block diagram of a user information synchronization apparatus according to an embodiment of the present application
- FIG. 3 is a schematic structural diagram of a computer apparatus according to a preferred embodiment of a method for synchronizing user information in the present application.
- FIG. 1 is a flowchart of a method for synchronizing user information according to an embodiment of the present application.
- the order of the steps in the flowchart may be changed according to different requirements, and some steps may be omitted.
- the multi-active system described in the present application means that the architecture of the system is a multi-active architecture. Specifically, it can be an off-site multi-active architecture.
- the remote location means that the data centers are geographically distributed and distributed, and each data center maintains a certain degree of independence. At the same time, multiple centers work together to provide services for business access in parallel. In the event of a data center failure, other data centers can operate normally and maintain normal operation of the service.
- the Cognos architecture of the multi-live architecture which is a BI (Business Intelligence) reporting system.
- the BI reporting system can integrate and provide reports for existing data in the enterprise, helping the business operators to quickly understand the information of the enterprise and make decisions.
- a multi-active system can contain at least two operating environments.
- a multi-live system contains two sets of operating environments. In this case, it can be called off-site live.
- a multi-live system contains three sets of operating environments.
- the user information may be the name of the user or the number of the user, and may also be one of the multiple users registered when the user name is included, the user's name, the user's registration time, the user's identity, and the like. A number of basic information.
- the multi-active system includes the A running environment and the B running environment, obtains the name of the user and the user number included in the A running environment, and obtains the name of the user and the user number included in the B running environment.
- the multi-active system includes the A running environment, the B running environment, and the C running environment, and obtains the name and user number of the user included in the A running environment in the A running environment, and the name of the user included in the B running environment.
- step S10 may include:
- the step S10 is performed to obtain the user information of each running environment in the multi-active system.
- the log information of the above-mentioned multi-live system may include abnormal information or error information of the multi-live system during operation.
- log information within a specified time can be obtained.
- the value of the specified time can be set as needed, for example, to obtain log information within 3 hours.
- the judgment may be made by judging the type of the information, and then the name of the information is used for judging, so as to quickly locate the required information from the log information.
- step S10 may be performed to synchronize the user information, so that the user basic information is consistent between the operating environments. Improve the success rate of user login.
- the log information includes information that the user fails to log in
- the reason for the user's login failure is obtained, and the user of each operating environment in the multi-live system is executed according to the reason that the user fails to log in. The steps of the information.
- step S10 may be performed to ensure that the user basic information is consistent between the operating environments, so that the user cannot log in because the operating environment data is inconsistent, thereby improving system reliability.
- step S10 may include:
- the step S10 is performed to acquire the user information of each running environment in the multiple living system.
- the number of the preset processes may be set as needed. Similarly, the above specified process can also be set as needed.
- step S10 may be performed only when the number of processes currently running in the system is small, or the process is not specified, so that the user information synchronization method described in this application can be performed quickly without affecting the current system. Other tasks are running.
- the preset number of processes and/or the specified process is determined according to hardware resources of the multiple active system.
- step S10 may include:
- Step S10 Determining whether to perform the step S10 to acquire user information of each operating environment in the multi-active system according to the system time.
- the system time of the multi-live system refers to the current system time of the multi-live system, and at the same time, may be the system time of acquiring any one of the operating environments of the multi-live system. Since the operating environments of the multi-active system work together, the system time of any operating environment is consistent with the system time of other systems.
- step S10 it can be determined whether the current system time is a specified time, for example, whether the current system time is 8:00 pm, and if yes, step S10 is performed.
- step S10 it can be determined whether the current system time is an hourly time, for example, whether the current system time is 14 points or 15 points, and if yes, step S10 is performed, then, at this time, each hour of the whole time, that is, every interval In the hour, step S10 is performed.
- the step of performing user information of each of the operating environments in the operating environment of the multiple active system is performed.
- the user information of each running environment is acquired, only the user information of one hour in each running environment of the multi-live system may be acquired.
- the user information that has been matched before is not repeatedly matched, and only the newly added user information is matched, which can reduce operation redundancy and improve the operating efficiency of the system.
- S20 The user information in the different running environments is matched, and the to-be-synchronized user and the to-be-synchronized running environment corresponding to the user to be synchronized are obtained.
- the obtained user information of each running environment may be separately matched, thereby obtaining a to-be-synchronized user and a to-be-synchronized running environment corresponding to the user to be synchronized.
- step S20 is to match the acquired user information in different operating environments, and obtain the to-be-synchronized user and the to-be-synchronized running environment corresponding to the user to be synchronized, which may include:
- the user whose selection information does not cover each operating environment is the user to be synchronized.
- the first operating environment may be any one of the operating systems.
- the first user may be any one of the first operating environments.
- each user in the first operating environment can be matched with each user in the other operating environments.
- each user in the second operating environment in the multi-live system is matched with each user in the other operating environments, and each user in the third operating environment is separately from the other operating environments.
- Each of the users performs a match to obtain information of the user that does not completely exist in each of the operating environments.
- the user name contained in the A running environment is x user, y user, and z user
- the user name contained in the B running environment is x user and z user
- the matching result is that the B running environment does not include the y user.
- the user to be synchronized is the y user
- the environment to be synchronized corresponding to the y user is the 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.
- the user name included in the A running environment is x user, y user, and z user.
- the user name contained in the B running environment is x user and z user
- the user name included in the C running environment is x user. .
- the user to be synchronized is the y user and the z user.
- the environment to be synchronized corresponding to the y user is the B running environment and the C running environment.
- the running environment to be synchronized by the z user is the C running environment, that is, in the A running environment and B running.
- the information of the y user and the z user are inconsistent, and the information of the y user needs to be synchronized to the C running environment and the C running environment, and the information of the z user is synchronized to the C running environment.
- the step S20 is to match the obtained user information in different operating environments, and obtain the to-be-synchronized user and the to-be-synchronized running environment corresponding to the user to be synchronized, and may further include:
- the user corresponding to the user information that exists and is inconsistent in each running environment is determined to be the user to be synchronized, and the running environment to be synchronized is determined according to the specified information of the user to be synchronized.
- the information of the same user that exists in different operating environments may or may not be identical.
- the registration information of the x user exists in both the A running environment and the B running environment, and the registration information of the x user is different in the A running environment and the B running environment.
- the information of the x user is inconsistent in different operating environments, and it is determined that the x user is the user to be synchronized.
- the above specified information is used as a reference for determining the operating environment to be synchronized.
- the specified information of the user to be synchronized may be the data input party of the user to be synchronized, or the data size of the data to be synchronized, or the registration time of the data to be synchronized.
- the specified information of the user to be synchronized may also be a combination of the above information or other information not mentioned above.
- the registration time of the x user is June, and other operational data related to the user is generated in June
- the registration time of the x user is 3 months, and the operation is performed at the same time.
- the to-be-synchronized running environment of the user x to be synchronized is the B environment, that is, the information of the x user in the A running environment and the x user in the B running environment. The information is not completely consistent, and the information of the x user needs to be synchronized to the B running environment.
- analog registration can be completed through a pre-developed SDK (Software Development Kit) interface program.
- SDK Software Development Kit
- the operating environment to be synchronized in the multi-active system can be accessed through the SDK interface program, and the corresponding user to be synchronized is registered in the to-be-synchronized running environment.
- the SDK interface program can include a Cognos interface application, and the like.
- Each of the to-be-synchronized running environments in the Cognos system of the remote-area architecture is accessed through the Cognos interface application, and the users to be synchronized are simulated to be registered in the to-be-synchronized running environment.
- the same user information is available in the operating environment of the Cognos system of the remote and multi-active architecture.
- the user's registration information is the basic information of the user in the system.
- the basic information of the user is available in each environment of the multi-active system.
- step S30 may include:
- step S30 is executed to simulate that the users to be synchronized are registered in the to-be-synchronized running environment.
- step S30 may be performed only when the number of processes currently running in the system is small, or when no process is specified, so that the operation of simulating user registration can be performed quickly, and does not affect other current tasks of the system. run.
- the information of the user exists in the running environment. That is, as long as the user has registered, when logging in to any running environment through the load balancer, the login can be successful and the operation can be performed.
- each user's profile file can be created in any running environment, and the profile file can be used as the basis for the synchronization of the report data of each user (for example, The user's report data is synchronized through the profile file, thereby providing a basis for the user's other data to be synchronized between different operating environments.
- the user information synchronization method provided by the present application obtains the user information of each operating environment in the multi-active system; the user information in the different running environments is matched to obtain the to-be-synchronized user and the to-be-synchronized running environment corresponding to the user to be synchronized; Simulating the user to be synchronized to register in the to-be-synchronized running environment. Since the user to be synchronized and the corresponding user environment to be synchronized are obtained, and the user to be synchronized is simulated to be registered in the corresponding running environment to be synchronized, the registration information of the user to be synchronized is also available in the environment to be synchronized, which may be different in different places. Maintain consistency of user basic information in a live system. At the same time, it is also beneficial to synchronize other information than the basic information of the user, so that the user data can be consistent in the remote living system.
- FIG. 2 is a functional block diagram of a user information synchronization apparatus according to an embodiment of the present application.
- the user information synchronization device includes an acquisition module 210, a matching module 220, and a synchronization module 230.
- a module as referred to herein refers to a series of computer readable instruction segments that can be executed by a processor of a computer device and that are capable of performing a fixed function, which are stored in a memory of the computer device.
- the functions of the respective modules will be described in detail in the subsequent embodiments.
- the obtaining module 210 is configured to obtain user information of each operating environment in the multi-active system.
- the multi-active system described in the present application means that the architecture of the system is a multi-active architecture. Specifically, it can be an off-site multi-active architecture.
- the remote location means that the data centers are geographically distributed and deployed, and each data center maintains a certain degree of independence. At the same time, multiple centers work together to provide services for business access in parallel. In the event of a data center failure, other data centers can operate normally and maintain normal operation of the service.
- the Cognos architecture of the multi-live architecture which is a BI (Business Intelligence) reporting system.
- the BI reporting system can integrate and provide reports for existing data in the enterprise, helping the business operators to quickly understand the information of the enterprise and make decisions.
- a multi-active system can contain at least two operating environments.
- a multi-live system contains two sets of operating environments. In this case, it can be called off-site live.
- a multi-live system contains three sets of operating environments.
- the user information may be the name of the user or the number of the user, and may also be one of the multiple users registered when the user name is included, the user's name, the user's registration time, the user's identity, and the like. A number of basic information.
- the multi-active system includes the A running environment and the B running environment, obtains the name of the user and the user number included in the A running environment, and obtains the name of the user and the user number included in the B running environment.
- the multi-active system includes the A running environment, the B running environment, and the C running environment, and obtains the name and user number of the user included in the A running environment in the A running environment, and the name of the user included in the B running environment.
- the apparatus of the present application further includes a log obtaining module and a first triggering module. specific:
- the log obtaining module is configured to obtain log information of the multiple living system.
- the first triggering module is configured to trigger the acquiring module to acquire user information of each operating environment in the multi-active system, if the log information includes information that the user fails to log in.
- the log information of the above-mentioned multi-live system may include abnormal information or error information of the multi-live system during operation.
- log information within a specified time can be obtained.
- the value of the specified time can be set as needed, for example, to obtain log information within 3 hours.
- the judgment may be made by judging the type of the information, and then the name of the information is used for judging, so as to quickly locate the required information from the log information.
- the acquiring module 210 may be triggered to obtain user information of each operating environment in the multi-active system, and the user information is synchronized.
- the user basic information is consistent between the operating environments, and the success rate of the user login is improved.
- the acquisition module 210 is triggered to obtain the user information of each operating environment in the multi-active system according to the reason for the user login failure.
- the reason why the user fails to log in is not limited to the user data being out of sync, or the user password may be entered incorrectly. Therefore, if the user fails to log in because the user does not exist in the system, the trigger acquisition module 210 can perform the operation, so that the user basic information is consistent among the running environments, and the user is prevented from logging in due to the inconsistent operating environment data. System reliability.
- the apparatus described in the present application may include a performing module and a second triggering module. specific:
- a process obtaining module configured to acquire a running process of the multiple living system
- a second triggering module configured to: when the number of running processes is lower than a preset number of processes and/or the running process does not include a specified process, triggering the acquiring module to acquire each running environment of the multiple living system User Info.
- the number of the preset processes may be set as needed. Similarly, the above specified process can also be set as needed.
- the trigger acquisition module 210 performs the operation only when the number of processes currently running in the system is small, or the process is not specified, so that the user information synchronization method described in the present application can be performed quickly, and is not Affects other current tasks of the system.
- the preset number of processes and/or the specified process is determined according to hardware resources of the multiple active system.
- the apparatus described in this application may further include a time acquisition module and a third trigger module. specific:
- a time acquisition module configured to acquire a system of the multi-live system.
- a third triggering module configured to determine, according to the system time, whether the acquiring module is triggered to acquire user information of each operating environment in the multi-active system.
- the system time of the multi-live system refers to the current system time of the multi-live system, and at the same time, may be the system time of acquiring any one of the operating environments of the multi-live system. Since the operating environments of the multi-active system work together, the system time of any one operating environment is consistent with the system time of other systems.
- the trigger acquisition module 210 performs an operation.
- the trigger acquisition module 210 performs an operation, and at this time, each hour of the whole time, that is, each At intervals of one hour, the trigger acquisition module 210 performs an operation.
- the trigger acquisition module 210 performs an operation. Moreover, when the user information of each running environment is acquired, only the user information of one hour in each running environment of the multi-live system may be acquired. At this time, the user information that has been matched before is not repeatedly matched, and only the newly added user information is matched, which can reduce operation redundancy and improve the operating efficiency of the system.
- the matching module 220 is configured to match the acquired user information in different operating environments to obtain a to-be-synchronized user and a to-be-synchronized running environment corresponding to the user to be synchronized.
- the obtained user information of each running environment may be separately matched, thereby obtaining a to-be-synchronized user and a to-be-synchronized running environment corresponding to the user to be synchronized.
- the matching module 220 can be specifically configured to:
- the user whose selection information does not cover each operating environment is the user to be synchronized.
- the first operating environment may be any one of the operating systems.
- the first user may be any one of the first operating environments.
- each user in the first operating environment can be matched with each user in the other operating environments.
- each user in the second operating environment in the multi-live system is matched with each user in the other operating environments, and each user in the third operating environment is separately from the other operating environments.
- Each of the users performs a match to obtain information of the user that does not completely exist in each of the operating environments.
- the user name contained in the A running environment is x user, y user, and z user
- the user name contained in the B running environment is x user and z user
- the matching result is that the B running environment does not include the y user.
- the user to be synchronized is the y user
- the environment to be synchronized corresponding to the y user is the 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.
- the user name included in the A running environment is x user, y user, and z user.
- the user name contained in the B running environment is x user and z user
- the user name included in the C running environment is x user. .
- the user to be synchronized is the y user and the z user.
- the environment to be synchronized corresponding to the y user is the B running environment and the C running environment.
- the running environment to be synchronized by the z user is the C running environment, that is, in the A running environment and B running.
- the information of the y user and the z user are inconsistent, and the information of the y user needs to be synchronized to the C running environment and the C running environment, and the information of the z user is synchronized to the C running environment.
- the matching module 220 may be specifically configured to:
- the information of the same user that exists in different operating environments may or may not be identical.
- the registration information of the x user exists in both the A running environment and the B running environment, and the registration information of the x user is different in the A running environment and the B running environment.
- the information of the x user is inconsistent in different operating environments, and it is determined that the x user is the user to be synchronized.
- the above specified information is used as a reference for determining the operating environment to be synchronized.
- the specified information of the user to be synchronized may be the data input party of the user to be synchronized, or the data size of the data to be synchronized, or the registration time of the data to be synchronized.
- the specified information of the user to be synchronized may also be a combination of the above information or other information not mentioned above.
- the registration time of the x user is June, and other operational data related to the user is generated in June
- the registration time of the x user is 3 months, and the operation is performed at the same time.
- the to-be-synchronized running environment of the user x to be synchronized is the B environment, that is, the information of the x user in the A running environment and the x user in the B running environment. The information is not completely consistent, and the information of the x user needs to be synchronized to the B running environment.
- the synchronization module 230 is configured to simulate that the user to be synchronized is registered in the to-be-synchronized running environment.
- analog registration can be completed through a pre-developed SDK (Software Development Kit) interface program.
- SDK Software Development Kit
- the operating environment to be synchronized in the multi-active system can be accessed through the SDK interface program, and the corresponding user to be synchronized is registered in the running environment to be synchronized.
- the SDK interface program can include a Cognos interface application, and the like.
- Each of the to-be-synchronized running environments in the Cognos system of the remote-area architecture is accessed through the Cognos interface application, and the users to be synchronized are simulated to be registered in the to-be-synchronized running environment.
- the same user information is available in the operating environment of the Cognos system of the remote and multi-active architecture.
- the user's registration information is the basic information of the user in the system.
- the basic information of the user is available in each environment of the multi-active system.
- the method described in this application may further include a process acquisition module and a second trigger module. specific:
- a process obtaining module configured to acquire a running process of the multiple living system
- a second triggering module configured to: when the number of running processes is lower than a preset number of processes and/or the running process does not include a specified process, triggering the synchronization module to simulate the to-be-synchronized user in the waiting Register in the synchronous runtime environment.
- the synchronization module 230 may be triggered to perform operations only when the number of processes currently running in the system is small, or when no process is specified, so that the operation of simulating user registration can be performed quickly without affecting other current systems. Each task runs.
- the information of the user exists in the running environment. That is, as long as the user has registered, when logging in to any running environment through the load balancer, the login can be successful and the operation can be performed.
- each user's profile file can be created in any running environment, and the profile file can be used as a basis for reporting data synchronization of each user (for example, The user's report data is synchronized through the profile file, thereby providing a basis for the user's other data to be synchronized between different operating environments.
- the user information synchronization device obtains the user information of each operating environment in the multi-active system through the obtaining module; the matching module matches the obtained user information in different operating environments, and obtains the user to be synchronized and the user to be synchronized.
- the synchronization running module simulates that the user to be synchronized is registered in the to-be-synchronized running environment. Since the user to be synchronized and the corresponding user environment to be synchronized are obtained, and the user to be synchronized is simulated to be registered in the corresponding running environment to be synchronized, the registration information of the user to be synchronized is also available in the environment to be synchronized, which may be different in different places. Maintain consistency of user basic information in a live system. At the same time, it is also beneficial to synchronize other information than the basic information of the user, so that the user data can be consistent in the remote living system.
- the above-described integrated unit implemented in the form of a software function module can be stored in a non-volatile readable storage medium.
- the software function module described above is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods described in various embodiments of the present application. Part of the steps.
- FIG. 3 is a schematic structural diagram of a computer apparatus according to a preferred embodiment of a method for synchronizing user information in the present application.
- the computer device comprises at least one transmitting device 31, at least one memory 32, at least one processor 33, at least one receiving device 34 and at least one communication bus.
- the communication bus is used to implement connection communication between these components.
- the computer device is a device capable of automatically performing numerical calculation and/or information processing according to an instruction set or stored in advance, and the hardware thereof includes but is not limited to a microprocessor and an application specific integrated circuit (ASIC). , Field-Programmable Gate Array (FPGA), Digital Signal Processor (DSP), embedded devices, etc.
- the computer device may also include a network device and/or a user device.
- the network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud computing-based cloud composed of a large number of hosts or network servers, where the cloud computing is distributed computing.
- a super virtual computer consisting of a group of loosely coupled computers.
- the computer device may be, but is not limited to, any electronic product that can interact with a user through a keyboard, a touch pad, or a voice control device.
- 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 Internet 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.
- VPN virtual private network
- the receiving device 34 and the transmitting device 31 may be wired transmission 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 memory function in a physical form, such as a RAM (Random-Access Memory), a FIFO (First In First Out) memory, or the like.
- the memory 32 may also be a memory having a physical form, such as a memory stick, a TF card (Trans-flash Card), a smart media card, a secure digital card, a flash memory card. Storage devices such as (flash card) and the like.
- the processor 33 can include one or more microprocessors, digital processors.
- the processor 33 can call program code stored in the memory 32 to perform related functions.
- the various units described in FIG. 3 are program code stored in the memory 32 and executed by the processor 33 to implement a user information synchronization method.
- the processor 33 also known as a central processing unit (CPU), is a very large-scale integrated circuit, which is a computing core (Core) and a control unit (Control Unit).
- modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software function modules.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
Abstract
本申请提供一种用户信息同步方法,包括:获取多活***中每个运行环境的用户信息;将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境;模拟所述待同步用户在所述待同步运行环境中注册。本申请还公开了一种用户信息同步装置、计算机装置和存储介质。本申请可以在异地多活***中保持用户基础信息的一致性。
Description
本申请要求于2018年04月23日提交中国专利局,申请号为201810368075.3发明名称为“用户信息同步方法、装置、计算机装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,尤其涉及一种用户信息同步方法、装置、计算机装置及存储介质。
随着技术的发展,应用***(如社交平台、购物平台等)上的用户量越来越大,在部署服务器等硬件环境时,通过多活体系架构进行部署可以提高部署的成本、兼顾容灾等优点。然而对于异地多活体系架构,通常有多套同时运行的运行环境。在登陆多活***时,通常通过负载均衡器进行登陆。负载均衡器可以将网络请求分散到服务器集群中的可用服务器中,分配最适当的服务器响应网络请求。因此,用户在首次注册时,多活***随机指定一套最适合的运行环境供用户在客户端进行登陆,客户端并没有任何不同,而实际用户登陆的为多活***中某一运行环境,用户注册时的信息仅保留在某一运行环境中,在其他运行环境中用户并没有用户注册的信息,这样就会导致用户基础数据不一致的问题,进而影响到用户其他数据的同步(例如用户报表的同步等)。
发明内容
鉴于以上内容,有必要提供一种用户信息同步方法、装置、计算机装置及存储介质,能在异地多活***中保持用户基础信息的一致性。
本申请提供一种用户信息同步方法,所述方法包括:
获取多活***中每个运行环境的用户信息;
将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境;
模拟所述待同步用户在所述待同步运行环境中注册。
本申请还提供一种用户信息同步装置,所述装置包括:
获取模块,用于获取多活***中每个运行环境的用户信息;
匹配模块,用于将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境;
同步模块,用于模拟所述待同步用户在所述待同步运行环境中注册。
本申请还提供一种计算机装置,所述计算机装置包括存储器及处理器,所述存储器用于存储至少一个指令,所述处理器用于执行所述至少一个指令以实现任意实施例中所述的用户信息同步方法。
本申请还提供一种非易失性可读存储介质,其特征在于,所述非易失性可读存储介质存储有至少一个指令,所述至少一个指令被处理器执行时实现任意实施例中所述的用户信息同步方法。
由以上技术方案看出,本申请通过获取多活***中每个运行环境的用户信息;将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境;模拟所述待同步用户在所述待同步运行环境中注册。由于获取了待同步用户与对应的待同步用户环境,并且模拟了待同步用户在对应的待同步运行环境中注册,因此在待同步运行环境中也有了待同步用户的注册信息,可以在异地多活***中保持用户基础信息的一致性。同时,也有利于用户基础信息以外的其他信息进行同步,使得在异地多活***中用户数据可以保持一致。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1是本申请实施例提供的一种用户信息同步方法的流程图;
图2是本申请实施例提供的用户信息同步装置的功能模块图;
图3是本申请实现用户信息同步方法的较佳实施例的计算机装置的结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
如图1所示,图1为本申请实施例提供的一种用户信息同步方法的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。
S10,获取多活***中每个运行环境的用户信息。
本申请所述的多活***是指***的体系架构为多活体系架构。具体的,可以是异地多活体系架构。异地多活是指数据中心在地理空间上是分布部署 的,每个数据中心保持一定的独立性。同时,多个中心协同工作,并行的为业务访问提供服务,在一个数据中心发生故障的情况下,其他数据中心可以正常运行,保持业务的正常的运行。
例如,多活体系架构的Cognos(康格诺)***,所述Cognos是一种BI(Business Intelligence,商业智能)报表***。BI报表***可以为企业中现有数据进行整合并提供出报表,帮助企业的经营者快速了解企业的信息,进而进行决策。
在实际应用中,多活***可以包含至少两套运行环境。比如,某一多活***包含两套运行环境,此时,可称为异地双活。又比如,某一多活***包含三套运行环境。
上述用户信息可以是用户的名称或者用户的编号,同时,也可以为包括用户的名称、用户的编号、用户的注册时间、用户身份等在内的多项用户注册时所填写的一项或者是多项基础信息。
比如,多活***中包含A运行环境和B运行环境,获取A运行环境中包含的用户的名称和用户的编号,同时,获取B运行环境中包含的用户的名称和用户的编号。
又比如,多活***中包含A运行环境、B运行环境和C运行环境,获取A运行环境中获取A运行环境中包含的用户的名称和用户的编号,B运行环境中包含的用户的名称和用户的编号,以及C运行环境中包含的用户的名称和用户的编号。
可选的,在本申请另一实施例中,上述步骤S10之前可包括:
获取所述多活***的日志信息;若所述日志信息包含用户登陆失败的信息,执行所述步骤S10获取多活***中每个运行环境的用户信息。
上述多活***的日志信息可以包含多活***在运行过程中的异常信息或报错信息。
具体的,可以获取在指定时间之内的日志信息。指定时间的值可以根据需要设定,例如获取3小时之内的日志信息。
在判断日志信息是否包含用户登陆失败的信息时,可以通过判断信息的类型进行判断,进而通过信息的名称进行判断,以便从日志信息中快速的定位所需信息。
在本实施例中,若日志信息包含用户登陆失败的信息,则说明有用户登陆不上,此时可以执行步骤S10,对用户信息进行同步,使得用户基础信息在各运行环境之间保持一致,提高用户登陆的成功率。
进一步地,在本申请其他实施例中,若日志信息包含用户登陆失败的信息,获取用户登陆失败的原因,根据用户登陆失败的原因执行所述步骤S10获取多活***中每个运行环境的用户信息的步骤。
由于用户登陆失败的原因不限于用户数据不同步这一种,也可能是用户密码输入错误等。因此若用户登陆失败的原因为用户不存在***中,可执行步骤S10,使得用户基础信息在各运行环境之间保持一致,避免用户因为运 行环境数据不一致而使得用户无法登陆,提高***的可靠性。
可选的,在本申请另一实施例中,上述步骤S10之前可包括:
获取所述多活***的运行中进程;
当所述运行中进程的数量低于预设进程数量和/或所述运行中进程不包含指定进程时,执行所述步骤S10获取多活***中每个运行环境的用户信息。
其中,上述预设进程数量可以根据需要设定。同样的,上述指定进程也可以根据需要设定。
在本实施例中,可以仅当***当前运行的进程数量较少,或者没有指定进程时,才执行步骤S10,使得本申请所述的用户信息同步方法可以快速进行,同时并不影响***当前的其他各项任务运行。
进一步地,所述预设进程数量和/或所述指定进程根据所述多活***的硬件资源确定。
由于不同的硬件资源下,使得当前***保持流畅运行的条件也不相同。例如,不同的硬件资源可以为进程分配不同的硬件资源,进而支持不同的进程数量或者是不同的进程任务。因此,根据不同的硬件资源进行设定进程数量,可以保证多活***运行的流畅性和稳定性。
可选的,在本申请另一实施例中,上述步骤S10之前可包括:
获取所述多活***的***时间;
根据所述***时间确定是否执行所述步骤S10获取多活***中每个运行环境的用户信息。
其中,所述多活***的***时间是指多活***当前的***时间,同时,可以是获取多活***中任意一个运行环境的***时间。由于多活***中各运行环境是协同工作的,因此任意运行环境的***时间与其他***的***时间是一致的。
具体的,可以判断当前的***时间是否为指定时间,例如判断当前的***时间是否为晚上8点,若是,则执行步骤S10。
或者,可以判断当前的***时间是否为整点时间,例如判断当前***时间是否为14点或者为15点,若是,则执行步骤S10,则此时,每个整点时间,即每间隔1个小时,执行步骤S10。
进一步地,若当前的***时间为整点时间,则执行所述多活***中所有运行环境中每个运行环境的用户信息的步骤。并且,在获取每个运行环境的用户信息时,可以仅获取多活***的各个运行环境中一小时内增量的用户信息。此时,不再对之前已匹配过的用户信息进行重复匹配,仅对新增的用户信息进行匹配,可以减少操作冗余,提高***的运行效率。
S20,将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境。
具体的,可以将获取到的每个运行环境的用户信息分别进行匹配,从而得到待同步用户以及待同步用户对应的待同步运行环境。
进一步地,所述步骤S20将获取到的不同运行环境中的用户信息进行匹 配,得到待同步用户以及待同步用户对应的待同步运行环境,可包括:
将所述多活***的第一运行环境中的用户信息与所述第一运行环境以外的其他运行环境中的用户信息进行对比;
当第一运行环境中的第一用户的信息没有在所述其他运行环境中都存在时,确定所述第一用户为待同步用户,确定不存在所述第一用户的信息的运行环境为待同步运行环境。
在本实施例中,选取信息没有覆盖到每个运行环境的用户为待同步用户。
其中,上述第一运行环境可以是多活***中的任意一个运行环境。上述第一用户可以为第一运行环境之中的任意一个用户。
具体的,若多活***中包含三个运行环境,可以对将第一个运行环境之中的每一个用户分别与其他运行环境之中的每一个用户进行匹配。
然后,再将多活***中的第二个运行环境中的每一个用户分别与其他运行环境之中的每一个用户进行匹配,以及第三个运行环境之中的每一个用户分别与其他运行环境之中的每一个用户进行匹配,从而获取不完全存在于每个运行环境之中的用户的信息。
比如,获取到A运行环境中包含的用户名称为x用户,y用户,和z用户,B运行环境中包含的用户名称为x用户和z用户,则匹配结果为B运行环境中不包含y用户,则待同步用户是y用户,y用户对应的待同步运行环境为B运行环境,即,在A运行环境和B运行环境中,y用户的信息不一致,需要将y用户的信息同步至B运行环境中。
又比如,获取到A运行环境中包含的用户名称为x用户,y用户,和z用户,B运行环境中包含的用户名称为x用户和z用户,C运行环境中包含的用户名称为x用户。则将A运行环境与B运行环境和C运行环境中的用户名称分别进行匹配。得到待同步用户为y用户以及z用户,y用户对应的待同步运行环境为B运行环境和C运行环境,z用户对应的待同步运行环境为C运行环境,即,在A运行环境、B运行环境以及C运行环境中,y用户以及z用户的信息不一致,需要将y用户的信息同步至C运行环境与C运行环境,以及将z用户的信息同步至C运行环境。
其他实施例中,所述步骤S20将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境,还可包括:
将所述多活***的第一运行环境中的用户信息与所述第一运行环境以外的其他运行环境中的用户信息进行对比;
获取在每个运行环境中存在且不一致的用户信息;
确定在每个运行环境中存在且不一致的用户信息对应的用户为待同步用户,根据待同步用户的指定信息确定待同步运行环境。
在本实施例中,确定信息存在于每个运行环境中的,但信息不完全一致的用户为待同步用户。
具体的,在实际应用中,获取到的不同运行环境中的存在的同一用户的信息可能一致,也可能不完全一致。例如,x用户的注册信息在A运行环境 中与B运行环境中都存在,且x用户的注册信息在A运行环境中与在B运行环境中不尽相同。则此时,该x用户的信息在不同的运行环境中不一致,确定x用户为待同步用户。
上述指定信息用于作为确定待同步运行环境的基准。具体的,待同步用户的指定信息可以为待同步用户的数据录入方,或者未待同步数据的数据大小,或者待同步数据的注册时间的先后等信息。待同步用户的指定信息还可以为上述信息的结合或者是其他上述未提及的信息。
例如,在A运行环境中,x用户的注册时间为6月,且6月产生了与用户相关的其他操作性数据,而在B运行环境中,x用户的注册时间3月,同时在B运行环境中,在3-6月并与该用户相关的其他操作性数据,则确定待同步用户x的待同步运行环境为B环境,即A运行环境中x用户的信息与B运行环境中x用户的信息不完全一致,需将x用户的信息同步至B运行环境中。
S30,模拟所述待同步用户在所述待同步运行环境中注册。
具体的,可通过预先开发好的SDK(Software Development Kit,软件开发工具包)接口程序完成模拟注册。
在具体实现时,可以通过SDK接口程序访问多活***中每一个待同步运行环境,并在该待同步运行环境下注册对应的待同步用户。
例如,该SDK接口程序可以包括Cognos(康格诺)接口应用等。通过Cognos接口应用访问异地多活体系架构的Cognos***中每一个待同步运行环境,并在该待同步运行环境下模拟待同步用户进行注册。此时,在异地多活体系架构的Cognos***的每套运行环境中,都有了同样的用户的相关信息。
模拟用户注册时,用户的注册信息是用户在***中的基本信息,此时,在多活***的各个环境中都有了用户的基本信息。
可选的,在本申请另一实施例中,上述步骤S30之前可包括:
获取所述多活***的运行中进程;
当所述运行中进程的数量低于预设进程数量和/或所述运行中进程不包含指定进程时,执行所述步骤S30模拟所述待同步用户在所述待同步运行环境中注册。
在本实施例中,可以仅当***当前运行的进程数量较少,或者没有指定进程时,才执行步骤S30,使得模拟用户注册的操作可以快速进行,同时并不影响***当前的其他各项任务运行。
在本申请的其他实施例中,在对多活***每个运行环境的用户基础数据进行同步以后,使得用户再次通过负载均衡器登录任意运行环境时,该运行环境中都存在该用户的信息,即只要用户注册过,在此通过负载均衡器登录任意运行环境时,都可以登陆成功,并且可以执行操作。
例如,在对多活体系架构的Cognos***的用户进行模拟注册之后,可以在任意运行环境中创建每个用户的概要(profile)文件,该profile文件可 以作为各用户的报表数据同步的基础(例如,通过profile文件将该用户的报表数据进行同步),从而实现为用户的其他数据在不同运行环境之间同步时提供依据的目的。
本申请提供的用户信息同步方法获取多活***中每个运行环境的用户信息;将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境;模拟所述待同步用户在所述待同步运行环境中注册。由于获取了待同步用户与对应的待同步用户环境,并且模拟了待同步用户在对应的待同步运行环境中注册,因此在待同步运行环境中也有了待同步用户的注册信息,可以在异地多活***中保持用户基础信息的一致性。同时,也有利于用户基础信息以外的其他信息进行同步,使得在异地多活***中用户数据可以保持一致。
如图2所示,图2为本申请实施例提供的用户信息同步装置的功能模块图。所述用户信息同步装置包括获取模块210、匹配模块220和同步模块230。本申请所称的模块是指一种能够被计算机装置的处理器所执行并且能够完成固定功能的一系列计算机可读指令段,其存储在计算机装置的存储器中。在本实施例中,关于各模块的功能将在后续的实施例中详述。
获取模块210,用于获取多活***中每个运行环境的用户信息。
本申请所述的多活***是指***的体系架构为多活体系架构。具体的,可以是异地多活体系架构。异地多活是指数据中心在地理空间上是分布部署的,每个数据中心保持一定的独立性。同时,多个中心协同工作,并行的为业务访问提供服务,在一个数据中心发生故障的情况下,其他数据中心可以正常运行,保持业务的正常的运行。
例如,多活体系架构的Cognos(康格诺)***,所述Cognos是一种BI(Business Intelligence,商业智能)报表***。BI报表***可以为企业中现有数据进行整合并提供出报表,帮助企业的经营者快速了解企业的信息,进而进行决策。
在实际应用中,多活***可以包含至少两套运行环境。比如,某一多活***包含两套运行环境,此时,可称为异地双活。又比如,某一多活***包含三套运行环境。
上述用户信息可以是用户的名称或者用户的编号,同时,也可以为包括用户的名称、用户的编号、用户的注册时间、用户身份等在内的多项用户注册时所填写的一项或者是多项基础信息。
比如,多活***中包含A运行环境和B运行环境,获取A运行环境中包含的用户的名称和用户的编号,同时,获取B运行环境中包含的用户的名称和用户的编号。
又比如,多活***中包含A运行环境、B运行环境和C运行环境,获取A运行环境中获取A运行环境中包含的用户的名称和用户的编号,B运行环境中包含的用户的名称和用户的编号,以及C运行环境中包含的用户的名称 和用户的编号。
可选的,在本申请另一实施例中,本申请所述的装置还包括日志获取模块和第一触发模块。具体的:
日志获取模块,用于获取所述多活***的日志信息。
第一触发模块,用于若所述日志信息包含用户登陆失败的信息,触发所述获取模块获取多活***中每个运行环境的用户信息。
上述多活***的日志信息可以包含多活***在运行过程中的异常信息或报错信息。
具体的,可以获取在指定时间之内的日志信息。指定时间的值可以根据需要设定,例如获取3小时之内的日志信息。
在判断日志信息是否包含用户登陆失败的信息时,可以通过判断信息的类型进行判断,进而通过信息的名称进行判断,以便从日志信息中快速的定位所需信息。
在本实施例中,若日志信息包含用户登陆失败的信息,则说明有用户登陆不上,此时可以触发获取模块210获取多活***中每个运行环境的用户信息,对用户信息进行同步,使得用户基础信息在各运行环境之间保持一致,提高用户登陆的成功率。
进一步地,在本申请其他实施例中,若日志信息包含用户登陆失败的信息,获取用户登陆失败的原因,根据用户登陆失败的原因触发获取模块210获取多活***中每个运行环境的用户信息。
由于用户登陆失败的原因不限于用户数据不同步这一种,也可能是用户密码输入错误等。因此若用户登陆失败的原因为用户不存在***中,可执行触发获取模块210执行操作,使得用户基础信息在各运行环境之间保持一致,避免用户因为运行环境数据不一致而使得用户无法登陆,提高***的可靠性。
可选的,在本申请另一实施例中,本申请所述的装置可包括进行模块和第二触发模块。具体的:
进程获取模块,用于获取所述多活***的运行中进程;
第二触发模块,用于当所述运行中进程的数量低于预设进程数量和/或所述运行中进程不包含指定进程时,触发所述获取模块获取多活***中每个运行环境的用户信息。
其中,上述预设进程数量可以根据需要设定。同样的,上述指定进程也可以根据需要设定。
在本实施例中,可以仅当***当前运行的进程数量较少,或者没有指定进程时,才执行触发获取模块210执行操作,使得本申请所述的用户信息同步方法可以快速进行,同时并不影响***当前的其他各项任务运行。
进一步地,所述预设进程数量和/或所述指定进程根据所述多活***的硬件资源确定。
由于不同的硬件资源下,使得当前***保持流畅运行的条件也不相同。例如,不同的硬件资源可以为进程分配不同的硬件资源,进而支持不同的进 程数量或者是不同的进程任务。因此,根据不同的硬件资源进行设定进程数量,可以保证多活***运行的流畅性和稳定性。
可选的,在本申请另一实施例中,本申请所述的装置还可包括时间获取模块和第三触发模块。具体的:
时间获取模块,用于获取所述多活***的***时。
第三触发模块,用于根据所述***时间确定是否触发所述获取模块获取多活***中每个运行环境的用户信息。
其中,所述多活***的***时间是指多活***当前的***时间,同时,可以是获取多活***中任意一个运行环境的***时间。由于多活***中各运行环境是协同工作的,因此任意一个运行环境的***时间与其他***的***时间是一致的。
具体的,可以判断当前的***时间是否为指定时间,例如判断当前的***时间是否为晚上8点,若是,则触发获取模块210执行操作。
或者,可以判断当前的***时间是否为整点时间,例如判断当前***时间是否为14点或者为15点,若是,则触发获取模块210执行操作,则此时,每个整点时间,即每间隔1个小时,触发获取模块210执行操作。
进一步地,若当前的***时间为整点时间,则触发获取模块210执行操作。并且,在获取每个运行环境的用户信息时,可以仅获取多活***的各个运行环境中一小时内增量的用户信息。此时,不再对之前已匹配过的用户信息进行重复匹配,仅对新增的用户信息进行匹配,可以减少操作冗余,提高***的运行效率。
匹配模块220,用于将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境。
具体的,可以将获取到的每个运行环境的用户信息分别进行匹配,从而得到待同步用户以及待同步用户对应的待同步运行环境。
进一步地,所述匹配模块220可具体用于:
将所述多活***的第一运行环境中的用户信息与所述第一运行环境以外的其他运行环境中的用户信息进行对比;当第一运行环境中的第一用户的信息没有在所述其他运行环境中都存在时,确定所述第一用户为待同步用户,确定不存在所述第一用户的信息的运行环境为待同步运行环境。
在本实施例中,选取信息没有覆盖到每个运行环境的用户为待同步用户。
其中,上述第一运行环境可以是多活***中的任意一个运行环境。上述第一用户可以为第一运行环境之中的任意一个用户。
具体的,若多活***中包含三个运行环境,可以对将第一个运行环境之中的每一个用户分别与其他运行环境之中的每一个用户进行匹配。
然后,再将多活***中的第二个运行环境中的每一个用户分别与其他运行环境之中的每一个用户进行匹配,以及第三个运行环境之中的每一个用户分别与其他运行环境之中的每一个用户进行匹配,从而获取不完全存在于每个运行环境之中的用户的信息。
比如,获取到A运行环境中包含的用户名称为x用户,y用户,和z用户,B运行环境中包含的用户名称为x用户和z用户,则匹配结果为B运行环境中不包含y用户,则待同步用户是y用户,y用户对应的待同步运行环境为B运行环境,即,在A运行环境和B运行环境中,y用户的信息不一致,需要将y用户的信息同步至B运行环境中。
又比如,获取到A运行环境中包含的用户名称为x用户,y用户,和z用户,B运行环境中包含的用户名称为x用户和z用户,C运行环境中包含的用户名称为x用户。则将A运行环境与B运行环境和C运行环境中的用户名称分别进行匹配。得到待同步用户为y用户以及z用户,y用户对应的待同步运行环境为B运行环境和C运行环境,z用户对应的待同步运行环境为C运行环境,即,在A运行环境、B运行环境以及C运行环境中,y用户以及z用户的信息不一致,需要将y用户的信息同步至C运行环境与C运行环境,以及将z用户的信息同步至C运行环境。
其他实施例中,所述匹配模块220可具体用于:
将所述多活***的第一运行环境中的用户信息与所述第一运行环境以外的其他运行环境中的用户信息进行对比;获取在每个运行环境中存在且不一致的用户信息;确定在每个运行环境中存在且不一致的用户信息对应的用户为待同步用户,根据待同步用户的指定信息确定待同步运行环境。
在本实施例中,确定信息存在于每个运行环境中的,但信息不完全一致的用户为待同步用户。
具体的,在实际应用中,获取到的不同运行环境中的存在的同一用户的信息可能一致,也可能不完全一致。例如,x用户的注册信息在A运行环境中与B运行环境中都存在,且x用户的注册信息在A运行环境中与在B运行环境中不尽相同。则此时,该x用户的信息在不同的运行环境中不一致,确定x用户为待同步用户。
上述指定信息用于作为确定待同步运行环境的基准。具体的,待同步用户的指定信息可以为待同步用户的数据录入方,或者未待同步数据的数据大小,或者待同步数据的注册时间的先后等信息。待同步用户的指定信息还可以为上述信息的结合或者是其他上述未提及的信息。
例如,在A运行环境中,x用户的注册时间为6月,且6月产生了与用户相关的其他操作性数据,而在B运行环境中,x用户的注册时间3月,同时在B运行环境中,在3-6月并与该用户相关的其他操作性数据,则确定待同步用户x的待同步运行环境为B环境,即A运行环境中x用户的信息与B运行环境中x用户的信息不完全一致,需将x用户的信息同步至B运行环境中。
同步模块230,用于模拟所述待同步用户在所述待同步运行环境中注册。
具体的,可通过预先开发好的SDK(Software Development Kit,软件开发工具包)接口程序完成模拟注册。
在具体实现时,可以通过SDK接口程序访问多活***中每一个待同步运 行环境,并在该待同步运行环境下注册对应的待同步用户。
例如,该SDK接口程序可以包括Cognos(康格诺)接口应用等。通过Cognos接口应用访问异地多活体系架构的Cognos***中每一个待同步运行环境,并在该待同步运行环境下模拟待同步用户进行注册。此时,在异地多活体系架构的Cognos***的每套运行环境中,都有了同样的用户的相关信息。
模拟用户注册时,用户的注册信息是用户在***中的基本信息,此时,在多活***的各个环境中都有了用户的基本信息。
可选的,在本申请另一实施例中,本申请所述的方法还可包括进程获取模块和第二触发模块。具体的:
进程获取模块,用于获取所述多活***的运行中进程;
第二触发模块,用于当所述运行中进程的数量低于预设进程数量和/或所述运行中进程不包含指定进程时,触发所述同步模块模拟所述待同步用户在所述待同步运行环境中注册。
在本实施例中,可以仅当***当前运行的进程数量较少,或者没有指定进程时,才触发同步模块230执行操作,使得模拟用户注册的操作可以快速进行,同时并不影响***当前的其他各项任务运行。
在本申请的其他实施例中,在对多活***每个运行环境的用户基础数据进行同步以后,使得用户再次通过负载均衡器登录任意运行环境时,该运行环境中都存在该用户的信息,即只要用户注册过,在此通过负载均衡器登录任意运行环境时,都可以登陆成功,并且可以执行操作。
例如,在对多活体系架构的Cogons***的用户进行模拟注册之后,可以在任意运行环境中创建每个用户的概要(profile)文件,该profile文件可以作为各用户的报表数据同步的基础(例如,通过profile文件将该用户的报表数据进行同步),从而实现为用户的其他数据在不同运行环境之间同步时提供依据的目的。
本申请提供的用户信息同步装置通过获取模块获取多活***中每个运行环境的用户信息;匹配模块将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境;同步模块模拟所述待同步用户在所述待同步运行环境中注册。由于获取了待同步用户与对应的待同步用户环境,并且模拟了待同步用户在对应的待同步运行环境中注册,因此在待同步运行环境中也有了待同步用户的注册信息,可以在异地多活***中保持用户基础信息的一致性。同时,也有利于用户基础信息以外的其他信息进行同步,使得在异地多活***中用户数据可以保持一致。
上述以软件功能模块的形式实现的集成的单元,可以存储在一个非易失性可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的部分步骤。
如图3所示,图3是本申请实现用户信息同步方法的较佳实施例的计算机装置的结构示意图。所述计算机装置包括至少一个发送装置31、至少一个存储器32、至少一个处理器33、至少一个接收装置34以及至少一个通信总线。其中,所述通信总线用于实现这些组件之间的连接通信。
所述计算机装置是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。所述计算机装置还可包括网络设备和/或用户设备。其中,所述网络设备包括但不限于单个网络服务器、多个网络服务器组成的服务器组或基于云计算(Cloud Computing)的由大量主机或网络服务器构成的云,其中,云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。
所述计算机装置可以是,但不限于任何一种可与用户通过键盘、触摸板或声控设备等方式进行人机交互的电子产品。
所述计算机装置所处的网络包括,但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。
其中,所述接收装置34和所述发送装置31可以是有线发送端口,也可以为无线设备,例如包括天线装置,用于与其他设备进行数据通信。
所述存储器32用于存储程序代码。所述存储器32可以是集成电路中没有实物形式的具有存储功能的电路,如RAM(Random-Access Memory,随机存取存储器)、FIFO(First In First Out,先入先出)存储器等。或者,所述存储器32也可以是具有实物形式的存储器,如内存条、TF卡(Trans-flash Card)、智能媒体卡(smart media card)、安全数字卡(secure digital card)、快闪存储器卡(flash card)等储存设备等等。
所述处理器33可以包括一个或者多个微处理器、数字处理器。所述处理器33可调用存储器32中存储的程序代码以执行相关的功能。例如,图3中所述的各个单元是存储在所述存储器32中的程序代码,并由所述处理器33所执行,以实现一种用户信息同步方法。所述处理器33又称中央处理器(CPU,Central Processing Unit),是一块超大规模的集成电路,是运算核心(Core)和控制核心(Control Unit)。
在本申请所提供的几个实施例中,应该理解到,所揭露的***,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。***权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。
Claims (20)
- 一种用户信息同步方法,其特征在于,所述方法包括:获取多活***中每个运行环境的用户信息;将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境;模拟所述待同步用户在所述待同步运行环境中注册。
- 如权利要求1所述的方法,其特征在于,所述方法还包括:获取所述多活***的日志信息;若所述日志信息包含用户登陆失败的信息,执行所述获取多活***中每个运行环境的用户信息的步骤。
- 如权利要求1所述的方法,其特征在于,所述方法还包括:获取所述多活***的运行中进程;当所述运行中进程的数量低于预设进程数量和/或所述运行中进程不包含指定进程时,执行所述获取多活***中每个运行环境的用户信息的步骤;或者当所述运行中进程的数量低于预设进程数量和/或所述运行中进程不包含指定进程时,执行所述模拟所述待同步用户在所述待同步运行环境中注册的步骤。
- 如权利要求3所述的方法,其特征在于,所述预设进程数量和/或所述指定进程根据所述多活***的硬件资源确定。
- 如权利要求1至4中任一项所述的方法,其特征在于,所述将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境包括:将所述多活***的第一运行环境中的用户信息与所述第一运行环境以外的其他运行环境中的用户信息进行对比;当第一运行环境中的第一用户的信息没有在所述其他运行环境中都存在时,确定所述第一用户为待同步用户,确定不存在所述第一用户的信息的运行环境为待同步运行环境。
- 如权利要求1至4中任一项所述的方法,其特征在于,所述将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境包括:将所述多活***的第一运行环境中的用户信息与所述第一运行环境以外的其他运行环境中的用户信息进行对比;获取在每个运行环境中存在且不一致的用户信息;确定在每个运行环境中存在且不一致的用户信息对应的用户为待同步用户,根据待同步用户的指定信息确定待同步运行环境。
- 如权利要求1至4中任一项所述的方法,其特征在于,所述方法还包 括:获取所述多活***的***时间;根据所述***时间确定是否执行所述获取多活***中每个运行环境的用户信息的步骤。
- 一种用户信息同步装置,其特征在于,所述装置包括:获取模块,用于获取多活***中每个运行环境的用户信息;匹配模块,用于将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境;同步模块,用于模拟所述待同步用户在所述待同步运行环境中注册。
- 一种计算机装置,其特征在于,所述计算机装置包括存储器及处理器,所述存储器用于存储至少一个指令,所述处理器用于执行所述至少一个指令以实现以下步骤:获取多活***中每个运行环境的用户信息;将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境;模拟所述待同步用户在所述待同步运行环境中注册。
- 如权利要求9所述的计算机装置,其特征在于,所述处理器还用于执行所述至少一个指令以实现以下步骤:获取所述多活***的日志信息;若所述日志信息包含用户登陆失败的信息,执行所述获取多活***中每个运行环境的用户信息的步骤。
- 如权利要求9所述的计算机装置,其特征在于,所述处理器还用于执行所述至少一个指令以实现以下步骤:获取所述多活***的运行中进程;当所述运行中进程的数量低于预设进程数量和/或所述运行中进程不包含指定进程时,执行所述获取多活***中每个运行环境的用户信息的步骤;或者当所述运行中进程的数量低于预设进程数量和/或所述运行中进程不包含指定进程时,执行所述模拟所述待同步用户在所述待同步运行环境中注册的步骤。
- 如权利要求9至11中任一项所述的计算机装置,其特征在于,所述将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境包括:将所述多活***的第一运行环境中的用户信息与所述第一运行环境以外的其他运行环境中的用户信息进行对比;当第一运行环境中的第一用户的信息没有在所述其他运行环境中都存在时,确定所述第一用户为待同步用户,确定不存在所述第一用户的信息的运行环境为待同步运行环境。
- 如权利要求9至11中任一项所述的计算机装置,其特征在于,所述 将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境包括:将所述多活***的第一运行环境中的用户信息与所述第一运行环境以外的其他运行环境中的用户信息进行对比;获取在每个运行环境中存在且不一致的用户信息;确定在每个运行环境中存在且不一致的用户信息对应的用户为待同步用户,根据待同步用户的指定信息确定待同步运行环境。
- 如权利要求9至11中任一项所述的计算机装置,其特征在于,所述处理器还用于执行所述至少一个指令以实现以下步骤:获取所述多活***的***时间;根据所述***时间确定是否执行所述获取多活***中每个运行环境的用户信息的步骤。
- 一种非易失性可读存储介质,其上存储有计算机指令,其特征在于,所述计算机指令被处理器执行时实现以下步骤:获取多活***中每个运行环境的用户信息;将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境;模拟所述待同步用户在所述待同步运行环境中注册。
- 如权利要求15所述的存储介质,其特征在于,所述计算机指令被处理器执行时实现以下步骤:获取所述多活***的日志信息;若所述日志信息包含用户登陆失败的信息,执行所述获取多活***中每个运行环境的用户信息的步骤。
- 如权利要求15所述的存储介质,其特征在于,所述计算机指令被处理器执行时实现以下步骤:获取所述多活***的运行中进程;当所述运行中进程的数量低于预设进程数量和/或所述运行中进程不包含指定进程时,执行所述获取多活***中每个运行环境的用户信息的步骤;或者当所述运行中进程的数量低于预设进程数量和/或所述运行中进程不包含指定进程时,执行所述模拟所述待同步用户在所述待同步运行环境中注册的步骤。
- 如权利要求15至17中任一项所述的存储介质,其特征在于,所述将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境包括:将所述多活***的第一运行环境中的用户信息与所述第一运行环境以外的其他运行环境中的用户信息进行对比;当第一运行环境中的第一用户的信息没有在所述其他运行环境中都存在时,确定所述第一用户为待同步用户,确定不存在所述第一用户的信息的运 行环境为待同步运行环境。
- 如权利要求15至17中任一项所述的存储介质,其特征在于,所述将获取到的不同运行环境中的用户信息进行匹配,得到待同步用户以及待同步用户对应的待同步运行环境包括:将所述多活***的第一运行环境中的用户信息与所述第一运行环境以外的其他运行环境中的用户信息进行对比;获取在每个运行环境中存在且不一致的用户信息;确定在每个运行环境中存在且不一致的用户信息对应的用户为待同步用户,根据待同步用户的指定信息确定待同步运行环境。
- 如权利要求15至17中任一项所述的存储介质,其特征在于,所述计算机指令被处理器执行时实现以下步骤:获取所述多活***的***时间;根据所述***时间确定是否执行所述获取多活***中每个运行环境的用户信息的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810368075.3A CN108551484B (zh) | 2018-04-23 | 2018-04-23 | 用户信息同步方法、装置、计算机装置及存储介质 |
CN201810368075.3 | 2018-04-23 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019205345A1 true WO2019205345A1 (zh) | 2019-10-31 |
Family
ID=63512030
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/099774 WO2019205345A1 (zh) | 2018-04-23 | 2018-08-10 | 用户信息同步方法、装置、计算机装置及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108551484B (zh) |
WO (1) | WO2019205345A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116820624B (zh) * | 2023-08-29 | 2023-12-01 | 阿里健康科技(中国)有限公司 | 操作指令的发送方法、处理方法、装置、设备和介质 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106802790A (zh) * | 2015-11-26 | 2017-06-06 | 华为技术有限公司 | 基于云平台的应用用户使用信息管理的方法、设备及*** |
CN107453872A (zh) * | 2017-06-27 | 2017-12-08 | 北京溢思得瑞智能科技研究院有限公司 | 一种基于Mesos容器云平台的统一安全认证方法及*** |
US20180018380A1 (en) * | 2016-07-18 | 2018-01-18 | Hewlett Packard Enterprise Development Lp | Maintaining Consistent Subscriber Data on Geo-Redundant Subscriber Databases |
Family Cites Families (7)
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 |
WO2012166944A2 (en) * | 2011-06-03 | 2012-12-06 | Uc Group Limited | Systems and methods for registration, validation, and monitoring of users over multiple websites |
US9131475B2 (en) * | 2013-06-27 | 2015-09-08 | Qualcomm Incorporated | Fast acquisition in multi-subscriber identity module (SIM) devices |
US10127060B2 (en) * | 2013-08-16 | 2018-11-13 | Intuitive Surgical Operations, Inc. | System and method for replay of data and events provided by heterogeneous devices |
CN106980625B (zh) * | 2016-01-18 | 2020-08-04 | 阿里巴巴集团控股有限公司 | 一种数据同步方法、装置及*** |
CN106254094B (zh) * | 2016-07-19 | 2019-08-13 | ***股份有限公司 | 一种数据同步方法及*** |
CN107391314A (zh) * | 2017-07-31 | 2017-11-24 | 郑州云海信息技术有限公司 | 一种支持双活的数据一致性保持方法与装置 |
-
2018
- 2018-04-23 CN CN201810368075.3A patent/CN108551484B/zh active Active
- 2018-08-10 WO PCT/CN2018/099774 patent/WO2019205345A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106802790A (zh) * | 2015-11-26 | 2017-06-06 | 华为技术有限公司 | 基于云平台的应用用户使用信息管理的方法、设备及*** |
US20180018380A1 (en) * | 2016-07-18 | 2018-01-18 | Hewlett Packard Enterprise Development Lp | Maintaining Consistent Subscriber Data on Geo-Redundant Subscriber Databases |
CN107453872A (zh) * | 2017-06-27 | 2017-12-08 | 北京溢思得瑞智能科技研究院有限公司 | 一种基于Mesos容器云平台的统一安全认证方法及*** |
Also Published As
Publication number | Publication date |
---|---|
CN108551484B (zh) | 2021-04-20 |
CN108551484A (zh) | 2018-09-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10917457B2 (en) | Command processing in distributed computing systems | |
US11615115B2 (en) | Systems and methods for managing distributed database deployments | |
US10713280B2 (en) | Systems and methods for managing distributed database deployments | |
US11544288B2 (en) | Systems and methods for managing distributed database deployments | |
US10740353B2 (en) | Systems and methods for managing distributed database deployments | |
US11321348B2 (en) | Provisioning and managing replicated data instances | |
CN110737442A (zh) | 一种边缘应用管理方法及*** | |
CN112119374A (zh) | 使用替代服务器名称选择性地提供相互传输层安全 | |
CN110622129A (zh) | 使用软件容器用于加速数据分析应用程序开发和部署的各方面的方法、***和门户 | |
US10404613B1 (en) | Placement of control and data plane resources | |
WO2016037479A1 (zh) | 虚拟化网络功能vnf优化方法、装置及*** | |
US9910745B1 (en) | Unified data layer backup system | |
CN112104723A (zh) | 一种多集群的数据处理***及方法 | |
US11269728B2 (en) | Scalable multi-framework multi-tenant lifecycle management of deep learning applications | |
US11360825B2 (en) | Systems and methods for service resource allocation and deployment | |
US11196547B2 (en) | Scalable multi-framework multi-tenant lifecycle management of deep learning applications | |
US11799839B2 (en) | Cross-regional replication of keys | |
CN112214351A (zh) | 备份数据的恢复方法和装置、电子设备和存储介质 | |
CN106972962A (zh) | 高可用集群的配置方法、装置及*** | |
WO2019205345A1 (zh) | 用户信息同步方法、装置、计算机装置及存储介质 | |
US9612927B1 (en) | Managing server processes with proxy files | |
US10880150B1 (en) | Node-indexed system, apparatus and method configured to sequence client events within a peer-to-peer network | |
US12050505B2 (en) | Systems and methods for automatically applying configuration changes to computing clusters | |
US20230236911A1 (en) | Systems and methods for automatically applying configuration changes to computing clusters | |
CN117608921A (zh) | 云数据库的备份方法、恢复方法及相关设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18916168 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18916168 Country of ref document: EP Kind code of ref document: A1 |