CN112561449B - Method and system for synchronizing inventory information - Google Patents
Method and system for synchronizing inventory information Download PDFInfo
- Publication number
- CN112561449B CN112561449B CN202011563067.8A CN202011563067A CN112561449B CN 112561449 B CN112561449 B CN 112561449B CN 202011563067 A CN202011563067 A CN 202011563067A CN 112561449 B CN112561449 B CN 112561449B
- Authority
- CN
- China
- Prior art keywords
- server
- authentication request
- request information
- synchronized
- target user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/087—Inventory or stock management, e.g. order filling, procurement or balancing against orders
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/45—Structures or tools for the administration of authentication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/547—Messaging middleware
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2151—Time stamp
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Economics (AREA)
- Entrepreneurship & Innovation (AREA)
- Human Resources & Organizations (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- General Business, Economics & Management (AREA)
- Operations Research (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Storage Device Security (AREA)
Abstract
The invention relates to a method and a system for synchronizing inventory information, which comprises a second server receiving an authentication request sent by a target user, the second server performing a first encryption processing on the authentication request information through a private key and then sending a first processing result to a first server; the first server carries out first decryption processing on the first processing result through the public key to obtain a second processing result, and when the second authentication request information is consistent with the second processing result, the target user is confirmed to pass authentication; and when the authentication is passed, the first server determines the updating data of the target entity to be synchronized according to the second authentication request information, synchronizes the updating data of the target entity to be synchronized to the Redis server, and the second server updates the data information by reading the Redis server. The invention realizes the purpose of providing accurate inventory and price information for customers. Meanwhile, the stock information of the first server does not need to be exported every day during sales, so that the working efficiency is improved, and the experience of customers is improved.
Description
Technical Field
The invention relates to the field of servers, in particular to a method and a system for synchronizing inventory information.
Background
At present, in the electronic component industry, medium and small enterprises generally use ERP software to manage purchase, sale and inventory, and simultaneously use SaaS electronic market application, wherein the SaaS electronic market provides a simple inventory management module, and inventory information in the ERP exported every day needs to be sold and imported into the inventory management module. However, since the data of each electronic component in the ERP also changes at any time due to the existence of the transaction time, the information in the inventory module may be deviated. When customers consult, the inventory and price information of the electronic components searched in the inventory management module is inaccurate, and the credit of merchants and electronic markets is influenced. In addition, the stock information of the first server needs to be guided out every day for sale, and then is arranged and guided into the stock module of the electronic market according to the template applied by the electronic market, so that time and labor are consumed.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method and a system for synchronizing inventory information aiming at the defects of the prior art.
The technical scheme for solving the technical problems is as follows:
a method of inventory information synchronization, the method comprising:
the second server receives an authentication request sent by a target user, wherein the authentication request comprises authentication request information of the target user requesting authentication;
the second server generates a private key of the target user according to the first authentication request information of the target user, and sends a first processing result to the first server after the authentication request information is subjected to first encryption processing through the private key;
the first server receives second authentication request information input by the target user, determines a public key of the target user according to the authentication request information, performs first decryption processing on the first processing result through the public key to obtain a second processing result, and confirms that the target user passes authentication when the second authentication request information is consistent with the second processing result;
when the authentication is passed, the first server determines the update data of the target entity to be synchronized according to the second authentication request information, and synchronizes the update data of the target entity to be synchronized to a Redis server, and the second server updates data information by reading the Redis server.
The method has the beneficial effects that: the method comprises the steps that a second server receives an authentication request sent by a target user, the second server generates a private key, after first encryption processing is carried out on the authentication request information according to the private key, a first processing result is sent to a first server, the first server receives second authentication request information input by the target user, a public key of the target user is determined according to the authentication request information, first decryption processing is carried out on the first processing result through the public key, a second processing result is obtained, when the second authentication request information is consistent with the second processing result, the target user is confirmed to pass authentication, when the authentication passes, the first server determines updating data of the target entity to be synchronized according to the authentication request information and synchronizes the updating data of the target entity to be synchronized to a Redis server, the second server updates data information by reading the Redis server, accurate inventory and price information is provided to the client when the client consults is realized. Meanwhile, the inventory information of the first server is not required to be exported every day during sales, and then the inventory information is sorted according to the template applied to the electronic market and imported into the inventory module of the electronic market, so that the working efficiency is improved, and the experience of customers is improved.
On the basis of the technical scheme, the invention can be further improved as follows.
Further, the first server determines, according to the authentication request information, update data of a target entity to be synchronized, and synchronizes the update data of the target entity to be synchronized to a Redis server, and the second server updates data information by reading the Redis server, which specifically includes:
the first server generates an authentication token of the target user based on the authentication request information;
when the data of the target entity corresponding to the target user in the first server is changed and the authentication token of the target user is within the validity period, synchronizing the update data of the target entity to be synchronized into the Redis server and updating a first timestamp of the Redis server;
the second server reads a first time stamp of the Redis server according to a preset time interval, extracts the updated data of the target entity to be synchronized in the Redis server between the first time stamp and a second time stamp according to the first time stamp and the second time stamp of data updating of the second server, and sends the updated data to the second server.
The beneficial effect of adopting the above further scheme is: the first server generates an authentication token of a target user based on authentication request information, when data of a target entity corresponding to the target user in the first server is changed and the authentication token of the target user is within a validity period, update data of the target entity to be synchronized are synchronized to the Redis server, a first timestamp of the Redis server is updated, the second server reads the first timestamp of the Redis server according to a preset time interval, the first timestamp is extracted between the first timestamp and a second timestamp according to the first timestamp and a second timestamp updated by data of the second server, the update data of the target entity to be synchronized in the Redis server are updated to the second server, and the efficiency of data synchronization is improved.
Further, after the second server performs the first encryption processing on the authentication request information according to the private key, the second server sends a first processing result to the first server, which specifically includes:
the second server performs first hash calculation on the first authentication request information to obtain a first calculation result;
and calling the private key to encrypt the first calculation result to obtain the first processing result.
The beneficial effect of adopting the further scheme is that: and a private key is generated through the second server, and the authentication request information is subjected to first encryption processing according to the private key, so that the data security is improved.
Further, the first server performs a first decryption process on the first processing result through the public key to obtain a second processing result, which specifically includes:
the first server performs second hash calculation on the second authentication request information to obtain a second calculation result;
and calling the public key to decrypt the second calculation result to obtain the second processing result.
Further, after the first server determines the update data of the target entity to be synchronized according to the authentication request information and synchronizes the update data of the target entity to be synchronized to the Redis server, the method further includes:
the first server acquires a log record of data update of the target entity to be synchronized in the Redis server;
judging whether the Redis server successfully receives the update data of the target entity to be synchronized;
if not, storing the update data of the target entity to be synchronized in a message queue, and sequentially synchronizing the update data of the target entity to be synchronized in the Redis server when performing next data synchronization.
Another technical solution of the present invention for solving the above technical problems is as follows:
a system for inventory information synchronization, the system comprising:
the second server is used for receiving an authentication request sent by a target user, wherein the authentication request comprises authentication request information of the target user requesting authentication;
the second server is used for generating a private key of the target user according to the first authentication request information of the target user, performing first encryption processing on the authentication request information through the private key, and then sending a first processing result to the first server;
the first server is used for receiving second authentication request information input by the target user, determining a public key of the target user according to the authentication request information, performing first decryption processing on the first processing result through the public key to obtain a second processing result, and confirming that the target user passes authentication when the second authentication request information is consistent with the second processing result;
when the authentication is passed, the first server is used for determining the update data of the target entity to be synchronized according to the authentication request information and synchronizing the update data of the target entity to be synchronized into a Redis server;
and the second server is used for updating the data information by reading the Redis server.
The beneficial effects of the system are as follows: the system for synchronizing the inventory information is provided, an authentication request sent by a target user is received by a second server, the second server generates a private key, the authentication request information is subjected to first encryption processing according to the private key and then sent to a first server, the first server receives second authentication request information input by the target user and determines a public key of the target user according to the authentication request information, the first processing result is subjected to first decryption processing through the public key to obtain a second processing result, when the second authentication request information is consistent with the second processing result, the target user is confirmed to pass authentication, when the authentication passes, the first server determines the updating data of the target entity to be synchronized according to the authentication request information and synchronizes the updating data of the target entity to be synchronized to a Redis server, the second server updates data information by reading the Redis server, accurate inventory and price information is provided to the client when the client consults is realized. Meanwhile, the inventory information of the first server is not required to be exported every day during sales, and then the inventory information is sorted according to the template applied to the electronic market and imported into the inventory module of the electronic market, so that the working efficiency is improved, and the experience of customers is improved.
Further, the first server is specifically configured to generate an authentication token of the target user based on the authentication request information;
when the data of the target entity corresponding to the target user in the first server is changed and the authentication token of the target user is within the validity period, synchronizing the update data of the target entity to be synchronized into the Redis server and updating a first timestamp of the Redis server;
the second server is specifically configured to read a first timestamp of the Redis server according to a preset time interval, and extract, according to the first timestamp and a second timestamp of data update of the second server, update data of the target entity to be synchronized in the Redis server between the first timestamp and the second timestamp to the second server.
Further, the second server is specifically configured to perform a first hash calculation on the first authentication request information to obtain a first calculation result;
and calling the private key to encrypt the first calculation result to obtain the first processing result.
Further, the first server is specifically configured to perform a second hash calculation on the second authentication request information by the first server to obtain a second calculation result;
and calling the public key to decrypt the second calculation result to obtain the second processing result.
Further, the first server is specifically configured to obtain a log record of data update of the target entity to be synchronized in the Redis server;
judging whether the Redis server successfully receives the update data of the target entity to be synchronized;
if not, storing the update data of the target entity to be synchronized in a message queue, and sequentially synchronizing the update data of the target entity to be synchronized in the Redis server when performing next data synchronization.
Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention or in the description of the prior art will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for synchronizing inventory information according to an embodiment of the present invention;
fig. 2 is a block diagram of a system for synchronizing inventory information according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
As shown in fig. 1, which is a schematic flow chart of a method for synchronizing inventory information according to an embodiment of the present invention, the method for synchronizing inventory information includes:
110. and the second server receives an authentication request sent by the target user, wherein the authentication request comprises authentication request information of the target user requesting authentication.
120. And the second server generates a private key of the target user according to the first authentication request information of the target user, and sends a first processing result to the first server after the authentication request information is subjected to first encryption processing through the private key.
130. And the first server receives second authentication request information input by the target user, determines a public key of the target user according to the authentication request information, performs first decryption processing on the first processing result through the public key to obtain a second processing result, and confirms that the target user passes authentication when the second authentication request information is consistent with the second processing result.
140. When the authentication is passed, the first server determines the update data of the target entity to be synchronized according to the second authentication request information, and synchronizes the update data of the target entity to be synchronized to a Redis server, and the second server updates data information by reading the Redis server.
It should be understood that in this embodiment, the first server is a server loaded with an ERP system or other inventory management software, and the second server may be a server loaded with inventory management software.
Further, step 140 specifically includes:
141. the first server generates an authentication token of the target user based on the authentication request information.
142. When the data of the target entity corresponding to the target user in the first server is changed and the authentication token of the target user is within the validity period, synchronizing the update data of the target entity to be synchronized to the Redis server, and updating the first timestamp of the Redis server.
143. The second server reads a first time stamp of the Redis server according to a preset time interval, extracts the updated data of the target entity to be synchronized in the Redis server between the first time stamp and a second time stamp according to the first time stamp and the second time stamp of data updating of the second server, and sends the updated data to the second server.
Further, step 120 specifically includes:
and the second server performs first hash calculation on the first authentication request information to obtain a first calculation result.
And calling the private key to encrypt the first calculation result to obtain the first processing result.
Further, step 130 specifically includes:
and the first server performs second hash calculation on the second authentication request information to obtain a second calculation result.
And calling the public key to decrypt the second calculation result to obtain the second processing result.
Further, or, the step 140 specifically includes:
the first server acquires a log record of data update of the target entity to be synchronized in the Redis server.
And judging whether the Redis server successfully receives the update data of the target entity to be synchronized.
If not, storing the update data of the target entity to be synchronized in a message queue, and sequentially synchronizing the update data of the target entity to be synchronized in the Redis server when performing next data synchronization.
Another technical solution of the present invention for solving the above technical problems is as follows:
a system for inventory information synchronization, the system comprising:
the second server is used for receiving an authentication request sent by a target user, wherein the authentication request comprises authentication request information of the target user requesting authentication;
the second server is used for generating a private key of the target user according to the first authentication request information of the target user, performing first encryption processing on the authentication request information through the private key, and then sending a first processing result to the first server;
the first server is used for receiving second authentication request information input by the target user, determining a public key of the target user according to the authentication request information, performing first decryption processing on the first processing result through the public key to obtain a second processing result, and confirming that the target user passes authentication when the second authentication request information is consistent with the second processing result;
when the authentication is passed, the first server is used for determining the update data of the target entity to be synchronized according to the authentication request information and synchronizing the update data of the target entity to be synchronized to a Redis server;
and the second server is used for updating the data information by reading the Redis server.
Further, the first server is specifically configured to generate an authentication token of the target user based on the authentication request information;
when the data of the target entity corresponding to the target user in the first server is changed and the authentication token of the target user is within the validity period, synchronizing the update data of the target entity to be synchronized into the Redis server and updating a first timestamp of the Redis server;
the second server is specifically configured to read a first timestamp of the Redis server according to a preset time interval, and extract, according to the first timestamp and a second timestamp of data update of the second server, update data of the target entity to be synchronized in the Redis server between the first timestamp and the second timestamp to the second server.
The second server is specifically configured to perform a first hash calculation on the first authentication request information to obtain a first calculation result;
and calling the private key to encrypt the first calculation result to obtain the first processing result.
Further, the first server is specifically configured to perform a second hash calculation on the second authentication request information by the first server to obtain a second calculation result;
and calling the public key to decrypt the second calculation result to obtain the second processing result.
Further, the first server is specifically configured to obtain a log record of data update of the target entity to be synchronized in the Redis server;
judging whether the Redis server successfully receives the update data of the target entity to be synchronized;
if not, storing the update data of the target entity to be synchronized in a message queue, and sequentially synchronizing the update data of the target entity to be synchronized in the Redis server when performing next data synchronization.
It should be understood that, for convenience and brevity of description, only the division of the above-mentioned functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules as required, that is, the internal structure of the apparatus may be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal system and method can be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal system are merely illustrative, and for example, the division of the modules or units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A method for synchronizing inventory information, the method comprising:
the method comprises the steps that a second server receives a first authentication request sent by a target user, wherein the first authentication request comprises first authentication request information of the target user requesting authentication;
the second server generates a private key of the target user according to the first authentication request information of the target user, and sends a first processing result to the first server after first encryption processing is carried out on the first authentication request information through the private key;
the first server receives second authentication request information input by the target user, determines a public key of the target user according to the second authentication request information, performs first decryption processing on the first processing result through the public key to obtain a second processing result, and determines that the target user passes authentication when the second authentication request information is consistent with the second processing result;
when the authentication is passed, the first server determines the update data of the target entity to be synchronized according to the second authentication request information, and synchronizes the update data of the target entity to be synchronized to a Redis server, and the second server updates data information by reading the Redis server.
2. The method according to claim 1, wherein the first server determines, according to the second authentication request information, update data of a target entity to be synchronized, and synchronizes the update data of the target entity to be synchronized to a Redis server, and the second server updates data information by reading the Redis server, specifically including:
the first server generates an authentication token of the target user based on the second authentication request information;
when the data of the target entity corresponding to the target user in the first server is changed and the authentication token of the target user is within the validity period, synchronizing the update data of the target entity to be synchronized into the Redis server and updating a first timestamp of the Redis server;
the second server reads a first time stamp of the Redis server according to a preset time interval, extracts the updated data of the target entity to be synchronized in the Redis server between the first time stamp and a second time stamp according to the first time stamp and the second time stamp of data updating of the second server, and sends the updated data to the second server.
3. The method for synchronizing the inventory information according to claim 1, wherein the second server performs a first encryption process on the first authentication request information according to the private key, and then sends a first processing result to the first server, specifically including:
the second server performs first hash calculation on the first authentication request information to obtain a first calculation result;
and calling the private key to encrypt the first calculation result to obtain the first processing result.
4. The method for synchronizing inventory information according to claim 3, wherein the first server performs a first decryption process on the first processing result through the public key to obtain a second processing result, specifically comprising:
the first server performs second hash calculation on the second authentication request information to obtain a second calculation result;
and calling the public key to decrypt the second calculation result to obtain the second processing result.
5. The method for synchronizing the inventory information according to claim 1, wherein after the first server determines the update data of the target entity to be synchronized according to the second authentication request information and synchronizes the update data of the target entity to be synchronized to a Redis server, the method further comprises:
the first server acquires a log record of data update of the target entity to be synchronized in the Redis server;
judging whether the Redis server successfully receives the update data of the target entity to be synchronized;
if not, storing the update data of the target entity to be synchronized in a message queue, and sequentially synchronizing the update data of the target entity to be synchronized in the Redis server when performing next data synchronization.
6. A system for synchronizing inventory information, the system comprising:
the second server is used for receiving a first authentication request sent by a target user, wherein the first authentication request comprises first authentication request information of the target user requesting authentication;
the second server is used for generating a private key of the target user according to the first authentication request information of the target user, performing first encryption processing on the first authentication request information through the private key, and then sending a first processing result to the first server;
the first server is used for receiving second authentication request information input by the target user, determining a public key of the target user according to the second authentication request information, performing first decryption processing on the first processing result through the public key to obtain a second processing result, and confirming that the target user passes authentication when the second authentication request information is consistent with the second processing result;
when the authentication is passed, the first server is used for determining the update data of the target entity to be synchronized according to the authentication request information and synchronizing the update data of the target entity to be synchronized into a Redis server;
and the second server is used for updating the data information by reading the Redis server.
7. The system for synchronizing inventory information according to claim 6, wherein:
the first server is specifically configured to generate an authentication token of the target user based on the second authentication request information;
when the data of the target entity corresponding to the target user in the first server is changed and the authentication token of the target user is within the validity period, synchronizing the update data of the target entity to be synchronized into the Redis server and updating a first timestamp of the Redis server;
the second server is specifically configured to read a first timestamp of the Redis server according to a preset time interval, and extract, according to the first timestamp and a second timestamp of data update of the second server, update data of the target entity to be synchronized in the Redis server between the first timestamp and the second timestamp to the second server.
8. The system for synchronizing inventory information according to claim 6, wherein:
the second server is specifically configured to perform a first hash calculation on the first authentication request information to obtain a first calculation result;
and calling the private key to encrypt the first calculation result to obtain the first processing result.
9. The system for synchronizing inventory information of claim 8, wherein:
the first server is specifically configured to perform a second hash calculation on the second authentication request information by the first server to obtain a second calculation result;
and calling the public key to decrypt the second calculation result to obtain the second processing result.
10. The system for synchronizing inventory information according to claim 6, wherein:
the first server is specifically configured to obtain a log record of data update of the target entity to be synchronized in the Redis server;
judging whether the Redis server successfully receives the update data of the target entity to be synchronized;
if not, storing the update data of the target entity to be synchronized in a message queue, and sequentially synchronizing the update data of the target entity to be synchronized in the Redis server when performing next data synchronization.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011563067.8A CN112561449B (en) | 2020-12-25 | 2020-12-25 | Method and system for synchronizing inventory information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011563067.8A CN112561449B (en) | 2020-12-25 | 2020-12-25 | Method and system for synchronizing inventory information |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112561449A CN112561449A (en) | 2021-03-26 |
CN112561449B true CN112561449B (en) | 2022-05-10 |
Family
ID=75032813
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011563067.8A Active CN112561449B (en) | 2020-12-25 | 2020-12-25 | Method and system for synchronizing inventory information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112561449B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114553895B (en) * | 2022-04-24 | 2022-07-22 | 浙江中控技术股份有限公司 | Data synchronization method, system, storage medium and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108418874A (en) * | 2018-02-12 | 2018-08-17 | 平安科技(深圳)有限公司 | Guiding method, device, computer equipment and storage medium are returned across wide area network data |
CN109800272A (en) * | 2019-02-25 | 2019-05-24 | 广州虎牙信息科技有限公司 | Data cached synchronous method, server, application system and storage device |
CN110851290A (en) * | 2019-11-01 | 2020-02-28 | 香港乐蜜有限公司 | Data synchronization method and device, electronic equipment and storage medium |
CN111680955A (en) * | 2020-08-11 | 2020-09-18 | 南京云联数科科技有限公司 | Method, computing device, and computer storage medium for inventory information processing |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190066167A1 (en) * | 2011-02-04 | 2019-02-28 | Adstruc, Inc. | System to dynamically manage and optimize the utilization of outdoor advertising units |
-
2020
- 2020-12-25 CN CN202011563067.8A patent/CN112561449B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108418874A (en) * | 2018-02-12 | 2018-08-17 | 平安科技(深圳)有限公司 | Guiding method, device, computer equipment and storage medium are returned across wide area network data |
CN109800272A (en) * | 2019-02-25 | 2019-05-24 | 广州虎牙信息科技有限公司 | Data cached synchronous method, server, application system and storage device |
CN110851290A (en) * | 2019-11-01 | 2020-02-28 | 香港乐蜜有限公司 | Data synchronization method and device, electronic equipment and storage medium |
CN111680955A (en) * | 2020-08-11 | 2020-09-18 | 南京云联数科科技有限公司 | Method, computing device, and computer storage medium for inventory information processing |
Also Published As
Publication number | Publication date |
---|---|
CN112561449A (en) | 2021-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210192497A1 (en) | Methods, apparatus and computer program products for securely accessing account data | |
US12062039B2 (en) | Digital asset distribution by transaction device | |
US10007911B2 (en) | Methods for rapidly provisioning application functionality to a mobile communication device | |
US10007805B2 (en) | Forming a protected data field entry | |
US20200250630A1 (en) | Method, device, electric apparatus and terminal apparatus for confirming order delivery | |
US20070038579A1 (en) | System and method using order preserving hash | |
CN110490640B (en) | Method, device and system for object distribution processing | |
US9973926B2 (en) | Secure multi-channel communication system and method | |
KR20150029664A (en) | Payment gateway system using security code based on time stamp, and the operating method thereof | |
CN112561449B (en) | Method and system for synchronizing inventory information | |
CN110659899B (en) | Offline payment method, device and equipment | |
JP2018101189A (en) | Campaign application authentication device | |
WO2018212835A1 (en) | Portable device with local verification data | |
CN113821820B (en) | Method, device, medium and equipment for encrypting and decrypting resources in splitting mode | |
CN115065682A (en) | Product tracing full life cycle management system based on industrial internet identification analysis | |
JP7296723B2 (en) | Information processing device and method, and information processing system | |
WO2020071938A1 (en) | Method and system for flagging actions of a user for subsequent analysis and storage | |
CN110719264B (en) | Information processing method and device, electronic equipment and storage medium | |
CN115115367B (en) | Transaction information query method and device based on block chain and electronic equipment | |
CN112350975B (en) | Method and system for synchronizing product information | |
CN115953139A (en) | Salary generation auditing method, device, equipment and storage medium | |
CN114896430A (en) | Image data management method and device | |
CN117611157A (en) | Method, device, equipment and storage medium for updating smart card | |
KR20230078119A (en) | Nft management system apparatus which is able to encrypt and manage the original contents data, which is to be a subject to an nft, and the operating method thereof | |
CN112232791A (en) | Virtual resource source determination method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |