Event processing method and related device

By using event timestamps and serial numbers in the customer service system for out-of-order judgment and processing, the problem of inaccurate information caused by receiving events out of order is solved and the accuracy and reliability of system data are ensured.

WO2024217155A1PCT designated stage expired Publication Date: 2024-10-24BEIJING YOUZHUJU NETWORK TECH CO LTD

Patent Information

Application Number
PCT/CN2024/079161
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-18
Filing Date
2024-02-28
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

In customer service systems, receiving events may be out of order when data is transmitted over the network, resulting in inaccurate received information. Existing technologies cannot effectively identify and handle such errors.

Method used

By carrying the timestamp and sequence number in the event, extract the timestamp and sequence number of the received event, and compare it with the timestamp and sequence number of the latest stored event to determine whether the event is out of order, and process it if it is out of order. to ensure information accuracy.

Benefits of technology

Effectively identify and handle events in which the order of receipt is incorrect, avoid the problem of inaccurate information, and ensure the data accuracy and reliability of the customer service system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024079161_24102024_PF_FP_ABST
    Figure CN2024079161_24102024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure is an event processing method. The method comprises: acquiring a first timestamp and a first serial number from a received first event; reading a stored second timestamp and a stored second serial number, which correspond to a second event; on the basis of the first timestamp, the first serial number, the second timestamp and the second serial number, determining whether the first event is a shuffling event; and in response to it being determined that the first event is a shuffling event, performing shuffling processing on the first event. On the basis of the method, further provided in the present disclosure are an event processing apparatus, an electronic device, a storage medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Event processing methods and related equipment

[0001] This application claims priority to the Chinese invention patent application entitled “Event processing method and related equipment” and application number 202310416948.4 filed on April 18, 2023. The entire contents of that application are incorporated by reference into this application. Technical Field

[0002] The present disclosure relates to the field of communication technologies, and in particular to an event processing method, device, electronic device, storage medium, and program product. Background Art

[0003] In recent years, customer service has not only been widely used in telecommunications operations, but with the prevalence of various e-commerce companies and their new retail business models, online customer service has also become an indispensable part of customer service. Customer service quality and cost have become the standards for measuring the success of customer service system construction.

[0004] Currently, many companies use third-party customer service centers for customer service. Typically, these centers report the data generated during operations to the user company through event reporting. For example, for voice-related customer service, the center can report data related to voice calls to users through voice call events. These voice call events typically include call-related events and agent-related events. This allows company developers to develop applications based on these events for various business scenarios, such as monitoring customer service alerts, generating user call traces, determining agent status, and generating call record details.

[0005] Summary of the Invention

[0006] In view of this, an embodiment of the present disclosure provides an event processing method, which can judge the disorder of received events based on the timestamp and serial number carried in the event, so as to effectively and accurately identify events with incorrect receiving order, and avoid the problem of inaccurate received information caused by the incorrect event receiving order.

[0007] According to some embodiments of the present disclosure, the event processing method described in the embodiments of the present disclosure may include: extracting a first timestamp and a first sequence number from a received first event; reading a stored second timestamp and a second sequence number corresponding to a second event; determining whether the first event is an out-of-order event based on the first timestamp, the first sequence number, and the second timestamp and the second sequence number; and in response to determining that the first event is an out-of-order event, performing out-of-order processing on the first event.

[0008] In an embodiment of the present disclosure, the method further includes: in response to determining that the first event is a non-out-of-order event, updating the second timestamp to the first timestamp and updating the second sequence number to the first sequence number.

[0009] In an embodiment of the present disclosure, determining whether the first event is an out-of-order event based on the first timestamp, the first sequence number, the second timestamp, and the second sequence number includes: comparing the first timestamp and the second timestamp; in response to determining that the first timestamp is greater than the second timestamp, determining that the first event is a non-out-of-order event; in response to determining that the first timestamp is less than the second timestamp, determining that the first event is an out-of-order event; in response to determining that the first timestamp is equal to the second timestamp, comparing the first sequence number with the second sequence number; in response to determining that the first sequence number is greater than the second sequence number, determining that the first event is a non-out-of-order event; in response to determining that the first sequence number is equal to the second sequence number, determining that the first event is a duplicate event and discarding the first event; and in response to determining that the first sequence number is less than the second sequence number, determining an absolute value of a difference between the first sequence number and the second sequence number, and comparing the absolute value of the difference with a preset sequence number threshold; in response to determining that the absolute value of the difference is greater than or equal to the sequence number threshold, determining that the first event is a non-out-of-order event; and in response to determining that the absolute value of the difference is less than the sequence number threshold, determining that the first event is an out-of-order event.

[0010] In an embodiment of the present disclosure, the above-mentioned determination of whether the first event is an out-of-order event based on the first timestamp, the first sequence number, the second timestamp and the second sequence number includes: comparing the first timestamp and the second timestamp; in response to determining that the first timestamp is greater than the second timestamp, determining that the first event is a non-out-of-order event; in response to determining that the first timestamp is less than the second timestamp, determining that the first event is an out-of-order event; in response to determining that the first timestamp is equal to the second timestamp, comparing the first sequence number with the second sequence number; in response to determining that the first sequence number is greater than the second sequence number, determining that the first event is a non-out-of-order event; in response to determining that the first sequence number is equal to the second sequence number, determining that the first event is a duplicate event and discarding the first event; and in response to determining that the first sequence number is less than the second sequence number, determining that the first event is an out-of-order event.

[0011] In an embodiment of the present disclosure, the above-mentioned first event is an agent status event; extracting the first timestamp and the first serial number from the received first event includes: extracting the first timestamp, the first serial number and the agent's identifier from the agent status event; and reading the stored second timestamp and second serial number corresponding to the second event includes: reading the stored second timestamp and second serial number corresponding to the agent's identifier.

[0012] In an embodiment of the present disclosure, the above-mentioned first event is a call event; extracting the first timestamp and the first serial number from the received first event includes: extracting the first timestamp, the first serial number and the call identifier from the call event; and reading the stored second timestamp and the second serial number corresponding to the second event includes: reading the stored second timestamp and the second serial number corresponding to the call identifier.

[0013] In an embodiment of the present disclosure, the out-of-order processing of the first events includes: discarding the first events.

[0014] In an embodiment of the present disclosure, the out-of-order processing of the first event includes: sorting the first event and other received events according to the first timestamp and the first sequence number.

[0015] Based on the above method, an embodiment of the present disclosure provides an event processing device, including:

[0016] A first version number extraction module, configured to extract a first timestamp and a first sequence number from a received first event;

[0017] A second version number extraction module, configured to read a stored second timestamp and a second sequence number corresponding to a second event;

[0018] an out-of-order event identification module, configured to determine whether the first event is an out-of-order event based on the first timestamp, the first sequence number, and the second timestamp and the second sequence number; and

[0019] The out-of-order event processing module is configured to, in response to determining that the first event is an out-of-order event, perform out-of-order processing on the first event.

[0020] In addition, an embodiment of the present disclosure further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned event processing method when executing the program.

[0021] An embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the above event processing method.

[0022] An embodiment of the present disclosure further provides a computer program product, comprising computer program instructions, which, when executed on a computer, enable the computer to execute the above-mentioned event processing method. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0024] FIG1 shows a schematic diagram of a customer service system according to an embodiment of the present disclosure;

[0025] FIG2 shows an example of a situation in which events are out of order when the client-server center reports agent status events according to an embodiment of the present disclosure;

[0026] FIG3 shows the implementation process of the event processing method according to an embodiment of the present disclosure;

[0027] FIG4 shows an implementation flow of the method for determining whether a first event is an out-of-order event according to an embodiment of the present disclosure;

[0028] FIG5 shows an implementation flow of a method for processing an agent status event according to an embodiment of the present disclosure;

[0029] FIG6 shows an implementation flow of a method for processing a call event according to an embodiment of the present disclosure;

[0030] FIG7 shows the internal structure of the event processing device according to an embodiment of the present disclosure; and

[0031] FIG8 shows a more specific schematic diagram of the hardware structure of an electronic device according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0032] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0033] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should have the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative position relationships. When the absolute position of the described object changes, the relative position relationship may also change accordingly.

[0034] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0035] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operation of the disclosed technical solution based on the prompt message.

[0036] As an optional but non-limiting implementation, in response to a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0037] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0038] As mentioned above, many companies currently use customer service centers provided by third parties for customer service. Figure 1 shows a schematic diagram of the customer service system used by the customer service center described in the embodiment of the present disclosure. As shown in Figure 1, the customer service system described in the embodiment of the present disclosure may include: a customer service center 102, which can provide users with underlying support for customer service in various ways such as voice, instant messaging, and email; and a business platform 104, which can provide users with various upper-level management functions such as agent workstations, agent management, customer service monitoring and alarms, and data statistics. Among them, one or more agents 106 managed by the user can access the customer service center 102 through the workstation provided by the above-mentioned business platform 104, thereby providing customer service to the object of the incoming customer service call. The user 108 can access the above-mentioned business platform 104 through the above-mentioned customer service center 102, connect to a certain agent 106, and have a conversation with the above-mentioned agent 106.

