CN112015805B - User message synchronization method, device, server and computer storage medium - Google Patents

User message synchronization method, device, server and computer storage medium Download PDF

Info

Publication number
CN112015805B
CN112015805B CN201910458921.5A CN201910458921A CN112015805B CN 112015805 B CN112015805 B CN 112015805B CN 201910458921 A CN201910458921 A CN 201910458921A CN 112015805 B CN112015805 B CN 112015805B
Authority
CN
China
Prior art keywords
message
user
queue
temporary storage
storage area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910458921.5A
Other languages
Chinese (zh)
Other versions
CN112015805A (en
Inventor
康阳阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201910458921.5A priority Critical patent/CN112015805B/en
Publication of CN112015805A publication Critical patent/CN112015805A/en
Application granted granted Critical
Publication of CN112015805B publication Critical patent/CN112015805B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24578Query processing with adaptation to user needs using ranking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a user message synchronization method, a device, a server and a computer storage medium, wherein the method comprises the following steps: writing user information into a first user database, an information temporary storage area and an information queue; receiving a user message from the message queue, synchronizing the user message to a second user database; after receiving the user message from the message queue successfully, sending a response message to the message temporary storage area; deleting the user message corresponding to the response message in the message temporary storage area under the condition that the message temporary storage area receives the response message; when the user message in the message temporary storage area exceeds a first preset time, writing the user message into the message queue; therefore, all the user messages in the message queue can be synchronized to the second user database, and efficient information synchronization is realized.

Description

User message synchronization method, device, server and computer storage medium
Technical Field
The present application relates to the field of data processing, and in particular, to a method, an apparatus, a server, and a computer storage medium for synchronizing user messages.
Background
The existing user message synchronization system based on the message queue has the problems that the message queue is blocked due to a large amount of user messages to be processed, or the user messages in the message queue are not consumed for a long time and are removed, or the message queue Service system fails, so that the user messages are lost.
Disclosure of Invention
Embodiments of the present application provide a user message synchronization method, apparatus, server, and computer storage medium to solve at least one problem in the prior art.
In order to achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a user message synchronization method, where the method includes:
writing user information into a first user database, an information temporary storage area and an information queue;
receiving a user message from the message queue, synchronizing the user message to a second user database;
after receiving the user message from the message queue successfully, sending a response message to the message temporary storage area; deleting the user message corresponding to the response message in the message temporary storage area under the condition that the message temporary storage area receives the response message; and when the user message in the message temporary storage area exceeds a first preset time, writing the user message into the message queue.
Further, when the user message in the message temporary storage area exceeds a first preset time and before the user message is written into the message queue, the method further includes:
and when the user message in the message queue exceeds second preset time, deleting the user message from the message queue.
Further, the first preset time is greater than or equal to the second preset time.
Further, after receiving the user message from the message queue successfully, the sending a response message to the message buffer includes:
and after receiving the user message from the message queue, sending the response message to the message temporary storage area through the message queue.
In a second aspect, an embodiment of the present application provides a user message synchronization apparatus, where the apparatus includes:
the message writing unit is used for writing the user message into a first user database, a message temporary storage area and a message queue;
the message synchronization unit is used for receiving the user message from the message queue and synchronizing the user message to a second user database;
the message feedback unit is used for sending a response message to the message temporary storage area after the user message is successfully received from the message queue;
the message deleting unit is used for deleting the user message corresponding to the response message in the message temporary storage area under the condition that the message temporary storage area receives the response message;
and the first timing unit is used for writing the user message into the message queue when the user message in the message temporary storage area exceeds a first preset time.
Further, the apparatus further comprises:
and the second timing unit is used for deleting the user message from the message queue when the user message in the message queue exceeds second preset time.
Further, the first preset time is greater than or equal to the second preset time.
Further, the message feedback unit is further configured to send the response message to the message buffer via the message queue after receiving the user message from the message queue.
In a third aspect, an embodiment of the present application provides a server, where the server includes a network interface, a memory, and a processor; wherein the content of the first and second substances,
the network interface is configured to realize connection communication among the components;
the memory configured to store a computer program operable on the processor;
the processor is configured to perform the method of the first aspect when running the computer program.
In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a computer program, which when executed by at least one processor implements the method of the first aspect.
The user message synchronization method, the user message synchronization device, the server and the computer storage medium provided by the embodiment of the application write the user message into a first user database, a message temporary storage area and a message queue; receiving a user message from the message queue, synchronizing the user message to a second user database; after receiving the user message from the message queue successfully, sending a response message to the message temporary storage area; deleting the user message corresponding to the response message in the message temporary storage area under the condition that the message temporary storage area receives the response message; and when the user message in the message temporary storage area exceeds a first preset time, writing the user message into the message queue. Therefore, the condition that the user message is lost due to the failure of the message queue or the expiration of the user message in the message queue is avoided, all the user messages in the message queue can be ensured to be synchronized to the second user database, and the high-efficiency information synchronization is realized.
Drawings
Fig. 1 is a schematic view of an application scenario of a user message synchronization method according to an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating an implementation of a user message synchronization method according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating an implementation of another user message synchronization method according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating an implementation flow of a timeout mechanism of a message buffer in a user message synchronization method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a user message synchronization apparatus according to an embodiment of the present application;
fig. 6 is a schematic diagram of a specific hardware structure of a server according to an embodiment of the present application.
Detailed Description
So that the manner in which the features and elements of the present embodiments can be understood in detail, a more particular description of the embodiments, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings.
Fig. 1 is an application scenario of an exemplary user message synchronization method provided in an embodiment of the present application, and as shown in fig. 1, the synchronization system includes a user, a local API gateway, a local user message system, a third party API gateway, a third party user message system, and a third party service.
Step 1: a user initiates an API call request to a local API gateway, wherein the API call request comprises: access Key (AK), secret Key (SK), and user Signature (Signature) string.
And 2, step: the local API gateway inquires user credentials of an Access Key/Secret Key (AK/SK) from a local user message system. The Access Key is used for identifying a user, and the Secret Key is a Key used for encrypting a Signature (Signature) string and verifying the Signature string.
And 3, step 3: and the local user message system searches and returns an Access Secret corresponding to the Access Key according to the Access Key.
And 4, step 4: and the local API gateway verifies whether the user signature character string is correct or not according to the user signature character string carried in the API call request and the inquired AK/SK information.
And 5: and the local API gateway initiates an authentication request to the local user message system when the user signature character string passes the verification.
And 6: and the local user message system completes authentication and returns authentication information.
And 7: and performing data encapsulation conversion on the API call request so as to meet the data processing requirement of the third-party API gateway.
And 8: and the local API gateway forwards the processed API call request to a third party API gateway by routing.
And step 9: and after receiving the API call request, the third party API gateway acquires the user identification from the API call request and inquires user group information from a third party user message system.
Step 10: and the third party user message system returns user group information after inquiring the user group corresponding to the API call request.
Step 11: and inquiring AK/SK user credentials in a corresponding user group database according to the user group information.
Step 12: and the third party user message system searches and returns an Access Secret corresponding to the Access Key according to the Access Key of the user.
Step 13: and the third-party API gateway verifies whether the user signature character string is correct or not according to the user signature character string carried by the API calling request and the inquired AK/SK information.
Step 14: and the third party API gateway initiates an authentication request to the third party user message system when the user signature character string passes the verification.
Step 15: and the third-party user message system completes authentication and returns authentication information.
Step 16: and carrying out data preprocessing on the API call request so as to meet the data processing requirement of third-party service.
And step 17: the third party API gateway forwards the API call request to the third party service.
Step 18: and the third party service processes the API call request.
Step 19: and the third-party service returns the processing result of the API call request to the third-party API gateway.
Step 20: and the third party API gateway performs data post-processing on the API call request result.
Step 21: and the third party API gateway forwards the processed API call request result to the local API gateway by routing.
Step 22: and the local API gateway performs data conversion and encapsulation on the API call request result so as to meet the data processing requirement of a local user system.
Step 23: and the local API gateway sends the API calling request and the processed API calling request result to the user.
The technical solution in the embodiment of the present application may be applied to the application scenario shown in fig. 1, but is not limited to the application scenario shown in fig. 1, and the technical solution in the embodiment of the present application may be applied to any other suitable application scenario for data synchronization of a third-party user system.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Fig. 2 is a schematic view illustrating an implementation flow of a user message synchronization method according to an embodiment of the present application, where the method mainly includes the following steps:
step 210: user information is written into a first user database, an information temporary storage area and an information queue.
In the embodiment of the present application, a user message is written into a first user database, where the user message includes: and the user information management module registers, changes, deletes and other operation information. When the user performs operations such as registration, change, deletion and the like, the first user database is subjected to relevant read-write operations according to the operation information such as user registration, change, deletion and the like, and the operation information such as user registration, change, deletion and the like is synchronously written into the message temporary storage area and the message queue. Wherein the first user database may be a local user database.
Step 220: receiving a user message from the message queue, synchronizing the user message to a second user database.
Step 230: and after the user message is successfully received from the message queue, sending a response message to the message temporary storage area.
In this embodiment of the present application, the receiving the user message from the message queue, and synchronizing the user message to a second user database, specifically, a message receiving module in a third-party user message system receives the user message from the message queue, and the message receiving module analyzes the received user message, and performs a related read-write operation on the second user database according to an analysis result. And the message receiving module sends a response message to the message queue when successfully receiving the user message in the message queue. And the message queue sends the response message to a message temporary storage area. The response message includes: a feedback message that the corresponding user message is successfully received, and identification information of the corresponding user message. Wherein the second user database may be a third party user database.
Step 240: and deleting the user message corresponding to the response message in the message temporary storage area under the condition that the message temporary storage area receives the response message.
In the embodiment of the present application, after receiving the response message sent by the message queue, the message buffer searches for the user message corresponding to the response message according to the response message, and deletes the user message corresponding to the response message in the message buffer.
Step 250: and when the user message in the message temporary storage area exceeds a first preset time, writing the user message into the message queue.
In the embodiment of the application, when the user message in the message temporary storage area exceeds the first preset time, the timer in the message temporary storage area triggers the timeout instruction of the message temporary storage area, and the timeout instruction of the message temporary storage area is that the message temporary storage area sends the user message which is stored by the message temporary storage area and exceeds the first preset time to the message queue.
In the embodiment of the application, when the user message in the message queue exceeds a second preset time, a timer in the message queue triggers an overtime instruction of the message queue, and the overtime instruction of the message queue deletes the user message which is stored by the message queue and exceeds the second preset time.
And the first preset time is more than or equal to the second preset time. Therefore, when the user messages in the message queue are not received, synchronized and deleted, the timer in the message temporary storage region triggers an instruction for overtime user messages stored in the message temporary storage region to be written into the message queue again after being overtime, and the above circulation can avoid that the user messages which are not synchronized are deleted due to message queue faults or the user messages in the message queue are overtime, so that the user messages in the message queue can be completely synchronized to the second user database.
It should be noted that, the user messages in the message buffer and the message queue both have time labels, and a timer and an timeout mechanism are both provided in the message buffer and the message queue.
The user message synchronization method comprises the steps of writing user messages into a first user database, a message temporary storage area and a message queue; receiving a user message from the message queue, synchronizing the user message to a second user database; after receiving the user message from the message queue successfully, sending a response message to the message temporary storage area; deleting the user message corresponding to the response message in the message temporary storage area under the condition that the message temporary storage area receives the response message; and when the user message in the message temporary storage area exceeds a first preset time, writing the user message into the message queue. Therefore, the condition that the user message is deleted due to the failure of the message queue or the expiration of the user message in the message queue is avoided, the user messages in the message queue can be ensured to be all synchronized to the second user database, and the high-efficiency information synchronization is realized.
Fig. 3 is a schematic flow chart illustrating an implementation of another user message synchronization method according to an embodiment of the present application, where the method mainly includes the following steps:
step 310: the user message is written to a first user database.
Step 320: and synchronously writing the user message into a message temporary storage area and a message queue.
In this embodiment of the present application, step 320, synchronously writing the user message into the message buffer and the message queue includes:
step 321: and synchronously writing the user message into the message temporary storage area.
Step 322: and synchronously writing the user message into the message queue.
In an embodiment of the present application, a user message is written in a first user database, where the user message includes: and the user information management module registers, changes, deletes and other operation information. When the user performs operations such as registration, change, deletion and the like, the first user database is subjected to relevant read-write operations according to the operation information such as user registration, change, deletion and the like, and the operation information such as user registration, change, deletion and the like is synchronously written into the message temporary storage area and the message queue. Wherein the first user database may be a local user database.
Step 330: and the message receiving module receives the user message in the message queue.
Step 340: and the message receiving module writes the analyzed user message into a second user database.
Step 350: and the message receiving module sends a response message to the message queue.
Step 360: and the message queue sends the response message to a message temporary storage area.
In the embodiment of the application, a message receiving module in a third-party user message system receives the user message from the message queue, and the message receiving module analyzes the received user message and performs related read-write operation on the second user database according to the analysis result. And the message receiving module sends a response message to the message queue when successfully receiving the user message in the message queue. And the message queue sends the response message to a message temporary storage area. The response message includes: a feedback message that the corresponding user message is successfully received, and identification information of the corresponding user message. Wherein the second user database may be a third party user database.
In the embodiment of the present application, the message temporary storage region receives a response message sent by the message queue, searches for a user message corresponding to the response message according to the response message, and deletes the user message corresponding to the response message in the message temporary storage region.
Step 370: and the message temporary storage area writes the overtime user message into the message queue.
In the embodiment of the application, when the user message in the message temporary storage area exceeds the first preset time, the timer in the message temporary storage area triggers the timeout instruction of the message temporary storage area, and the timeout instruction of the message temporary storage area is that the message temporary storage area sends the user message which is stored by the message temporary storage area and exceeds the first preset time to the message queue.
In the embodiment of the application, when the user message in the message queue exceeds a second preset time, a timer in the message queue triggers an overtime instruction of the message queue, and the overtime instruction of the message queue deletes the user message which is stored by the message queue and exceeds the second preset time.
And the first preset time is more than or equal to the second preset time. Therefore, when the user messages in the message queue are not received, synchronized and deleted, the timer in the message temporary storage region triggers an instruction for overtime user messages stored in the message temporary storage region to be written into the message queue again, and the above circulation can avoid that the user messages which are not synchronized are deleted due to message queue faults or user message expiration in the message queue, so that the user messages in the message queue can be all synchronized to the second user database.
It should be noted that the user messages in the message buffer and the message queue both have time tags, and a timer and an timeout mechanism are both provided in the message buffer and the message queue.
The user message synchronization method comprises the steps of writing user messages into a first user database, a message temporary storage area and a message queue; receiving a user message from the message queue, synchronizing the user message to a second user database; after receiving user information from the information queue successfully, sending a response message to the information temporary storage area; deleting the user message corresponding to the response message in the message temporary storage area under the condition that the message temporary storage area receives the response message; and when the user message in the message temporary storage area exceeds a first preset time, writing the user message into the message queue. Therefore, the condition that the user message is deleted due to the fact that the message queue is in failure or the user message in the message queue is overtime is avoided, the fact that all the user messages in the message queue can be synchronized to the second user database is guaranteed, and efficient information synchronization is achieved.
Fig. 4 is a schematic diagram illustrating an implementation flow of a timeout mechanism of a message buffer in a user message synchronization method according to an embodiment of the present application, where the method mainly includes the following steps:
step 410: and synchronously writing the user message into the message buffer and the message queue.
In this embodiment of the present application, a user message is synchronously written into a message buffer and a message queue, where the user message includes: and the user message management module is used for managing the user registration, change, deletion and other operation information.
Step 420: after receiving the user message, the message buffer judges whether a response message is received, and if the response message is received, the process goes to step 430; if no reply message is received, proceed to step 440.
Step 430: and deleting the user message corresponding to the response message from the message temporary storage area.
Step 440: the message buffer waits for the reply message.
In the embodiment of the application, after receiving the user message, the message temporary storage area judges whether a response message is received, if so, searches the user message corresponding to the response message according to the response message, and deletes the user message corresponding to the response message in the message temporary storage area; and if the message temporary storage area does not receive the response message, not operating and waiting for the response message.
Step 450: judging whether the user message in the message temporary storage area exceeds a first preset time, if so, turning to step 460; if the first predetermined time is not exceeded, the process proceeds to step 440.
Step 460: and rewriting the user message exceeding the first preset time into the message queue.
In the embodiment of the application, whether the user message in the message temporary storage area exceeds a first preset time is judged, and if the user message in the message temporary storage area exceeds the first preset time, the message temporary storage area rewrites the user message which is stored in the message temporary storage area and exceeds the first preset time into the message queue; and if the user message in the message temporary storage area does not exceed the first preset time, not operating and waiting for the response message.
Step 470b: a message receiving module receives a user message from the message queue.
Step 480b: and the message receiving module sends a response message to the message queue.
Step 490b: and the message queue sends the response message to the message temporary storage area.
In this embodiment, the message receiving module receives the user message from the message queue, specifically, the message receiving module in the third-party user message system receives the user message from the message queue, and the message receiving module analyzes the received user message and performs a related read-write operation on the second user database according to an analysis result. And the message receiving module sends a response message to the message queue when successfully receiving the user message in the message queue. And the message queue sends the response message to a message temporary storage area. The response message includes: the feedback information that the corresponding user information is successfully received, and the identification information of the corresponding user information. Wherein the second user database may be a third party user database.
In the embodiment of the present application, the user messages in the message buffer and the message queue both have time tags, and a timer and an timeout mechanism are both disposed in the message buffer and the message queue. When the user message in the message temporary storage area exceeds a first preset time, a timer in the message temporary storage area triggers an overtime instruction of the message temporary storage area, and the overtime instruction of the message temporary storage area is that the message temporary storage area sends the user message which is stored by the message temporary storage area and exceeds the first preset time to the message queue. When the user message in the message queue exceeds second preset time, a timer in the message queue triggers an overtime instruction of the message queue, and the overtime instruction of the message queue deletes the user message which exceeds the second preset time and is stored by the message queue.
And the first preset time is more than or equal to the second preset time. Therefore, when the user messages in the message queue are not received, synchronized and deleted, the timer in the message temporary storage region triggers an instruction for overtime user messages stored in the message temporary storage region to be written into the message queue again, and the above circulation can avoid that the user messages which are not synchronized are deleted due to message queue faults or user message expiration in the message queue, so that the user messages in the message queue can be all synchronized to the second user database.
It should be noted that steps 410-460 in this embodiment are implemented by a timeout mechanism in the message buffer. Steps 470b-490b are the synchronization process of the user messages in the message queue. Steps 410-460 and 470b-490b in this embodiment are not in obvious sequence, and may be performed simultaneously.
The user message synchronization method comprises the steps of writing user messages into a first user database, a message temporary storage area and a message queue; receiving a user message from the message queue, synchronizing the user message to a second user database; after receiving the user message from the message queue successfully, sending a response message to the message temporary storage area; deleting the user message corresponding to the response message in the message temporary storage area under the condition that the message temporary storage area receives the response message; and when the user message in the message temporary storage area exceeds a first preset time, writing the user message into the message queue. Therefore, the condition that the user message is deleted due to the failure of the message queue or the expiration of the user message in the message queue is avoided, the user messages in the message queue can be ensured to be all synchronized to the second user database, and the high-efficiency information synchronization is realized.
Based on the same technical concept of the foregoing user message synchronization method, an embodiment of the present application provides a user message synchronization apparatus, and fig. 5 is a schematic structural diagram of the user message synchronization apparatus provided in the embodiment of the present application, as shown in fig. 5, the user message synchronization apparatus 500 includes:
a message writing unit 501, configured to write a user message into a first user database, a message buffer and a message queue;
a message synchronization unit 502, configured to receive a user message from the message queue, and synchronize the user message to a second user database;
a message feedback unit 503, configured to send a response message to the message buffer after the user message is successfully received from the message queue;
a message deleting unit 504, configured to delete the user message corresponding to the response message in the message buffer when the message buffer receives the response message;
a first timing unit 505, configured to write the user message into the message queue when the user message in the message buffer exceeds a first preset time.
In other embodiments, the apparatus further comprises:
a second timing unit 506, configured to delete the user message from the message queue when the user message in the message queue exceeds a second preset time.
In other embodiments, the first preset time is greater than or equal to the second preset time.
In other embodiments, the message feedback unit 503 is further configured to send the response message to the message buffer via the message queue after receiving the user message from the message queue.
The components in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware or a form of a software functional module.
Based on the understanding that the technical solutions of the embodiments of the present application, in essence or a part contributing to the prior art, or all or part of the technical solutions may be embodied in the form of a software product, which is stored in a computer storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned computer storage media include: a U-disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Accordingly, embodiments of the present application provide a computer storage medium storing a computer program, which when executed by at least one processor implements the steps of the above embodiments.
Referring to fig. 6, a specific hardware structure of a server 600 provided in an embodiment of the present application is shown, including: a network interface 601, a memory 602, and a processor 603; the various components are coupled together by a bus system 604. It is understood that the bus system 604 is used to enable communications among the components. The bus system 604 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are identified in fig. 6 as the bus system 604. Wherein the content of the first and second substances,
the network interface 601 is configured to receive and transmit signals during information transmission and reception with other external network elements;
a memory 602 for storing a computer program capable of running on the processor 603;
a processor 603 for, when running the computer program, performing:
writing user information into a first user database, an information temporary storage area and an information queue;
receiving a user message from the message queue, synchronizing the user message to a second user database;
after receiving the user message from the message queue successfully, sending a response message to the message temporary storage area;
deleting the user message corresponding to the response message in the message temporary storage area under the condition that the message temporary storage area receives the response message;
and when the user message in the message temporary storage area exceeds a first preset time, writing the user message into the message queue.
The processor 603 is further configured to, when running the computer program, perform:
and when the user message in the message queue exceeds second preset time, deleting the user message from the message queue.
The processor 603 is further configured to, when running the computer program, perform:
the first preset time is greater than or equal to the second preset time.
The processor 603 is further configured to, when running the computer program, perform:
and after receiving the user message from the message queue, sending the response message to the message temporary storage area through the message queue.
It will be appreciated that the memory 602 in the subject embodiment can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM) which serves as an external cache. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), enhanced Synchronous SDRAM (ESDRAM), sync Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 602 of the methodologies described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
And the processor 603 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 603. The Processor 603 may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may reside in ram, flash memory, rom, prom, or eprom, registers, among other computer storage media that are well known in the art. The computer storage medium is located in the memory 602, and the processor 603 reads the information in the memory 602, and combines the hardware to complete the steps of the above method.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not imply any order of execution, and the order of execution of the processes should be determined by their functions and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. The above-described device embodiments are merely illustrative, for example, the division of the unit is only one logical functional division, and other division ways may be implemented in practice, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
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 multiple 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, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit. Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided herein may be combined in any combination to arrive at a new method or apparatus embodiment without conflict.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (6)

