Data change notification method, device, apparatus, and medium

By merging data change notifications with cache records and delay configuration tables, the problem of a large number of email notifications caused by frequent data changes is solved, thus optimizing email sending and ensuring data integrity.

CN115048400BActive Publication Date: 2025-11-28PINGAN YIQIANBAO E COMMERCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210734062.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-11-28
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

During the software development lifecycle, frequent data changes result in a large number of email notifications, making them difficult to access and impacting management efficiency.

Method used

By caching records and delaying configuration tables, data change notification information is merged, email notifications are delayed, email sending frequency is reduced, and notification operations are performed at the appropriate time.

Benefits of technology

This significantly reduces email sending frequency and email costs, while ensuring users are quickly informed of all data changes and protecting data integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048400B_ABST
    Figure CN115048400B_ABST
Patent Text Reader

Abstract

The application discloses a data change notification method, device, equipment and medium, and the method comprises the following steps: reading the cache record information and the delay configuration information of the target data notification information; determining the actual notification information of the current change according to the historical notification record of the last change of the target data and the to-be-notified information of the current change, and storing the actual notification information in the cache record information; determining the notification time of the current change according to the delay configuration information, and performing the corresponding notification operation on the actual notification information at the notification time; and updating the cache record information according to the notification execution situation. The application realizes the combined sending of multiple notifications, greatly reduces the frequency of mail sending, thereby significantly reducing the mail input cost; and since the data change is recorded in the cache record information every time, the user can quickly know all the modified contents during the delay sending, and the data integrity is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, in particular to a data change notification method and device, equipment and medium. BACKGROUND

[0002] During the software and application development life cycle, in order to improve management efficiency and promote the development process, the management of requirement information, design information and defect information is usually fine-grained, that is, the data change content and time node are recorded, and so on. The information is frequently changed in a short period of time, resulting in a large number of email notifications in a short period of time, and each email contains a large amount of information, which causes confusion to the reviewer, and the reviewer often needs to check multiple emails to know the specific content of the change.

[0003] It should be noted that the above description is only an example of the background and does not necessarily constitute prior art. SUMMARY

[0004] To solve the above problems, the embodiments of the present application provide a data change notification method, device, equipment and medium, which records and delays the configuration table of the data change notification, and uses the delayed sending method to achieve the purpose of combining and sending multiple notifications, greatly reduces the frequency of email sending, thereby reducing the cost of email investment; and the user can quickly know all the modified contents during the period, so as to overcome or at least partially overcome the shortcomings of the prior art.

[0005] In a first aspect, the embodiments of the present application provide a data change notification method, which comprises:

[0006] According to the ID of the target data, read the cache record information and delay configuration information of the target data notification information;

[0007] According to the historical notification record of the last change of the target data and the to-be-notified information of the current change, determine the actual notification information of the current change, and store it in the cache record table; wherein the historical notification record is read by traversing the cache record information in reverse order;

[0008] According to the delay configuration table, determine the notification time of the current notification, and perform the corresponding notification operation on the actual notification information at the notification time;

[0009] According to the notification execution situation, update the cache record information.

[0010] In a second aspect, the embodiments of the present application also provide a data change notification device, which comprises:

[0011] The query unit is configured to read the cache record information and the delay configuration information of the target data notification information according to an ID of the target data.

[0012] The merging unit is configured to determine actual notification information of the current change according to historical notification records of the last change of the target data and the to-be-notified information of the current change, and store the actual notification information in the cache record table.

[0013] The notification unit is configured to determine a notification time of the current notification according to the delay configuration table, and perform a corresponding notification operation on the actual notification information at the notification time.

[0014] The updating unit is configured to update the cache record information according to a notification execution condition.

[0015] In a third aspect, an electronic device is provided, including: a processor; and a memory arranged to store computer-executable instructions that, when executed, cause the processor to perform any of the above methods.

