Information synchronization method and apparatus, electronic device, and storage medium

CN116756156BActive Publication Date: 2026-09-11BEIJING XISOUND TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310573585.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-19
Publication Date
2026-09-11
Estimated Expiration
2043-05-19

AI Technical Summary

Technical Problem

[0005]本发明提供一种信息同步方法、装置、电子设备及存储介质,用以解决现有技术中新数据库中的信息不全面的缺陷,实现了提高新数据库中信息的全面性的目的

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116756156B_ABST
    Figure CN116756156B_ABST
Patent Text Reader

Abstract

The application provides an information synchronization method and device, electronic equipment and storage medium, the method comprises the following steps: receiving a login instruction input by a user, wherein the login instruction comprises login information; determining whether a field value of a field related to the login information in a first database is empty, on the condition that the first database comprises the login information; searching for a second field value of a first target field related to the login information in a second database, on the condition that a first field value of the first target field in the first database is not empty; and adding the second field value to the field value corresponding to the first target field in the first database, on the condition that the first field value and the second field value are different. The information synchronization method and device, electronic equipment and storage medium provided by the application can improve the comprehensiveness of information in the first database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information processing technology, and in particular to an information synchronization method, apparatus, electronic device, and storage medium. Background Technology

[0002] As applications (Apps) or mini-programs are continuously iterated and upgraded, their accompanying databases also need to be upgraded and updated accordingly. In existing technologies, when upgrading an application, a new database is usually built to address issues where the application cannot be used due to mismatches in data structure or baseline schema in the historical database.

[0003] Currently, after building a new database, information from the previous database is usually used to refresh the information in the new database, so that the application or mini-program can identify the relevant information of registered users based on the information in the new database.

[0004] However, the above information synchronization method may cause the original information in the new database to be lost, resulting in incomplete information in the new database after synchronization. Summary of the Invention

[0005] This invention provides an information synchronization method, apparatus, electronic device, and storage medium to address the shortcomings of incomplete information in existing new databases, thereby improving the comprehensiveness of information in new databases.

[0006] This invention provides an information synchronization method, comprising:

[0007] Receive a login command input by the user, wherein the login command includes login information;

[0008] If the login information is included in the first database, determine whether the field value of the field related to the login information in the first database is empty;

[0009] If the value of the first field of the first target field related to the login information in the first database is not empty, then search for the value of the second field of the first target field in the second database.

[0010] If the first field value and the second field value are different, the second field value is added to the field value corresponding to the first target field in the first database.

[0011] According to an information synchronization method provided by the present invention, adding the second field value to the field value corresponding to the first target field in the first database includes:

[0012] Determine the third-party platform identifier corresponding to the value of the second field;

[0013] The second field value is sent to the third-party platform corresponding to the third-party platform identifier, so that the third-party platform can determine the usage status of the second field value;

[0014] Receive the usage status sent by the third-party platform;

[0015] If the usage status is available, the second field value is added to the field value corresponding to the first target field in the first database.

[0016] According to an information synchronization method provided by the present invention, determining the third-party platform identifier corresponding to the second field value includes:

[0017] Extract the attribution information from the value of the second field;

[0018] The attribution information is input into the platform identification model to obtain the third-party platform identifier corresponding to the attribution information output by the platform identification model. The platform identification model is obtained by training an initial platform identification model based on at least two sample attribution information.

[0019] According to an information synchronization method provided by the present invention, the method further includes:

[0020] If the field value of the second target field related to the login information in the first database is empty, the field value of the second target field is searched in the second database, and the field value of the second target field found in the second database is added to the first database.

[0021] According to an information synchronization method provided by the present invention, the method further includes:

[0022] If the login information is not included in the first database, check in the second database whether the field value of the field related to the login information is empty;

[0023] If the field value of the field related to the login information in the second database is not empty, the field value of the field related to the login information in the second database is added to the first database.

[0024] According to an information synchronization method provided by the present invention, after adding the field value of the second target field to the first database, the method further includes:

[0025] Delete the field values ​​of all fields related to the login information in the second database.

[0026] According to an information synchronization method provided by the present invention, the method further includes:

[0027] If the field value of the second target field related to the login information in the first database and the field value of the second target field in the second database are both empty, add marker information to the second target field in the first database. The marker information indicates that the field value of the second target field in the second database is empty.

[0028] The present invention also provides an information synchronization device, comprising:

[0029] A receiving module is used to receive a login instruction input by a user, wherein the login instruction includes login information;

[0030] The determining module is used to determine whether the field value of a field related to the login information in the first database is empty, when the first database includes the login information.

[0031] The search module is used to search for the second field value of the first target field in the second database when the first field value of the first target field related to the login information in the first database is not empty;

[0032] An add module is used to add the second field value to the field value corresponding to the first target field in the first database when the first field value and the second field value are different.

[0033] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the information synchronization method described above.

[0034] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the information synchronization method as described above.

[0035] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the information synchronization method as described above.

[0036] The information synchronization method, apparatus, electronic device, and storage medium provided by this invention receive a login command input by a user, wherein the login command includes login information. If the login information is present in a first database, the method determines whether the field value of a field related to the login information in the first database is empty. If the first field value of a first target field related to the login information in the first database is not empty, the method finds the second field value of the first target field in a second database. If the two values ​​differ, the second field value is added to the corresponding field value of the first target field in the first database. This avoids the problem of synchronizing identical data, thus improving the efficiency of information synchronization. Furthermore, since the second field value of the first target field in the second database is added to the first database, instead of directly overwriting or refreshing, the original first field value in the first database is retained, and then added as another field value corresponding to the first target field. Therefore, the method achieves both information synchronization and preservation of the original information in the first database, avoiding information loss and making the information in the synchronized first database more comprehensive. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0038] Figure 1 This is one of the flowcharts illustrating the information synchronization method provided in this embodiment of the invention;

[0039] Figure 2 This is a second flowchart illustrating the information synchronization method provided in this embodiment of the invention;

[0040] Figure 3 This is the third flowchart illustrating the information synchronization method provided in this embodiment of the invention;

[0041] Figure 4 This is a schematic diagram of the information synchronization device provided in an embodiment of the present invention;

[0042] Figure 5 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0044] To better meet market demands, application or mini-program providers typically need to update their applications or mini-programs regularly or irregularly in order to improve user experience and thereby increase user retention rates.

[0045] However, when an application or mini-program is updated, the database is also updated. Specifically, existing technologies update the database by overwriting or refreshing the information in the new database with information from the historical database. This results in incomplete information in the synchronized new database, leading to the loss of information in the new database.

[0046] Furthermore, in certain scenarios, users need to retain information from both the historical and new databases. For example, if a user binds a new bank card account to the upgraded XX Wallet App, but other previously bound bank card accounts are still in use, it is necessary to retain information from both the new and historical databases to solve the problem of users being unable to use their previously bound bank card accounts normally. Therefore, there is an urgent need for an information synchronization method that does not lose information from either the new or historical databases.

[0047] To address the aforementioned problems, this invention provides an information synchronization method. By setting information in a historical database and information in a new database at different locations corresponding to the same information type, the information in the historical database is synchronized to the corresponding information in another location in the new database. This ensures that information synchronization is completed while preventing the loss of information in the new database, thereby improving the comprehensiveness of information in the new database.

[0048] The following is combined Figures 1-3 The information synchronization method provided in this embodiment of the invention is described below. This method can be applied to scenarios where information synchronization between the new and old databases is required after upgrading the database corresponding to an application or mini-program. Furthermore, the execution subject of this method can be a terminal device such as a mobile phone, computer, or PC.

[0049] Figure 1 This is one of the flowcharts illustrating the information synchronization method provided in the embodiments of the present invention, such as... Figure 1 As shown, the method includes:

