Instant messaging system address book management method and device and storage medium
By writing the results of the organizational personnel into the database and cache service unit in the instant messaging system, and sending the change results to the client in real time, the client cannot update the information of the organization and personnel in time, realizing the improvement of system response efficiency efficiency Essence
Patent Information
- Application Number
- CN202411536737.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-31
AI Technical Summary
The address book management methods of the existing instant messaging system cannot update the organizational structure and personnel information on the client in a timely and effective manner, resulting in the client being unable to display the updated information in real time.
Obtain the organizational personnel change results, write them into the database and cache service unit, and send the change results to the client in real time. The client processes the results of organizational personnel changes in online and offline states respectively to ensure timely updates of information.
It realizes real-time updates on the client, reduces database read and write operations, improves system response efficiency, and improves server-side data processing efficiency.
Smart Images

Figure CN119363705A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and more specifically, to an instant messaging system address book management method, device and storage medium. Background Art
[0002] The confidential instant messaging system is deployed inside the confidential information system and generally has functions such as address book management, point-to-point message sending, group message sending, etc. The confidential instant messaging system can be deployed on one or more servers. When there are a large number of users, a distributed deployment method is generally used to improve the system's response speed.
[0003] The confidential information system can maintain the organizational structure and personnel information within the entire unit. In the existing instant messaging system address book management method, when the administrator changes the organizational structure or personnel information on the management side, the client cannot receive the change information in a timely and effective manner, and cannot display the updated organizational structure and personnel information in real time on the client. Summary of the invention
[0004] In view of at least one defect or improvement need in the prior art, the present invention provides an instant messaging system address book management method, device and storage medium, which will solve at least one of the problems existing in the above-mentioned background technology.
[0005] To achieve the above object, according to a first aspect of the present invention, a method for managing an address book of an instant messaging system is provided, comprising the following steps:
[0006] Obtain the results of organizational personnel changes, write them into the database, and record the update time of each organizational information and each user information in the database;
[0007] Write the organizational personnel change result into the cache service unit, and record the update time of each organizational structure and each user information in the cache service unit;
[0008] Sending the organization personnel change result to a message service unit, wherein the message service unit is used to send the organization personnel change result to a client in real time;
[0009] 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.
[0010] Furthermore, the instant messaging system address book management method, after sending the organization personnel change result to the message service unit, further includes the following steps:
[0011] When the client is online, after successfully verifying the login information, it establishes a connection with the message service unit and obtains 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] Furthermore, the instant messaging system address book management method, after sending the organization personnel change result to the message service unit, further includes the following steps:
[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] Get the organizational personnel change results that have changed after the organizational personnel change timestamp returned by the cache service unit;
[0016] Update local organization personnel information based on organization personnel change results, and record the organization personnel change result timestamp locally.
[0017] Furthermore, the instant messaging system address book management method further includes:
[0018] For each organization or person, configure it to be displayed to one or more organizations and / or persons.
[0019] Furthermore, the instant messaging system address book management method further includes:
[0020] For each organization or personnel configuration, one or more organizations and / or personnel are displayed.
[0021] Furthermore, the instant messaging system address book management method further includes:
[0022] Get the display scope for each organization or person, write it into the database, and write it into the cache service unit.
[0023] Furthermore, the instant messaging system address book management method further includes:
[0024] For a certain organization or person, if another organization or person shows it, it will be displayed in their address book; if another organization or person does not show it, it will not be displayed in their address book and cannot be searched by them.
[0025] According to the second aspect of the present invention, there is also provided an instant messaging system address book management device, which includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of any one of the above-mentioned methods.
[0026] According to the third aspect of the present invention, a storage medium is also provided, which stores a computer program that can be executed by an instant messaging system address book management device. When the computer program is run on the instant messaging system address book management device, the instant messaging system address book management device executes the steps of any one of the above-mentioned methods.
[0027] According to a fourth aspect of the present invention, there is also provided a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for managing an address book of an instant messaging system.
[0028] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0029] The instant messaging system address book management method provided by the present invention stores the organization and personnel information persistently in the database and in the cache. The update operation of the organization and personnel information interacts with the cache, thereby reducing the read and write operations of the database and improving the system response efficiency. When updating, only the changed data is updated instead of the full data, thereby improving the data processing efficiency of the server. The processing of the organization and personnel tree structure is performed on the client side instead of the server side, thereby improving the system response efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 A flowchart of a method for managing an instant messaging system address book provided in an embodiment of the present application;
[0032] Figure 2 A schematic diagram of the instant messaging system composition of an instant messaging system address book management method provided in an embodiment of the present application;
[0033] Figure 3 A schematic diagram of a flow chart of updating the organization personnel of an online client in an instant messaging system address book management method provided in an embodiment of the present application;
[0034] Figure 4 A schematic diagram of the organizational personnel update process for an offline client in an instant messaging system address book management method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0036] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0037] Figure 1 FIG. 1 is a flow chart of a method for managing an instant messaging system address book provided in an embodiment of the present application. Figure 1 As shown, an instant messaging system address book management method provided in an embodiment of the present application includes the following steps:
[0038] 101. Obtain the results of organizational personnel changes, write them into the database, and record the update time of each organizational information and each user information in the database.
[0039] Specifically, Figure 2 A schematic diagram of an instant messaging system composition of an instant messaging system address book management method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the instant messaging system provided in the embodiment of the present application includes an instant messaging system server, an instant messaging system management terminal and an instant messaging system client, wherein the messaging system server includes a main service unit, a cache service unit, a database and a message service unit. Organization personnel changes are that the administrator logs in to the instant messaging system management terminal through a browser to add, adjust or delete the organizational structure or personnel information of the instant messaging system.
[0040] Among them, the database is used for long-term recording of information to ensure data persistence; the cache service unit is used to store information that needs to be quickly queried and read, which can relieve the pressure on the database; 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 organizational personnel into the database, and records the update time of each organizational information and each user information in the database. The database will feedback to the instant messaging main service unit whether the writing is successful.
[0042] 102. Write the organizational personnel change results into the cache service unit, and record the update time of each organizational structure 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 organizations or 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 will feedback whether the writing is successful to the instant messaging main service unit.
[0044] Updating the database first and then updating the information of the cache service unit can ensure the consistency of the database and cache data, and can ensure that the organizational personnel change results stored in the database are consistent with the organizational personnel change results in the cache service unit for fast reading.
[0045] 103. Send 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.
[0046] Specifically, the instant messaging main service unit notifies the message service unit of the addition, adjustment or deletion information of the organization or personnel, and the message service unit can send a message to the client in real time, and the message sent can include the result of the organization and personnel change.
[0047] 104. Receive the local organization personnel change timestamp sent by the client, and compare it with the organization personnel change timestamp of the cache service unit. 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 and sent by the client is received and compared with the organization personnel change timestamp of the cache service unit. If the local organization personnel change timestamp sent by 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 after the last organization personnel list update on the client, and no processing is performed; 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 results 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 embodiment of the present application stores the organization and personnel information persistently in the database and in the cache. The update operation of the organization and personnel information interacts with the cache, thereby reducing the read and write operations of the database and improving the system response efficiency. When updating, only the changed data is updated instead of the full data, thereby improving the data processing efficiency of the server. The processing of the organization and personnel tree structure is performed on the client side instead of the server side, thereby improving the system response efficiency.
[0050] Optionally, the instant messaging system address book management method provided in the embodiment of the present application further includes the following steps after sending the organization personnel change result to the message service unit:
[0051] When the client is online, after successfully verifying the login information, it establishes a connection with the message service unit and obtains messages from the message service unit in real time;
[0052] 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.
[0053] Specifically, Figure 3 A schematic diagram of the organization personnel update process of an instant messaging system address book management method for an online client provided in an embodiment of the present application is as follows: Figure 3 As shown, when a user logs in through an instant messaging system client, a connection is established with the message service unit, and the user can receive messages sent by the message service unit in real time.
[0054] The main service unit of the instant messaging system sends the information and timestamp of the addition, adjustment or deletion of the organization or personnel to all online users. After receiving the message, the client updates the local organization structure and personnel information, and records the timestamp of the organization personnel change result locally. That is, when the client is online, when the main service unit of the instant messaging system 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 in the embodiment of the present 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 timestamp is obtained, and the local organization personnel change timestamp is sent to the instant messaging main service unit;
[0057] Get the organizational personnel change results that have changed after the organizational personnel change timestamp returned by the cache service unit;
[0058] Update local organization personnel information based on organization personnel change results, and record the organization personnel change result timestamp locally.
[0059] Specifically, Figure 4 A schematic diagram of the organization personnel update process of an instant messaging system address book management method for an offline client provided in an embodiment of the present application is as follows: Figure 4 As shown, the offline user has not established a connection with the message service unit and cannot receive information sent by the message service unit in real time. When the offline user logs in next time, that is, when the offline state is restored to the online state, the local recorded organization and personnel update timestamp is obtained, the timestamp of the last time the client updated the organization personnel list is confirmed, and the timestamp is sent to the instant messaging main service unit.
[0060] The instant messaging main service unit sends the user's organization and personnel update timestamp to the cache service unit, and compares the timestamp with the timestamp stored in the cache service unit. Querying from the cache service unit instead of from the database can read faster and improve system processing efficiency.
[0061] If the timestamp is consistent with the timestamp stored in 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.
[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 update of the organization personnel list on the client. The instant messaging main service unit sends the organization personnel change results after the local organization personnel change timestamp to the client. The client analyzes and processes the received itemized organization personnel information and updates the local organization and personnel information based on the information.
[0063] Optionally, the instant messaging system address book management method provided in the embodiment of the present application further includes:
[0064] For each organization or person, configure it to be displayed to one or more organizations and / or persons.
[0065] Specifically, the administrator can configure which organizations or individuals can see each organization or each individual through the instant messaging system management terminal.
[0066] Optionally, the instant messaging system address book management method provided in the embodiment of the present application further includes:
[0067] For each organization or personnel configuration, one or more organizations and / or personnel are displayed.
[0068] Specifically, the administrator can configure which organizations or individuals each organization or each individual can see.
[0069] Optionally, the instant messaging system address book management method provided in the embodiment of the present application further includes:
[0070] Get the display scope for each organization or person, 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 person, the visible range of each person's address book can be obtained, and the data is persistently recorded in the database, and the data is stored in the cache service unit.
[0072] Based on the above-mentioned address book management method, each time the client user requests the server for change information of the organization and personnel, the organization and personnel information returned by the server includes a field that indicates whether it is visible to the user. The client receives the data returned from the instant messaging main service unit and displays it according to the data in the field that indicates whether it is visible to the user.
[0073] Optionally, the instant messaging system address book management method provided in the embodiment of the present application further includes:
[0074] For a certain organization or person, if another organization or person shows it, it will be displayed in their address book; if another organization or person does not show it, it will not be displayed in their address book and cannot be searched by them.
[0075] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may 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 nanosystem (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 aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0077] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0078] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0079] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0080] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0081] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program code.
[0082] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0083] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. 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. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
[0084] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0085] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for managing an instant messaging system address book, comprising the following steps: Obtain the results of organizational personnel changes, write them into the database, and record the update time of each organizational information and each user information in the database; Write the organizational personnel change result into the cache service unit, and record the update time of each organizational structure and each user information in the cache service unit; Sending the organization personnel change result to a message service unit, wherein the message service unit is used to send the organization personnel change result to a client in real time; 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.
2. The instant messaging system address book management method according to claim 1, further comprising the following steps after sending the organization personnel change result to the message service unit: When the client is online, after successfully verifying the login information, it establishes a connection with the message service unit and obtains messages from the message service unit in real time; 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.
3. The instant messaging system address book management method according to claim 2, further comprising the following steps after sending the organization personnel change result to the message service unit: 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; The instant messaging main service unit obtains the organizational personnel change results that are changed after the organizational personnel change timestamp returned by the cache service unit; Update local organization personnel information based on organization personnel change results, and record the organization personnel change result timestamp locally.
4. The instant messaging system address book management method according to claim 1, further comprising: For each organization or person, configure it to be displayed to one or more organizations and / or persons.
5. The instant messaging system address book management method according to claim 1, further comprising: For each organization or personnel configuration, one or more organizations and / or personnel are displayed.
6. The instant messaging system address book management method according to claim 4 or 5, further comprising: Get the display scope for each organization or person, write it into the database, and write it into the cache service unit.
7. The instant messaging system address book management method according to claim 2 or 3, further comprising: For an organization or person, if another organization or person shows it to them, it will be displayed in their address book; If another organization or person does not display it, it will not be displayed in their address book and cannot be searched by them.
8. An instant messaging system address book management device, characterized in that: The method comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of the method according to any one of claims 1 to 7.
9. A storage medium, characterized in that: It stores a computer program executable by an instant messaging system address book management device. When the computer program runs on the instant messaging system address book management device, the instant messaging system address book management device executes the steps of any one of the methods described in claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the instant messaging system address book management method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Large-scale organization updating method in instant messaging
CN106375417A
Online state processing method based on organizational structure
CN111277491A
Organizer information synchronization method and device, electronic equipment and storage medium
CN112445864A
Offline message pulling method and device, computer equipment and storage medium
CN115297076A
Data query system and cache data updating method
CN116361309A