[0016] In a fourth aspect, a computer-readable storage medium is provided, which stores one or more programs, and the one or more programs, when executed by an electronic device including a plurality of applications, cause the electronic device to perform any of the above methods.

[0017] The above at least one technical solution adopted by the embodiments of the present application can achieve the following beneficial effects:

[0018] In the present application, when data is changed, the notification information is not sent immediately, but the cache record information and the delay configuration information of the target data notification information are queried, the actual notification information of the current change is determined according to the historical notification records of the last change of the target data and the to-be-notified information of the current change, and is stored in the cache record table; the notification time of the current notification is determined according to the delay configuration information, and a corresponding notification operation is performed on the actual notification information at the notification time; finally, the cache record information is updated according to the execution condition of the current notification. The present application stores the related information of each time of sending the changed data in the cache record information, and achieves the purpose of sending the multiple notifications in a combined manner through the delay sending mode, greatly reduces the frequency of sending the mail, and thus significantly reduces the mail input cost; and since each data change leaves a trace in the cache record information, the user can quickly know all the modified contents during the delay sending, and the data integrity is ensured. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0020] Figure 1 A flow diagram of a method for notifying data change is shown according to an embodiment of the application;

[0021] Figure 2 A flow diagram of a method for notifying data change is shown according to another embodiment of the application;

[0022] Figure 3 A structural diagram of a device for notifying data change is shown according to an embodiment of the application;

[0023] Figure 4 A structural diagram of an electronic device is shown according to an embodiment of the application. DETAILED DESCRIPTION

[0024] In order to make the objects, technical solutions and advantages of the application clearer, the technical solutions of the application will be described clearly and completely below with reference to the embodiments of the application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the application, but not all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without any creative work fall within the protection scope of the application.

[0025] The technical solutions provided by the embodiments of the application will be described in detail below with reference to the accompanying drawings.

[0026] In the software or application development process, the process is usually coordinated by multiple people, and information and data are frequently changed. In order to quickly promote the development work, the management of requirement information, design information and defect information is pursued to be fine-grained management, such as recording the change content and time node of each data change. In order to make multiple parties receive the notification in time when the data change occurs each time, the email is usually used to notify the data change. However, due to the frequency of data change, for a piece of data, an email is sent each time the change occurs, which will result in a large number of emails. Usually, a lot of emails need to be found to know the content of the final modification of a piece of data.

[0027] The present application is proposed in view of the above, and the concept of the present application is to add a cache record information and a delay configuration information to the notification information of data, each time when the data is changed, the notification information is written into the cache record information, and the history notification record of the last change of the target data is read, according to the state and content of the last change notification, the actual notification content of the present notification is determined, and is also written into the cache record information; then according to the delay configuration information, the notification time of the present notification is determined, and the corresponding notification operation is performed on the actual notification information at the notification time, and according to the notification execution, the related data of the target data in the cache record information is updated.

[0028] Figure 1 The flowchart of the notification method of data change according to one embodiment of the present application is shown, from Figure 1 It can be seen that the present application at least includes steps S110-S140:

[0029] Step S110: reading the cache record information and the delay configuration information of the target data notification information.

[0030] The cache record information can be in the form of a file or a table, and the notification information of each data change notification in the history time is recorded in the cache record information (but not all of them are actually executed), the notification information can include but is not limited to the modified data content, the operator, the operation time and the notification sending state, wherein the notification sending state includes not sent and sent.

[0031] The data content can include the content before the data is modified (original data) and the modified content each time. Among them, the content before the modification is used to record the original data which is not changed, and is created only when the first change occurs, for example:

[0032]

[0033] The modified content each time is used to record the data record modified by the user, which can be in the form of an array, sorted according to the modification time sequence, and each group of records includes the operator, the operation time and the change content, for example:

[0034]

[0035]

[0036] Of course, the notification sending state of each modified data is marked, and the notification sending state includes not sent and sent.