1. A method for synchronizing user messages, the method comprising:
writing user information into a first user database, an information temporary storage area and an information queue;
receiving a user message from the message queue, synchronizing the user message to a second user database;
after receiving user information from the information queue successfully, sending a response message to the information temporary storage area; deleting the user message corresponding to the response message in the message temporary storage area under the condition that the message temporary storage area receives the response message; deleting the user message from the message queue when the user message in the message queue exceeds a second preset time; and when the user message in the message temporary storage area exceeds a first preset time, writing the user message into the message queue, wherein the first preset time is more than or equal to a second preset time.
2. The method of claim 1, wherein said sending a response message to said message buffer after successfully receiving a user message from said message queue comprises:
and after receiving the user message from the message queue, sending the response message to the message temporary storage area through the message queue.
3. A user message synchronization apparatus, the apparatus comprising:
the message writing unit is used for writing the user message into the first user database, the message temporary storage area and the message queue;
a message synchronization unit, configured to receive a user message from the message queue, and synchronize the user message to a second user database;
the message feedback unit is used for sending a response message to the message temporary storage area after the user message is successfully received from the message queue;
the message deleting unit is used for deleting the user message corresponding to the response message in the message temporary storage area under the condition that the message temporary storage area receives the response message;
the second timing unit is used for deleting the user message from the message queue when the user message in the message queue exceeds second preset time;
and the first timing unit is used for writing the user message into the message queue when the user message in the message temporary storage area exceeds a first preset time, wherein the first preset time is more than or equal to a second preset time.
4. The apparatus of claim 3,
the message feedback unit is further configured to send the response message to the message buffer via the message queue after receiving the user message from the message queue.
5. A server, comprising a network interface, a memory, and a processor; wherein the content of the first and second substances,
the network interface is configured to realize connection communication among the components;
the memory configured to store a computer program operable on the processor;
the processor, when executing the computer program, is configured to perform the method of any of claims 1 or 2.
6. A computer storage medium, characterized in that the computer storage medium stores a computer program which, when executed by at least one processor, implements the method according to any one of claims 1 or 2.
CN201910458921.5A 2019-05-29 2019-05-29 User message synchronization method, device, server and computer storage medium Active CN112015805B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910458921.5A CN112015805B (en) 2019-05-29 2019-05-29 User message synchronization method, device, server and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910458921.5A CN112015805B (en) 2019-05-29 2019-05-29 User message synchronization method, device, server and computer storage medium