[0050] Step 101: Receive the login command input by the user.

[0051] The login instructions include login information.

[0052] Specifically, the terminal device can respond to the user's input in the login account field of an application or mini-program, or the clicking of the login button, thereby obtaining the login command entered by the user. The login information can be a login account, mobile phone number, or ID card number, etc.

[0053] Step 102: If the first database includes login information, determine whether the field values ​​of the fields related to the login information in the first database are empty.

[0054] For example, taking a user entering a login command on an application as an example, after the terminal device receives the login command, it can search the first database to see if login information is included. If login information is included in the first database, it means that the user has previously registered in the first database. At this time, it will search the first database to see if there is any information related to the login information, that is, to determine whether the field values ​​of the fields related to the login information in the first database are empty. In addition, when a user enters a login command on a mini-program, it can search the first database for information related to the login information based on the login information and openid. Here, openid is used to identify the user. For each official account or mini-program, a secure openid is generated for each user. The official account or mini-program can store this openid so that the user's identity can be identified the next time they log in, or it can be bound to the user's original account in a third-party application.

[0055] The first target field related to login information can be understood as the information type name of the information related to login information. For example, when the login account is used as login information, the bank card account or email account bound to the login account can represent the first target field related to login information.

[0056] Step 103: If the value of the first field of the first target field related to login information in the first database is not empty, search for the value of the second field of the first target field in the second database.

[0057] Specifically, when it is determined that the first field value of the first target field related to login information in the first database is not empty, that is, when the first database stores information related to the login information, it indicates that the user has already registered. However, since the historical database may still contain information that the user is currently using, such as multiple bank card accounts linked to the user, it is necessary to continue searching for information corresponding to the first target field in the historical database, that is, to search for the second field value of the first target field in the second database. The second database is the historical database established before upgrading the application or mini-program.

[0058] Step 104: If the first field value and the second field value are different, add the second field value to the field value corresponding to the first target field in the first database.

[0059] Specifically, when it is found that the value of the second field of the first target field in the second database is different from the value of the first field of the first target field in the first database, it indicates that the value of the second field is likely also information that the logged-in user is using. Therefore, it cannot be simply replaced or refreshed, otherwise it will lead to the loss of information in one of the databases.

[0060] Therefore, when the field values ​​corresponding to the same field related to the login information differ between the new database and the historical database, the information in the historical database cannot be directly synchronized to the same field value corresponding to the same field in the new database (i.e., the first database). Instead, it is synchronized to a different field value corresponding to the same field in the new database to avoid information loss. It is important to note that when synchronizing information from the historical database to the new database, the old information does not directly replace the new information; both are retained. That is, while retaining the first field value in the first database, the second field value can be added to another field value corresponding to the first target field in the first database. In other words, both the first and second field values ​​are stored as field values ​​of the first target field in the first database, thus preventing information loss in the new database during synchronization.

[0061] For example, taking the bank card account bound to login account AA as the first target field, when bank card account AA is the first field value of the first target field in the first database, and bank card account BB is the second field value of the first target field in the second database, it means that the login user has bound two different bank card accounts. Therefore, in order to avoid losing the bank card accounts that the login user is still using normally, they need to be retained. For example, they can be retained in the way shown in Table 1 below.

[0062] Table 1

[0063]

[0064] The information synchronization method provided in this invention receives a login command input by a user, which includes login information. If the login information is present in a first database, the method determines whether the field value of a field related to the login information in the first database is empty. If the first field value of a first target field related to the login information in the first database is not empty, the method finds the second field value of the first target field in the second database. If the two values ​​differ, the second field value is added to the corresponding field value of the first target field in the first database. This avoids the problem of synchronizing identical data, thus improving the efficiency of information synchronization. Furthermore, since the second field value of the second target field in the first database is added to the first database, instead of directly overwriting or refreshing, it retains the original first field value in the first database and adds it as another field value corresponding to the first target field. Therefore, it achieves both information synchronization and preservation of the original information in the first database, avoiding information loss and making the information in the synchronized first database more comprehensive.

[0065] Furthermore, the specific process of adding the second field value to the field value corresponding to the first target field in the first database in step 104 of the above embodiment will be described in detail below.

[0066] Figure 2 This is a second flowchart illustrating the information synchronization method provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the method includes:

[0067] Step 201: Determine the third-party platform identifier corresponding to the value of the second field.

[0068] The third-party platform identifier can be understood as the entity or abbreviation of the entity to which the second field value belongs. For example, the third-party platform identifier for bank account 6214********8896 is **Bank; the third-party platform identifier for 213**45@qq.com is Tencent*, etc.

[0069] In one possible implementation, the third-party platform identifier corresponding to the second field value can be determined as follows: extract the attribution information from the second field value; input the attribution information into the platform identification model to obtain the third-party platform identifier corresponding to the attribution information output by the platform identification model, wherein the platform identification model is trained on an initial platform identification model based on attribution information from at least two samples.

[0070] Specifically, the attribution information can be understood as information used to identify which third-party platform it belongs to. For field value samples of different types, the attribution information of samples at different positions is extracted. For example, for bank account numbers, the first 4 characters are extracted, and for email addresses, the suffix characters are extracted. Further, based on the attribution information of these different samples, the initial platform recognition model is trained to obtain a platform recognition model applicable to field values of different types.

[0071] Thereby, after extracting the attribution information in the second field value, the attribution information can be input into the pre-trained platform recognition model, so as to obtain the third-party platform identifier output by the platform recognition model.

[0072] In this embodiment, by pre-training the platform recognition model for determining the third-party platform identifier corresponding to the field value, higher accuracy of the determined third-party platform identifier corresponding to the second field value can be achieved.

[0073] In another possible implementation, when determining the third-party platform identifier corresponding to the second field value, the third-party platform identifier corresponding to the second field value can be determined by looking up a preset third-party platform identifier lookup table. The third-party platform identifier lookup table is a plurality of lookup tables for different attribution information types, and the correspondence between each attribution information and their respective corresponding third-party platform identifiers is stored in the third-party platform identifier lookup table.

[0074] Wherein, the file name of the third-party platform identifier lookup table may be the attribution information type or a number representing the attribution information type.

[0075] Specifically, for field values of each attribution information type, a third-party platform identifier lookup table may be set, so that all attribution information and corresponding third-party platform identifiers are stored in each lookup table in the form of <attribution information, third-party platform identifier>, for example: <qq.com, Ten* Company>, <163.com, Net* Company>, <139.com, China Mob* Company>, etc., which will not be listed one by one here.

[0076] In this embodiment, by pre-setting the lookup table for looking up the third-party platform identifier corresponding to the field value, that is, establishing the mapping relationship between field values of different attribution information types and their corresponding third-party platform identifiers, when determining the third-party platform identifier corresponding to the second field value, the third-party platform identifier with higher accuracy can be quickly obtained.

[0077] Step 202: sending the second field value to the third-party platform corresponding to the third-party platform identifier, so that the third-party platform determines the use status of the second field value.

[0078] Furthermore, after obtaining the third-party platform identifier corresponding to the second field value, the second field value is sent to the third-party platform corresponding to the third-party platform identifier. For example, if the second field value is email address XX and the third-party platform identifier corresponding to the second field value is YY Company, the email address XX is sent to the server corresponding to YY Company via SMS query or website query to verify the validity of the email address XX, that is, whether the email address XX is currently available.

[0079] Step 203: Receive the usage status sent by the third-party platform.

[0080] Specifically, after finding the usage status of the second field value, the third-party platform will send the usage status to the terminal device.

[0081] Furthermore, if the terminal device does not receive the usage status from the third-party platform within the first preset time period, the terminal device will resend the second field value to the third-party platform until it receives the usage status from the third-party platform within the second preset time period. Alternatively, if the terminal device does not receive the usage status from the third-party platform within the first preset time period, the usage status of the second field value will be defaulted to unavailable.

[0082] Step 204: If the usage status is available, add the second field value to the field value corresponding to the first target field in the first database.

[0083] Specifically, when the usage status is "available," it means the second field value is valid information, and it needs to be added to the corresponding field value of the first target field in the first database. Conversely, if the usage status is "unavailable," it means the second field value is invalid information, that is, the second field value may have been deregistered. In this case, the second field value can be deleted from the second database to save storage space.

[0084] In this embodiment, by determining the third-party platform identifier corresponding to the second field value and sending the second field value to the third-party platform corresponding to the third-party platform identifier, if the usage status of the second field value is found to be available, that is, if the second field value is valid information, then the second field value is added to the field value corresponding to the first target field in the first database. This effectively avoids adding invalid information from the second database to the first database when adding the second field value, thereby improving the accuracy of information synchronization.

[0085] To further improve the accuracy and comprehensiveness of information synchronization, in Figure 1Based on the illustrated embodiment, information synchronization can also be performed in the following manner: if the field value of the second target field related to login information in the first database is empty, search for the field value of the second target field in the second database and add the field value of the second target field found in the second database to the first database.

[0086] Specifically, when the value of the second target field related to login information in the first database is empty (i.e., when there is a gap in the information related to login information in the first database), the value of the second target field is searched in the second database. If the value is found, it is added to the first database. This maximizes the accuracy of information synchronization without compromising the integrity of the information in the first database. For example, taking the bound email address as the second target field related to the login account "bb", if the value of the second target field in the first database is empty, but the value of the second target field in the second database is "email ZZ", it indicates that the logged-in user is logging into the upgraded application or mini-program for the first time, and therefore, information synchronization is required. Furthermore, performing information synchronization only when the value of the second target field in the first database is empty avoids the destruction of the integrity of the information in the first database due to the original information in the first database being overwritten by information in the second database during information synchronization, thus preventing information loss.

[0087] To further improve the accuracy of information synchronization, based on the above embodiments, if the first database does not contain login information, the field value of the field related to login information in the second database is checked to see if it is empty. If the field value of the field related to login information in the second database is not empty, the field value of the field related to login information in the second database is added to the first database.

[0088] Specifically, if a user is using the upgraded application or mini-program for the first time, their login information may not be available in the new database. In other words, the first database does not include login information. Therefore, it is necessary to continue searching for information related to their login information in the historical database to verify whether they are a registered user.

[0089] Furthermore, if there is information related to login information in the historical database, that is, if the field value of the field related to login information in the second database is not empty, it means that the user is a registered user, and the field value of the retrieved field related to login information needs to be added to the new database, that is, the first database.

[0090] For example, if there is no information related to the login information in the historical database, that is, if the field value of the field related to the login information in the second database is empty, the user is prompted that he / she is an unregistered user and given corresponding registration guidance to improve the user experience.

[0091] In this embodiment, when the first database does not contain login information (i.e., when the user uses the upgraded application or mini-program for the first time), the system checks whether the field value of the login information-related field in the second database is empty. If the field value of the login information-related field in the second database is not empty (i.e., the user is a registered user of the application or mini-program before the upgrade), the information of the user in the historical database is synchronized to the new database. That is, the field value of the login information-related field in the second database is added to the first database. In other words, the information synchronization operation is only performed when the data in the first database is empty, thereby further improving the accuracy of information synchronization.

[0092] Furthermore, based on the above embodiments, when both the field value of the second target field related to login information in the first database and the field value of the second target field in the second database are empty, the terminal device will repeatedly search for the field value of the second target field in the second database every time it receives a login command input by the user. This is an invalid search, resulting in wasted resources and reduced information synchronization efficiency. Therefore, the following approach can be taken: when both the field value of the second target field related to login information in the first database and the field value of the second target field in the second database are empty, add marker information to the second target field in the first database. The marker information indicates that the field value of the second target field in the second database is empty.