[0037] The delay configuration information can also be in the form of a file or a table, and the delay configuration information can include a sending rule of the data change notification, and the sending rule includes a trigger condition of the delay sending and the non-delay sending. The application does not limit the specific condition of the trigger of the delay sending and the non-delay sending, and the specific condition can be limited according to the specific needs. For example, the delay sending condition is a delay sending expression, and the delay sending time = current time + sending period; and the non-delay sending can be some restrictive conditions.

[0038] In the actual scene, for example, a cache record table and a delay configuration table can be added for the data change notification, and the tables are used to store the above information.

[0039] Step S120: determining actual notification information of the current change according to the historical notification record of the last change of the target data and the to-be-notified information of the current change, and storing the actual notification information in the cache record information; wherein the historical notification record is read by traversing the cache record information in a reverse order.

[0040] For a target data, a historical notification record closest to the current time is queried from the cache record table. The specific query method can be reading by traversing the cache record table in a reverse order, for example, traversing the cache record table in a reverse order according to the primary key of the target data to obtain the historical notification record closest to the current time.

[0041] Then, the actual notification information of the current change is determined by comparing the historical notification record of the last change and the to-be-notified information of the current change. For example, if the data content to be changed in the historical notification record is to change the target data to data A, the operation time is 12:00:00, the operator is A, and the notification sending state is not sent; and the data content to be changed in the to-be-notified information is to change the target data to data B, the operation time is 12:02:00, and the operator is A, since the notification sending state of the historical notification record is not sent, and the operators are consistent, the to-be-notified information of the current change can be directly combined with the historical notification record of the last change, and the to-be-notified information of the current change can be combined to change the target data to data A + data B, and the operation time is 12:02:00, that is, the operator A changes the target data twice in a short time.

[0042] The actual notification information formed after the combination is stored in the cache record information. It should be noted that the actual notification information is not necessarily actually initiated, for example, the operator changes the target data again without triggering the notification condition, and the combination can be performed again.

[0043] For the actual notification information of the change, in addition to the above examples, the data content to be changed in the historical notification record is changed to data A, the operation time is 12:00:00, the operator is A, and the notification sending state is sent. The data content to be changed in the notification information is changed to data B, the operation time is 12:02:00, the operator is A, and the notification sending state is sent. Since the notification sending state of the historical notification record is sent, it means that the changed notification has been executed, so there is no need to merge, and the notification information to be changed this time is directly used as the actual notification information of the change, and stored in the cache record information.

[0044] Of course, there are other scenarios, which will not be listed one by one.

[0045] It should be noted that in order to ensure the integrity of the data, the "merge" mentioned here does not use the overwrite method for saving, but can use the "splicing" method to merge the data together and save it, so that relevant personnel can view the entire change trace of the target data (some changes do not actually occur).

[0046] Step S130: According to the delay configuration table, determine the notification time of the notification, and perform the corresponding notification operation on the actual notification information at the notification time.

[0047] As mentioned earlier, the delay configuration information can include the trigger conditions for delayed sending and non-delayed sending of data change notifications. It should be noted that the priority of the trigger condition for non-delayed sending is higher than that of the trigger condition for delayed sending. That is, when determining the notification time of a notification, first determine whether the data change meets the trigger condition for non-delayed sending. If it meets, perform the corresponding notification operation on the actual notification information immediately. If it does not meet, enter the trigger condition for delayed sending. When the trigger condition for delayed sending is met, perform the corresponding notification operation on the actual notification information.

[0048] Taking the determination of whether a data change meets the trigger condition for delayed sending as an example, assuming that the delay sending condition is: delay sending time = current time + sending period (5 min), the current time is 12.05, and the read change operation time of the target data is 12:01. After determining that the notification time of the notification has not been reached, when the current time is later than 12:06, it can be determined that the notification time of the notification has been reached, and the corresponding notification operation is performed on the actual notification information.

[0049] The specific notification operation can generate an email containing the specific content of the data change this time, and then send the email to the specified mailbox.