Publications (2)

Publication Number Publication Date
CN112015805A CN112015805A (en) 2020-12-01
CN112015805B true CN112015805B (en) 2022-12-13

Family

ID=73501825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910458921.5A Active CN112015805B (en) 2019-05-29 2019-05-29 User message synchronization method, device, server and computer storage medium

Country Status (1)

Country Link
CN (1) CN112015805B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112929431B (en) * 2021-02-01 2022-12-20 深圳市科漫达智能管理科技有限公司 Message synchronous and asynchronous response conversion method and device based on micro-service framework

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989123A (en) * 2015-02-13 2016-10-05 阿里巴巴集团控股有限公司 Data synchronization method, apparatus and system
CN109271265A (en) * 2018-09-29 2019-01-25 平安科技(深圳)有限公司 Request processing method, device, equipment and storage medium based on message queue

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989123A (en) * 2015-02-13 2016-10-05 阿里巴巴集团控股有限公司 Data synchronization method, apparatus and system
CN109271265A (en) * 2018-09-29 2019-01-25 平安科技(深圳)有限公司 Request processing method, device, equipment and storage medium based on message queue

Also Published As

Publication number Publication date
CN112015805A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
US10440111B2 (en) Application execution program, application execution method, and information processing terminal device that executes application
US8910139B2 (en) Method for processing firmware based on firmware over the air technology, apparatus, and system
US20170139778A1 (en) Relay apparatus, relay method, and computer program product
US9198031B2 (en) Managing distribution of software updates in near field communication (NFC) mobile devices
US10104063B2 (en) Android-based mobile equipment security protection method, and device
WO2019237797A1 (en) Data backup method and apparatus
US9883386B2 (en) Method and a server for managing profiles
US20040064517A1 (en) Synchronization message processing method
CN109361525B (en) Method, device, control terminal and medium for restarting distributed deployment of multiple services
JP6359652B2 (en) Information transmission method, apparatus and device
US11099889B2 (en) Method-call-chain tracking method, electronic device, and computer readable storage medium
US8244213B2 (en) Communication device and method for managing service sharing
US20210342557A1 (en) Passive near field communication (nfc) device, method and system
US20230247007A1 (en) Quic transport protocol-based communication method and system
CN112686358A (en) Data transmission method, NFC electronic tag, terminal device and storage medium
CN112714158A (en) Transaction processing method, relay network, cross-link gateway, system, medium, and device
CN112015805B (en) User message synchronization method, device, server and computer storage medium
US8793651B2 (en) Remote card content management using synchronous server-side scripting
CN110719590A (en) One-key login method, device, equipment and storage medium based on mobile phone number
WO2016112793A1 (en) Method for concurrence of multiple service sessions, and system thereof
CN110830479B (en) Multi-card-based one-key login method, device, equipment and storage medium
CN111327680A (en) Authentication data synchronization method, device, system, computer equipment and storage medium
US6832336B2 (en) Method and apparatus for maintaining consistent data
US20210234686A1 (en) Information processing device, information processing method, and storage medium
CN109375966B (en) Method, device and equipment for initializing node and storage 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