[0039] In the above-mentioned customer service system, the customer service center 102 typically reports various data and information generated during its operation to the service platform 104 through event reporting, which then analyzes and processes the reported data and information. For example, the customer service center 102 may report various call-related events and agent-related events to the user's service platform 104.

[0040] However, in actual applications, the transmission links used to transmit data in the network are often time-varying and complex. Consequently, events may be received out of order. This means that an event generated and reported first by the customer service center 102 may be received later by the service platform 104, resulting in an incorrect order of events. This incorrect order of events may further result in inaccurate information received by the service platform 104.

[0041] The following uses agent status event reporting as an example to illustrate the situation where the service platform 104 receives inaccurate information due to an error in the order of received events. Figure 2 shows an example of a situation where the client-server center, according to an embodiment of the present disclosure, receives events out of order when reporting agent status events. As shown in Figure 2, assume that Agent 1, while providing customer service through Customer Service Center 102, performs a busy action at time t1 (i.e., sets their own status to busy). At this point, Customer Service Center 102 generates an Agent Busy event (e.g., an EventAgentNotReady event) and reports it to Service Platform 104. This Agent Busy event includes Agent 1's identifier. Subsequently, Agent 1 performs an Idle action at time t2 (i.e., sets their own status to Idle). At this point, Customer Service Center 102 generates an Agent Idle event (e.g., an EventAgentReady event) and reports it to Service Platform 104. This Agent Idle event also includes Agent 1's identifier. However, due to network or other reasons, service platform 104 first receives the Agent Idle event at time t3 and then receives the Agent Busy event at time t4. In this case, if service platform 104 fails to detect the incorrect order of event reception, service platform 104 will first determine Agent 1's status as Idle based on the received Agent Idle event, and then determine Agent 1's status as Busy based on the received Agent Busy event. Consequently, Agent 1's current status will be Busy. This is clearly an incorrect state, and an incorrect agent status will result in the agent being unable to effectively provide customer service.

[0042] To address the above-mentioned issues, some embodiments of the present disclosure propose a method for processing received events based on the sequence number carried in the event. The sequence number represents the order in which the events were generated. Typically, when a new event is generated, the sequence number is incremented by 1 and carried in the event to identify the order in which the events were generated. Therefore, the sequence number is typically monotonically increasing. Based on the above-mentioned characteristics of the sequence number, when using the sequence number carried in the event to determine whether the event is out of order, the sequence number carried in the newly received event can be compared with the sequence number of the recorded received event. If the sequence number carried in the newly received event is greater than the sequence number of the recorded received event, it indicates that the event was received in the correct order and can be processed normally. Conversely, if the sequence number carried in the newly received event is less than the sequence number of the recorded received event, it indicates that the event was received in an incorrect order. The newly received event can usually be considered an old event, and the newly received event can be discarded or reordered. As can be seen, the above-mentioned method can utilize the characteristic that the sequence number is typically monotonically increasing to determine whether the event is received in an incorrect order, thereby effectively resolving the problem of receiving information errors caused by out-of-order events.

[0043] However, during research, the applicant discovered that in actual applications, although the sequence numbers carried in events are usually monotonically increasing, they can occasionally "roll back to zero." That is, in actual applications, under certain special circumstances, the sequence numbers carried in events are not guaranteed to be monotonically increasing, and may occasionally restart from zero. In such cases, if the aforementioned method for determining event out-of-order is still used, the "roll back to zero" sequence will misinterpret newly received events as indicating an error in the order in which events were received. Consequently, the newly received events will be discarded, resulting in errors in the received information.

[0044] Generally, there are two situations that cause the serial number to "reset to zero":

[0045] Case 1: Sequence number exhaustion. In the embodiments of the present disclosure, event sequence numbers are typically stored using long integer data. Although the upper limit of the sequence number that can be recorded by long integer data is very large, for customer service with a large call volume, the sequence number is generally exhausted faster. When the sequence number reaches the upper limit of the value that can be recorded by a long integer data, it will restart from zero, causing the sequence number to "return to zero".

[0046] Case 2: Abnormal situation. When the customer service center needs to restart the application, such as upgrading basic components, fixing security issues, or upgrading hardware, or when the customer service center experiences abnormal situations such as power outages or hardware failures in the computer room, the serial number may also start counting from zero, causing the serial number to "reset to zero".

[0047] It can be seen that although the method proposed in the above embodiment for judging the disorder of events received based on the serial numbers carried in the events can identify events with incorrect reception order in most cases, once the serial number "returns to zero", the newly received events that occur later may be mistakenly judged as errors in the reception order of events, and the newly received events that occur later may be discarded or re-sorted incorrectly, which in turn leads to errors in the received information.

[0048] To this end, other embodiments of the present disclosure provide an event processing method that can determine the out-of-order nature of received events based on the timestamps and sequence numbers carried in the events, thereby effectively and accurately identifying events that were received in the wrong order, thereby avoiding the problem of inaccurate received information caused by the wrong event reception order. It should be noted that the above-mentioned event processing method can be executed by the business platform 104 in the customer service system.

[0049] FIG3 shows the implementation process of the event processing method according to the embodiment of the present disclosure. As shown in FIG3, the event processing method may include the following steps:

[0050] At step 302, a first timestamp and a first sequence number are extracted from the received first event.

[0051] In the embodiment of the present disclosure, each type of event reported by the customer service center 102 to the business platform 104 will carry a timestamp and a sequence number corresponding to the event.

[0052] As mentioned above, the sequence number carried in the event is generated when the event is generated, and is mainly used to identify the order in which the event is generated.

[0053] Furthermore, the timestamp carried in an event is also generated when the event is generated, primarily to record the time at which the event was generated. Typically, the accuracy of these event stamps is microseconds. It is understood that a larger timestamp indicates a later time at which the event was generated, while a smaller timestamp indicates an earlier time at which the event was generated. It is important to note that because timestamps correspond to objectively existing time, they are absolutely monotonically increasing and will not stop counting or "reset to zero" due to machine restarts or other abnormal conditions. Furthermore, timestamps do not recount due to reaching a storage limit.

[0054] It should be noted that, for ease of description, in the embodiments of the present disclosure, a newly received, unprocessed event is referred to as the first event; and the latest event, which has been processed and determined to be non-out-of-order, is referred to as the second event. Furthermore, drawing on the concept of versions in software, the combination of the timestamp and sequence number carried in an event can also be referred to as the version number of the event. Thus, it can also be considered that the purpose of step 302 above is to obtain the version number of the first event.

[0055] In step 304 , the stored second timestamp and second sequence number corresponding to the second event are read.

[0056] As previously mentioned, in the embodiments of the present disclosure, the latest event that has been processed and determined to be non-out-of-order is referred to as the second event. For this second event, the service platform 104 stores the corresponding timestamp (i.e., the second timestamp) and sequence number (i.e., the second sequence number) of the second event as a basis for determining event out-of-order. Thus, it can be considered that the purpose of step 304 is to read the version number of the latest event that has been correctly received locally.

[0057] In step 306 , it is determined whether the first event is an out-of-order event based on the first timestamp, the first sequence number, the second timestamp, and the second sequence number.

[0058] In an embodiment of the present disclosure, the specific method for determining whether the first event is an out-of-order event based on the first timestamp, the first sequence number, the second timestamp and the second sequence number in step 306 will be described in detail later and will be omitted here.

[0059] In step 308 , in response to determining that the first event is an out-of-order event, out-of-order processing is performed on the first event.

[0060] In an embodiment of the present disclosure, out-of-order processing of the first event may include discarding the first event. Alternatively, out-of-order processing of the first event may include sorting the first event and other received events based on the first timestamp and the first sequence number. The specific method for sorting the first event and other received events will be described in detail later and is omitted here.

[0061] In an embodiment of the present disclosure, if the first event is determined to be a non-out-of-order event, then the first event can be processed according to existing business requirements. For example, assuming the first event is an agent status event, if the first event is determined to be a non-out-of-order event, the status of a particular agent identified in the first event can be updated in the business system based on the agent's status.

[0062] Furthermore, if the first event is determined to be a non-out-of-order event, the stored second timestamp can be updated to the first timestamp, and the stored second sequence number can be updated to the first sequence number. That is, the stored second timestamp and second sequence number corresponding to the second event can be updated to the first timestamp and first sequence number corresponding to the first event. In this way, the stored second timestamp and second sequence number corresponding to the second event will always record the timestamp and sequence number of the most recently received non-out-of-order event, thereby ensuring the accuracy of the judgment criteria for determining event out-of-order.

[0063] It can be seen from the event processing method shown in Figure 3 above that the above method further introduces the timestamp carried in the event on the basis of the serial number to perform disorder judgment, thereby effectively avoiding disorder misjudgment caused by the serial number "returning to zero", and can effectively and accurately identify events with incorrect reception order, avoiding the problem of inaccurate reception information caused by the incorrect event reception order.

[0064] The specific implementation method of determining whether the first event is an out-of-order event based on the first timestamp, the first sequence number, the second timestamp and the second sequence number in step 306 will be described in detail below with reference to specific examples and drawings.

[0065] FIG4 shows the implementation process of the method for determining whether a first event is an out-of-order event according to an embodiment of the present disclosure. As shown in FIG4 , the method may include the following steps:

[0066] At step 402 , the first timestamp and the second timestamp are compared.

[0067] In step 404 , in response to determining that the first timestamp is greater than the second timestamp, the first event is determined to be a non-out-of-order event.

[0068] At step 406 , in response to determining that the first timestamp is less than the second timestamp, the first event is determined to be an out-of-order event.

[0069] In an embodiment of the present disclosure, when the timestamp of a newly received first event is different from the timestamp of a stored second event, since the timestamp is monotonically increasing and does not "return to zero", the order of event generation can be accurately determined directly based on the size of the timestamp. However, in the case of a high concurrency of events, multiple events may correspond to the same timestamp. The order of event generation cannot be determined solely based on the timestamp. In this case, it is necessary to further combine the sequence number carried in the event to make a judgment.

[0070] At step 408 , in response to determining that the first timestamp is equal to the second timestamp, the first sequence number is compared with the second sequence number.

[0071] At step 410 , in response to determining that the first sequence number is greater than the second sequence number, the first event is determined to be a non-out-of-sequence event.

[0072] In step 412, in response to determining that the first sequence number is equal to the second sequence number, the first event is determined to be a duplicate event, and the first event is discarded.

[0073] In the embodiments of the present disclosure, if the timestamps of two events are the same, and the sequence number of the newly received first event is greater than the sequence number of the stored second event, then it can be directly determined that the order in which the events were received is correct, that is, the first event is a non-out-of-order event, and subsequent normal processing can then be performed. If the sequence number of the newly received first event is equal to the sequence number of the stored second event, then it can be determined that the newly received event and the second event are duplicates, and therefore there is no need to process the first event and it can be directly discarded.

[0074] At step 414 , in response to determining that the first sequence number is less than the second sequence number, an absolute value of the difference between the first sequence number and the second sequence number is determined.

[0075] In step 416, the absolute value of the difference is compared with a preset sequence number threshold.

[0076] At step 418 , in response to determining that the absolute value of the difference is greater than or equal to the sequence number threshold, the first event is determined to be a non-out-of-sequence event.

[0077] At step 420 , in response to determining that the absolute value of the difference is less than the sequence number threshold, the first event is determined to be an out-of-sequence event.

[0078] Research has found that when two events have the same timestamp and the sequence number of the newly received first event is smaller than the sequence number of the stored second event, it is not necessarily due to an error in the order in which the events were received. Instead, two possible scenarios exist: one is that the order in which the events were received was indeed incorrect, meaning that the first event occurred first and was received later out of order; the other is that the order in which the events were received was correct, but the sequence number of the first event was reduced due to a "rollout" before the first event was generated. Further research has found that, since "rollout" is usually an unexpected occurrence and does not occur frequently, when the sequence number of the first event is reduced due to a "rollout" to the first event, the difference between the sequence number of the first event and the stored sequence number of the second event is usually large. If the sequence number of the first event is reduced due to an error in the order in which the events were received, the difference between the sequence number of the first event and the stored sequence number of the second event is usually small (this is because the first and second events have the same timestamp, meaning they were generated at the same time, so even with a large concurrency of events, the difference between the sequence numbers of the two events will not be too large). Based on the above research, in the embodiments of the present disclosure, a sequence number threshold parameter is pre-set. When the first and second timestamps are the same and the first sequence number is smaller than the second sequence number, a further determination is made as to whether the absolute value of the difference between the first and second sequence numbers is greater than the sequence number threshold. Only when the absolute value of the difference is smaller than the sequence number threshold is the first event determined to be an out-of-sequence event. If the absolute value of the difference is greater than or equal to the sequence number threshold, it is determined that the sequence number of the first event decreased due to a "reset to zero" condition before the first event occurred. In this case, the first event is determined to be a non-out-of-sequence event and normal subsequent processing is performed.

[0079] It can be seen that, in the process of determining whether the first event is an out-of-order event, the timestamp carried in the event is first used as the main basis for judgment, and when the first timestamp of the first event is the same as the timestamp of the stored second event, the serial number carried in the event is combined for judgment. In the judgment process, the changing characteristics of the serial number when the serial number of the event becomes smaller due to the serial number "returning to zero" are fully considered, so that it is possible to effectively and accurately determine whether the newly received first event is an out-of-order event, and effectively avoid the problem of inaccurate received information caused by the reversal of the order of event reception.

[0080] In the embodiments of the present disclosure, the sequence number threshold can be flexibly set based on the actual application scenario. For example, in some embodiments, the sequence number threshold can be set based on the actual concurrent event volume and the average period during which the sequence number "rolls to zero" occurs. Specifically, the sequence number threshold can be set to a value that is less than the product of the concurrent event volume and the average period.

[0081] In addition, as an alternative to the above scheme, taking into account the occurrence of - the timestamps of the first event and the second event are the same, but the sequence number "returns to zero" occurs just before the first event is generated, resulting in the sequence number of the first event being smaller than the sequence number of the second event - the probability of this situation is very low even when the event concurrency is high, the method shown in Figure 4 above can be simplified. Specifically, the above steps 402-412 remain unchanged, and after the above step 412, it further includes: in response to determining that the first sequence number is smaller than the second sequence number, determining that the above first event is an out-of-sequence event. Although the above method does not judge the above special situation where the event sequence number becomes smaller due to the "return to zero" situation, since the above method introduces the timestamp as the main basis for judgment, it can still effectively and accurately identify the vast majority of out-of-sequence events.

[0082] In an embodiment of the present disclosure, the specific method for sorting the above-mentioned first event and other received events can also refer to the method shown in Figure 4 above, that is, first, a first sorting can be performed based on the first timestamp of the first event and the timestamps of other events (events with smaller timestamps are sorted first). If the timestamp of the above-mentioned first event is the same as the timestamp of one or more events in the other events, a second sorting can be further performed based on the first serial number of the above-mentioned first event and the serial numbers of the above-mentioned one or more events (usually events with smaller serial numbers are sorted first). In particular, when performing the second sorting, if it is determined that the serial number of the first event becomes smaller due to the serial number being "returned to zero", the first event can be sorted after the other events.

[0083] As you can see, the event handling method described above doesn't distinguish between the specific types of first and second events. In actual application scenarios, different types of events are typically judged and handled separately based on specific business needs. The following examples illustrate this using agent status events and call events.

[0084] FIG5 shows the implementation process of the method for processing an agent status event according to an embodiment of the present disclosure. As shown in FIG5 , the method may include the following steps:

[0085] In step 502, a first timestamp, a first sequence number, and an agent identifier are extracted from the received agent state event.

[0086] As mentioned above, in addition to the timestamp and sequence number, the agent status event also includes the identifier of the agent whose status has changed.

[0087] In step 504, the stored second timestamp and second serial number corresponding to the agent's identification are read.

[0088] In the embodiments of the present disclosure, during the processing of agent status events, a timestamp (also known as a second timestamp) and a sequence number (also known as a second sequence number) corresponding to the agent's identifier are stored for each agent, serving as a basis for determining event out-of-order. In this case, the second event refers to the latest agent status event that has been processed for a particular agent. In other words, each agent will be associated with a second event, a second timestamp, and a second sequence number.

[0089] At step 506, determining whether the agent status event is an out-of-sequence event based on the first timestamp, the first sequence number, the second timestamp, and the second sequence number; and

[0090] In step 508, in response to determining that the agent status event is an out-of-sequence event, out-of-sequence processing is performed on the agent status event.

[0091] Furthermore, the method may further include: in response to determining that the agent status event is a non-out-of-sequence event, updating the second timestamp corresponding to the agent identifier to the first timestamp, and updating the second sequence number corresponding to the agent identifier to the first sequence number. Next, if the agent status event is determined to be a non-out-of-sequence event, the status of the agent corresponding to the agent identifier may be updated based on the agent status event.

[0092] FIG6 shows the implementation process of the method for processing a call event according to an embodiment of the present disclosure. As shown in FIG6 , the method may include the following steps:

[0093] In step 602, a first timestamp, a first sequence number, and a call identifier are extracted from the received call event.

[0094] It should be noted that, in general, in addition to the timestamp and sequence number, a call event also includes a call identifier to distinguish different calls. That is, for a newly generated call, the customer service center will generate a call identifier to mark the call.

[0095] In step 604, the stored second timestamp and second sequence number corresponding to the call identifier are read.

[0096] In the embodiment of the present disclosure, during the call event processing process, the timestamp (i.e., second timestamp) and sequence number (i.e., second sequence number) corresponding to the call identifier of each call are stored for each call as a basis for determining event reordering. In other words, each call will correspond to a second event, a second timestamp, and a second sequence number.

[0097] At step 606, determining whether the call event is an out-of-sequence event based on the first timestamp, the first sequence number, the second timestamp, and the second sequence number; and

[0098] In step 608, in response to determining that the call event is an out-of-sequence event, out-of-sequence processing is performed on the call event.

[0099] Furthermore, the method may further include: in response to determining that the call event is a non-out-of-sequence event, updating the second timestamp corresponding to the call identifier to the first timestamp, and updating the second sequence number corresponding to the call identifier to the first sequence number. Next, if the call event is determined to be a non-out-of-sequence event, call trajectory information may be generated based on the call event or other data statistics and monitoring processing may be performed.

[0100] In addition, the specific implementation method of the above steps 506 and 606 can refer to the method shown in FIG. 4 .

[0101] It can be seen that the above event processing method can be used to process the agent status events and call events received from the customer service center, and can effectively and accurately determine whether the newly received agent status events or call events are out-of-order events, effectively avoiding the problem of inaccurate received information caused by the reverse order of event reception.

[0102] It should be noted that Figures 5 and 6 are merely two examples and are not intended to limit the event handling method described in this disclosure to only the handling of agent status events and call events. On the contrary, the basic concept of the event handling method described in this disclosure can be applied to handling various events generated by a customer service center.

[0103] When judging the reception order of events, the above-mentioned event processing method and device not only consider the serial number carried by the event but also the timestamp, which can effectively avoid the misjudgment of the incorrect reception order caused by the serial number "returning to zero". Therefore, it can effectively and accurately identify events with incorrect reception order and avoid the problem of inaccurate reception information caused by the incorrect event reception order.

[0104] Corresponding to the above method, the embodiment of the present disclosure further discloses an event processing device. FIG7 shows the internal structure of the event processing device according to the embodiment of the present disclosure. As shown in FIG7, the event processing device may include the following modules:

[0105] A first version number extraction module 702 is configured to extract a first timestamp and a first sequence number from a received first event;

[0106] A second version number extraction module 704 is configured to read a stored second timestamp and a second sequence number corresponding to a second event;

[0107] an out-of-order event identification module 706, configured to determine whether the first event is an out-of-order event based on the first timestamp, the first sequence number, and the second timestamp and the second sequence number; and

[0108] The out-of-order event processing module 708 is configured to, in response to determining that the first event is an out-of-order event, perform out-of-order processing on the first event.

[0109] The specific implementation of each of the above modules can refer to the aforementioned methods and drawings, and will not be repeated here. For the convenience of description, the above devices are described separately according to their functions and modules. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware. The device of the above embodiment is used to implement the corresponding event processing method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0110] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides a head-mounted display device, including: a sensor, a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, the event processing method described in any of the above embodiments is implemented.

[0111] FIG8 is a schematic diagram showing the hardware structure of a more specific head-mounted display device provided in this embodiment. The device may include: a processor 2010, a memory 2020, an input / output interface 2030, a communication interface 2040, and a bus 2050. The processor 2010, the memory 2020, the input / output interface 2030, and the communication interface 2040 are connected to each other within the device via the bus 2050.

[0112] The processor 2010 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0113] The memory 2020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 2020 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 220 and is called and executed by the processor 2010.

[0114] The input / output interface 2030 is used to connect input / output devices to enable information input and output. Input / output devices can be configured as components within the device or externally connected to the device to provide corresponding functions. Input devices may include microphones and various sensors, while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0115] The communication interface 2040 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).

[0116] The bus 2050 comprises a path for transmitting information between the various components of the device (eg, the processor 2010 , the memory 2020 , the input / output interface 2030 , and the communication interface 2040 ).

[0117] It should be noted that although the above device only shows the processor 2010, the memory 2020, the input / output interface 2030, the communication interface 2040, and the bus 2050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will understand that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.

[0118] The electronic device of the above embodiment is used to implement the corresponding event processing method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0119] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the event processing method described in any of the above embodiments.

[0120] The computer-readable media of this embodiment include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, modules of programs 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 technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0121] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the task processing method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0122] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Within the scope of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.