[0050] Step S140: Update the cache record information according to the notification execution.

[0051] In some embodiments of this application, in the above method, updating the cache record information according to the notification execution status includes: if the change execution status of this change is successful, then updating the notification sending status of the actual notification content of this change recorded in the cache record information to sent.

[0052] Finally, based on the notification execution status, the cached record information is updated. This mainly involves updating the notification sending status of the target data in the cached record information. For example, if the original notification sending status is "not sent", the notification sending status is updated to "sent" after the email is sent.

[0053] Depend on Figure 1 As shown in the method, this application does not immediately send notification information when data is changed. Instead, it queries the cached record information and delay configuration information of the target data notification information. Based on the historical notification records of the last change of the target data and the pending notification information for this change, it determines the actual notification information for this change and stores it in the cached record table. Based on the delay configuration information, it determines the notification timing for this notification and performs the corresponding notification operation on the actual notification information at the specified timing. Finally, it updates the cached record information based on the execution status of this notification. This application stores relevant information for each data change in the cached record information. By delaying the sending, it achieves the purpose of merging multiple notifications, greatly reducing the frequency of email sending and thus significantly reducing email costs. Furthermore, since each data change is recorded in the cached record information, users can quickly know all the modifications made during the delayed sending period, ensuring data integrity.

[0054] In some embodiments of this application, when the target data is modified for the first time or the cached record information of the target data notification information cannot be read, the method further includes: constructing cached record information and delay configuration information of the target data notification information, wherein the cached record table includes the target data before modification, the modified data, the operator, the operation time, and the notification sending status; the delay configuration table includes: a delayed sending expression and a non-delayed triggering condition, wherein the delayed sending expression is the sum of the current time and the sending period, and the non-delayed triggering condition is an array composed of key, check, and value.

[0055] The data is not created with cache record information at the time of creation, so the history notification record of the target data cannot be read at the first time of changing the target data, because it does not exist. In addition, the history notification record of the target data can not be read due to other reasons, such as data loss, etc. In this case, the cache record information and the delay configuration information of the target data need to be constructed, the content of the current change is taken as the first cache record information, and the sending rule of the target data is configured. The specific sending rule is not limited in the application, and in some embodiments of the application, the sending rule can also continue the existing default sending rule.

[0056] In some embodiments of the application, in the above method, the delay sending expression is the sum of the current time and the sending period, that is, the delay sending time = current time + sending period, wherein the sending period can be set as needed, such as 5 min.

[0057] In some embodiments of the application, in the above method, the non-delay trigger condition is an array composed of key, check and value. When the non-delay trigger condition is configured, the configured value is in array format, wherein the key is the field name of the change, the check is the equation, such as supporting equal, not equal, containing, not containing, etc., and the value is the value of the judgment. For example, the configured non-delay trigger condition is:

[0058]

[0059] In addition, when a target data is changed, if the cached history notification record of the target data is not retrieved, it means that the current change may be the first change to the target data, or the previous record has been lost. Therefore, when determining the actual notification content of the current change, no merging operation is needed, and the content of the current change is directly taken as the actual notification content of the current change. In some embodiments of the application, in the above method, the actual notification content of the current change is determined according to the history notification record of the last change of the target data and the notification content to be notified in the current change, comprising: determining the notification sending state of the last change of the target data according to the history notification record; if the notification sending state of the last change is not sent, merging the notification content to be notified in the current change with the notification content in the history notification record to obtain the actual notification content of the current change; if the notification sending state of the last change is sent, the notification content to be notified in the current change is directly taken as the actual notification content of the current change.

