Event acquisition method and device, computer device, and storage medium

By retrieving the reservation events of the target object and its related previous events from the second server through the first server, the problem of data integrity and reliability in application iteration is solved, ensuring the integrity and accuracy of reservation event data.

CN116737688BActive Publication Date: 2025-11-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210209658.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-04
Publication Date
2025-11-28
Estimated Expiration
2042-03-04

AI Technical Summary

Technical Problem

During application iteration, existing technologies cannot effectively guarantee the integrity and reliability of event-related data for the target object, especially when the same object account logs into different versions of the application at the same time. This results in the inability to migrate data related to newly generated events in the old version of the application, which may be missing or tampered with.

Method used

The upgraded first server retrieves event information from the unupgraded second server, responds to reservation event retrieval requests, obtains the target reservation event and its related previous events, and returns complete reservation event data, thus avoiding loss or tampering during the data migration process.

Benefits of technology

It ensures the integrity and reliability of appointment event data during application iteration, guarantees that data is not lost or tampered with, and improves the accuracy and consistency of data acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116737688B_ABST
    Figure CN116737688B_ABST
Patent Text Reader

Abstract

The application provides an event acquisition method and device, computer equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: in response to a reservation event acquisition request, acquiring at least one first reservation event of a first application account, the first reservation event being an event related to the first application account; based on a first start time of a target reservation event, acquiring a second reservation event from a second server, the event start time of the second reservation event being located before the first start time, the target reservation event being the latest reservation event in terms of event start time among the at least one first reservation event; and based on the at least one first reservation event and the second reservation event, returning at least one reservation event. The above scheme can return the required reservation event according to the reservation event acquisition request, avoids the loss or tampering of the related data of the reservation event, and thus guarantees the integrity of the related data of the reservation event.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to an event acquisition method and device, computer equipment and storage medium. BACKGROUND

[0002] With the development of computer technology, the iteration rate of application is fast. In the iteration process of new and old versions of application, how to ensure the integrity and reliability of the related data of the target object involved event is the research direction.

[0003] At present, the commonly used method is to migrate the related data of the event of the target object in the old version of application. The migration scheme is: in the iteration process, the related data of the event of the target object in the old version of application is locked, and the locked data is migrated to the new version of application as a whole, so that the object account can access the related data of the event of the target object in the old version of application through the new version of application.

[0004] However, due to the existence of the same object account logging into different versions of application at the same time, if the above technical scheme is used, the related data of the newly generated event in the old version of application cannot be migrated, resulting in the loss or tampering of the related data of the event of the target object, and the integrity and reliability of the related data of the event cannot be guaranteed. SUMMARY

[0005] The embodiments of the present application provide an event acquisition method and device, computer equipment and storage medium, which can avoid the loss or tampering of the related data of the reservation event, so as to ensure the integrity of the related data of the reservation event. The technical scheme is as follows:

[0006] On the one hand, an event acquisition method is provided, which is applied to a first server, and the method comprises:

[0007] In response to a reservation event acquisition request, at least one first reservation event of a first application account is acquired, the first reservation event being an event related to the first application account;

[0008] Based on the first start time of a target reservation event, a second reservation event whose event start time is located before the first start time is acquired from a second server, the target reservation event being the latest reservation event in the at least one first reservation event in terms of event start time, and the second reservation event being an event related to the first application account;

[0009] Based on the at least one first reservation event and the second reservation event, at least one reservation event is returned.

[0010] On the other hand, an event acquisition device is provided, which comprises:

[0011] The first obtaining module is configured to obtain at least one first reservation event of a first application account in response to a reservation event obtaining request, the first reservation event being an event related to the first application account;

[0012] The first obtaining module is further configured to obtain, from a second server, a second reservation event whose event start time is earlier than a first start time based on the target reservation event, the target reservation event being a reservation event with the latest event start time among the at least one first reservation event, and the second reservation event being an event related to the first application account;

[0013] The first sending module is configured to return at least one reservation event based on the at least one first reservation event and the second reservation event.

[0014] In some embodiments, the first obtaining module comprises:

[0015] The first obtaining unit is configured to obtain a plurality of reservation events related to the first application account in response to the reservation event obtaining request;

[0016] The second obtaining unit is configured to obtain, from the plurality of reservation events, a second quantity of first reservation events with the earliest event start time based on a first quantity carried in the reservation event obtaining request, the first quantity being not less than the second quantity.

[0017] In some embodiments, the first obtaining module is further configured to obtain, from the second server, a second reservation event whose event start time is earlier than a second start time in response to the first quantity being greater than a quantity of the plurality of reservation events, the second start time being later than the first start time.

[0018] In some embodiments, the first sending module comprises:

[0019] The processing unit is configured to perform format processing on the second reservation event based on the at least one first reservation event, the format processing being used to unify a data format of the second reservation event and a data format of the at least one first reservation event;

[0020] The sending unit is configured to return the at least one reservation event based on the at least one first reservation event and the second reservation event after the format processing.

[0021] In some embodiments, the first sending module comprises:

[0022] The sorting unit is configured to jointly sort the at least one first reservation event and the second reservation event based on event start time.

[0023] The third acquisition unit is used to acquire a first quantity carried in the reservation event based on the reservation event, and to acquire the first number of reservation events that are sorted first.

[0024] The sending unit is also used to return the first number of reservation events.

[0025] In some embodiments, the first acquisition module is further configured to, in response to a page-turning request, acquire a third start time carried by the page-turning request, wherein the third start time is the event start time of the latest start of the at least one reservation event;

[0026] The first sending module is further configured to return at least one reservation event whose event start time is after the third start time, based on the third start time, the at least one first reservation event, and the second reservation event.

[0027] In some embodiments, the first acquisition module is further configured to, in response to a page-turning request, acquire a third start time carried by the page-turning request, wherein the third start time is the event start time of the latest start of the at least one reservation event;

[0028] The first sending module is further configured to, based on the third start time, reacquire at least one scheduled event whose start time is after the third start time, and return the at least one scheduled event.

[0029] In some embodiments, the apparatus further includes:

[0030] A tagging module is used to add a source tag to the at least one reservation event, the source tag being used to indicate the source server of the reservation event.

[0031] In some embodiments, the apparatus further includes:

[0032] The second acquisition module is used to acquire at least one first historical event of the first application account in response to a historical event acquisition request, wherein the first historical event is an event related to the first application account;

[0033] The second acquisition module is further configured to acquire, based on the fourth start time of the target historical event, a second historical event whose start time is after the fourth start time from the second server, wherein the target historical event is the historical event with the earliest start time among the at least one first historical event, and the second historical event is an event related to the first application account;

[0034] The second sending module is used to return at least one historical event based on the at least one first historical event and the second historical event.

[0035] In some embodiments, the apparatus further comprises:

[0036] a determining module configured to determine event modification information of the modified appointment event in response to the event modification request;

[0037] a third sending module configured to send an event modification prompt corresponding to the event modification information to at least one second application account based on the second server, the at least one second application account being related to the modified appointment event.

[0038] In another aspect, a computer device is provided, which comprises a processor and a memory, the memory being configured to store at least one piece of computer program, the at least one piece of computer program being loaded and executed by the processor to implement the event obtaining method in the embodiments of the present application.

[0039] In another aspect, a computer readable storage medium is provided, which stores at least one piece of computer program, the at least one piece of computer program being loaded and executed by a processor to implement the event obtaining method in the embodiments of the present application.

[0040] In another aspect, a computer program product or computer program is provided, which comprises computer program code stored in a computer readable storage medium, the computer program code being read by a processor of a computer device from the computer readable storage medium, and the processor executes the computer program code to enable the computer device to perform the event obtaining method provided in the various aspects or various optional implementations.

[0041] The embodiments of the present application provide an event obtaining solution, which does not need to migrate the related data of the appointment event, and returns the required appointment event according to the appointment event obtaining request by obtaining the event information from the second server before upgrading by the first server after upgrading, avoids the case that the related data of the appointment event is missing or tampered, and can guarantee the integrity of the related data of the appointment event. BRIEF DESCRIPTION OF DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0043] Figure 1 is an implementation environment schematic diagram of an event obtaining method provided by the embodiments of the present application;

[0044] Figure 2 is a flowchart of an event acquisition method according to an embodiment of the present application;

[0045] Figure 3 is a flowchart of another event acquisition method according to an embodiment of the present application;

[0046] Figure 4 is an interaction flowchart of an event acquisition method according to an embodiment of the present application;

[0047] Figure 5 is an interaction flowchart of a modification of a reservation event according to an embodiment of the present application;

[0048] Figure 6 is a structural schematic diagram of an event acquisition apparatus according to an embodiment of the present application;

[0049] Figure 7 is a structural schematic diagram of another event acquisition apparatus according to an embodiment of the present application;

[0050] Figure 8 is a structural schematic diagram of a server according to an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described below with reference to the drawings.

[0052] In the present application, the terms "first", "second", and the like are used to distinguish the same or similar items with substantially the same function and action, and it should be understood that there is no logical or time sequence dependency between "first", "second", and "nth", and the number and execution order are not limited.

[0053] In the present application, the term "at least one" means one or more, and the term "multiple" means two or more.

[0054] It should be noted that the information (including but not limited to device information of a target object, personal information of a target object, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.), and signals involved in the present application are all authorized by the target object or fully authorized by all parties, and the collection, use, and processing of related data need to comply with relevant laws, regulations, and standards of relevant countries and regions. For example, the reservation events involved in the present application are obtained under full authorization.

[0055] In order to facilitate understanding, the following explains the terms involved in the present application.

[0056] Kafka: a high-throughput distributed publish / subscribe messaging system that can handle all action stream data of target objects in a website.

[0057] API (Application Programming Interface): a pre-defined interface or a convention for connecting different components of a software system. In the embodiments of the present application, it refers to the meaning of a pre-defined data parameter in an event, which can indicate the data format of the event.

[0058] The event acquisition method provided by the embodiments of the present application can be executed by a computer device. In some embodiments, the computer device is a terminal or a server. In the following, the implementation environment of the event acquisition method provided by the embodiments of the present application is introduced by taking the computer device as a server, Figure 1 is a schematic diagram of the implementation environment of the event acquisition method provided by the embodiments of the present application. Referring to Figure 1 , the implementation environment includes a terminal 101, a first server 102 and a second server 103. The terminal 101, the first server 102 and the second server 103 can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.

[0059] In some embodiments, the terminal 101 is a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, etc., but is not limited thereto. The terminal 101 is installed and runs an application program supporting event acquisition. In some embodiments, the application program is a conference application program, a social application program or a multimedia application program, etc. The terminal 101 is a terminal used by a target object, and the target object uses the terminal 101 to acquire related data of an event. It should be noted that the number of terminals can be more or less. For example, the number of terminals is one, or the number of terminals is dozens or hundreds, or more. The number of terminals and the type of device are not limited in the embodiments of the present application.

[0060] In some embodiments, the first server 102 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The first server 102 provides background services for applications that support event acquisition. In some embodiments, the first server 102 undertakes the primary computing work, and the terminal 101 undertakes the secondary computing work; or, the first server 102 undertakes the secondary computing work, and the terminal 101 undertakes the primary computing work; or, the first server 102 and the terminal 101 collaborate on computing using a distributed computing architecture.

[0061] In some embodiments, the second server 103 has a similar structure and works in a similar manner to the first server 102, and will not be described in detail here.

[0062] In some embodiments, the first server 102 can use the event acquisition method provided in this application to acquire at least one reservation event from the first server 102 and the second server 103. Before the application supporting event acquisition is upgraded, the terminal 101 sends the reservation events created by the application to the second server 103, whereby the second server 103 stores these reservation events. After the application supporting event acquisition is upgraded, the terminal 101 sends the reservation events created by the application to the first server 102, whereby the first server 102 stores these reservation events. At this time, the terminal 101 can acquire at least one reservation event from the first server 102 and the second server 103 through the first server 102.

[0063] In some embodiments, the scheduling event is a scheduled meeting. For example, in a scheduled meeting scenario, terminal 101 sends a scheduled meeting request to first server 102 through an installed meeting application. After receiving the scheduled meeting request, first server 102 uses the event acquisition method provided in this application embodiment to obtain at least one scheduled meeting from first server 102 and second server 103. Then, first server 102 returns the at least one scheduled meeting to terminal 101. The target user views the meeting information of the at least one scheduled meeting through terminal 101.

[0064] In some embodiments, the reservation event is a reservation item. For example, in the scenario of a reservation item, the terminal 101 sends a reservation item acquisition request to the first server 102 through an installed shopping application. After receiving the reservation item acquisition request, the first server 102 acquires at least one reservation item from the first server 102 and the second server 103 by using the event acquisition method provided in the embodiments of the present application. Then, the first server 102 returns the at least one reservation item to the terminal 101. The target object views the item information of the at least one reservation item through the terminal 101.

[0065] Figure 2 is a flowchart of an event acquisition method according to an embodiment of the present application. Referring to Figure 2 In the embodiments of the present application, the first server is taken as an example for illustration. The event acquisition method includes the following steps:

[0066] 201, in response to a reservation event acquisition request, the first server acquires at least one first reservation event of a first application account, the first reservation event being an event related to the first application account.

[0067] In the embodiments of the present application, an application supporting event acquisition is installed on the terminal, and the application includes an entry of an event acquisition service. The first server is configured to provide background service for the event acquisition service in the application. The first application account logged in through the application can trigger the upgraded event acquisition service. The terminal sends a reservation event acquisition request to the first server in response to a triggering operation on the entry of the event acquisition service, so as to instruct the first server to acquire a reservation event related to the first application account. The reservation event can be a reservation meeting, a reservation item, or a reservation for medical treatment, etc., which is not limited in the embodiments of the present application.

[0068] The reservation event acquisition request carries the first application account. After receiving the reservation event acquisition request, the first server can parse the first application account from the reservation event acquisition request. Then, the first server acquires at least one first reservation event based on the first application account, by querying the first application account related first reservation event from the database of the first server.

[0069] For example, taking the first appointment event as an appointment meeting as an example. The terminal is installed with a communication application, the communication application includes an entry of a meeting service for booking a meeting. The communication application is logged in with a first application account, and the entry of the meeting service can be triggered through the first application account. The terminal sends a booking meeting acquisition request to the first server in response to the triggering operation of the entry of the meeting service. The first server can acquire at least one appointment meeting related to the first application account based on the first application account carried in the booking meeting acquisition request.

[0070] 202. The first server acquires a second appointment event from the second server based on a first start time of a target appointment event, the target appointment event being an appointment event with the latest start time among the at least one first appointment event, and the second appointment event being an event related to the first application account and having a start time earlier than the first start time.

[0071] In the embodiments of the present application, the appointment event includes an event start time, which is used to indicate the time of occurrence of the appointment event. The first server can determine a target appointment event with the latest event start time based on the event start time of the at least one first appointment event. Then, the first server acquires a second appointment event from the second server based on a first start time of the target appointment event, the first start time being the event start time of the target appointment event. The second server is used to provide background services for the event acquisition service in the application before the event acquisition service is upgraded, and the second server is used to provide background services for other services in addition to the event acquisition service in the application.

[0072] For example, taking the first server to acquire three appointment meetings related to the first application account as an example. The three appointment meetings are all appointment meetings on January 1, 20XX, and the meeting start times are 12:00:00, 13:00:00 and 14:00:00 respectively. The first server can determine that the appointment meeting with the meeting start time of 14:00:00 is the target appointment meeting, and the first start time is January 1, 20XX 14:00:00. Then, the first server acquires the appointment meeting with the meeting start time before January 1, 20XX 14:00:00 from the second server.

[0073] 203. The first server returns at least one appointment event based on the at least one first appointment event and the second appointment event.

[0074] In the embodiments of the present application, the first server can return all the acquired at least one first reservation event and second reservation event to the terminal. Alternatively, the first server can select a reservation event meeting a condition from the acquired at least one first reservation event and second reservation event, and then return the reservation event meeting the condition to the terminal. The condition is determined based on an application scenario, which is not limited in the embodiments of the present application.

[0075] The embodiments of the present application provide an event acquisition method, which does not need to migrate the related data of the reservation event, and can return the required reservation event according to a reservation event acquisition request by acquiring the reservation event from the second server before upgrading by the first server after upgrading, thereby avoiding the case that the related data of the reservation event is missing or tampered, and ensuring the integrity of the related data of the reservation event.

[0076] Hereinafter, the event acquisition method provided by the embodiments of the present application is further described based on an application scenario. In the application scenario, a first application supporting event acquisition is installed on the terminal, and the first application includes an entrance of an event acquisition service. The first server is used to provide background service for the event acquisition service after upgrading in the first application, and other services except the event acquisition service in the first application are provided by the second server. The event acquisition service before upgrading in the first application is provided by the second server. Figure 3 is a flowchart of another event acquisition method provided by the embodiments of the present application, referring to Figure 3 In the embodiments of the present application, the event acquisition method is described by taking the first server as an example. The event acquisition method includes the following steps:

[0077] 301. In response to a reservation event acquisition request, the first server acquires a plurality of reservation events related to a first application account.