[0123] In addition, to simplify the description and discussion, and so as not to obscure the embodiments of the present disclosure, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, devices may be shown in the form of block diagrams to avoid obscuring the embodiments of the present disclosure, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be fully within the purview of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it will be apparent to those skilled in the art that the embodiments of the present disclosure may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0124] Although the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0125] The embodiments of the present disclosure are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. An event processing method, comprising: extracting a first timestamp and a first sequence number from the received first event; Reading the stored second timestamp and second sequence number corresponding to the second event; determining whether the first event is an out-of-order event based on the first timestamp, the first sequence number, and the second timestamp and the second sequence number; as well as In response to determining that the first event is an out-of-order event, the first event is processed out of order.

2. The method according to claim 1, further comprising: In response to determining that the first event is a non-out-of-sequence event, the second timestamp is updated to the first timestamp and the second sequence number is updated to the first sequence number.

3. The method according to claim 1, wherein: The determining whether the first event is an out-of-order event based on the first timestamp, the first sequence number, and the second timestamp and the second sequence number comprises: comparing the first timestamp and the second timestamp; In response to determining that the first timestamp is greater than the second timestamp, determining that the first event is a non-out-of-order event; In response to determining that the first timestamp is less than the second timestamp, determining that the first event is an out-of-order event; In response to determining that the first timestamp is equal to the second timestamp, comparing the first sequence number to a second sequence number; In response to determining that the first sequence number is greater than the second sequence number, determining that the first event is a non-out-of-sequence event; In response to determining that the first sequence number is equal to the second sequence number, determining that the first event is a duplicate event, and discarding the first event; and In response to determining that the first sequence number is less than the second sequence number, determining an absolute value of a difference between the first sequence number and the second sequence number; comparing the absolute value of the difference with a preset sequence number threshold; in response to determining that the absolute value of the difference is greater than or equal to the sequence number threshold, determining that the first event is a non-out-of-order event; and in response to determining that the absolute value of the difference is less than the sequence number threshold, determining that the first event is an out-of-order event.

4. The method according to claim 1, wherein: The determining whether the first event is an out-of-order event based on the first timestamp, the first sequence number, and the second timestamp and the second sequence number comprises: comparing the first timestamp and the second timestamp; In response to determining that the first timestamp is greater than the second timestamp, determining that the first event is a non-out-of-order event; In response to determining that the first timestamp is less than the second timestamp, determining that the first event is an out-of-order event; In response to determining that the first timestamp is equal to the second timestamp, comparing the first sequence number to a second sequence number; In response to determining that the first sequence number is greater than the second sequence number, determining that the first event is a non-out-of-sequence event; In response to determining that the first sequence number is equal to the second sequence number, determining that the first event is a duplicate event, and discarding the first event; and In response to determining that the first sequence number is less than the second sequence number, the first event is determined to be an out-of-sequence event.

5. The method according to claim 1, wherein: The first event is an agent status event; The extracting the first timestamp and the first sequence number from the received first event comprises: extracting the first timestamp, the first sequence number and the identification of the agent from the agent state event; and The reading of the stored second timestamp and second serial number corresponding to the second event includes: reading the stored second timestamp and second serial number corresponding to the identification of the seat.

6. The method according to claim 1, wherein: The first event is a call event; Extracting the first timestamp and the first sequence number from the received first event includes: extracting the first timestamp, the first sequence number and the call identifier from the call event; and The reading of the stored second timestamp and second sequence number corresponding to the second event includes: reading the stored second timestamp and second sequence number corresponding to the call identifier.

7. The method according to claim 1, wherein: The out-of-order processing of the first events includes: discarding the first events.

8. The method according to claim 1, wherein: The out-of-order processing of the first event includes: sorting the first event and other received events according to the first timestamp and the first sequence number.

9. An event processing device, comprising: A first version number extraction module, configured to extract a first timestamp and a first sequence number from a received first event; A second version number extraction module, used to read the stored second timestamp and second sequence number corresponding to the second event; an out-of-order event identification module, configured to determine whether the first event is an out-of-order event based on the first timestamp, the first sequence number, and the second timestamp and the second sequence number; as well as The out-of-order event processing module is used to perform out-of-order processing on the first event in response to determining that the first event is an out-of-order event.

10. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the event processing method according to any one of claims 1 to 8 is implemented.

11. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the event processing method according to any one of claims 1 to 8.

12. A computer program product, comprising computer program instructions, which, when executed on a computer, enable the computer to execute the event processing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Time sequence index out-of-order detection method and device and medium

    CN113934458A

  • Method for processing out-of-order data, equipment and readable storage medium

    CN113961763A

  • Data updating method and device, storage medium and electronic device

    CN115734204A

  • Event processing method and related equipment

    CN116431364A

  • Consistent read queries from a secondary compute node

    US20200050692A1

Cited By

  • Event processing method and related equipment

    CN116431364A