[0060] The notification content of the one-time data change is determined according to whether the notification of the last change of the target data is sent. If the last change notification sending state is not sent, it means that the last change notification has not been sent, and the notification content to be notified of the current change is combined with the notification content in the historical notification record. The subsequent can be combined into the same notification and sent. If the last change notification sending state is sent, it means that the last change notification has been sent, and there is no need to notify again. The actual notification content of the current change is directly determined according to the change content, that is, the modified data content, the operator, the operation time, etc. In some embodiments of the present application, in the above method, the historical change record is read by the following method: according to the primary key value of the target data, the data in the cache record information is traversed in reverse order; when it is determined that the first primary key value of a piece of data is consistent with the second primary key value of the target data, the record is taken as the historical notification record, and the traversal is ended.

[0061] In addition, in order to quickly read the cache record information corresponding to the target data, an identification mark can be set for each piece of data, such as in the form of a primary key. The value of the primary key is used to record the data ID to which the cache record belongs. Through the primary key of a piece of data, the cache record corresponding to the target data can be quickly retrieved from the cache record information.

[0062] Specific query process, can according to the primary key value of the target data, traverse each data in the cache record information in reverse order, if the first primary key value of a piece of data is inconsistent with the second primary key value of the target data, then traverse the next piece of data; if the first primary key value of a piece of data is consistent with the second primary key value of the target data, then the record is taken as the historical notification record, and the traversal is ended.

[0063] In some embodiments of the present application, in the above method, the merging of the notification content to be notified of the current change and the historical notification record to obtain the actual notification content of the current notification includes: comparing the consistency of the first operator of the historical notification record and the second operator of the notification content to be notified; if consistent, deleting the first primary key value of the historical notification record, and placing the notification content to be notified after the historical notification record after the deletion operation to obtain the actual notification content of the current notification; if inconsistent, deleting the second primary key value of the notification content to be notified, and placing the notification content to be notified after the historical notification record after the deletion operation to obtain the actual notification content of the current notification.

[0064] For example, the historical notification record is as follows, and the first primary key value can be the "subject" therein:

[0065]

[0066] The to-be-notified content is as follows, and the second primary key value can be "subject" in the following:

[0067]

[0068]

[0069] The consistency of the first operator of the historical notification record and the second operator of the to-be-notified content is compared. If the consistency is consistent, it means that the two changes are made by the same person. The operator modifies the previous change, and the intention is to modify the target data to the data modified by the current change. At this time, the first primary key value of the historical notification record can be deleted, and the to-be-notified content of the current change is placed after the historical notification record after the deletion operation, to obtain the actual notification content of the current notification, that is, directly notify the content of the current modification. Taking the above example as an example, the actual notification content of the current notification is as follows:

[0070]

[0071] If the first operator of the historical notification record and the second operator of the to-be-notified content are inconsistent, it means that the two changes are made by different people. It means that different people have modification behavior for the same data, and the two modification contents need to be retained and notified. At this time, the first primary key value of the historical notification record is deleted, and the to-be-notified content of the current change is placed after the historical notification record after the deletion operation, to obtain the actual notification content of the current notification. Taking the above example as an example, assuming that the operator of the current change is Li Si, that is, the to-be-notified content of the current change is as follows:

[0072]

[0073]

[0074] After merging, the actual notification content of the current notification is as follows:

[0075]

[0076] In some embodiments of the present application, in the above method, the notification time of the current change is determined according to the delay configuration table, and the corresponding notification operation is performed on the actual notification content at the notification time, including: judging whether the to-be-changed content of the current change satisfies the non-delay trigger condition, if yes, generating and sending a notification email of the current change; if not, waiting for polling, if it is determined through polling that the notification sending state of the current change is not sent, and the current time is later than the sending time determined through the delay sending expression, then generating and sending a notification email of the current change; wherein the polling period of the polling is equal to the sending period.

[0077] In determining the change timing of the current change, firstly, it is judged whether the to-be-changed content of the current change satisfies the non-delay trigger condition. For example, as mentioned above, the non-delay trigger condition is:

[0078]

[0079]

[0080] If the check in the non-delay trigger condition is "equal to", it is judged whether the primary key value (the value of key) in the current change is equal to the value of value in the non-delay trigger condition. If yes, the non-delay trigger condition is satisfied, and the notification email of the current change is generated and sent immediately.

