Activity time configuration method and device, electronic equipment and storage medium
Through automatic time zone conversion and fast synchronization of target configuration time, the problem of low efficiency in active time configuration is solved, and the effect of simplifying the configuration process and improving efficiency is achieved.
Patent Information
- Application Number
- CN202311135296.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-03-04
AI Technical Summary
When configuring activity time, operators need to manually calculate the target configuration time based on the time zone of each server, resulting in cumbersome steps, high cost of understanding time zones, and low efficiency.
By obtaining the initial configuration time and the corresponding configuration time zone, the central node uses the cluster synchronization node to obtain the current time zone of each server, automatically converts the time zone based on the time difference, obtains the target configuration time of each server, and quickly synchronizes it to the corresponding server.
There is no need to manually calculate the target configuration time, which reduces the time zone understanding cost and improves the configuration efficiency of activity time, so that the target activities can be promoted to users within the corresponding target configuration time.
Smart Images

Figure CN119557078A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an activity time configuration method, device, electronic device and storage medium. Background Art
[0002] With the development of the Internet, applications have provided various convenient functions for people's lives. Operators can configure a variety of different types of activities and promote different types of activities to application users through applications. In order to adapt to the trend of global development and meet the needs of applications around the world, it is usually necessary to use servers in different time zones to host application activities.
[0003] Currently, when configuring activity time, operators need to calculate the target configuration time of each server according to the time zone of each server hosting the activity, so that the activity can be promoted to the users of the application within the corresponding target configuration time. However, the activity time calculation steps are cumbersome and the cost of understanding the time zone is high, resulting in low efficiency in configuring the activity time. Summary of the invention
[0004] The following is a summary of the subject matter described in detail in this application. This summary is not intended to limit the scope of the claims.
[0005] The embodiments of the present application provide an activity time configuration method, device, electronic device and storage medium, which can reduce the time zone understanding cost and thus improve the configuration efficiency of activity time.
[0006] On the one hand, an embodiment of the present application provides an activity time configuration method, which is applied to a central node. The activity time configuration method includes:
[0007] Obtaining an initial configuration time of a target activity and a configuration time zone corresponding to the initial configuration time, wherein the target activity is respectively hosted by a plurality of servers located in different time zones, and each of the servers establishes communication with a cluster synchronization node;
[0008] Obtaining the current time zone of each of the servers sent by the cluster synchronization node;
[0009] Based on the time difference between each of the current time zones and the configuration time zone, respectively convert the initial configuration time to obtain the target configuration time corresponding to each of the servers;
[0010] Each of the target configuration times is sent to the cluster synchronization node, so that the cluster synchronization node synchronizes each of the target configuration times to the corresponding server.
[0011] On the other hand, an embodiment of the present application further provides an activity time configuration method, which is applied to a cluster synchronization node, wherein the cluster synchronization node establishes communication with multiple servers located in different time zones, each of which is used to carry a target activity, and the activity time configuration method includes:
[0012] Obtaining the current time zone of each of the servers, and sending the current time zone to the central node, so that the central node can obtain the initial configuration time of the target activity and the configuration time zone corresponding to the initial configuration time, and then, based on the time difference between each of the current time zone and the configuration time zone, respectively convert the initial configuration time to obtain the target configuration time corresponding to each of the servers;
[0013] The target configuration times sent by the central node are obtained, and the target configuration times are synchronized to the corresponding servers respectively.
[0014] On the other hand, the embodiment of the present application further provides an activity time configuration device, which is applied to a central node, and the activity time configuration device includes:
[0015] A first acquisition module is used to acquire an initial configuration time of a target activity and a configuration time zone corresponding to the initial configuration time, wherein the target activity is respectively carried by a plurality of servers located in different time zones, and each of the servers establishes communication with a cluster synchronization node;
[0016] A second acquisition module is used to acquire the current time zone of each server sent by the cluster synchronization node;
[0017] A conversion module, configured to perform time zone conversion on the initial configuration time based on the time difference between each current time zone and the configuration time zone, to obtain a target configuration time corresponding to each server;
[0018] The first synchronization module is used to send each of the target configuration times to the cluster synchronization node, so that the cluster synchronization node synchronizes each of the target configuration times to the corresponding server.
[0019] Further, the central node is deployed with a first database, the server is deployed with a second database, the data storage structure of the first database is the same as the data storage structure of the second database, and the first synchronization module is specifically used for:
[0020] storing the target configuration time in a structured manner in the first database;
[0021] Acquire each of the target configuration times from the first database, generate a target data packet corresponding to each of the target configuration times, and send the target data packet to the cluster synchronization node so that the cluster synchronization node synchronizes the target data packet to the corresponding second database.
[0022] Furthermore, the first synchronization module is specifically used for:
[0023] Acquire the activity identifier of the target activity, generate synchronization orders corresponding to each target configuration time according to the activity identifier, write the synchronization orders into the first database and associate them with the corresponding target configuration time;
[0024] The synchronization order is acquired from the first database, the activity content of the target activity is acquired according to the activity identifier, and the target data packets corresponding to each target configuration time are generated according to the target configuration time and the activity content.
[0025] Furthermore, the activity time configuration device further includes a first query module, and the first query module is specifically used for:
[0026] Determine an order status of the synchronization order, wherein the order status includes a synchronized state or an unsynchronized state;
[0027] Generate a query request for a target order, wherein the target order is the synchronized order in the unsynchronized state;
[0028] The query request is sent to the cluster synchronization node, so that the cluster synchronization node sends the synchronization result of the target data packet corresponding to the target order to the central node, and updates the order status according to the synchronization result.
[0029] Furthermore, the first synchronization module is specifically used for:
[0030] Signing the target data packet based on a preset private key to generate signature data, and adding the signature data to the target data packet;
[0031] The target data packet after adding the signature data is sent to the cluster synchronization node, wherein the signature data is used by the cluster synchronization node to verify the target data packet based on a public key, and the public key and the private key belong to the same key pair.
[0032] Furthermore, the central node is also deployed with a third database, and the second acquisition module is specifically used for:
[0033] storing the initial configuration time and the corresponding configuration time zone in a structured manner in the third database, wherein the data storage structure of the third database is different from the data storage structure of the first database;
[0034] Generate a time zone acquisition request based on the initial configuration time stored in the third database and the association relationship between the servers;
[0035] The time zone acquisition request is sent to the cluster synchronization node, and the current time zone of each of the servers sent by the cluster synchronization node in response to the time zone acquisition request is acquired.
[0036] Furthermore, the first acquisition module is specifically used for:
[0037] Displaying a configuration interface, wherein the configuration interface is provided with a time configuration control and a time zone configuration control;
[0038] In response to interaction with the time configuration control, obtaining an initial configuration time of a target activity based on input of the time configuration control;
[0039] In response to interaction with the time zone configuration control, a configuration time zone corresponding to the initial configuration time input based on the time configuration control is obtained.
[0040] Furthermore, the activity time configuration device further includes an adjustment module, which is specifically used for:
[0041] Receiving the account information of each of the servers sent by the cluster synchronization node, wherein the account information is the information recorded after the account in the server performs an action;
[0042] The corresponding target configuration time is adjusted according to the account information, and each adjusted target configuration time is sent to the cluster synchronization node again, so that the cluster synchronization node can synchronize each adjusted target configuration time to the corresponding server again.
[0043] Furthermore, the above adjustment module is specifically used for:
[0044] When the account information includes the number of current online users, if the sum of the number of current online users is less than or equal to a preset first number threshold, the target configuration time is postponed;
[0045] Alternatively, when the account information includes the number of current online users, if the sum of the number of current online users is greater than a preset second number threshold, the target configuration time is advanced;
[0046] Alternatively, when the account information includes cumulative transaction volume, if the sum of the cumulative transaction volumes is less than or equal to a preset first transaction volume threshold, the target configuration time is postponed;
[0047] Alternatively, when the account information includes the accumulated transaction volume, if the sum of the accumulated transaction volumes is greater than a preset second transaction volume threshold, the target configuration time is advanced.
[0048] On the other hand, an embodiment of the present application further provides an activity time configuration device, which is applied to a cluster synchronization node, wherein the cluster synchronization node establishes communication with a plurality of servers located in different time zones, each of which is used to carry a target activity, and the activity time configuration device includes:
[0049] A sending module, used for obtaining the current time zone of each of the servers, and sending the current time zone to the central node, so that after the central node obtains the initial configuration time of the target activity and the configuration time zone corresponding to the initial configuration time, based on the time difference between each of the current time zone and the configuration time zone, the initial configuration time is respectively converted into a time zone to obtain the target configuration time corresponding to each of the servers;
[0050] The second synchronization module is used to obtain each of the target configuration times sent by the central node, and synchronize each of the target configuration times to the corresponding server.
[0051] Further, the central node is deployed with a first database, the server is deployed with a second database, the data storage structure of the first database is the same as the data storage structure of the second database, and the second synchronization module is specifically used for:
[0052] Obtaining a target data packet corresponding to each of the servers sent by the central node, wherein the target data packet is generated based on the target configuration time after the central node stores the target configuration time in the first database in a structured manner and then obtains each of the target configuration times from the first database;
[0053] The target data packet is synchronized to the corresponding second database.
[0054] Furthermore, the first database stores synchronization orders associated with the target configuration time, and the order status of the synchronization orders includes a synchronized state or an unsynchronized state. The activity time configuration device also includes a second query module, and the second query module is specifically used to:
[0055] receiving a query request for a target order sent by the central node, wherein the target order is the synchronized order in the unsynchronized state;
[0056] The synchronization result of the target data packet corresponding to the target order is obtained, and the synchronization result is sent to the central node so that the central node can update the order status.
[0057] Further, the target data packet includes the target configuration time and signature data, and the signature data is generated by the central node after signing the target data packet based on a preset private key, and the second synchronization module is specifically used to: parse the target data packet to obtain the target configuration time and the signature data;
[0058] Verifying the signature data based on a public key, wherein the public key and the private key belong to the same key pair;
[0059] The target data packets that fail the verification are eliminated, and the remaining target data packets are obtained.
[0060] On the other hand, an embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned activity time configuration method when executing the computer program.
[0061] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to implement the above-mentioned activity time configuration method.
[0062] On the other hand, the embodiment of the present application further provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the above-mentioned activity time configuration method.
[0063] The embodiments of the present application include at least the following beneficial effects: by obtaining the initial configuration time and the corresponding configuration time zone, the central node then obtains the current time zone of each server through the cluster synchronization node, and based on the time difference between the current time zone and the configuration time zone, the central node automatically converts the time zone of the initial configuration time to obtain the target configuration time corresponding to each server, and quickly synchronizes each target configuration time to the corresponding server through the cluster synchronization node, so that the target activity can be promoted to the user within the corresponding target configuration time, without the need to manually calculate the target configuration time, which can reduce the time zone understanding cost and thus improve the configuration efficiency of the activity time.
[0064] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent from the description, or may be understood by practicing the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0066] Figure 1 A schematic diagram of an optional implementation environment provided for an embodiment of the present application;
[0067] Figure 2 An optional flowchart of the activity time configuration method provided in the embodiment of the present application;
[0068] Figure 3 An optional interface diagram of the configuration interface provided in the embodiment of the present application;
[0069] Figure 4 A schematic diagram of an optional architecture of a first database and a second database provided in an embodiment of the present application;
[0070] Figure 5 An optional interactive schematic diagram of the activity time configuration method provided in the embodiment of the present application;
[0071] Figure 6 An optional flowchart of encryption processing provided in an embodiment of the present application;
[0072] Figure 7 A schematic diagram of an optional process for verifying a target data packet provided in an embodiment of the present application;
[0073] Figure 8 An optional flow chart of the activity time configuration method provided in the embodiment of the present application;
[0074] Fig. 9 A schematic diagram of an optional architecture of a central node and a cluster synchronization node provided in an embodiment of the present application;
[0075] Fig.10 Another optional interactive schematic diagram of the activity time configuration method provided in the embodiment of the present application;
[0076] Fig.11 An optional structural diagram of an activity time configuration device provided in an embodiment of the present application;
[0077] Fig.12 Another optional structural diagram of the activity time configuration device provided in the embodiment of the present application;
[0078] Fig.13 A partial structural block diagram of a terminal provided in an embodiment of the present application;
[0079] Fig.14 A partial structural block diagram of the server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0081] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the characteristics of the target object such as target object attribute information or attribute information set, the permission or consent of the target object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. Among them, the target object can be a user. In addition, when the embodiment of the present application needs to obtain the target object attribute information, the target object's separate permission or separate consent will be obtained by means of a pop-up window or jumping to a confirmation page, etc., and after the separate permission or separate consent of the target object is clearly obtained, the necessary target object-related data for enabling the normal operation of the embodiment of the present application will be obtained.
[0082] To facilitate understanding of the technical solutions provided in the embodiments of the present application, some key terms used in the embodiments of the present application are explained here:
[0083] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to achieve data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool that can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of technical network systems require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.
[0084] Currently, when configuring activity time, operators need to calculate the target configuration time of each server according to the time zone of each server hosting the activity, so that the activity can be promoted to the users of the application within the corresponding target configuration time. However, the activity time calculation steps are cumbersome and the cost of understanding the time zone is high, resulting in low efficiency in configuring the activity time.
[0085] Based on this, the embodiments of the present application provide an activity time configuration method, device, electronic device and storage medium, which can reduce the time zone understanding cost and thus improve the configuration efficiency of activity time.
[0086] Reference Figure 1 , Figure 1 A schematic diagram of an optional implementation environment provided for an embodiment of the present application, the implementation environment includes a terminal 101, a central node 102, a cluster synchronization node 103 and a server 104, wherein the terminal 101 and the central node 102 are connected via a communication network, and the cluster synchronization node 103 can establish communication with multiple servers 104.
[0087] Exemplarily, the central node 102 can obtain the initial configuration time of the target activity and the configuration time zone corresponding to the initial configuration time, wherein the target activity is respectively carried by multiple servers 104 located in different time zones; obtain the current time zone of each server 104 sent by the cluster synchronization node 103; based on the time difference between each current time zone and the configuration time zone, perform time zone conversion on the initial configuration time to obtain the target configuration time corresponding to each server 104; send each target configuration time to the cluster synchronization node 103, so that the cluster synchronization node 103 can synchronize each target configuration time to the corresponding server 104, and then determine the synchronization result of the target configuration time, and send the synchronization result to the terminal 101.
[0088] The central node 102 obtains the initial configuration time and the corresponding configuration time zone, and then obtains the current time zone of each server 104 through the cluster synchronization node 103. Based on the time difference between the current time zone and the configuration time zone, the central node 102 automatically converts the initial configuration time to the time zone, obtains the target configuration time corresponding to each server 104, and quickly synchronizes each target configuration time to the corresponding server 104 through the cluster synchronization node 103, so that the target activity can be promoted to the user within the corresponding target configuration time, without the need to manually calculate the target configuration time, which can reduce the time zone understanding cost and thus improve the configuration efficiency of the activity time.
[0089] The central node 102, cluster synchronization node 103 and server 104 can all be independent physical servers, or server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In addition, the central node 102 can also be a node server in the blockchain network.
[0090] The terminal 101 may be a mobile phone, a computer, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal, etc., but is not limited thereto. The terminal 101 and the central node 102 may be directly or indirectly connected via wired or wireless communication, which is not limited in the present embodiment.
[0091] The method provided in the embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, smart transportation, assisted driving, games, payment and other scenarios.
[0092] Reference Figure 2 , Figure 2 An optional flow chart of an activity time configuration method provided in an embodiment of the present application. The activity time configuration method can be executed by a central node. The central node can be an independent server or terminal, or a server cluster composed of multiple servers. The activity time configuration method includes but is not limited to the following steps 201 to 204.
[0093] Step 201: Obtain the initial configuration time of the target activity and the configuration time zone corresponding to the initial configuration time.
[0094] Among them, in order to adapt to the development trend of globalization, based on the principle of nearby deployment of servers, corresponding servers are usually deployed in different regions. There may be differences in time zones between servers in different regions, which is equivalent to the target activity being hosted by multiple servers located in different time zones. Each server can call the activity content and activity time required for the target activity. Each server establishes communication with the cluster synchronization node. The initial configuration time may include the activity start time and the activity end time. The activity start time may include a specific start date and a specific start time. The activity end time may include a specific end date and a specific end time. The configuration time zone may be one of the time zones: zero time zone, East 1 to East 12, and West 1 to West 12.
[0095] Based on this, although the target activity is hosted by multiple servers located in different time zones, relevant personnel do not need to convert the configuration time based on the time zones of each server. Relevant personnel only need to enter the initial configuration time under the configuration time zone. For example, the time zones corresponding to the servers hosting the target activity include East 8, East 9 and West 2. The configuration time zone can be East 8, and the initial configuration time can be 8:00 to 12:00 on date A. The initial configuration time can then be automatically converted into the target configuration time corresponding to each time zone, reducing the cost of understanding the time zone, thereby improving the configuration efficiency of the activity time.
[0096] In one possible implementation, the initial configuration time of the target activity and the configuration time zone corresponding to the initial configuration time are obtained, specifically by displaying a configuration interface, wherein the configuration interface is provided with a time configuration control and a time zone configuration control; in response to interaction with the time configuration control, the initial configuration time of the target activity based on the input of the time configuration control is obtained; in response to interaction with the time zone configuration control, the configuration time zone corresponding to the initial configuration time input based on the time configuration control is obtained.
[0097] The central node may be deployed with a management console, which has a configuration interface. Relevant personnel may input the initial configuration time and configuration time zone in the configuration interface of the management console, and may also add, modify or delete the activity content of the target activity.
[0098] Specifically, refer to Figure 3 , Figure 3 An optional interface diagram of the configuration interface provided in the embodiment of the present application.
[0099] The configuration interface may display a time configuration control 301 and a time zone configuration control 302. Relevant personnel may configure the initial configuration time of the target activity through the time configuration control 301. Configuring the initial configuration time of the target activity may include: configuring the activity start time and activity end time of the target activity. Relevant personnel may configure the configuration time zone of the target activity through the time zone configuration control 302. Figure 3 The configured time zone is UTC+8:00, i.e., East 8. The event starts at 2000-01-01 00:00:00 and ends at 2000-01-01 16:00:00.
[0100] Among them, assuming that the specific activity start time is not configured, it can be considered that the target activity needs to start immediately, and the central node can use the current time as the activity start time. Assuming that the specific activity end time is not configured, it can be considered that the target activity needs to continue, and the central node can use a future time that is far away from the current time as the activity end time, such as a future time 100 years away from the current time as the activity end time.
[0101] Step 202: Obtain the current time zone of each server sent by the cluster synchronization node.
[0102] Among them, the cluster synchronization node can establish communication with multiple servers that carry target activities, the cluster synchronization node can record the current time zone of each server, and the cluster synchronization node can also determine the current time zone of the server based on the current location of each server. Multiple servers that carry target activities can form a cluster. Normally, the current time zone of each server in the same cluster is the same. Therefore, the current time of any server in the cluster is the current time zone of the cluster. The cluster can be used as the basic unit of time configuration. Each server in the same cluster can promote the target activity to the users of the application within the same target configuration time. The cluster synchronization node can only send the current time zone of each cluster to the central node, and the central node can also only send the target configuration time of each cluster to the cluster synchronization node, which can greatly reduce the amount of data interacting between the central node and the cluster synchronization node, thereby improving the configuration efficiency of the activity time.
[0103] Based on this, since the target activities are carried by multiple servers located in different time zones, it is equivalent to that terminals running applications in different regions can be connected to servers in corresponding time zones. Each server can promote the target activities to users of the application within the corresponding target configuration time. In order to be able to automatically convert the initial configuration time into the target configuration time corresponding to each time zone in the future, it is necessary to obtain the current time zone of each server carrying the target activities through the cluster synchronization node. For example, the multiple servers carrying the target activities include server 1 and server 2. The current time zone of server 1 is East 8, and the current time zone of server 2 is East 9. The cluster synchronization node will record the current time zones of server 1 and server 2, and the central node can obtain the current time zones of server 1 and server 2 through the cluster synchronization node.
[0104] Step 203: Based on the time difference between each current time zone and the configuration time zone, the initial configuration time is converted into a time zone to obtain the target configuration time corresponding to each server.
[0105] Based on this, the target activity is hosted by multiple servers located in different time zones. After obtaining the current time zone of each server, the time difference between the current time zone of each server and the configuration time zone can be calculated, and then the initial configuration time is converted based on the time difference. The initial configuration time is automatically converted to the target configuration time, so that servers in different time zones can synchronously promote the target activity to the users of the application according to their respective target configuration times. Therefore, relevant personnel only need to enter the initial configuration time under the configuration time zone, and there is no need to convert the initial configuration time based on the current time zone of each server, which reduces the time zone understanding cost and improves the configuration efficiency of the activity time. Moreover, the time zone conversion logic is set on the central node, and the cluster synchronization node does not need to set the time zone conversion logic, which can simplify the system deployment complexity of the cluster synchronization node.
[0106] For example, the initial configuration time entered by the relevant personnel is 18:00, and the configuration time zone is East 8. Assuming that the current time zone of the server hosting the target activity is zero time zone, the central node can convert the initial configuration time based on the time difference between the current time zone and the configuration time zone, and obtain the target configuration time corresponding to the server as 10:00.
[0107] Specifically, the central node may be deployed with a first synchronization system, which may be provided with a time zone conversion logic. In the first synchronization system, the initial configuration time is converted according to the time zone conversion logic, which can reduce the time zone understanding cost and thus improve the configuration efficiency of the activity time.
[0108] Step 204: Send each target configuration time to the cluster synchronization node, so that the cluster synchronization node synchronizes each target configuration time to the corresponding server.
[0109] Among them, after the central node determines the target configuration time of each server, the central node can synchronize each target configuration time to the corresponding server through the cluster synchronization node. The synchronization efficiency is high. Servers in different time zones can start and end target activities at the same time according to their respective converted target configuration times, thereby realizing the synchronization of target activities.
[0110] Specifically, the cluster synchronization node can be deployed with a second synchronization system. The second synchronization system can be set with time zone sending logic and time synchronization logic. The second synchronization system can send the current time zone of each server to the first synchronization system of the central node according to the time zone sending logic. The second synchronization system can synchronize each target configuration time to the corresponding server according to the time synchronization logic.
[0111] Based on this, by obtaining the initial configuration time and the corresponding configuration time zone, the central node then obtains the current time zone of each server through the cluster synchronization node. Based on the time difference between the current time zone and the configuration time zone, the central node automatically converts the initial configuration time to obtain the target configuration time corresponding to each server, and quickly synchronizes each target configuration time to the corresponding server through the cluster synchronization node, so that the target activity can be promoted to the user within the corresponding target configuration time, without the need to manually calculate the target configuration time, which can reduce the time zone understanding cost and thus improve the configuration efficiency of the activity time.
[0112] In a possible implementation, a first database is deployed on a central node, and a second database is deployed on a server. The data storage structure of the first database is the same as that of the second database. Each target configuration time is sent to a cluster synchronization node so that the cluster synchronization node can synchronize each target configuration time to a corresponding server. Specifically, the target configuration time can be structuredly stored in the first database; each target configuration time is obtained from the first database, a target data packet corresponding to each target configuration time is generated, and the target data packet is sent to the cluster synchronization node so that the cluster synchronization node can synchronize the target data packet to the corresponding second database.
[0113] Among them, the central node is deployed with a first database, specifically referring to that the central node can access and manage the first database, the first database can be stored only in the central node, or the first database can be distributed on multiple different nodes. When the database is distributed on multiple nodes, a distributed database system can be formed; in order to meet the needs of independent deployment, each server can be deployed with an independent client system and a second database, the server can access and manage the second database, the second database can be stored only in a single server, or the second database can be distributed on multiple servers. When the database is distributed on multiple servers, a distributed database system can be formed.
[0114] Among them, the target configuration time is structuredly stored in the first database, which specifically refers to storing the target configuration time in the form of a JSON structure in the first database. Therefore, the target configuration time obtained from the first database is to obtain the target configuration time stored in the form of a JSON structure, and then generate a target data packet containing the JSON structure, and synchronize the target data packet to the corresponding second database, which specifically refers to synchronizing the JSON structure in the target data packet to the second database, so that the second database can synchronize the target configuration time in the first database.
[0115] Based on this, the data storage structure of the first database is the same as the data storage structure of the second database, which is equivalent to the first database and the second database being isomorphic databases. An isomorphic database means that data is stored in the same way in the database. Two isomorphic databases can have the same table structure, fields, data types, query languages, indexes, constraints, etc. Therefore, when it is necessary to synchronize data stored in the JSON structure in the first database to the second database, only simple write-back logic needs to be executed, without the need to execute the business logic of data structure conversion, which can improve synchronization efficiency.
[0116] Specifically, the central node may be deployed with a first synchronization system, and the cluster synchronization node may be deployed with a second synchronization system. The first synchronization system may write the target configuration time obtained by time zone conversion into the first database, and the second synchronization system may write the received target configuration time into the corresponding second database.
[0117] In a possible implementation, the central node is also deployed with a third database to obtain the current time zone of each server sent by the cluster synchronization node. Specifically, the initial configuration time and the corresponding configuration time zone are structuredly stored in the third database, wherein the data storage structure of the third database is different from the data storage structure of the first database; based on the initial configuration time stored in the third database and the association relationship between the servers, a time zone acquisition request is generated; the time zone acquisition request is sent to the cluster synchronization node to obtain the current time zone of each server sent by the cluster synchronization node in response to the time zone acquisition request.
[0118] Among them, the central node will also deploy a third database, the central node can access and manage the third database, the third database can be stored only in the central node, and the third database can also be distributed on multiple different nodes. The target configuration time and the corresponding configuration time zone are structured and stored in the third database. Specifically, it can refer to storing the target configuration time and the corresponding configuration time zone in the third database in a specific data structure. The third database plays the role of temporarily storing data.
[0119] Among them, the third database can store the initial configuration time and corresponding configuration time zones of multiple target activities. Usually, a target activity will only be configured with one set of initial configuration time and corresponding configuration time zone. Under specific circumstances, a target activity can also be configured with multiple sets of initial configuration time and corresponding configuration time zones. However, it is necessary to ensure that there will be no time overlap between any two sets of initial configuration times after converting them to the same time zone.
[0120] Exemplarily, two sets of initial configuration times and corresponding configuration time zones can be configured for a target activity, wherein the first set of configurations is: the initial configuration time is from 8:00 to 12:00 on date A, and the configuration time zone is GMT+8; the second set of configurations is: the initial configuration time is from 14:00 to 18:00 on date A, and the configuration time zone is GMT+8; the target activity can determine two target configuration times, and after completing the configuration of the target configuration times, the target activity can be carried out when the current time is at any target configuration time.
[0121] Among them, the association between the initial configuration time and the server can refer to the association between the target activity and the server. Since the target activities are carried by multiple servers located in different time zones, it is equivalent to that terminals running applications in different regions can be connected to servers in corresponding time zones. Each server can promote the target activity to users of the application within the corresponding target configuration time. The initial configuration time of the target activity can be associated with each server that carries the target activity. After the third data database writes the initial configuration time and the corresponding configuration time zone, it will generate a corresponding time zone acquisition request. The cluster synchronization node can respond to the time zone acquisition request and send the current time zone of each server that carries the target activity to the central node. The central node can subsequently convert the initial configuration time based on the current time zone of each server. Servers in different time zones can start and end the target activities at the same time according to their respective converted target configuration times, thereby realizing the synchronization of the target activities.
[0122] Based on this, since the first database does not need to store time zone data, the data storage structure of the first database can be simplified compared to the more complex data storage structure of the third database, so that the data storage structure of the first database is different from the data storage structure of the third database. Since the first database and the second database are isomorphic, after simplifying the first database, it is equivalent to simplifying the second database as well, thereby reducing the deployment complexity of the first database and the second database, and can improve the performance of the system composed of the central node, cluster synchronization node and server.
[0123] Specifically, refer to Figure 4 , Figure 4 A schematic diagram of an optional architecture of the first database and the second database provided in an embodiment of the present application.
[0124] Among them, the central node can be deployed with a first synchronization system, the cluster synchronization node can be deployed with a second synchronization system, the management station of the central node can write the initial configuration time and the configuration time zone into the third database, the initial configuration time stored in the third database can include the activity start time and the activity end time, the second synchronization system of the cluster synchronization node can send the current time zone of the server to the first synchronization system of the central node, the first synchronization system of the central node can perform time zone conversion on the initial configuration time based on the time difference between each current time zone and the configuration time zone, and obtain the target configuration time corresponding to each server, the first synchronization system of the central node can write the converted target configuration time into the first database, and the target configuration time stored in the first database can include the activity start time and the activity end time after the time zone conversion.
[0125] In one possible implementation, a target data packet corresponding to each target configuration time is generated, specifically by obtaining an activity identifier of the target activity, generating a synchronization order corresponding to each target configuration time according to the activity identifier, writing the synchronization order to the first database and associating it with the corresponding target configuration time; obtaining the synchronization order from the first database, obtaining the activity content of the target activity according to the activity identifier, and generating a target data packet corresponding to each target configuration time according to the target configuration time and the activity content.
[0126] Among them, the first database can be deployed with a business management system. The first database can store multiple target configuration times corresponding to the same target activity but different servers, and can also store multiple target configuration times corresponding to the same server but different target activities. In order to avoid conflicts in the activities being carried out, each activity can be scheduled through the business management system. When the business management system schedules the target activity, the business management system can obtain the target configuration time of the target activity and the activity identifier of the scheduled target activity. Then, the business management system can generate a synchronization order according to the activity identifier and write the synchronization order into the first database. Since the synchronization operation of the target configuration time can be performed based on the synchronization order subsequently, writing the synchronization order into the first database can record the synchronization process of the target configuration time.
[0127] Specifically, during the synchronization process, the activity content of the target activity can be obtained in the first database according to the activity identifier corresponding to the synchronization order. The activity content includes the activity name, login method, version information, etc., which are not limited to the embodiments of the present application. Then, the activity content and the target configuration time can be combined to generate a corresponding target data packet. The target data packet needs to be sent to the server for the second database to synchronize the activity content and the target configuration time, thereby ensuring data consistency between the second database and the first database.
[0128] Specifically, refer to Figure 5 , Figure 5 An optional interactive schematic diagram of the activity time configuration method provided in an embodiment of the present application.
[0129] The central node may be deployed with a management console, a first synchronization system, and a business management system, and the cluster synchronization node may be deployed with a second synchronization system. The interaction process between the central node, the cluster synchronization node, and the server is as follows:
[0130] First, the management station of the central node obtains the initial configuration time and the configuration time zone corresponding to the initial configuration time.
[0131] Then, the management station of the central node stores the initial configuration time and the corresponding configuration time zone in a structured manner in the third database.
[0132] Then, the management station of the central node sends a synchronization data request to the first synchronization system of the central node.
[0133] Then, the first synchronization system of the central node generates a time zone acquisition request based on the initial configuration time stored in the third database and the association relationship between the servers.
[0134] Then, the first synchronization system of the central node sends a time zone acquisition request to the cluster synchronization node.
[0135] Then, the first synchronization system of the central node obtains the current time zone of each server sent by the cluster synchronization node in response to the time zone acquisition request.
[0136] Then, the first synchronization system of the central node converts the initial configuration time into a time zone based on the time difference between each current time zone and the configuration time zone, and obtains the target configuration time corresponding to each server.
[0137] Then, the first synchronization system of the central node stores the target configuration time in a structured manner in the first database.
[0138] Then, the business management system of the central node obtains each target configuration time from the first database, obtains the activity identifier of the target activity, generates a synchronization order corresponding to each target configuration time according to the activity identifier, writes the synchronization order to the first database and associates it with the corresponding target configuration time.
[0139] Then, the first synchronization system of the central node obtains the synchronization order from the first database, obtains the activity content of the target activity according to the activity identifier, and generates target data packets corresponding to each target configuration time according to the target configuration time and the activity content.
[0140] Then, the first synchronization system of the central node sends the target data packet to the cluster synchronization node.
[0141] Then, the second synchronization system of the cluster synchronization node synchronizes the target data packet to the corresponding second database.
[0142] In one possible implementation, the activity time configuration method also includes: determining the order status of a synchronized order, wherein the order status includes a synchronized state or an unsynchronized state; generating a query request for a target order, wherein the target order is a synchronized order in an unsynchronized state; sending the query request to a cluster synchronization node, so that the cluster synchronization node sends the synchronization result of a target data packet corresponding to the target order to a central node, and updates the order status according to the synchronization result.
[0143] Among them, the synchronous order can be written into the order data table of the first database, and a new row of data is inserted each time a new synchronous order is written. The order data table may include a first order number field and a content field. The column where the first order number field is located is used to record the order number of the synchronous order, and the column where the content field is located is also used to record the order content of the synchronous order. The order content may include the activity identifier of the target activity, the application identifier of the application used to promote the target activity, the cluster identifier of the cluster used to host the target activity, etc. The first database may include an order status table, and the order status table may include a second order number field and a status field. The column where the second order number field is located is also used to record the order number of the synchronous order, and the column where the status field is located is used to record the order status of the synchronous order.
[0144] Among them, the order status is used to indicate whether the synchronization order is in a synchronized state or an unsynchronized state. The synchronized state may refer to that the second database has stored the target configuration time corresponding to the synchronization order, and the unsynchronized state may refer to that the second database has not stored the target configuration time corresponding to the synchronization order. When the synchronization order is in the synchronized state, it can be considered that the target activity corresponding to the synchronization order has been synchronized. When the synchronization order is in the unsynchronized state, it can be considered that the target activity corresponding to the synchronization order has not been synchronized.
[0145] Specifically, since the data volume of the target data packet may be relatively large, it may take a long time to write the data content of the target data packet into the second database. Therefore, the target data packet is synchronized to the corresponding second database. Specifically, the data content of the target data packet can be asynchronously written into the second database. The cluster synchronization node can continue to execute other tasks without waiting for the second database to complete the synchronization operation, which can improve the task processing efficiency. Therefore, if all synchronization orders in an unsynchronized state are taken as target orders, it is necessary to periodically query the second database whether the synchronization of the target activities corresponding to the target orders is completed. The central node can periodically generate query requests for target orders and then send the query requests to the cluster synchronization node. The cluster synchronization node can determine whether the second database has stored the target configuration time corresponding to each synchronization order. Then, the cluster synchronization node will send the synchronization result of the target data packet corresponding to the target order to the central node. When the synchronization result indicates that the second database has stored the target configuration time corresponding to the target order, the order status of the target order recorded in the first database can be updated to a synchronized state.
[0146] In one possible implementation, a target data packet is sent to a cluster synchronization node. Specifically, the target data packet can be signed based on a preset private key to generate signature data, and the signature data can be added to the target data packet; the target data packet with the added signature data is sent to the cluster synchronization node, wherein the signature data is used for the cluster synchronization node to verify the target data packet based on a public key, and the public key and the private key belong to the same key pair.
[0147] Among them, the public key can be maintained by a certificate authority or other trusted environment, and the cluster synchronization node can obtain the public key. The public key and private key belonging to the same key pair are constructed based on an asymmetric encryption algorithm.
[0148] Specifically, refer to Figure 6 and Figure 7 , Figure 6 An optional flowchart of encryption processing provided in an embodiment of the present application is shown below. Figure 7 An optional flowchart of verifying a target data packet provided in an embodiment of the present application.
[0149] Among them, the central node uses a private key to sign the target data packet, which is equivalent to encrypting the content data of the target data packet to obtain signature data, and adding the signature data to the target data packet. At this time, the target data packet can contain signature data and content data, and then the target data packet can be sent to the cluster synchronization node. The process of verifying the target data packet can be: the cluster synchronization node uses a public key to decrypt the signature data to obtain first summary data, the cluster synchronization node uses an extraction algorithm to extract a summary of the content data in the target data packet to obtain second summary data, and then the cluster synchronization node compares the first summary data and the second summary data. When the comparison result indicates that the first summary data and the second summary data are the same, it means that the signature verification result is legal, that is, the verification of the target data packet passes. Conversely, when the comparison result indicates that the first summary data and the second summary data are different, it means that the signature verification result is illegal, that is, the verification of the target data packet fails, which can improve the reliability of the target data packet transmission process.
[0150] Among them, the content data of the target data packet is encrypted, specifically, the central node first uses a hash algorithm to perform a summary extraction on the content data of the target data packet to obtain initial summary data, and then the central node uses a private key to encrypt the initial summary data to obtain signature data; the cluster synchronization node uses an extraction algorithm to perform a summary extraction on the content data in the target data packet, specifically, the cluster synchronization node uses a hash algorithm to perform a summary extraction on the content data in the target data packet.
[0151] In one possible implementation, the activity time configuration method also includes: receiving account information of each server sent by the cluster synchronization node, wherein the account information is information recorded after the account in the server performs an action; adjusting the corresponding target configuration time according to the account information, and sending each adjusted target configuration time to the cluster synchronization node again, so that the cluster synchronization node can synchronize each adjusted target configuration time to the corresponding server again.
[0152] Among them, the account in the server executes an action, which may refer to the account in the server executing a login action or a transaction action. Executing a login action may refer to verifying the account information by entering the account name and account password. After the verification is passed, the access right to the server may be obtained. Executing a transaction action may refer to using the logged-in account to conduct transactions in the server, for example, purchasing virtual items or selling virtual items. After the account in the server executes an action, the cluster synchronization node may record the executed action, that is, record the account information of the server. The cluster synchronization node may send the account information of each server to the central node to facilitate the central node to adjust the target configuration time of the server.
[0153] Among them, after the target configuration time is synchronized to the server, the target configuration time can be adjusted based on the business logic set by the central node. Specifically, the central node can obtain the account information of each server where the target activity is deployed through the cluster synchronization node, and then adjust the target configuration time according to the account information. The adjusted target configuration time can then be synchronized to the server again through the cluster synchronization node.
[0154] Based on this, the cluster synchronization node does not need to set up more business logic. Assuming that the cluster synchronization node is set up with business logic, since different servers can be located in different time zones, the cluster synchronization node will configure the corresponding business logic based on the current time zone of each server. After the server system is updated, it may be necessary to adjust the business logic of the server based on the updated system, resulting in the embedding of business logic in the system upgrade and maintenance, making the server system upgrade process complicated and difficult to maintain. The activity configuration method provided in the embodiment of the present application configures the business logic in the central node, and the cluster synchronization node only needs to move the data of the first database to the second database. There is no need to pay attention to too much business logic, which can reduce the complexity of the server system upgrade process and thus reduce the difficulty of maintenance.
[0155] Specifically, the central node can be deployed with a first synchronization system, and the first synchronization system can be set with business logic. The target configuration time is adjusted in the first synchronization system according to the business logic. The cluster synchronization node does not need to set up more business logic, which can reduce the complexity of the server's system upgrade process, thereby reducing the difficulty of maintenance. Relevant personnel can add, modify or delete business logic in the first synchronization system.
[0156] In one possible implementation, the corresponding target configuration time is adjusted according to the account information. Specifically, when the account information includes the current online number, if the sum of the current online numbers is less than or equal to the preset first number threshold, the target configuration time is postponed; or, when the account information includes the current online number, if the sum of the current online numbers is greater than the preset second number threshold, the target configuration time is advanced; or, when the account information includes the cumulative transaction volume, if the sum of the cumulative transaction volumes is less than or equal to the preset first transaction volume threshold, the target configuration time is postponed; or, when the account information includes the cumulative transaction volume, if the sum of the cumulative transaction volumes is greater than the preset second transaction volume threshold, the target configuration time is advanced.
[0157] The business logic set by the central node may specifically be that when the account information is the current online quantity, the sum of the current online quantities of each server where the target activity is deployed may be calculated first, and then the sum of the current online quantities may be compared with the quantity threshold;
[0158] If the sum of the current online numbers is less than or equal to the first number threshold, it can be considered that the number of current online accounts does not meet the standard, so the target configuration time can be postponed, thereby delaying the start time of the activity;
[0159] If the sum of the current online numbers is greater than the second number threshold, it can be considered that the number of current online accounts is in the excess range, so the target configuration time can be advanced to advance the start time of the activity. The second number threshold is greater than or equal to the first number threshold.
[0160] Among them, the server can carry multiple applications, each application can be configured with corresponding activities. When the server needs to promote the target activity to the users of the target application, the number of current online accounts of the target application can be used as the current online number, and the account information can also be the cumulative online number, which refers to the number of all registered accounts.
[0161] Exemplarily, the first quantity threshold is 100,000. The business logic can be set such that when the current time reaches the activity start time, if the number of online accounts in the entire server is less than or equal to 100,000, the target activity will be started one hour later. For example, the activity start time of the target configuration time is 10 o'clock. When it reaches 10 o'clock, if the sum of the current online numbers is less than or equal to 100,000, the target configuration time of the target configuration time is adjusted to 11 o'clock.
[0162] The second quantity threshold is 1 million. The business logic can also be set to when the current time reaches two hours before the activity start time, if the number of online accounts in the entire server is greater than 1 million, the target activity will be started one hour in advance. For example, the activity start time of the target configuration time is 10 o'clock. When it reaches 8 o'clock, if the total number of current online accounts is greater than 1 million, the target configuration time will be adjusted to 9 o'clock.
[0163] Specifically, the business logic set by the central node may be that when the account information is the cumulative transaction volume, the total cumulative transaction volume of each server where the target activity is deployed may be calculated first, and then the total cumulative transaction volume may be compared with the transaction volume threshold. The transaction volume may be the number of virtual goods purchased or sold, and the cumulative transaction volume may be the transaction volume within a preset time period.
[0164] If the sum of the accumulated transaction volumes is less than or equal to the first transaction volume threshold, it can be considered that the accumulated transaction volume does not meet the standard, so the target configuration time can be postponed, thereby delaying the start time of the activity;
[0165] If the sum of the accumulated transaction volumes is greater than the second transaction volume threshold, it can be considered that the accumulated transaction volume is in the excess quantity range, so the target configuration time can be advanced to advance the start time of the activity. The second transaction volume threshold is greater than or equal to the first transaction volume threshold.
[0166] Exemplarily, the first transaction volume threshold is 1000. The business logic can be set to that when the current time reaches the activity start time, if the cumulative transaction volume is less than or equal to 1000, the target activity will be delayed by one hour. For example, the activity start time of the target configuration time is 10 o'clock. When it reaches 10 o'clock, if the sum of the cumulative transaction volume is less than or equal to 1000, the target configuration time of the target configuration time will be adjusted to 11 o'clock.
[0167] The second transaction volume threshold is 10,000. The business logic can also be set to when the current time reaches two hours before the activity start time, if the cumulative transaction volume is greater than 10,000, the target activity will be started one hour in advance. For example, the activity start time of the target configuration time is 10 o'clock. When it reaches 8 o'clock, if the cumulative transaction volume is greater than 10,000, the target configuration time will be adjusted to 9 o'clock.
[0168] Based on this, the business logic can be pre-configured in the central node, and the target configuration time can be flexibly adjusted through the business logic to meet different business needs and improve business processing capabilities.
[0169] In one possible implementation, the business logic set by the central node may specifically be to first execute the target activity within a test time period, and determine the activity score of each server according to the account information of each server. For example, when the account information indicates that the cumulative number of online accounts or the cumulative transaction volume of the server within the test time period is large, the activity score of the server is high. Conversely, when the account information indicates that the cumulative number of online accounts or the cumulative transaction volume of the server within the target time period is small, the activity score of the server is low. The servers may be sorted according to the activity scores, and subsequently, the target configuration time may be adjusted so that servers with higher activity scores execute the target activity again within the target time period, and servers with lower activity scores no longer execute the target activity within the target time period.
[0170] In one possible implementation, the business logic set by the central node may specifically be that before generating the synchronization orders corresponding to each target configuration time, it is necessary to determine whether each server meets the activity requirements based on the account information of each server. For example, when the account information indicates that the total cumulative online quantity or the total cumulative transaction volume of each server exceeds a preset quantity threshold, the server can be considered to meet the activity requirements; otherwise, the server can be considered to not meet the activity requirements. When it is determined that the server meets the activity requirements, the synchronization orders corresponding to each target configuration time are generated.
[0171] Reference Figure 8 , Figure 8 An optional flow chart of an activity time configuration method provided in an embodiment of the present application. The activity time configuration method can be executed by a cluster synchronization node. The cluster synchronization node can be an independent server or terminal, or a server cluster composed of multiple servers. The cluster synchronization node establishes communication with multiple servers located in different time zones, and each server is used to carry the target activity. The activity time configuration method includes but is not limited to the following steps 801 to 802.
[0172] Step 801: Obtain the current time zone of each server and send the current time zone to the central node so that the central node can obtain the initial configuration time of the target activity and the configuration time zone corresponding to the initial configuration time. Then, based on the time difference between each current time zone and the configuration time zone, perform time zone conversion on the initial configuration time to obtain the target configuration time corresponding to each server.
[0173] Step 802: Acquire each target configuration time sent by the central node, and synchronize each target configuration time to the corresponding server.
[0174] The above-mentioned activity time configuration method executed by the cluster synchronization node and the above-mentioned activity time configuration method executed by the central node are based on the same inventive concept. The central node obtains the current time zone of each server through the cluster synchronization node. Based on the time difference between the current time zone and the configuration time zone, the central node automatically converts the initial configuration time into a time zone, obtains the target configuration time corresponding to each server, and quickly synchronizes each target configuration time to the corresponding server through the cluster synchronization node, so that the target activity can be promoted to the user within the corresponding target configuration time, without the need to manually calculate the target configuration time, which can reduce the time zone understanding cost and thus improve the configuration efficiency of the activity time.
[0175] In a possible implementation, a first database is deployed at the central node, and a second database is deployed at the server. The data storage structure of the first database is the same as that of the second database. Each target configuration time sent by the central node is obtained, and each target configuration time is synchronized to the corresponding server. Specifically, the target data packet corresponding to each server sent by the central node is obtained, wherein the target data packet is generated based on the target configuration time after the central node stores the target configuration time in a structured manner in the first database, and then obtains each target configuration time from the first database; and synchronizes the target data packet to the corresponding second database.
[0176] Based on this, the data storage structure of the first database is the same as the data storage structure of the second database, which is equivalent to the first database and the second database being isomorphic databases. An isomorphic database means that data is stored in the same way in the database. Two isomorphic databases can have the same table structure, fields, data types, query languages, indexes, constraints, etc. Therefore, when it is necessary to synchronize data stored in the JSON structure in the first database to the second database, only simple write-back logic needs to be executed, without the need to execute the business logic of data structure conversion, which can improve synchronization efficiency.
[0177] In one possible implementation, a first database stores synchronization orders associated with a target configuration time, and the order status of the synchronization order includes a synchronized state or an unsynchronized state. The activity time configuration method also includes: receiving a query request for a target order sent by a central node, where the target order is a synchronization order in an unsynchronized state; obtaining a synchronization result of a target data packet corresponding to the target order, and sending the synchronization result to the central node so that the central node can update the order status.
[0178] Based on this, the target configuration time can be asynchronously written to the second database, and the cluster synchronization node can continue to execute other tasks without waiting for the second database synchronization operation to be completed, which can improve the task processing efficiency. The cluster synchronization node can determine whether the second database has stored the target configuration time corresponding to each synchronization order. Therefore, if all synchronization orders in an unsynchronized state are taken as target orders, it is necessary to periodically query the second database whether the synchronization of the target activities corresponding to the target orders is completed. The central node can periodically generate query requests for target orders, and then send the query requests to the cluster synchronization node. The cluster synchronization node can respond to the query request and send the synchronization result of the target data packet corresponding to the target order to the central node. When the synchronization result indicates that the second database has stored the target configuration time corresponding to the target order, the order status of the target order recorded in the first database can be updated to a synchronized state. By periodically polling the target order, the synchronization status of each target configuration time can be detected in time.
[0179] In one possible implementation, the target data packet includes the target configuration time and signature data. The signature data is generated by the central node after signing the target data packet based on a preset private key. The target data packets corresponding to each server sent by the central node are obtained by parsing the target data packet to obtain the target configuration time and signature data; verifying the signature data based on the public key, wherein the public key and the private key belong to the same key pair; eliminating the target data packets that fail the verification, and obtaining the remaining target data packets.
[0180] Among them, the public key can be maintained by a certificate authority or other trusted environment, and the cluster synchronization node can obtain the public key. The public key and private key belonging to the same key pair are constructed based on an asymmetric encryption algorithm.
[0181] Based on this, the central node uses a private key to sign the target data packet, which is equivalent to encrypting the content data of the target data packet to obtain signature data, and adding the signature data to the target data packet. At this time, the target data packet may contain signature data and content data, and then the target data packet may be sent to the cluster synchronization node. The process of verifying the target data packet may be: the cluster synchronization node uses a public key to decrypt the signature data to obtain first summary data, the cluster synchronization node extracts a summary of the content data in the target data packet through an extraction algorithm to obtain second summary data, and then the cluster synchronization node compares the first summary data with the second summary data. When the comparison result indicates that the first summary data and the second summary data are the same, it means that the signature verification result is legal, that is, the verification of the target data packet passes, and the data packet can be retained. Conversely, when the comparison result indicates that the first summary data and the second summary data are different, it means that the signature verification result is illegal, that is, the verification of the target data packet fails, which can improve the reliability of the target data packet transmission process.
[0182] Specifically, the content data of the target data packet is encrypted, which specifically means that the central node first uses a hash algorithm to perform a summary extraction on the content data of the target data packet to obtain initial summary data, and then the central node uses a private key to encrypt the initial summary data to obtain signature data; the cluster synchronization node uses an extraction algorithm to perform a summary extraction on the content data in the target data packet, which specifically means that the cluster synchronization node uses a hash algorithm to perform a summary extraction on the content data in the target data packet.
[0183] Reference Fig. 9 and Fig.10 , Fig. 9 A schematic diagram of an optional architecture of a central node and a cluster synchronization node provided in an embodiment of the present application, Fig.10 Another optional interaction schematic diagram of the activity time configuration method provided in the embodiment of the present application.
[0184] The following describes in detail the interaction process between the central node, cluster synchronization node and server.
[0185] Among them, the central node is deployed with a management station, a first synchronization system and a business management system, the cluster synchronization node is deployed with a second synchronization system, the central node is deployed with a first database and a third database, the server is deployed with a second database, and the data storage structure of the first database is the same as the data storage structure of the second database.
[0186] First, the central node displays the configuration interface of the management console, wherein the configuration interface is provided with a time configuration control and a time zone configuration control.
[0187] Then, the management station of the central node obtains the initial configuration time of the target activity based on the input of the time configuration control in response to the interaction with the time configuration control.
[0188] Then, the management station of the central node responds to the interaction with the time zone configuration control and obtains the configuration time zone corresponding to the initial configuration time input based on the time configuration control, wherein the target activity is respectively carried by multiple servers located in different time zones, and each server establishes communication with the cluster synchronization node.
[0189] Then, the management station of the central node stores the initial configuration time and the corresponding configuration time zone in a structured manner in the third database.
[0190] Then, the management station of the central node may send an initial configuration time synchronization data request to the first synchronization system;
[0191] Then, the first synchronization system of the central node determines the initial configuration time that needs to be synchronized in the third database in response to the synchronization data request;
[0192] Then, the first synchronization system of the central node generates a time zone acquisition request based on the initial configuration time stored in the third database and the association relationship between the servers.
[0193] Then, the first synchronization system of the central node sends a time zone acquisition request to the cluster synchronization node.
[0194] Then, the first synchronization system of the central node obtains the current time zone of each server sent by the cluster synchronization node in response to the time zone acquisition request. Specifically, when the servers in the same time zone are divided into the same cluster and the servers in different time zones are divided into different clusters, the cluster synchronization node can use the current time zone of any server in the cluster as the current time zone of the cluster, and then the cluster synchronization node can send the current time zone of the cluster to the central node.
[0195] Then, the first synchronization system of the central node performs time zone conversion on the initial configuration time based on the time difference between each current time zone and the configuration time zone to obtain the target configuration time corresponding to each server. Specifically, when the servers in the same time zone are divided into the same cluster and the servers in different time zones are divided into different clusters, the target configuration time corresponding to each cluster can be obtained through time zone conversion, and the target configuration time of each server in the same cluster is the same.
[0196] Then, the first synchronization system of the central node stores the target configuration time in a structured manner in the first database, wherein the data storage structure of the third database is different from the data storage structure of the first database.
[0197] Then, the first synchronization system of the central node may send feedback information of successful synchronization to the management station.
[0198] Then, the business management system of the central node obtains each target configuration time from the first database, obtains the activity identifier of the target activity, generates a synchronization order corresponding to each target configuration time according to the activity identifier, writes the synchronization order to the first database and associates it with the corresponding target configuration time.
[0199] Then, the first synchronization system of the central node obtains the synchronization order from the first database, obtains the activity content of the target activity according to the activity identifier, and generates target data packets corresponding to each target configuration time according to the target configuration time and the activity content.
[0200] Then, the first synchronization system of the central node signs the target data packet based on a preset private key, generates signature data, and adds the signature data to the target data packet.
[0201] Then, the first synchronization system of the central node sends the target data packet with the signature data added to the cluster synchronization node.
[0202] Then, the second synchronization system of the cluster synchronization node parses the target data packet to obtain the target configuration time and signature data.
[0203] Then, the second synchronization system of the cluster synchronization node verifies the signature data based on the public key, wherein the public key and the private key belong to the same key pair.
[0204] Then, the second synchronization system of the cluster synchronization node removes the target data packets that have failed the verification and obtains the remaining target data packets.
[0205] Then, the second synchronization system of the cluster synchronization node synchronizes the target data packet to the corresponding second database.
[0206] Then, the first synchronization system of the central node determines the order status of the synchronization order, wherein the order status includes a synchronized state or an unsynchronized state.
[0207] Then, the first synchronization system of the central node generates a query request for a target order, wherein the target order is a synchronization order in an unsynchronized state.
[0208] Then, the first synchronization system of the central node sends the query request to the cluster synchronization node.
[0209] Then, the second synchronization system of the cluster synchronization node sends the synchronization result of the target data packet corresponding to the target order to the central node.
[0210] Then, the first synchronization system of the central node updates the order status according to the synchronization result.
[0211] Then, the first synchronization system of the central node receives the account information of each server sent by the cluster synchronization node, wherein the account information is the information recorded after the account in the server performs an action.
[0212] Then, when the account information includes the current online number, if the sum of the current online numbers is less than or equal to the preset first number threshold, the first synchronization system of the central node postpones the target configuration time; or, when the account information includes the current online number, if the sum of the current online numbers is greater than the preset second number threshold, the first synchronization system of the central node advances the target configuration time; or, when the account information includes the cumulative transaction volume, if the sum of the cumulative transaction volumes is less than or equal to the preset first transaction volume threshold, the first synchronization system of the central node postpones the target configuration time; or, when the account information includes the cumulative transaction volume, if the sum of the cumulative transaction volumes is greater than the preset second transaction volume threshold, the first synchronization system of the central node advances the target configuration time.
[0213] Then, the first synchronization system of the central node sends each adjusted target configuration time to the cluster synchronization node again.
[0214] Then, the second synchronization system of the cluster synchronization node synchronizes each adjusted target configuration time to the corresponding server again.
[0215] Based on this, by obtaining the initial configuration time and the corresponding configuration time zone, the central node then obtains the current time zone of each server through the cluster synchronization node. Based on the time difference between the current time zone and the configuration time zone, the central node automatically converts the initial configuration time to obtain the target configuration time corresponding to each server, and quickly synchronizes each target configuration time to the corresponding server through the cluster synchronization node, so that the target activity can be promoted to the user within the corresponding target configuration time, without the need to manually calculate the target configuration time, which can reduce the time zone understanding cost and thus improve the configuration efficiency of the activity time.
[0216] The activity time configuration method provided in the embodiment of the present application can be applied to a variety of scenarios.
[0217] For example, in the scenario of purchasing virtual goods, the target activity can be to put the virtual goods on the shelves. The initial configuration time is automatically converted to the time zone through the central node to obtain the target configuration time corresponding to each server, and each target configuration time is quickly synchronized to the corresponding server through the cluster synchronization node. The virtual goods can be put on the shelves within their respective target configuration times, and the virtual goods can be put on the shelves synchronously without the need to manually calculate the target configuration time, which can reduce the time zone understanding cost and thus improve the configuration efficiency of the activity time.
[0218] For another example, in the scenario of selecting a payment method, the target activity may be to support online payment using the target payment method. The central node can automatically convert the initial configuration time into a time zone to obtain the target configuration time corresponding to each server. The cluster synchronization node can quickly synchronize each target configuration time to the corresponding server. The target payment method can be supported for online payment within the respective target configuration time. Synchronous support for online payment using the target payment method can be achieved without the need to manually calculate the target configuration time, which can reduce the time zone understanding cost and thus improve the configuration efficiency of the activity time.
[0219] It is to be understood that, although the steps in the above-mentioned various flow charts are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in the present embodiment, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the above-mentioned flow charts can include a plurality of steps or a plurality of stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of the steps or stages in other steps or other steps.
[0220] Reference Fig.11 , Fig.11 This is an optional structural diagram of an activity time configuration device provided in an embodiment of the present application. The activity time configuration device 1100 can be applied to a central node. The activity time configuration device 1100 includes:
[0221] The first acquisition module 1101 is used to acquire the initial configuration time of the target activity and the configuration time zone corresponding to the initial configuration time, wherein the target activity is respectively carried by multiple servers located in different time zones, and each server establishes communication with the cluster synchronization node;
[0222] The second acquisition module 1102 is used to acquire the current time zone of each server sent by the cluster synchronization node;
[0223] The conversion module 1103 is used to convert the initial configuration time into a time zone based on the time difference between each current time zone and the configuration time zone, so as to obtain the target configuration time corresponding to each server;
[0224] The first synchronization module 1104 is used to send each target configuration time to the cluster synchronization node, so that the cluster synchronization node synchronizes each target configuration time to the corresponding server.
[0225] Further, the central node is deployed with a first database, the server is deployed with a second database, the data storage structure of the first database is the same as the data storage structure of the second database, and the first synchronization module 1104 is specifically used for:
[0226] storing the target configuration time in a structured manner in a first database;
[0227] Each target configuration time is obtained from the first database, a target data packet corresponding to each target configuration time is generated, and the target data packet is sent to the cluster synchronization node so that the cluster synchronization node synchronizes the target data packet to the corresponding second database.
[0228] Furthermore, the first synchronization module 1104 is specifically used for:
[0229] Obtaining an activity identifier of the target activity, generating synchronization orders corresponding to each target configuration time according to the activity identifier, writing the synchronization orders into the first database and associating them with the corresponding target configuration time;
[0230] Acquire the synchronization order from the first database, acquire the activity content of the target activity according to the activity identifier, and generate the target data packet corresponding to each target configuration time according to the target configuration time and the activity content.
[0231] Furthermore, the activity time configuration device further includes a first query module, and the first query module is specifically used for:
[0232] Determine an order status of the synchronization order, wherein the order status includes a synchronized state or an unsynchronized state;
[0233] Generate a query request for a target order, wherein the target order is a synchronized order in an unsynchronized state;
[0234] The query request is sent to the cluster synchronization node, so that the cluster synchronization node sends the synchronization result of the target data packet corresponding to the target order to the central node, and updates the order status according to the synchronization result.
[0235] Furthermore, the first synchronization module 1104 is specifically used for:
[0236] Signing the target data packet based on a preset private key, generating signature data, and adding the signature data to the target data packet;
[0237] The target data packet with the signature data added is sent to the cluster synchronization node, wherein the signature data is used for the cluster synchronization node to verify the target data packet based on the public key, and the public key and the private key belong to the same key pair.
[0238] Furthermore, the central node is also deployed with a third database, and the second acquisition module 1102 is specifically used for:
[0239] storing the initial configuration time and the corresponding configuration time zone in a third database in a structured manner, wherein the data storage structure of the third database is different from the data storage structure of the first database;
[0240] Generate a time zone acquisition request based on the association relationship between the initial configuration time and the server stored in the third database;
[0241] A time zone acquisition request is sent to the cluster synchronization node, and the current time zone of each server sent by the cluster synchronization node in response to the time zone acquisition request is obtained.
[0242] Furthermore, the first acquisition module 1101 is specifically used for:
[0243] Display the configuration interface, wherein the configuration interface is provided with a time configuration control and a time zone configuration control;
[0244] In response to interaction with the time configuration control, obtaining an initial configuration time of the target activity based on input of the time configuration control;
[0245] In response to the interaction with the time zone configuration control, a configuration time zone corresponding to the initial configuration time input based on the time configuration control is obtained.
[0246] Furthermore, the activity time configuration device further includes an adjustment module, which is specifically used for:
[0247] Receive the account information of each server sent by the cluster synchronization node, where the account information is the information recorded after the account in the server performs an action;
[0248] The corresponding target configuration time is adjusted according to the account information, and each adjusted target configuration time is sent to the cluster synchronization node again, so that the cluster synchronization node can synchronize each adjusted target configuration time to the corresponding server again.
[0249] Furthermore, the above adjustment module is specifically used for:
[0250] When the account information includes the number of current online users, if the sum of the number of current online users is less than or equal to the preset first number threshold, the target configuration time is postponed;
[0251] Alternatively, when the account information includes the number of current online users, if the sum of the number of current online users is greater than a preset second number threshold, the target configuration time is advanced;
[0252] Alternatively, when the account information includes cumulative transaction volumes, if the sum of the cumulative transaction volumes is less than or equal to a preset first transaction volume threshold, the target configuration time is postponed;
[0253] Alternatively, when the account information includes the accumulated transaction volume, if the sum of the accumulated transaction volumes is greater than a preset second transaction volume threshold, the target configuration time is advanced.
[0254] The above-mentioned activity time configuration device 1100 and the activity time configuration method applied to the central node are based on the same inventive concept. By obtaining the initial configuration time and the corresponding configuration time zone, the central node then obtains the current time zone of each server through the cluster synchronization node. Based on the time difference between the current time zone and the configuration time zone, the central node automatically converts the time zone of the initial configuration time to obtain the target configuration time corresponding to each server, and quickly synchronizes each target configuration time to the corresponding server through the cluster synchronization node, so that the target activity can be promoted to the user within the corresponding target configuration time, without the need to manually calculate the target configuration time, which can reduce the time zone understanding cost and thus improve the configuration efficiency of the activity time.
[0255] Reference Fig.12 , Fig.12 Another optional structural diagram of the activity time configuration device provided in the embodiment of the present application, the activity time configuration device 1200 can be applied to a cluster synchronization node, the cluster synchronization node establishes communication with multiple servers located in different time zones, each server is used to carry the target activity, and the activity time configuration device 1200 includes:
[0256] The sending module 1201 is used to obtain the current time zone of each server and send the current time zone to the central node, so that the central node can obtain the initial configuration time of the target activity and the configuration time zone corresponding to the initial configuration time, and then perform time zone conversion on the initial configuration time based on the time difference between each current time zone and the configuration time zone to obtain the target configuration time corresponding to each server;
[0257] The second synchronization module 1202 is used to obtain each target configuration time sent by the central node, and synchronize each target configuration time to the corresponding server.
[0258] Further, the central node is deployed with a first database, the server is deployed with a second database, the data storage structure of the first database is the same as the data storage structure of the second database, and the second synchronization module 1202 is specifically used for:
[0259] Obtaining target data packets corresponding to each server sent by the central node, wherein the target data packets are generated based on the target configuration time after the central node stores the target configuration time in a structured manner in the first database and then obtains each target configuration time from the first database;
[0260] The target data packet is synchronized to the corresponding second database.
[0261] Furthermore, the first database stores synchronization orders associated with the target configuration time, and the order status of the synchronization order includes a synchronized state or an unsynchronized state. The activity time configuration device also includes a second query module, and the second query module is specifically used to:
[0262] Receive a query request for a target order sent by a central node, where the target order is a synchronized order that is in an unsynchronized state;
[0263] Get the synchronization result of the target data packet corresponding to the target order, and send the synchronization result to the central node so that the central node can update the order status.
[0264] Further, the target data packet includes the target configuration time and signature data, and the signature data is generated by the central node after signing the target data packet based on a preset private key. The second synchronization module 1202 is specifically used to: parse the target data packet to obtain the target configuration time and signature data;
[0265] Verify the signature data based on the public key, where the public key and the private key belong to the same key pair;
[0266] Eliminate the target data packets that fail the verification and obtain the remaining target data packets.
[0267] The above-mentioned activity time configuration device 1200 and the activity time configuration method applied to the cluster synchronization node are based on the same inventive concept. The central node obtains the current time zone of each server through the cluster synchronization node. Based on the time difference between the current time zone and the configuration time zone, the central node automatically converts the initial configuration time into a time zone, obtains the target configuration time corresponding to each server, and quickly synchronizes each target configuration time to the corresponding server through the cluster synchronization node, so that the target activity can be promoted to the user within the corresponding target configuration time, without the need to manually calculate the target configuration time, which can reduce the time zone understanding cost and thus improve the configuration efficiency of the activity time.
[0268] The electronic device for executing the above-mentioned activity time configuration method provided in the embodiment of the present application may be a terminal. Fig.13 , Fig.13 This is a partial structural block diagram of a terminal provided in an embodiment of the present application. The terminal includes: a camera assembly 1310, a memory 1320, an input unit 1330, a display unit 1340, a sensor 1350, an audio circuit 1360, a wireless fidelity (WiFi) module 1370, a processor 1380, and a power supply 1390. Those skilled in the art can understand that Fig.13 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0269] The camera assembly 1310 can be used to capture images or videos. Optionally, the camera assembly 1310 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions.
[0270] The memory 1320 may be used to store software programs and modules. The processor 1380 executes various functional applications and data processing of the terminal by running the software programs and modules stored in the memory 1320 .
[0271] The input unit 1330 may be used to receive input digital or character information and generate key signal input related to the terminal's settings and function control. Specifically, the input unit 1330 may include a touch panel 1331 and other input devices 1332 .
[0272] The display unit 1340 may be used to display input information or provided information and various menus of the terminal. The display unit 1340 may include a display panel 1341 .
[0273] The audio circuit 1360 , the speaker 1361 , and the microphone 1362 may provide an audio interface.
[0274] The power source 1390 may be alternating current, direct current, a disposable battery, or a rechargeable battery.
[0275] The number of sensors 1350 may be one or more, and the one or more sensors 1350 include but are not limited to: acceleration sensors, gyroscope sensors, pressure sensors, optical sensors, etc. Among them:
[0276] The acceleration sensor can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal. For example, the acceleration sensor can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1380 can control the display unit 1340 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor. The acceleration sensor can also be used for collecting game or user motion data.
[0277] The gyroscope sensor can detect the body direction and rotation angle of the terminal, and the gyroscope sensor can cooperate with the acceleration sensor to collect the user's 3D actions on the terminal. The processor 1380 can implement the following functions based on the data collected by the gyroscope sensor: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0278] The pressure sensor can be set in the side frame of the terminal and / or the lower layer of the display unit 1340. When the pressure sensor is set in the side frame of the terminal, the user's holding signal of the terminal can be detected, and the processor 1380 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor. When the pressure sensor is set in the lower layer of the display unit 1340, the processor 1380 controls the operability controls on the UI interface according to the user's pressure operation on the display unit 1340. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0279] The optical sensor is used to collect the ambient light intensity. In one embodiment, the processor 1380 can control the display brightness of the display unit 1340 according to the ambient light intensity collected by the optical sensor. Specifically, when the ambient light intensity is high, the display brightness of the display unit 1340 is increased; when the ambient light intensity is low, the display brightness of the display unit 1340 is decreased. In another embodiment, the processor 1380 can also dynamically adjust the shooting parameters of the camera assembly 1310 according to the ambient light intensity collected by the optical sensor.
[0280] In this embodiment, the processor 1380 included in the terminal can execute the activity time configuration method of the previous embodiment.
[0281] The electronic device for executing the above-mentioned activity time configuration method provided in the embodiment of the present application may also be a server, referring to Fig.14 , Fig.14This is a partial structural block diagram of a server provided in an embodiment of the present application. The server 1400 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1422 (for example, one or more processors) and a memory 1432, and one or more storage media 1430 (for example, one or more mass storage devices) storing application programs 1442 or data 1444. Among them, the memory 1432 and the storage medium 1430 may be short-term storage or permanent storage. The program stored in the storage medium 1430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server 1400. Furthermore, the central processing unit 1422 may be configured to communicate with the storage medium 1430 to execute a series of instruction operations in the storage medium 1430 on the server 1400.
[0282] The server 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458, and / or, one or more operating systems 1441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0283] The processor in the server 1400 may be used to execute the activity time configuration method.
[0284] The embodiment of the present application also provides a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the activity time configuration methods of the above-mentioned embodiments.
[0285] The embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the above-mentioned activity time configuration method.
[0286] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0287] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0288] It should be understood that in the description of the embodiments of the present application, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.
[0289] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0290] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0291] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0292] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0293] It should also be understood that the various implementations provided in the embodiments of the present application can be combined arbitrarily to achieve different technical effects.
[0294] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions under the shared conditions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A method for configuring activity time, characterized in that: Applied to the central node, the activity time configuration method includes: Obtaining an initial configuration time of a target activity and a configuration time zone corresponding to the initial configuration time, wherein the target activity is respectively hosted by a plurality of servers located in different time zones, and each of the servers establishes communication with a cluster synchronization node; Obtaining the current time zone of each of the servers sent by the cluster synchronization node; Based on the time difference between each of the current time zones and the configuration time zone, respectively convert the initial configuration time to obtain the target configuration time corresponding to each of the servers; Each of the target configuration times is sent to the cluster synchronization node, so that the cluster synchronization node synchronizes each of the target configuration times to the corresponding server.
2. The activity time configuration method according to claim 1, characterized in that: The central node is deployed with a first database, the server is deployed with a second database, the data storage structure of the first database is the same as the data storage structure of the second database, and the sending of each of the target configuration times to the cluster synchronization node so that the cluster synchronization node synchronizes each of the target configuration times to the corresponding server, includes: storing the target configuration time in a structured manner in the first database; Acquire each of the target configuration times from the first database, generate a target data packet corresponding to each of the target configuration times, and send the target data packet to the cluster synchronization node so that the cluster synchronization node synchronizes the target data packet to the corresponding second database.
3. The activity time configuration method according to claim 2, characterized in that: The generating of target data packets corresponding to each target configuration time includes: Acquire the activity identifier of the target activity, generate synchronization orders corresponding to each target configuration time according to the activity identifier, write the synchronization orders into the first database and associate them with the corresponding target configuration time; The synchronization order is acquired from the first database, the activity content of the target activity is acquired according to the activity identifier, and the target data packets corresponding to each target configuration time are generated according to the target configuration time and the activity content.
4. The activity time configuration method according to claim 3, characterized in that: The activity time configuration method also includes: Determine an order status of the synchronization order, wherein the order status includes a synchronized state or an unsynchronized state; Generate a query request for a target order, wherein the target order is the synchronized order in the unsynchronized state; The query request is sent to the cluster synchronization node, so that the cluster synchronization node sends the synchronization result of the target data packet corresponding to the target order to the central node, and updates the order status according to the synchronization result.
5. The activity time configuration method according to claim 2, characterized in that: The sending the target data packet to the cluster synchronization node includes: Signing the target data packet based on a preset private key to generate signature data, and adding the signature data to the target data packet; The target data packet after adding the signature data is sent to the cluster synchronization node, wherein the signature data is used by the cluster synchronization node to verify the target data packet based on a public key, and the public key and the private key belong to the same key pair.
6. The activity time configuration method according to claim 2, characterized in that: The central node is also deployed with a third database, and the obtaining of the current time zone of each server sent by the cluster synchronization node includes: storing the initial configuration time and the corresponding configuration time zone in a structured manner in the third database, wherein the data storage structure of the third database is different from the data storage structure of the first database; Generate a time zone acquisition request based on the initial configuration time stored in the third database and the association relationship between the servers; The time zone acquisition request is sent to the cluster synchronization node, and the current time zone of each of the servers sent by the cluster synchronization node in response to the time zone acquisition request is acquired.
7. The activity time configuration method according to claim 1, characterized in that: The obtaining of the initial configuration time of the target activity and the configuration time zone corresponding to the initial configuration time includes: Displaying a configuration interface, wherein the configuration interface is provided with a time configuration control and a time zone configuration control; In response to interaction with the time configuration control, obtaining an initial configuration time of a target activity based on input of the time configuration control; In response to interaction with the time zone configuration control, a configuration time zone corresponding to the initial configuration time input based on the time configuration control is obtained.
8. The activity time configuration method according to claim 1, characterized in that: The activity time configuration method also includes: Receiving the account information of each of the servers sent by the cluster synchronization node, wherein the account information is the information recorded after the account in the server performs an action; The corresponding target configuration time is adjusted according to the account information, and each adjusted target configuration time is sent to the cluster synchronization node again, so that the cluster synchronization node can synchronize each adjusted target configuration time to the corresponding server again.
9. The activity time configuration method according to claim 8, characterized in that: The adjusting the corresponding target configuration time according to the account information includes: When the account information includes the number of current online users, if the sum of the number of current online users is less than or equal to a preset first number threshold, the target configuration time is postponed; Alternatively, when the account information includes the number of current online users, if the sum of the number of current online users is greater than a preset second number threshold, the target configuration time is advanced; Alternatively, when the account information includes cumulative transaction volume, if the sum of the cumulative transaction volumes is less than or equal to a preset first transaction volume threshold, the target configuration time is postponed; Alternatively, when the account information includes the accumulated transaction volume, if the sum of the accumulated transaction volumes is greater than a preset second transaction volume threshold, the target configuration time is advanced.
10. A method for configuring activity time, characterized in that: Applied to a cluster synchronization node, the cluster synchronization node establishes communication with multiple servers located in different time zones, each of the servers is used to carry a target activity, and the activity time configuration method includes: Obtaining the current time zone of each of the servers, and sending the current time zone to the central node, so that the central node can obtain the initial configuration time of the target activity and the configuration time zone corresponding to the initial configuration time, and then, based on the time difference between each of the current time zone and the configuration time zone, respectively convert the initial configuration time to obtain the target configuration time corresponding to each of the servers; The target configuration times sent by the central node are obtained, and the target configuration times are synchronized to the corresponding servers respectively.
11. The activity time configuration method according to claim 10, characterized in that: The central node is deployed with a first database, the server is deployed with a second database, the data storage structure of the first database is the same as the data storage structure of the second database, and the acquiring of each target configuration time sent by the central node and synchronizing each target configuration time to the corresponding server respectively include: Obtaining a target data packet corresponding to each of the servers sent by the central node, wherein the target data packet is generated based on the target configuration time after the central node stores the target configuration time in the first database in a structured manner and then obtains each of the target configuration times from the first database; The target data packet is synchronized to the corresponding second database.
12. The activity time configuration method according to claim 11, characterized in that: The first database stores a synchronization order associated with the target configuration time, the order status of the synchronization order includes a synchronized state or an unsynchronized state, and the activity time configuration method further includes: receiving a query request for a target order sent by the central node, wherein the target order is the synchronized order in the unsynchronized state; The synchronization result of the target data packet corresponding to the target order is obtained, and the synchronization result is sent to the central node so that the central node can update the order status.
13. The activity time configuration method according to claim 11, characterized in that: The target data packet includes the target configuration time and signature data, and the signature data is generated by the central node signing the target data packet based on a preset private key. The step of obtaining the target data packets corresponding to each of the servers sent by the central node includes: Parsing the target data packet to obtain the target configuration time and the signature data; Verifying the signature data based on a public key, wherein the public key and the private key belong to the same key pair; The target data packets that fail the verification are eliminated, and the remaining target data packets are obtained.
14. An activity time configuration device, characterized in that: Applied to the central node, the activity time configuration device comprises: A first acquisition module is used to acquire an initial configuration time of a target activity and a configuration time zone corresponding to the initial configuration time, wherein the target activity is respectively carried by a plurality of servers located in different time zones, and each of the servers establishes communication with a cluster synchronization node; A second acquisition module is used to acquire the current time zone of each server sent by the cluster synchronization node; A conversion module, configured to perform time zone conversion on the initial configuration time based on the time difference between each current time zone and the configuration time zone, to obtain a target configuration time corresponding to each server; The first synchronization module is used to send each of the target configuration times to the cluster synchronization node, so that the cluster synchronization node synchronizes each of the target configuration times to the corresponding server.
15. An activity time configuration device, characterized in that: Applied to a cluster synchronization node, the cluster synchronization node establishes communication with multiple servers located in different time zones, each of the servers is used to carry a target activity, and the activity time configuration device includes: A sending module, used for obtaining the current time zone of each of the servers, and sending the current time zone to the central node, so that after the central node obtains the initial configuration time of the target activity and the configuration time zone corresponding to the initial configuration time, based on the time difference between each of the current time zone and the configuration time zone, the initial configuration time is respectively converted into a time zone to obtain the target configuration time corresponding to each of the servers; The second synchronization module is used to obtain each of the target configuration times sent by the central node, and synchronize each of the target configuration times to the corresponding server.
16. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the activity time configuration method according to any one of claims 1 to 13 is implemented.
17. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the activity time configuration method according to any one of claims 1 to 13 is implemented.
18. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the activity time configuration method according to any one of claims 1 to 13 is implemented.