[0093] Specifically, during the initial information synchronization—that is, upon receiving the first login command input from the user—if the value of the second target field related to the login information in the first database is found, and the value of the second target field in both the first and second databases is empty, a marking operation is performed on the second target field in the second database to indicate that the field value of the second target field is empty. The marking can be a number or a letter, such as the number 0 or the letter 0. They all indicate the absence of something, and can also be graphic labels, such as... or This application does not impose specific restrictions on such matters.

[0094] In this embodiment, when both the field value of the second target field related to login information in the first database and the field value of the second target field in the second database are empty, a marker is added to the second target field in the first database to indicate that the field value of the second target field in the second database is empty. Therefore, during subsequent information synchronization, if the second target field includes the marker information, it can be determined that the corresponding field value does not exist in the second database, eliminating the need for further information searching and synchronization in the second database. This avoids resource waste and improves the efficiency of information synchronization.

[0095] Similarly, if the value of the second target field related to login information in the first database is empty, and the usage status of the second target field in the second database is unavailable, the second target field in the second database can also be marked. In this way, during subsequent login processes, there will be no need to search for data in the second database, thereby further improving the efficiency of information synchronization.

[0096] In addition, based on the above embodiments, after adding the field value of the second target field to the first database, the field values ​​of all fields related to login information in the second database can be deleted to reduce the search complexity during subsequent information synchronization. This also avoids the problem of reduced information synchronization efficiency due to synchronizing a large amount of duplicate data, thus improving the efficiency of information synchronization.

[0097] The following description uses a login application as an example to illustrate the application of the above embodiments. The login information is a mobile phone number, the first database is a new database, the second database is a historical database, and the field values ​​related to the login information are the user's name, ID type, and ID number.

[0098] Figure 3 This is the third flowchart illustrating the information synchronization method provided in this embodiment of the invention. Figure 3 As shown, the steps in the dashed box are related operations, which are used to distinguish the two different specific situations corresponding to the result of "no" in the last judgment box.

[0099] like Figure 3 As shown, firstly, the login command input by the user is received to determine whether the mobile phone number included in the login command exists in the new database. If the mobile phone number exists, it is necessary to further determine whether the user's name, ID type, and ID number associated with that mobile phone number exist in the new database. If not, the user information in the historical database is searched directly to determine whether the user's name, ID type, and ID number exist in the historical database. If they exist, it means that the user has already registered in the application before the upgrade, and only information synchronization is needed. Otherwise, the registration process is executed.

[0100] Furthermore, the steps for when a mobile phone number exists in the new database (i.e., the steps in the dashed box diagram on the left) are described. Specifically, as mentioned above, when a mobile phone number exists in the new database, it is further determined whether the user's name, ID type, and ID number related to that mobile phone number exist in the new database. If they exist, it means that the user does not need to search for relevant information in the historical database and can log in directly, i.e., the login process can be executed directly. Otherwise, it is necessary to search for the user's name, ID type, and ID number related to that mobile phone number in the historical database to determine whether the user's name, ID type, and ID number exist in the historical database. If they exist, it means that the user is logging into the application for the first time and information synchronization is required, i.e., the synchronization process is executed. Otherwise, it means that the user has already registered in the application before the upgrade, but only other information related to that mobile phone number, i.e., user's name, ID type, and ID number, has not been added. Therefore, it means that information synchronization is not required, and the login process can be executed directly.

[0101] This embodiment combines the situations described in the above embodiments, so that when a login command is received from a user, the information exchange between the new database and the historical database can be maximized, thereby maximizing the utilization of the information in the historical database and improving the utilization rate of the information in the historical database.

[0102] Optionally, the login application can be changed to a login mini-program, and the information search based on mobile phone number can be changed to information search based on mobile phone number + openid. This embodiment does not make specific requirements for this. In addition, for the specific implementation process of other steps, please refer to the foregoing embodiments, and will not be described in detail here.