[0081] Similarly, if the check in the non-delay trigger condition is "not equal to", it is judged whether the primary key value (the value of key) in the current change is not equal to the value of value in the non-delay trigger condition. If yes, the non-delay trigger condition is satisfied, and the notification email of the current change is generated and sent immediately.

[0082] Of course, the non-delay trigger condition can also be configured with other conditions, which are not limited by the present application.

[0083] If the to-be-changed content of the current change does not satisfy the non-delay trigger condition, polling is waited. If it is determined through polling that the notification sending state of the current change is not sent, and the current time is later than the sending time determined through the delay sending expression, the notification email of the current change is generated and sent. The polling period of the polling is equal to the sending period.

[0084] Since the notification email is not always sent, a timing scheduling polling task can be set, and the frequency of the scheduling is the delay period set in the delay configuration information, that is, the polling period is equal to the sending period. As mentioned above, the polling period can be 5 min. After the timing scheduling polling task is started, the polling cache record information is performed every 5 min. Through polling, the cache notification record with the sending state of not sent and the current time later than the set sending time is executed with the corresponding notification operation, that is, the corresponding notification email is generated and sent to the specified mailbox.

[0085] Figure 2 A flowchart of a data change notification method according to an embodiment of the present application is shown, from Figure 2 It can be seen that the embodiment includes:

[0086] According to the second primary key value of the target data in descending order, it is judged whether there is a data in the cache record table whose first primary key value is consistent with the second primary key value of the target data. If not, the cache record information of the target data is constructed, including the original data of the target data, the operator of this change, the operation time, the sending state, and the sending state is set to not sent, and the cache record information of the target data is taken as the actual notification information of this time.

[0087] If there is, the data is taken as the historical notification record of the last change of the target data. If the first operator of the historical notification record is consistent with the second operator of this change, the first primary key value of the historical notification record is deleted, and the notification content to be notified is placed after the historical notification record after the deletion operation to obtain the actual notification content of this notification and save it to the cache record information. If not, the second primary key value of the notification content to be notified is deleted, and the notification content to be notified after the deletion operation is placed after the historical notification record after the deletion operation to obtain the actual notification content of this notification and save it to the cache record information.

[0088] It is judged whether the modified data of this change meets the non-delay trigger condition. If yes, the notification email of this change is generated and sent. If not, it waits and enters polling. It is judged whether the notification sending state in the actual notification content of this change is not sent through polling. If not, it continues to wait and enters the next polling. If yes, it is judged whether the current time reaches or is later than the delay trigger time of this change.

[0089] If yes, the notification email of this change is generated and sent. If not, it continues to wait and enters the next polling.

[0090] Figure 3 The structure diagram of the notification device of data change according to an embodiment of the application is shown. From Figure 3 It can be seen that the data change notification device 300 comprises:

[0091] The reading unit 310 is configured to read the cache record information of the target data notification information and the delay configuration information.

[0092] The merging unit 320 is configured to determine the actual notification information of this change according to the historical notification record of the last change of the target data and the notification information to be notified of this change, and store it in the cache record information. The historical notification record is read by traversing the cache record information in descending order.

[0093] The notification unit 330 is configured to determine the notification opportunity of this change according to the delay configuration information, and perform the corresponding notification operation on the actual notification information at the notification opportunity.

[0094] The updating unit 340 is configured to update the cache record information according to the notification execution condition.

[0095] In some embodiments of the present application, the device further comprises a constructing unit configured to construct the cache record information and the delay configuration information of the target data notification information when the target data is changed for the first time or the cache record information of the target data notification information is not read, wherein the cache record information comprises initial data of the target data, an operator, an operation time, and a notification sending state; and the delay configuration information comprises a delay sending expression and a non-delay trigger condition, wherein the delay sending expression is a sum of a current time and a sending period, and the non-delay trigger condition is an array composed of a key, a check, and a value.