[0078] In the embodiments of the present application, the reservation event acquisition request is sent by the terminal after detecting the triggering operation on the entrance of the event acquisition service. The reservation event acquisition request carries the first application account logged in by the first application. The first server can acquire the plurality of reservation events related to the first application account from the associated database. The reservation event can be a reservation meeting, a reservation article or a reservation for medical treatment, which is not limited in the embodiments of the present application.

[0079] In some embodiments, the first server is further configured to provide a background service for a second application, the second application being a conference application, and the second application being logged in with a third application account. The third application account has an association relationship with the first application account, and the association relationship is established by the first server when the first application account authorizes login of the second application. The first server can also obtain a third application account related appointment event, and the third application account related appointment event is also regarded as a first application account related appointment event. By obtaining the appointment event based on the association relationship between different application accounts, events related to different application programs can be obtained, and the efficiency of obtaining events is improved.

[0080] 302. The first server obtains, from the plurality of appointment events, a second quantity of first appointment events with the earliest event start time based on the first quantity carried in the appointment event obtaining request, the first quantity being not less than the second quantity.

[0081] In the embodiments of the present application, the terminal can page display the obtained appointment events, wherein the first quantity is the maximum number of appointment events displayed in a single page when the terminal pages displays the appointment events. The second quantity is the number of first appointment events obtained from the plurality of appointment events. The event start time is used to represent the time when the appointment event occurs. The first server can sort the plurality of appointment events based on the event start time of the plurality of appointment events. Based on the sorting result, the second quantity of appointment events are obtained as the first appointment events. It should be noted that in the case that the first quantity is not greater than a third quantity of the plurality of appointment events, the first server can obtain the first quantity of first appointment events in front of the sorting from the plurality of appointment events, and at this time, the second quantity is equal to the first quantity. In the case that the first quantity is greater than the third quantity of the plurality of appointment events, the first server can obtain the third quantity of first appointment events, and at this time, the second quantity is equal to the third quantity. The scheme provided in the embodiments of the present application can obtain a corresponding number of appointment events through the first quantity, so as to meet the maximum number of events displayed in a single page when the terminal pages displays the events.

[0082] For example, taking the appointment event as an appointment meeting as an example. Table 1 shows a plurality of appointment meetings related to the first application account obtained by the first server. Referring to Table 1, the first server can obtain the plurality of appointment meetings shown in Table 1 from the database of the first server based on the first application account carried in the appointment meeting obtaining request. The appointment meeting includes a meeting ID (Identity document, identity number) and a meeting start time. The plurality of appointment meetings in Table 1 are sorted according to the meeting start time. The first server can obtain the five appointment meetings in front of the sorting as the first appointment meetings from the plurality of appointment meetings.

[0083] Table 1

[0084]

[0085] It should be noted that the embodiments of the present application take the sorting and screening according to the event start time of the appointment event as an example for illustration. In actual application, the appointment event further includes an event end time and an event creation time. The event end time is used to represent the time when the appointment event ends. The event creation time is used to represent the time when the appointment event is created. The embodiments of the present application can also sort and screen according to the event end time of the appointment event in the order of the first appointment event, or arrange and screen according to the event creation time of the appointment event in the order of the first appointment event, which is not limited by the embodiments of the present application.

[0086] 303、the first server acquires, from the second server, a second appointment event whose event start time is before the first start time, based on the first start time of a target appointment event, the target appointment event being the appointment event with the latest event start time among the at least one first appointment event, and the second appointment event being the event related to the first application account.

[0087] In the embodiments of the present application, if the first server acquires one first appointment event, the first server determines the first appointment event as the target appointment event; if the first server acquires two or more first appointment events, the first server can determine the target appointment event with the latest event start time based on the event start times of the two or more first appointment events. Then, the first server can send an event acquisition request to the second server, the event acquisition request carrying the first application account and the first start time of the target appointment event. The second server can query the appointment event related to the first application account based on the database, and then acquire the second appointment event whose event start time is before the first start time from the database. The second server can return the second appointment event to the first server. The first start time is the event start time of the target appointment event. It should be noted that if the second server does not query the appointment event related to the first application account, or the second server does not acquire the appointment event whose event start time is before the first start time, the second appointment event is null.

[0088] In some embodiments, the first server can also determine a time interval based on multiple first reservation events, and then obtain a second reservation event from the second server through the time interval. Here, "multiple" means two or more. The first server can determine a first event and a second event from the multiple first reservation events. The first event is the reservation event with the earliest start time among the multiple first reservation events. The second event is the reservation event with the latest start time among the first reservation events. Then, the first server determines a time interval based on the start time of the first event and the start time of the second event. Then, the first server can obtain a second reservation event whose start time falls within the time interval from the second server based on the time interval. The solution provided in this application embodiment determines a time interval by using the two reservation events with the earliest and latest start times from multiple first reservation events, enabling the acquisition of a second reservation event within that time interval from the second server. This avoids the loss of relevant data for reservation events whose start times fall within the time interval, thereby ensuring the integrity of the relevant data for the reservation events.

[0089] For example, the first server retrieves the top five scheduled meetings from the six scheduled meetings shown in Table 1. Based on the start times of these five first scheduled meetings, the time interval is determined to be from 12:00:00 on January 1, 20XX to 21:00:00 on January 1, 20XX. Based on this time interval, the first server retrieves five second scheduled meetings from the second server whose start times fall within this time interval. See Table 2, which shows the scheduled meetings retrieved from the second server.

[0090] Table 2

[0091]

[0092] It should be noted that when the third number of reserved events in the first server is less than the first number, the first server can expand the time range for acquiring the second reserved events, thereby acquiring more second reserved events to meet the maximum number of events displayed per page when the terminal displays events in a paginated manner. Correspondingly, in response to the first number being greater than the number of multiple reserved events, the first server acquires second reserved events from the second server whose start time is before the second start time. This second start time is later than the first start time. The solution provided in this application embodiment, when the number of reserved events in the first server is less than the first number, can expand the time range for acquiring the second reserved events, enabling the acquisition of more second reserved events, thereby meeting the maximum number of events displayed per page when the terminal displays events in a paginated manner.