[0103] The information synchronization device provided in the embodiments of the present invention is described below. The information synchronization device described below and the information synchronization method described above can be referred to each other.

[0104] Figure 4 This is a schematic diagram of the structure of the information synchronization device provided in the embodiments of the present invention, such as... Figure 4 As shown, the device includes:

[0105] The receiving module 410 is used to receive a login instruction input by the user, which includes login information;

[0106] The determination module 420 is used to determine whether the field values ​​of fields related to login information in the first database are empty, when the first database includes login information.

[0107] The lookup module 430 is used to look up the value of the second field of the first target field in the second database when the value of the first field of the first target field related to the login information in the first database is not empty.

[0108] Add module 440, which is used to add the second field value to the field value corresponding to the first target field in the first database when the first field value and the second field value are different.

[0109] The information synchronization device provided in this embodiment of the invention receives a login command input by a user through a receiving module 410. The login command includes login information. If the login information is present in a first database, a determining module 420 determines whether the field value of a field related to the login information in the first database is empty. If the first field value of a first target field related to the login information in the first database is not empty, a searching module 430 searches for the second field value of the first target field in a second database. If the two values ​​differ, an adding module 440 adds the second field value to the corresponding field value of the first target field in the first database. This avoids the problem of synchronizing identical data, thus improving the efficiency of information synchronization. Furthermore, since the second field value of the first target field in the second database is added to the first database, instead of directly overwriting or refreshing, the original first field value in the first database is retained before adding the other field value corresponding to the first target field. Therefore, the goal of both synchronizing information and preserving the original information in the first database is achieved, avoiding information loss and making the information in the synchronized first database more comprehensive.

[0110] Optionally, the adding module 440 is specifically used for:

[0111] Determine the third-party platform identifier corresponding to the value of the second field;

[0112] Send the second field value to the third-party platform corresponding to the third-party platform identifier so that the third-party platform can determine the usage status of the second field value;

[0113] Receive usage status information from third-party platforms;

[0114] If the usage status is available, add the second field value to the field value corresponding to the first target field in the first database.

[0115] Optionally, the adding module 440 includes:

[0116] The extraction unit is used to extract attribution information from the second field value;

[0117] The input unit is used to input the attribution information into the platform identification model to obtain the third-party platform identifier corresponding to the attribution information output by the platform identification model. The platform identification model is obtained by training the initial platform identification model based on attribution information from at least two samples.

[0118] Optionally, the search module 430 is further configured to search for the field value of the second target field in the second database when the field value of the second target field related to the login information in the first database is empty;

[0119] The adding module 440 is also used to add the field value of the second target field found in the second database to the first database.

[0120] Optionally, the search module 430 is further configured to search in the second database whether the field value of a field related to the login information is empty if the first database does not contain login information;

[0121] The adding module 440 is also used to add the field values ​​of the login information-related fields in the second database to the first database when the field values ​​of the fields related to login information in the second database are not empty.

[0122] Optionally, after adding the field value of the second target field to the first database, the information synchronization device further includes:

[0123] The delete module is used to delete the field values ​​of all fields related to login information in the second database.

[0124] Optionally, the adding module 440 is further configured to add marker information to the second target field in the first database when both the field value of the second target field related to login information in the first database and the field value of the second target field in the second database are empty. The marker information indicates that the field value of the second target field in the second database is empty.

[0125] The apparatus of this embodiment can be used to execute the method of any of the above-described information synchronization methods. Its specific implementation process and technical effects are similar to those of the above-described information synchronization methods. For details, please refer to the detailed description in the above-described information synchronization methods, which will not be repeated here.

[0126] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute the information synchronization method provided by the above methods. This method includes: receiving a login instruction input by a user, the login instruction including login information; if the first database includes login information, determining whether the field value of a field related to the login information in the first database is empty; if the first field value of a first target field related to the login information in the first database is not empty, searching for a second field value of the first target field in the second database; if the first field value and the second field value are different, adding the second field value to the field value corresponding to the first target field in the first database.