[0096] In some embodiments of the present application, in the device, the merging unit 320 is configured to determine a notification sending state of a last change of the target data according to the historical notification record; if the notification sending state of the last change is not sent, merge the to-be-notified content of the current change and the historical notification record to obtain actual notification content of the current change; if the notification sending state of the last change is sent, directly take the to-be-notified content of the current change as the actual notification content of the current notification.

[0097] In some embodiments of the present application, in the device, the merging unit 320 is configured to traverse each piece of data in the cache record information in a reverse order according to a primary key value of the target data; when determining that a first primary key value of a piece of data is consistent with a second primary key value of the target data, take the piece of record as a historical notification record, and end the traversal.

[0098] In some embodiments of the present application, in the device, the merging unit 320 is configured to compare consistency of a first operator of the historical notification record and a second operator of the to-be-notified content; if the consistency is consistent, delete the first primary key value of the historical notification record, and place the to-be-notified content after the historical notification record after the deletion operation to obtain actual notification content of the current notification; if the consistency is inconsistent, delete the second primary key value of the to-be-notified content, and place the to-be-notified content after the historical notification record after the deletion operation to obtain actual notification content of the current notification.

[0099] In some embodiments of the present application, in the above device, the notification unit 330 is configured to determine whether the current change meets the non-delay trigger condition, and if yes, generate and send a notification email of the current change; if not, wait for polling, and if the polling determines that the notification sending state of the current change is not sent and the current time is later than the sending time determined by the delay sending expression, generate and send a notification email of the current change; wherein the polling cycle of the polling is equal to the sending cycle.

[0100] In some embodiments of the present application, in the above device, the update unit 340 is configured to update the notification sending state of the actual notification content of the current change recorded in the cache record information to sent if the change execution of the current change is successful.

[0101] It should be noted that the above data change notification device can implement the above data change notification method, which will not be described here.

[0102] Figure 4 is a structural schematic diagram of an electronic device according to an embodiment of the present application. Please refer to Figure 4 At the hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The memory can include a memory such as a random-access memory (RAM), and can also include a non-volatile memory such as at least one disk memory. Of course, the electronic device can also include other hardware required by the business.

[0103] The processor, network interface, and memory can be connected to each other through an internal bus, which can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, and a control bus. For ease of representation, Figure 4 In the figure, only one bidirectional arrow is used to represent the bus, but it does not mean that there is only one bus or only one type of bus.

[0104] The memory is used to store programs. Specifically, the program can include program code, and the program code includes computer operation instructions. The memory can include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0105] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming a notification device for data changes at the logical level. The processor executes the program stored in memory and specifically performs the methods described above.

[0106] The above is as stated in this application. Figure 3 The method executed by the data change notification device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0107] The electronic device can also perform Figure 3 A method for notifying a data change in a device, and implementation of the data change notification device in... Figure 3 The functions of the embodiments shown are not described in detail here.

[0108] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform... Figure 3 The method executed by the data change notification device in the illustrated embodiment is specifically used to execute the aforementioned method.

[0109] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0110] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0111] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0112] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0113] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0114] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0115] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0116] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or apparatus that includes a list of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0117] Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system or computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0118] The above only describes the embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.

Claims