[0093] For example, the first quantity is five and the third quantity of the reservation events in the first server is three. The three first reservation events obtained by the first server are all reservation events on January 1, 20XX, and the event start times of the three first reservation events are 12:00:00, 13:00:00 and 14:00:00 respectively. The first start time is 14:00:00 on January 1, 20XX. Since the first quantity is greater than the third quantity, the server determines the second start time as 20:00:00 on January 1, 20XX. The first server can obtain the second reservation events with event start times before 20:00:00 on January 1, 20XX from the second server.

[0094] It should be noted that the first server can also obtain the second reservation events based on the event end times or the event creation times of the first reservation events, which is not limited in the embodiments of the present application.

[0095] It should be noted that the following steps 304 to 306 are optional steps. Step 304 is to unify the data formats of the first reservation events and the second reservation events. Step 305 is to jointly sort the at least one first reservation event and the second reservation event. Step 306 is to select at least one reservation event in front of the order from the reservation events. The first server can point to at least one of the above steps 304 to 306, or none of the above steps 304 to 306, and the order of the first server executing the above steps 304, 305 and 306 is not limited in the embodiments of the present application.

[0096] Among them, after obtaining the first reservation event and the second reservation event, the first server can determine whether the data format of the first reservation event is consistent with the data format of the second reservation event. If the data format of the first reservation event is consistent with the data format of the second reservation event, the first server skips step 304. If the data format of the first reservation event is not completely consistent with the data format of the second reservation event, the first server can execute step 304 to format the second reservation event so that the data format of the first reservation event is consistent with the data format of the second reservation event.

[0097] Among them, after obtaining the first reservation event and the second reservation event, the first server can execute step 305 to jointly sort the first reservation event and the second reservation event; or skip step 305 to keep the original order of the first reservation event and the second reservation event unchanged; or execute step 304 first and then execute step 305 to jointly sort the first reservation event and the formatted second reservation event.

[0098] The first server can perform step 306 or skip step 306 after obtaining the first appointment event and the second appointment event. The first server can obtain the first number of appointment events in front of the second appointment event, or the first number of appointment events behind the second appointment event, which is not limited in the embodiments of the present application. The first server can obtain the first number of appointment events in front of the second appointment event after performing step 305.

[0099] 304. The first server formats the second appointment event based on the at least one first appointment event, the formatting being for unifying a data format of the second appointment event with a data format of the at least one first appointment event.

[0100] In the embodiments of the present application, the first server can format the obtained second appointment event so that the data format of the second appointment event is consistent with the data format of the at least one first appointment event. By adjusting the data format of the second appointment event to be consistent with the first appointment event, the appointment event obtained by the first server can be parsed and displayed by the application in the terminal.

[0101] For example, Table 3 shows an API document related to a first appointment event, which exemplarily shows the data format of the first appointment event. Table 4 shows an API document related to a second appointment event, which exemplarily shows the data format of the second appointment event. Taking the formatting of the parameter representing the start time of the meeting as an example, it is shown in Table 3 that the parameter representing the start time of the meeting in the first appointment event is start_time. Table 4 shows that the parameter representing the start time of the meeting in the second appointment event is meeting_start. The first server can format the parameter representing the start time of the meeting in the second appointment event, i.e., format meeting_start as start_time, so that the data format of the second appointment event is consistent with the data format of the at least one first appointment event.

[0102] Table 3

[0103]

[0104]

[0105] Table 4

[0106]

[0107]

[0108] In some embodiments, the first server can return the at least one appointment event based on the at least one first appointment event and the formatted second appointment event, i.e., directly performing step 307. In the scheme provided in the embodiments of the present application, the second appointment event is directly returned after being formatted, which is simple in operation and less in running consumption.

[0109] In some embodiments, the first server can further jointly sort the at least one first appointment event and the formatted second appointment event, and return the at least one appointment event based on the jointly sorted multiple appointment events, i.e., performing step 305 first, and then performing step 306 and step 307. In the scheme provided in the embodiments of the present application, by aligning the data format of the second appointment event to the data format of the first appointment event, the at least one first appointment event and the second appointment event can be more accurately jointly sorted, so that the terminal can accurately and orderly display the appointment events.

[0110] 305. The first server jointly sorts the at least one first appointment event and the second appointment event based on the event start time.

[0111] In some embodiments, the first server can jointly sort the at least one first appointment event and the formatted second appointment event based on the event start time. That is, the first server performs step 304 first, and then performs step 305. In the scheme provided in the embodiments of the present application, by formatting the second appointment event, the data format of the second appointment event is consistent with the data format of the first appointment event, so that the at least one first appointment event and the second appointment event can be more accurately jointly sorted, so that the terminal can accurately and orderly display the appointment events.

[0112] For example, taking the appointment event as an appointment meeting. The first server jointly sorts three first appointment meetings and five second appointment meetings based on the start time of the appointment meeting, and obtains eight appointment meetings shown in Table 5.

[0113] Table 5

[0114]

[0115]

[0116] It should be noted that the appointment event also includes an event end time and an event creation time. The first server can also jointly sort the at least one first appointment event and the second appointment event based on the event end time or the event creation time of the appointment event, which is not limited in the embodiments of the present application.

[0117] It should be noted that the condition of the first server jointly sorting the appointment event can be consistent with the condition of obtaining the appointment event, or can be inconsistent. For example, the first server obtains the at least one first appointment event and the second appointment event based on the event creation time of the appointment event, and then the first server jointly sorts the at least one first appointment event and the second appointment event based on the event creation time of the appointment event. Alternatively, the first server obtains the at least one first appointment event and the second appointment event based on the event start time of the appointment event, and then the first server jointly sorts the at least one first appointment event and the second appointment event based on the event end time. The embodiments of the present application do not limit this.