[0127] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0128] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the information synchronization method provided by the above methods. The method includes: receiving a login instruction input by a user, the login instruction including login information; if the login information is included in a first database, determining whether the field value of a field related to the login information in the first database is empty; if the first field value of a first target field related to the login information in the first database is not empty, searching for a second field value of the first target field in a second database; if the first field value and the second field value are different, adding the second field value to the field value corresponding to the first target field in the first database.

[0129] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the information synchronization method provided by the above methods. The method includes: receiving a login instruction input by a user, the login instruction including login information; if the login information is included in a first database, determining whether the field value of a field related to the login information in the first database is empty; if the first field value of a first target field related to the login information in the first database is not empty, searching for a second field value of the first target field in a second database; if the first field value and the second field value are different, adding the second field value to the field value corresponding to the first target field in the first database.

[0130] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0131] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An information synchronization method, characterized in that, include: Receive a login command input by a user into a target program, the login command including login information, the target program including an application or a mini-program; If the login information is included in the first database, determine whether the field value of the field related to the login information in the first database is empty; If the first field value of the first target field related to the login information in the first database is not empty, the second field value of the first target field is searched in the second database, which is a historical database established before the target program was upgraded. If the first field value and the second field value are different, the second field value is added to the field value corresponding to the first target field in the first database, while the first field value of the first target field in the first database is retained.

2. The information synchronization method according to claim 1, characterized in that, Adding the second field value to the field value corresponding to the first target field in the first database includes: Determine the third-party platform identifier corresponding to the value of the second field; The second field value is sent to the third-party platform corresponding to the third-party platform identifier, so that the third-party platform can determine the usage status of the second field value; Receive the usage status sent by the third-party platform; If the usage status is available, the second field value is added to the field value corresponding to the first target field in the first database.

3. The information synchronization method according to claim 2, characterized in that, The step of determining the third-party platform identifier corresponding to the second field value includes: Extract the attribution information from the value of the second field; The attribution information is input into the platform identification model to obtain the third-party platform identifier corresponding to the attribution information output by the platform identification model. The platform identification model is obtained by training an initial platform identification model based on at least two sample attribution information.

4. The information synchronization method according to claim 1, characterized in that, The method further includes: If the field value of the second target field related to the login information in the first database is empty, the field value of the second target field is searched in the second database, and the field value of the second target field found in the second database is added to the first database.

5. The information synchronization method according to any one of claims 1-4, characterized in that, The method further includes: If the login information is not included in the first database, check in the second database whether the field value of the field related to the login information is empty; If the field value of the field related to the login information in the second database is not empty, the field value of the field related to the login information in the second database is added to the first database.

6. The information synchronization method according to any one of claims 1-4, characterized in that, After adding the field value of the second target field to the first database, the method further includes: Delete the field values ​​of all fields related to the login information in the second database.

7. The information synchronization method according to any one of claims 1-4, characterized in that, The method further includes: If both the field value of the second target field related to the login information in the first database and the field value of the second target field in the second database are empty, add a marker to the second target field in the first database. The marker indicates that the field value of the second target field in the second database is empty.

8. An information synchronization device, characterized in that, include: A receiving module is used to receive a login instruction input by a user in a target program, wherein the login instruction includes login information, and the target program includes an application or a mini-program; The determining module is used to determine whether the field value of a field related to the login information in the first database is empty, when the first database includes the login information. The search module is used to search for the second field value of the first target field in the second database when the first field value of the first target field related to the login information in the first database is not empty. The second database is a historical database established before the target program is upgraded. The addition module is used to add the second field value to the field value corresponding to the first target field in the first database when the first field value and the second field value are different, while retaining the first field value of the first target field in the first database.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the information synchronization method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the information synchronization method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data synchronization method and device

    CN109829012A

  • Database reconciliation method and system

    US6496838B1