1. A method for notifying data changes, characterized in that, The method includes: Read the cached record information and delay configuration information of the target data notification information; the delay configuration information includes the trigger conditions for delayed transmission and non-delayed transmission; Based on the historical notification records of the last change to the target data and the pending notification information for this change, the actual notification information for this change is determined and stored in the cached record information; wherein, the historical notification records are read by traversing the cached record information in reverse order; Based on the delay configuration information, determine the notification timing for this change, and perform the corresponding notification operation on the actual notification information at the notification timing; Update the cached record information according to the notification execution status; When the target data is modified for the first time or the cached record information of the target data notification cannot be read, the method further includes: Construct cache record information and delay configuration information for the target data notification information. The cache record information includes the target data before modification, the data after modification, the operator, the operation time, and the notification sending status. The delay configuration information includes a delayed sending expression and a non-delayed trigger condition. The delayed sending expression is the sum of the current time and the sending period, and the non-delayed trigger condition is an array composed of key, check, and value. The step of determining the notification timing for this change based on the delay configuration information, and performing corresponding notification operations on the actual notification information at the notification timing, includes: Determine whether the modified data of this change meets the non-delayed triggering condition. If it does, generate and send a notification email for this change. If the conditions are not met, the system waits for polling. If the polling determines that the notification status for this change is not sent, and the current time is later than or equal to the sending time determined by the delayed sending expression, then a notification email for this change is generated and sent. The polling period is equal to the sending period.

2. The method according to claim 1, characterized in that, The step of determining the actual notification information for this change based on the historical notification records of the last change to the target data and the pending notification information for this change includes: Based on the historical notification records, determine the notification sending status of the last change to the target data; If the notification status of the last change is not sent, then the notification information for this change is merged with the historical notification record to obtain the actual notification information for this change; If the notification status of the previous change is "sent", then the pending notification information for this change will be directly used as the actual notification information for this change.

3. The method according to claim 2, characterized in that, The historical notification records were read using the following method: Based on the second primary key value of the target data, traverse each data entry in the cached record information in reverse order; When it is determined that the first primary key value of a piece of data is consistent with the second primary key value of the target data, the data is recorded as a historical notification record and the traversal ends.

4. The method according to claim 3, characterized in that, The step of merging the pending notification information for this change with the historical notification records to obtain the actual notification information for this change includes: Compare the consistency between the first operator of the historical notification record and the second operator of the notification information; If they match, delete the first primary key value of the historical notification record and place the notification information after the historical notification record after the deletion operation to obtain the actual notification information for this change; If there is a discrepancy, the second primary key value of the information to be notified is deleted, and the information to be notified after the deletion operation is placed after the historical notification record after the deletion operation to obtain the actual notification information of this change.

5. The method according to claim 1, characterized in that, The step of updating the cache record information based on the notification execution status includes: If the change is successfully executed, the notification sending status of the actual notification information for this change recorded in the cached record information will be updated to "sent".

6. A data change notification device, characterized in that, The device includes: The reading unit is used to read the cached record information and delay configuration information of the target data notification information; the delay configuration information includes the trigger conditions for delayed transmission and non-delayed transmission. The merging unit is used to determine the actual notification information for the current change based on the historical notification records of the last change to the target data and the pending notification information for the current change, and store it in the cached record information; wherein, the historical notification records are read by traversing the cached record information in reverse order; The notification unit is used to determine the notification timing for this change based on the delay configuration information, and to perform corresponding notification operations on the actual notification information at the notification timing. An update unit is used to update the cached record information based on the notification execution status; The construction unit, when the target data is modified for the first time or the cached record information of the target data notification information cannot be read, is further configured to: Construct cache record information and delay configuration information for the target data notification information. The cache record information includes the target data before modification, the data after modification, the operator, the operation time, and the notification sending status. The delay configuration information includes a delayed sending expression and a non-delayed trigger condition. The delayed sending expression is the sum of the current time and the sending period, and the non-delayed trigger condition is an array composed of key, check, and value. The notification unit is used to determine whether the modified data of this change meets the non-delayed triggering condition. If it does, a notification email for this change is generated and sent. If it does not, it waits for polling. If the polling determines that the notification sending status of this change is not sent, and the current time is later than or equal to the sending time determined according to the delayed sending expression, then a notification email for this change is generated and sent. The polling period is equal to the sending period.

7. An electronic device, comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of applications, cause the electronic device to perform the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data change notification method, device and equipment and readable storage medium

    CN111162995A

  • Cache updating method and device

    CN113742617A