[0118] 306. The first server obtains the first number of appointment events in front of the order based on the first number carried in the appointment event obtaining request.

[0119] In the embodiments of the present application, the first server can obtain the first number of appointment events in front of the order from the jointly sorted appointment events.

[0120] For example, continuing to refer to Table 5, Table 5 shows that the background server of the conference application obtains five appointment conferences in front of the order in the jointly sorted appointment conferences.

[0121] In some embodiments, the first service can also add a source mark to the at least one appointment event. The source mark is used to indicate the source server of the appointment event. The source server is divided into the first server and the second server. The terminal can distinguish the source of the appointment event based on the source mark. The terminal can display the appointment events of different sources in different forms based on the source mark, so that the target object can easily distinguish the source of the appointment event. The source mark can also be used to indicate the source application of the appointment event, which can be divided into an application program before the event obtaining service is upgraded, an application program after the event obtaining service is upgraded, and an application program provided with a background service by the first server, and the like. The embodiments of the present application do not limit this.

[0122] 307. The first server returns the first number of appointment events.

[0123] In the embodiments of the present application, the first server sends the obtained first number of appointment events to the terminal. After receiving the first number of appointment events, the terminal can display the first number of appointment events to present to the target object.

[0124] In order to more clearly describe the present scheme, the process of the event obtaining method in the present scheme is described as a whole. Figure 4 is an interaction flowchart of an event obtaining method according to an embodiment of the present application. Referring to Figure 4The event acquisition method includes steps 401-407. In step 401, the terminal sends a first application account event acquisition request to a first server. In step 402, the first server acquires at least one first reserved event from the first server in response to the event acquisition request, and determines a first start time of a target reserved event based on the at least one first reserved event. In step 403, the first server sends a reserved event acquisition request carrying the first start time to a second server. In step 404, the second server acquires a second reserved event from the second server based on the second reserved event acquisition request. In step 405, the second server sends the second reserved event to the first server. In step 406, the first server formats the second reserved event based on the at least one first reserved event, and jointly sorts the at least one first reserved event and the formatted second reserved event. In step 407, the first server returns the first quantity of the jointly sorted reserved events to the terminal.

[0125] It should be noted that the terminal can display the reserved events acquired in steps 301-307 in a list form in an event display page, and the maximum quantity of the reserved events displayed in the event display page is the first quantity. The terminal can send a page turning request to the first server in response to a page turning operation. The first server can acquire at least one reserved event from the at least one first reserved event and the second reserved event, or reacquire at least one reserved event based on the page turning request.

[0126] In some embodiments, the first server can acquire at least one reserved event from the at least one first reserved event and the second reserved event based on the page turning request. Accordingly, the process of acquiring at least one reserved event by the first server is as follows: in response to the page turning request, the first server acquires a third start time carried in the page turning request. The first server returns at least one reserved event whose event start time is later than the third start time based on the third start time, the at least one first reserved event and the second reserved event. The third start time is the event start time of the latest start reserved event in the at least one reserved event. The scheme provided in the embodiments of the present application acquires at least one reserved event from the at least one first reserved event and the second reserved event through the event start time of the latest start reserved event in the at least one reserved event in the current page, and does not need to repeatedly acquire the second reserved event from the second server, which is simple in operation and low in running consumption.

[0127] In some embodiments, the first server is capable of reacquiring the at least one reservation event based on the page turning request. Accordingly, the process of the first server acquiring the at least one reservation event is as follows: in response to the page turning request, the first server acquires the third start time carried in the page turning request. The first server reacquires the at least one reservation event based on the third start time and returns the at least one reservation event. The third start time is the event start time of the latest start reservation event in the plurality of reservation events. The process of the first server reacquiring the at least one reservation event is the same as the process of acquiring the first and second reservation events. The scheme provided in the embodiments of the present application reacquires the reservation events of the next page from the first and second servers based on the event start time of the latest start reservation event in the at least one reservation event displayed on the current page, so that the acquired reservation events are the latest data in the servers.

[0128] It should be noted that the first server is also capable of modifying the reservation event according to the modification operation of the target object on the reservation event. Then, the first server is capable of synchronously sending the modification notification of the reservation event to the terminal, so that the terminal can know the modification of the reservation event. Accordingly, the process of the first server modifying the reservation event is as follows: in response to the event modification request, the first server determines the event modification information of the modified reservation event. Then, the first server sends the event modification prompt corresponding to the event modification information to at least one second application account based on the second server. The at least one second application account is related to the modified reservation event. The modification operation can be reserving, canceling or modifying the information of the reservation event, which is not limited in the present application. The first server notifies the terminal of the modification of the reservation event through the second server. The scheme provided in the embodiments of the present application synchronously sends the modification notification of the reservation event to the terminal when the reservation event is modified, so that the terminal can know the modification of the reservation event, thereby notifying the target object of the modification of the reservation event and improving the experience of the target object.

[0129] For example, Figure 5 is an interactive flowchart of modifying a reservation event according to the embodiments of the present application. Referring to Figure 5The process of modifying the appointment event includes steps 501-506. 501, the second server subscribes to the event change notification of the first server through a message subscription system (kafka). 502, after the first server determines the modified appointment event, the first server sends an event modification prompt to the message subscription system. 503, the message subscription system sends the event modification prompt to the second server. 504, the second server can obtain the event modification information of the modified appointment event through the event modification prompt. 505, the second server can determine at least one second application account corresponding to the appointment event based on the event modification information. 506, the second server sends an event modification prompt corresponding to the event modification information to the at least one second application account. The terminal can obtain the modified appointment event based on the event prompt information.

