An instant messaging system address book management method, device and storage medium
By employing persistent database storage and caching-based interactive updates in the instant messaging system, the problem of untimely updates to the client's address book was solved, improving the system's response and data processing efficiency.
Patent Information
- Application Number
- CN202411536737.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2044-10-31
AI Technical Summary
When there are a large number of users, existing instant messaging systems cannot receive changes in organizational and personnel information in a timely and effective manner, resulting in the inability to update the address book in real time.
Organizational and personnel information is persistently stored in the database and updated interactively through a caching service unit, reducing database read and write operations. The client processes the hierarchical structure of organizational and personnel information, improving response efficiency.
It enables timely updates of organizational and personnel information in instant messaging systems, reduces database operations, and improves system response and data processing efficiency.
Smart Images

Figure CN119363705B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication technology, and more particularly, to an instant messaging system address book management method, device and storage medium. BACKGROUND
[0002] The secret instant messaging system is deployed in the secret information system and generally has functions of address book management, point-to-point message sending and group message sending. The secret instant messaging system can be deployed on one or more servers, and in the case of a large number of users, a distributed deployment mode is generally used to improve the response speed of the system.
[0003] The secret information system can maintain the organization structure and personnel information of the entire unit. In the existing instant messaging system address book management method, when the administrator changes the organization structure or personnel information on the management end, the client cannot receive the change information in time and effectively, and the updated organization structure and personnel information cannot be displayed in real time on the client. SUMMARY
[0004] In view of at least one defect or improvement demand of the prior art, the present application provides an instant messaging system address book management method, device and storage medium, which can solve at least one of the problems in the background art.
[0005] To achieve the above-mentioned purpose, according to the first aspect of the present application, an instant messaging system address book management method is provided, comprising the following steps:
[0006] Obtaining the organization personnel change result and writing it into the database to record the update time of each organization structure information and each user information in the database;
[0007] Writing the organization personnel change result into the cache service unit to record the update time of each organization structure and each user information in the cache service unit;
[0008] Sending the organization personnel change result to the message service unit, and the message service unit is used to send the organization personnel change result to the client in real time;
[0009] Receiving the local organization personnel change timestamp sent by the client, comparing it with the organization personnel change timestamp of the cache service unit, and if the timestamps are inconsistent, sending the organization personnel change result after the local organization personnel change timestamp to the client.
[0010] Further, the instant messaging system address book management method further comprises the following steps after the organization personnel change result is sent to the message service unit:
[0011] When the client is in the online state, after the login information is verified successfully, a connection is established with the message service unit to obtain messages from the message service unit in real time;
[0012] The organization personnel change result sent by the message service unit is obtained, the local organization personnel information is updated based on the organization personnel change result, and the organization personnel change result timestamp is recorded locally.
[0013] Further, the address book management method of the instant messaging system further comprises the following steps after the organization personnel change result is sent to the message service unit:
[0014] When the client recovers from the offline state to the online state, the local organization personnel change timestamp is obtained, and the local organization personnel change timestamp is sent to the instant messaging main service unit;
[0015] The organization personnel change result changed after the organization personnel change timestamp returned by the cache service unit is obtained;
[0016] The local organization personnel information is updated based on the organization personnel change result, and the organization personnel change result timestamp is recorded locally.
[0017] Further, the address book management method of the instant messaging system further comprises:
[0018] Each organization or personnel is configured to display one or more organizations and / or personnel.
[0019] Further, the address book management method of the instant messaging system further comprises:
[0020] Each organization or personnel is configured to display one or more organizations and / or personnel.
[0021] Further, the address book management method of the instant messaging system further comprises:
[0022] The display range of each organization or personnel is obtained, written into the database, and written into the cache service unit.
[0023] Further, the address book management method of the instant messaging system further comprises:
[0024] For a certain organization or personnel, if another organization or personnel displays it, it is displayed in its address book; if another organization or personnel does not display it, it is not displayed in its address book, and it cannot be searched by it.
[0025] According to a second aspect of the present application, there is further provided an instant messaging system address book management device comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program which, when executed by the processing unit, causes the processing unit to perform the steps of any of the above-mentioned methods.
[0026] According to a third aspect of the present application, there is further provided a storage medium storing a computer program executable by an instant messaging system address book management device, which, when executed on the instant messaging system address book management device, causes the instant messaging system address book management device to perform the steps of any of the above-mentioned methods.
[0027] According to a fourth aspect of the present application, there is further provided a computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the above-mentioned instant messaging system address book management methods.
[0028] Overall, the above technical solutions conceived by the present application can achieve the following beneficial effects compared with the prior art:
[0029] The instant messaging system address book management method provided by the present application stores organizational information and personnel information in a database for persistent storage and in a cache, and updates the organizational information and personnel information by interacting with the cache, thereby reducing read and write operations on the database and improving system response efficiency. When updating, only the changed data is updated instead of full data, thereby improving server data processing efficiency. The processing of the organizational information and personnel tree structure is performed on the client side instead of the server side, thereby improving system response efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0031] Figure 1 A flowchart of an instant messaging system address book management method provided by an embodiment of the present application;
[0032] Figure 2 A composition diagram of an instant messaging system for an instant messaging system address book management method provided by an embodiment of the present application;
[0033] Figure 3 An online client organization personnel update flowchart for an instant messaging system address book management method provided by an embodiment of the present application;
[0034] Figure 4 A flowchart of an organization personnel update process of an address book management method of an instant messaging system provided by an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as there is no conflict.
[0036] The terms "first", "second", "third", etc. in the specification and claims of the present application and the above-described drawings are used to distinguish different objects and are not used to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed or can optionally include other steps or units inherent to the process, method, product or device.
[0037] Figure 1 A flowchart of an address book management method of an instant messaging system provided by an embodiment of the present application, as shown in Figure 1 The address book management method of the instant messaging system provided by the embodiment of the present application includes the following steps:
[0038] 101, obtaining an organization personnel change result and writing it into a database to record the update time of each organization information and each user information in the database.
[0039] Specifically, Figure 2 A composition diagram of an instant messaging system of an address book management method of an instant messaging system provided by an embodiment of the present application, as shown in Figure 2 The instant messaging system provided by the embodiment of the present application includes an instant messaging system server, an instant messaging system management end and an instant messaging system client, wherein the instant messaging system server includes a main service unit, a cache service unit, a database and a message service unit. The organization personnel change is that the administrator logs in the instant messaging system management end through a browser to perform operations such as adding, adjusting or deleting organization information or personnel information of the instant messaging system.
[0040] The database is used for long-term record of information, and can ensure data persistence; the cache service unit is used for storing information that needs to be quickly queried and read, and can relieve the pressure of the database; and the message service unit is used for receiving and distributing messages.
[0041] The instant messaging main service unit writes the results of adding, adjusting or deleting the organization personnel into the database, and records the update time of each organization information and each user information in the database. The database feeds back to the instant messaging main service unit whether the writing is successful.
[0042] 102. Write the organization personnel change result into the cache service unit, and record the update time of each organization and each user information in the cache service unit.
[0043] Specifically, the instant messaging main service unit writes the results of adding, adjusting or deleting the organization personnel into the cache service unit, and records the update time of each organization information and each user information in the cache service unit. The cache service unit feeds back to the instant messaging main service unit whether the writing is successful.
[0044] Updating the database first and then updating the information in the cache service unit can ensure the consistency of the database and the cache data, and can ensure that the organization personnel change result stored in the database is consistent with the organization personnel change result in the cache service unit for quick reading.
[0045] 103. Send the organization personnel change result to the message service unit, and the message service unit is used for sending the organization personnel change result to the client in real time.
[0046] Specifically, the instant messaging main service unit notifies the message service unit of the information of adding, adjusting or deleting the organization personnel, and the message service unit can send messages to the client in real time. The sent message can contain the organization personnel change result.
[0047] 104. Receive the local organization personnel change timestamp sent by the client, compare it with the organization personnel change timestamp of the cache service unit, and if the timestamps are inconsistent, send the organization personnel change result after the local organization personnel change timestamp to the client.
[0048] Specifically, the local organization personnel change timestamp stored in the client is received, and the local organization personnel change timestamp is compared with the organization personnel change timestamp of the cache service unit. If the local organization personnel change timestamp of the client is consistent with the organization personnel change timestamp of the cache service unit, it is considered that the organization personnel list of the main service unit has not changed since the last organization personnel list update on the client, and no processing is performed. If the local organization personnel change timestamp of the client is inconsistent with the organization personnel change timestamp of the cache service unit, it is considered that the organization personnel list has changed since the last organization personnel list update on the client. The instant messaging main service unit sends the organization personnel change result after the local organization personnel change timestamp to the client, so that the client can update to the latest organization personnel list.
[0049] The instant messaging system address book management method provided in the embodiments of the present application stores organization information and personnel information in a database and stores the information in a cache. The update operation of the organization information and the personnel information is performed by interacting with the cache, so that the read and write operations of the database are reduced, the system response efficiency is improved, only the changed data is updated during the update, rather than the full data, the data processing efficiency of the server is improved, the processing of the organization information and the personnel tree structure is performed on the client rather than on the server, and the system response efficiency is improved.
[0050] Optionally, the instant messaging system address book management method provided in the embodiments of the present application further includes the following steps after the organization personnel change result is sent to the message service unit:
[0051] When the client is in an online state, the login information is verified to be successful, a connection is established with the message service unit, and the messages of the message service unit are acquired in real time.
[0052] The organization personnel change result sent by the message service unit is acquired, the local organization personnel information is updated based on the organization personnel change result, and the organization personnel change result timestamp is recorded locally.
[0053] Specifically, Figure 3 The instant messaging system address book management method provided in the embodiments of the present application is shown in the organization personnel update flow diagram of the online client, as shown in Figure 3 When the user logs in the instant messaging system client, the connection with the message service unit is established, and the messages sent by the message service unit can be received in real time.
[0054] The instant messaging system main service unit sends the organization or personnel addition, adjustment or deletion information and time stamp to all online users. After receiving the message, the client updates the local organization and personnel information and records the organization personnel change result time stamp locally. That is, when the client is in the online state and the instant messaging system main service unit sends the organization personnel change message, the client can update the organization personnel list in real time.
[0055] Optionally, the instant messaging system address book management method provided by the embodiment of the application further includes the following steps after sending the organization personnel change result to the message service unit:
[0056] When the client recovers from the offline state to the online state, the local organization personnel change time stamp is acquired and sent to the instant messaging main service unit.
[0057] The organization personnel change result changed after the organization personnel change time stamp returned by the cache service unit is acquired;
[0058] The local organization personnel information is updated based on the organization personnel change result, and the organization personnel change result time stamp is recorded locally.
[0059] Specifically, Figure 4 The instant messaging system address book management method provided by the embodiment of the application is shown in the organization personnel update flowchart of the offline client as shown in Figure 4 The offline user cannot receive the information sent by the message service unit in real time because the offline user and the message service unit do not establish a connection. When the offline user logs in next time, that is, when the offline state recovers to the online state, the local recorded organization and personnel update time stamp is acquired, the time stamp of the last time the client updates the organization personnel list is confirmed, and the time stamp is sent to the instant messaging main service unit.
[0060] The instant messaging main service unit sends the organization and personnel update time stamp of the user to the cache service unit, and compares the time stamp with the time stamp stored in the cache service unit. Querying from the cache service unit instead of querying from the database can be read faster and improve the system processing efficiency.
[0061] If the time stamp is consistent with the time stamp stored in the cache service unit, it is considered that the organization personnel list of the main service unit has not changed after the last time the organization personnel list of the client is updated, and no processing is performed.
[0062] If the local organization personnel change timestamp sent by the client is inconsistent with the organization personnel change timestamp of the cache service unit, it is considered that the organization personnel list has changed after the last organization personnel list update on the client, and the instant messaging main service unit sends the organization personnel change result after the local organization personnel change timestamp to the client. The client analyzes and processes the received entry organization personnel information, and updates the local organization and personnel information according to the information.
[0063] Optionally, the instant messaging system address book management method provided by the embodiment of the application further includes:
[0064] Each organization or personnel is configured to be displayed to one or more organizations and / or personnel.
[0065] Specifically, the administrator can configure, through the instant messaging system management end, which organizations or personnel each organization or each personnel can see.
[0066] Optionally, the instant messaging system address book management method provided by the embodiment of the application further includes:
[0067] Each organization or personnel is configured to display one or more organizations and / or personnel to it.
[0068] Specifically, the administrator can configure which organizations or personnel each organization or each personnel can see.
[0069] Optionally, the instant messaging system address book management method provided by the embodiment of the application further includes:
[0070] Obtain the display range of each organization or personnel, write it into the database, and write it into the cache service unit.
[0071] Specifically, after configuring the display range or visible range of each organization or personnel, the visible range of each person's address book can be obtained, and the data is recorded in the database, and the data is stored in the cache service unit.
[0072] On the basis of the above address book management method, when the client user requests the change information of the organization and personnel from the server each time, the organization and personnel information returned by the server includes the field of whether the user is visible. The client receives the data returned from the instant messaging main service unit, and displays according to the data of whether the user is visible.
[0073] Optionally, the instant messaging system address book management method provided by the embodiment of the application further includes:
[0074] For an organization or a person, if another organization or person shows it, it is displayed in its address book; if another organization or person does not show it, it is not displayed in its address book, and it cannot be searched by it.
[0075] The application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the steps of the method. The computer readable storage medium can include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nano system (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0076] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the application is not limited to the action sequence described, because according to the application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the application.
[0077] In the above embodiments, the description of each embodiment is focused on, and the part not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0078] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of the units is only a logical function division. There can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some services interfaces, devices or units, and can be electrical or other forms.
[0079] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0080] In addition, each of the function units in the embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.
[0081] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable memory. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned memory includes: a U disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0082] Those of ordinary skill in the art can understand that all or part of the steps of the various methods of the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer readable memory, which can include a flash disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc.
[0083] The above is only exemplary embodiments of the present disclosure, and cannot limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. Those skilled in the art will easily think of embodiments of the present disclosure after considering the specification and practicing the disclosure herein. The present application is intended to cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not described in the present disclosure. The specification and examples are only considered as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
[0084] The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present disclosure.
[0085] Those skilled in the art can easily understand that the above description is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for managing a contact list of an instant messaging system, comprising the steps of: obtaining an organization personnel change result and writing the result into a database to record the update time of each organization information and each user information in the database; writing the organization personnel change result into a cache service unit to record the update time of each organization and each user information in the cache service unit; sending the organization personnel change result to a message service unit, which is configured to send the organization personnel change result to a client in real time; receiving a local organization personnel change timestamp sent by the client and comparing the timestamp with the organization personnel change timestamp of the cache service unit, and if the timestamps are inconsistent, sending the organization personnel change result after the local organization personnel change timestamp to the client; after the step of sending the organization personnel change result to the message service unit, further comprising the steps of: when the client is in an online state, verifying login information and establishing a connection with the message service unit to obtain messages of the message service unit in real time; obtaining the organization personnel change result sent by the message service unit, updating local organization personnel information based on the organization personnel change result, and recording the organization personnel change result timestamp locally; after the step of sending the organization personnel change result to the message service unit, further comprising the steps of: when the client recovers from an offline state to an online state, obtaining a local organization personnel change timestamp and sending the local organization personnel change timestamp to an instant messaging main service unit; obtaining the organization personnel change result changed after the instant messaging main service unit obtains the organization personnel change timestamp returned by the cache service unit; updating local organization personnel information based on the organization personnel change result and recording the organization personnel change result timestamp locally.
2. The method of claim 1, further comprising: configuring each organization or personnel to show one or more organizations and / or personnel.
3. The method of claim 1, further comprising: configuring each organization or personnel to show one or more organizations and / or personnel.
4. The method of claim 2 or 3, further comprising: obtaining a display range of each organization or personnel, writing the range into a database, and writing the range into a cache service unit.
5. The method of claim 1, further comprising: for a certain organization or personnel, if another organization or personnel shows the certain organization or personnel, the certain organization or personnel is displayed in the contact list of the another organization or personnel; and if another organization or personnel does not show the certain organization or personnel, the certain organization or personnel is not displayed in the contact list of the another organization or personnel and cannot be searched by the another organization or personnel. A computer program product comprising at least one processing unit and at least one memory unit, wherein the memory unit stores a computer program which, when executed by the processing unit, causes the processing unit to perform the steps of any one of claims 1-5.
6. An instant messaging system address book management apparatus characterized by comprising: 7. A storage medium, characterized by The computer program stored in the computer readable medium is executable by the instant messaging system address book management device, and when the computer program is executed on the instant messaging system address book management device, the instant messaging system address book management device is caused to perform the steps of the method according to any one of claims 1 to 5.
8. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the steps of the instant messaging system address book management method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Large-scale organization updating method in instant messaging
CN106375417A
Organizer information synchronization method and device, electronic equipment and storage medium
CN112445864A