[0130] It should be noted that the first server can also obtain at least one historical event related to the first application account from the first server and the second server. Correspondingly, the process of the first server obtaining at least one historical event is: in response to a historical event obtaining request, the first server obtains at least one first historical event of the first application account. The first historical event is an event related to the first application account. Then, the first server obtains a second historical event whose event start time is later than the fourth start time from the second server based on the fourth start time of the target historical event. Then, the first server returns at least one historical event based on the at least one first historical event and the second historical event. The second historical event is an event related to the first application account, and the target historical event is the historical event with the earliest event start time in the at least one first historical event. The way the first server obtains at least one historical event is similar to the way at least one appointment event is obtained in steps 301-307, and will not be repeated here.

[0131] The embodiments of the application provide an event obtaining method, which does not need to migrate the related data of the appointment event or the related data of the historical event, and can return the required appointment event according to an appointment event obtaining request or return the required historical event according to a historical event obtaining request by obtaining the appointment event or the historical event from the second server before upgrading by the first server after upgrading, thereby avoiding the missing or tampering of the related data of the appointment event or the related data of the historical event, and ensuring the integrity of the related data of the appointment event or the related data of the historical event.

[0132] Figure 6 is a structural schematic diagram of an event obtaining device provided by the embodiments of the application. Referring to Figure 6 The device includes:

[0133] The first obtaining module 601 is configured to obtain at least one first reservation event of the first application account in response to a reservation event obtaining request, the first reservation event being an event related to the first application account.

[0134] The first obtaining module 601 is further configured to obtain, from the second server, a second reservation event whose event start time is earlier than a first start time, based on the target reservation event, the target reservation event being a reservation event with the latest event start time among the at least one first reservation event, and the second reservation event being an event related to the first application account.

[0135] The first sending module 602 is configured to return at least one reservation event based on the at least one first reservation event and the second reservation event.

[0136] In some embodiments, Figure 7 is a structural diagram of another event obtaining apparatus provided by an embodiment of the present application. Referring to Figure 7 The first obtaining module 601 includes:

[0137] The first obtaining unit 701 is configured to obtain a plurality of reservation events related to the first application account in response to a reservation event obtaining request.

[0138] The second obtaining unit 702 is configured to obtain, from the plurality of reservation events, a second quantity of first reservation events with the earliest event start time, based on a first quantity carried in the reservation event obtaining request, the first quantity being not less than the second quantity.

[0139] In some embodiments, continuing to refer to Figure 7 The first obtaining module 601 is further configured to obtain, from the second server, a second reservation event whose event start time is earlier than a second start time, in response to the first quantity being greater than a quantity of the plurality of reservation events, the second start time being later than the first start time.

[0140] In some embodiments, continuing to refer to Figure 7 The first sending module 602 includes:

[0141] The processing unit 703 is configured to perform a formatting process on the second reservation event based on the at least one first reservation event, the formatting process being configured to unify a data format of the second reservation event and a data format of the at least one first reservation event.

[0142] The sending unit 704 is configured to return at least one reservation event based on the at least one first reservation event and the formatted second reservation event.

[0143] In some embodiments, continuing to refer to Figure 7 The first sending module 602 includes:

[0144] The sorting unit 705 is configured to jointly sort the at least one first reservation event and the second reservation event based on the event start time.

[0145] The third obtaining unit 706 is configured to obtain the first quantity of reservation events in front of the sorting based on the first quantity carried in the reservation event obtaining request.

[0146] The sending unit 704 is further configured to return the first quantity of reservation events.

[0147] In some embodiments, continuing to refer to Figure 7 The first obtaining module 601 is further configured to, in response to the page turning request, obtain a third start time carried in the page turning request, the third start time being an event start time of a latest starting reservation event in the at least one reservation event.

[0148] The first sending module 602 is further configured to return the at least one reservation event with the event start time after the third start time based on the third start time, the at least one first reservation event and the second reservation event.

[0149] In some embodiments, continuing to refer to Figure 7 The first obtaining module 601 is further configured to, in response to the page turning request, obtain a third start time carried in the page turning request, the third start time being an event start time of a latest starting reservation event in the at least one reservation event.

[0150] The first sending module 602 is further configured to, based on the third start time, re-obtain the at least one reservation event with the event start time after the third start time, and return the at least one reservation event.

[0151] In some embodiments, continuing to refer to Figure 7 The apparatus further includes:

[0152] The marking module 603 is configured to add a source mark to the at least one reservation event, the source mark being used to indicate a source server of the reservation event.

[0153] In some embodiments, continuing to refer to Figure 7 The apparatus further includes:

[0154] The second obtaining module 604 is configured to, in response to a historical event obtaining request, obtain at least one first historical event of the first application account, the first historical event being an event related to the first application account.

[0155] The second obtaining module 604 is further configured to obtain, from the second server, a second historical event whose event start time is later than a fourth start time based on the fourth start time, the target historical event being a historical event with the earliest event start time among the at least one first historical event, and the second historical event being an event related to the first application account;

[0156] The second sending module 605 is configured to return at least one historical event based on the at least one first historical event and the second historical event.

[0157] In some embodiments, continuing to refer to Figure 7 The apparatus further includes:

[0158] The determining module 606 is configured to determine event modification information of the modified reserved event in response to the event modification request.

[0159] The third sending module 607 is configured to send an event modification prompt corresponding to the event modification information to at least one second application account based on the second server, the at least one second application account being related to the modified reserved event.

[0160] Embodiments of the present application provide an event obtaining apparatus, which does not need to migrate related data of a reserved event or related data of a historical event, and can return a required reserved event according to a reserved event obtaining request or return a required historical event according to a historical event obtaining request by obtaining the reserved event or the historical event from a second server before upgrading by a first server after upgrading, thereby avoiding the case that the related data of the reserved event or the related data of the historical event is missing or tampered, and ensuring the integrity of the related data of the reserved event or the related data of the historical event.

[0161] It should be noted that the event obtaining apparatus provided in the above embodiments is only used as an example for dividing the above functional modules in running an application program, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the above described functions. In addition, the event obtaining apparatus and the event obtaining method provided in the above embodiments belong to the same concept, and the implementation process is shown in the method embodiments, which will not be repeated here.

[0162] Figure 8is a structural schematic diagram of a server provided by an embodiment of the present application. The server 800 can have great differences due to different configurations or performances, and can include one or more processors (Central Processing Units, CPUs) 801 and one or more memories 802. The memory 802 stores at least one computer program, which is loaded and executed by the processor 801 to implement the event obtaining method provided by each method embodiment.

[0163] The embodiment of the present application further provides a computer readable storage medium, which stores at least one computer program. The at least one computer program is loaded and executed by a processor of a computer device to implement operations performed by the computer device in the event obtaining method of the above embodiment. For example, the computer readable storage medium can be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0164] The embodiment of the present application further provides a computer program product or a computer program, which includes computer program code stored in a computer readable storage medium. The processor of the computer device reads the computer program code from the computer readable storage medium, and executes the computer program code, so that the computer device executes the event obtaining method provided in the various optional implementation manners.

[0165] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by a program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a Read-Only Memory, a magnetic disk or an optical disk, etc.

[0166] The above is only optional embodiments of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An event acquisition method, characterized in that, Applied to a first server, which provides a background service for the upgraded event retrieval service in the application, the method includes: In response to a reservation event acquisition request, at least one first reservation event of the first application account is acquired, wherein the first reservation event is an event related to the first application account; Based on the first start time of the target reservation event, a second reservation event with a start time prior to the first start time is obtained from the second server. The target reservation event is the reservation event with the latest start time among the at least one first reservation event. The second reservation event is an event related to the first application account. The second server is used to provide background services for the event acquisition service before the upgrade in the application. Based on the at least one first reservation event and the second reservation event, return at least one reservation event.

2. The method according to claim 1, characterized in that, The step of obtaining at least one first reservation event of the first application account in response to the reservation event acquisition request includes: In response to the reservation event acquisition request, multiple reservation events related to the first application account are acquired; Based on the first quantity carried in the reservation event acquisition request, a second number of first reservation events with the earliest event start time are obtained from the plurality of reservation events, wherein the first number is not less than the second number.

3. The method according to claim 2, characterized in that, The method further includes: In response to the first quantity being greater than the number of the plurality of appointment events, a second appointment event with an event start time prior to a second start time is obtained from the second server, wherein the second start time is later than the first start time.

4. The method according to claim 1, characterized in that, The step of returning at least one reservation event based on the at least one first reservation event and the second reservation event includes: Based on the at least one first reservation event, the second reservation event is formatted, wherein the formatting process is used to unify the data format of the second reservation event with the data format of the at least one first reservation event; Based on the at least one first reservation event and the formatted second reservation event, return the at least one reservation event.

5. The method according to claim 1, characterized in that, The step of returning at least one reservation event based on the at least one first reservation event and the second reservation event includes: Based on the event start time, the at least one first reservation event and the second reservation event are jointly sorted; Based on the reservation event, obtain the first quantity carried in the request, and obtain the first quantity of reservation events that are ranked first; Return the first number of reservation events.

6. The method according to claim 1, characterized in that, The method further includes: In response to a page-turning request, obtain the third start time carried in the page-turning request, wherein the third start time is the event start time of the latest start of the at least one reservation event; Based on the third start time, the at least one first reservation event, and the second reservation event, return at least one reservation event whose event start time is after the third start time.

7. The method according to claim 1, characterized in that, The method further includes: In response to a page-turning request, obtain the third start time carried in the page-turning request, wherein the third start time is the event start time of the latest start of the at least one reservation event; Based on the third start time, reacquire at least one scheduled event whose start time is after the third start time, and return the at least one scheduled event.

8. The method according to claim 1, characterized in that, The method further includes: For each of the at least one reservation event, a source tag is added, which is used to indicate the source server of the reservation event.

9. The method according to claim 1, characterized in that, The method further includes: In response to a historical event retrieval request, at least one first historical event of the first application account is retrieved, wherein the first historical event is an event related to the first application account; Based on the fourth start time of the target historical event, a second historical event whose start time is after the fourth start time is obtained from the second server. The target historical event is the historical event with the earliest start time among the at least one first historical event, and the second historical event is an event related to the first application account. Based on the at least one first historical event and the second historical event, return at least one historical event.

10. The method according to claim 1, characterized in that, The method further includes: In response to an event modification request, determine the event modification information for the scheduled event that has been modified; Based on the second server, an event modification prompt corresponding to the event modification information is sent to at least one second application account, wherein the at least one second application account is related to the modified appointment event.

11. An event acquisition device, characterized in that, Deployed on a first server, which provides background services for the upgraded event acquisition service in the application, the device includes: The first acquisition module is used to acquire at least one first appointment event of the first application account in response to the appointment event acquisition request, wherein the first appointment event is an event related to the first application account; The first acquisition module is further configured to acquire a second reservation event whose start time is before the first start time from the second server based on the first start time of the target reservation event. The target reservation event is the reservation event with the latest start time among the at least one first reservation event. The second reservation event is an event related to the first application account. The second server is configured to provide background services for the event acquisition service before the upgrade in the application. The first sending module is configured to return at least one reservation event based on the at least one first reservation event and the second reservation event.

12. A computer device, characterized in that, The computer device includes a processor and a memory, the memory being used to store at least one computer program, the at least one computer program being loaded by the processor and executed as the event acquisition method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store at least one computer program for performing the event acquisition method according to any one of claims 1 to 10.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the event acquisition method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Event processing method and device

    CN108021443A

  • Reservation request processing method and device, equipment and storage medium

    CN112836838A