CN110690936A - Time control method, system and computer system in service operation - Google Patents

Time control method, system and computer system in service operation Download PDF

Info

Publication number
CN110690936A
CN110690936A CN201810736148.XA CN201810736148A CN110690936A CN 110690936 A CN110690936 A CN 110690936A CN 201810736148 A CN201810736148 A CN 201810736148A CN 110690936 A CN110690936 A CN 110690936A
Authority
CN
China
Prior art keywords
time
service
server
end equipment
business
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810736148.XA
Other languages
Chinese (zh)
Other versions
CN110690936B (en
Inventor
吴文勤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810736148.XA priority Critical patent/CN110690936B/en
Publication of CN110690936A publication Critical patent/CN110690936A/en
Application granted granted Critical
Publication of CN110690936B publication Critical patent/CN110690936B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a time control method, a time control system and a computer system in service operation. The method comprises the following steps: carrying out time synchronization between all parties of servers to which the service is oriented, so that system time between all parties of servers is aligned, and all parties of servers are mutually independent in the operation of the service; aligning the time of the service front-end equipment through the corresponding party server, so that the time of the service front-end equipment is synchronized to the system time of the corresponding party server; and under the condition that the time between the service front-end equipment is synchronized, the service is operated through the time synchronized by the service front-end equipment. Therefore, a time synchronization mechanism in a cross-subject system is built, and the time synchronization mechanism is built on servers belonging to different subjects and business front-end equipment, so that the normal operation of the business is ensured.

Description

Time control method, system and computer system in service operation
Technical Field
The invention relates to the technical field of internet application, in particular to a time control method, a time control system and a computer system in service operation.
Background
With the rapid development of internet application technology, many internet services are implemented across entities. That is, the system built by the cooperation of all parties is used for achieving the internet service, and further realizing the service operation. Especially, as more and more lines of business are switched into the line, the realization of a cross-body system becomes an important direction of business operation.
The system realization of cross-body in service operation is to build and deploy a server belonging to each body for service as a background of the belonging body, and for some servers, according to the difference of the belonging bodies, namely the difference of the required realization service, corresponding service front-end equipment also exists.
Therefore, the operation of the service is realized through the interaction between the service front-end devices and the control of the corresponding server. The operation of the service inevitably needs to ensure that the interaction between the service front-end devices is legal in time, and the interacted data is not data overdue in time, so that a cross-main system needs to build a time synchronization mechanism for the purpose, and the service is normally operated.
The existing time synchronization mechanism is only built inside a cluster and is used for realizing time synchronization among nodes inside the cluster. The time synchronization among the nodes in the cluster is performed depending on a certain node. Firstly, the time synchronization of the node is carried out, then each node sends a synchronization request to the node to request the node to feed back the current time corresponding to the clock of the node to each node so as to realize the synchronization.
However, this is limited to time synchronization within a cluster, and since there is correlation between nodes, it is not suitable for time synchronization across subject systems, how servers belonging to different subjects and corresponding service front-end devices synchronize, and it is not solved from the existing time synchronization within a cluster.
Disclosure of Invention
In order to solve the technical problems that time synchronization of a cross-subject system is realized by service operation in the related art, and a time synchronization mechanism is built in servers belonging to different subjects and service front-end equipment, the invention provides a time control method and device in service operation and a computer system.
A method of time control in a business operation, the method comprising:
carrying out time synchronization between all parties of servers to which the service is oriented, so that system time between all parties of servers is aligned, and all parties of servers are mutually independent in the operation of the service;
aligning the time of the service front-end equipment through the corresponding party server, so that the time of the service front-end equipment is synchronized to the system time of the corresponding party server;
and under the condition that the time between the service front-end equipment is synchronized, the service is operated through the time synchronized by the service front-end equipment.
A system for controlling time in operation of a business, the system comprising:
each party server which the business faces is used for carrying out time synchronization between the parties and aligning the system time between the parties, and the parties are independent in the operation of the business;
the service front-end equipment is used for aligning time through a corresponding party server to ensure that the time per se is synchronized to the system time of the corresponding party server;
the service front-end equipment is also used for operating the service through the synchronized time under the condition that the mutual time is synchronized.
A computer system, comprising:
a processor; and
a memory having computer readable instructions stored thereon which, when executed by the processor, implement the method as previously described.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects:
for the service realized by the cross-main-body system, time synchronization is carried out between the oriented servers, so that the system time between the servers is aligned, the servers are mutually independent in the operation of the service, all the servers are used as the background of the corresponding main body, at the moment, the service front-end equipment of each main body passes through the alignment time of the corresponding server, so that the service front-end equipment of all the main bodies is synchronized as the system time of the corresponding server, and finally, the service is operated through the synchronized time under the synchronization of the time between the service front-end equipment, so that a time synchronization mechanism in the cross-main-body system is built, and the time synchronization mechanism is built on the servers belonging to different main bodies and the service front-end equipment, so that the service can be operated normally.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a schematic illustration of an implementation environment in accordance with the present invention;
FIG. 2 is a block diagram illustrating an apparatus in accordance with an exemplary embodiment;
FIG. 3 is a flow chart illustrating a method of time control in a business operation in accordance with an exemplary embodiment;
FIG. 4 is a flowchart illustrating a description of step 350 shown in a corresponding embodiment in FIG. 3;
FIG. 5 is a flow chart illustrating a method of time control in a business operation according to another embodiment;
FIG. 6 is a schematic diagram illustrating a scenario of a subway ride code service in accordance with an exemplary embodiment;
FIG. 7 is a schematic diagram illustrating an implementation of a time synchronization mechanism in the scenario illustrated in FIG. 6, in accordance with an illustrative embodiment;
FIG. 8 is an implementation architecture diagram depicting gate time alignment according to the corresponding embodiment shown in FIG. 7;
fig. 9 is an implementation architecture diagram illustrating time alignment of a user terminal according to the corresponding embodiment of fig. 7;
fig. 10 is an architecture diagram illustrating implementation of time alignment and monitoring between social applications and subway partners according to the corresponding embodiment of fig. 7;
FIG. 11 is a block diagram illustrating a time control system in operation according to an exemplary embodiment;
FIG. 12 is a block diagram illustrating a service front-end device according to the corresponding embodiment of FIG. 11;
fig. 13 is a block diagram illustrating a time control system in service operation according to another embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
FIG. 1 is a schematic illustration of an implementation environment in accordance with the present invention. In an exemplary embodiment, the implementation of the service is illustrated by taking two bodies as an example. It should be noted that the main entities referred to herein refer to partners involved in service implementation, and the main entities are independent from each other, but there is also interaction for implementing service operations.
In view of this, in an exemplary embodiment, the present invention is directed to an implementation environment as shown in fig. 1, including: a first party server 110, a second party server 130, and a business front-end 150. The first party server 110 and the second party server 130 correspond to each partner involved in the service, and each partner deploys the applicable service front-end device 150 in the operation of the service, and it should be understood that the two service front-end devices 150 shown in the implementation environment shown in fig. 1 are different in specific landing scenes and correspond to the different two devices, respectively.
As shown in fig. 1, the first server 110 and the second server 130 are independent from each other and belong to different subjects, and interact with each other through the deployed service front-end device 150, thereby forming a cross-subject system and implementing a correspondingly deployed service.
In the cross-main system, the time synchronization mechanism set up by the invention ensures the time synchronization among the first server 110, the second server 130 and the business front-end equipment 150, thereby avoiding the abnormal operation of the business caused by time failure.
It should be understood that the joining of different partners plays their own role in the implementation of the service, and therefore, there are corresponding machine device deployments, and the machine device deployments are independent from other partners, so that the machine device deployments performed correspond to different principals, and the system formed is a multi-principal participating cross-principal system.
FIG. 2 is a block diagram illustrating an apparatus according to an example embodiment. For example, the apparatus 200 may be the business front-end device 150 in the implementation environment shown in fig. 1. For example, the business front-end device 150 is a terminal device such as a smart phone or a tablet computer, or various code scanning machines.
Referring to fig. 2, the apparatus 200 includes at least the following components: a processing component 202, a memory 204, a power component 206, a multimedia component 208, an audio component 210, a sensor component 214, and a communication component 216.
The processing component 202 generally controls overall operation of the device 200, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations, among others. The processing components 202 include at least one or more processors 218 to execute instructions to perform all or a portion of the steps of the methods described below. Further, the processing component 202 includes at least one or more modules that facilitate interaction between the processing component 202 and other components. For example, the processing component 202 can include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
The memory 204 is configured to store various types of data to support operations at the apparatus 200. Examples of such data include instructions for any application or method operating on the apparatus 200. The Memory 204 is implemented by at least any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically erasable Programmable Read-Only Memory (EEPROM), erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. Also stored in memory 204 are one or more modules configured to be executed by the one or more processors 218 to perform all or a portion of the steps of any of the methods of fig. 3, 4, and 5, described below.
The power supply component 206 provides power to the various components of the device 200. The power components 206 include at least a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 200.
The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a touch panel. If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. The screen further includes an Organic Light Emitting Display (OLED for short).
The audio component 210 is configured to output and/or input audio signals. For example, the audio component 210 includes a Microphone (MIC) configured to receive external audio signals when the device 200 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 204 or transmitted via the communication component 216. In some embodiments, audio component 210 also includes a speaker for outputting audio signals.
The sensor component 214 includes one or more sensors for providing various aspects of status assessment for the device 200. For example, the sensor assembly 214 detects the open/closed status of the device 200, the relative positioning of the components, the sensor assembly 214 also detects a change in position of the device 200 or a component of the device 200, and a change in temperature of the device 200. In some embodiments, the sensor assembly 214 also includes a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 216 is configured to facilitate wired or wireless communication between the apparatus 200 and other devices. The device 200 accesses a WIreless network based on a communication standard, such as WiFi (WIreless-Fidelity). In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the Communication component 216 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, bluetooth technology, and other technologies.
In an exemplary embodiment, the apparatus 200 is implemented by one or more Application Specific Integrated Circuits (ASICs), digital signal processors, digital signal processing devices, programmable logic devices, field programmable gate arrays, controllers, microcontrollers, microprocessors or other electronic components for performing the methods described below.
Fig. 3 is a flow chart illustrating a method of time control in a business operation according to an exemplary embodiment. The method for controlling time in service operation, as shown in fig. 3, in an exemplary embodiment, includes at least the following steps.
In step 310, time synchronization is performed between the servers to which the service is directed, such that the system time between the servers is aligned, and the servers are independent of each other during operation of the service.
The parties to which the service is directed refer to the partners of the service, which are different subjects in the corresponding system implementation. Correspondingly, each party server targeted by the service is a background implementation deployed by each partner, and each party server may be a single server device or a server cluster, which is not limited herein.
No matter how many subjects the service is oriented to, in the built system, the servers corresponding to the subjects, that is, the servers of each subject need to ensure the consistency of time, so as to ensure the interactive performance between the subjects, and further ensure the normal operation of the service.
The time synchronization between the servers of all parties is to substantially ensure the consistency of the system time in all the servers. With the operation of the server, a time error inevitably occurs, which causes the system time of each server to have a deviation, so that a time synchronization mechanism needs to be established in a cross-main-body system of the business through the realization of the method of the invention, thereby ensuring the consistency in time.
It should be understood that each server is adapted to the requirement of the corresponding subject, and has independent business logic relative to other subjects, but will also achieve the business corresponding to the implemented cross-subject system through the execution of the respective business logic and the cooperation between each other.
For example, the gate of the subway station can verify that the subway ticket is held by the user by scanning the bus code generated by the user terminal, and after the gate passes the verification of the generated bus code, the gate executes the release action on the user. The subway bus taking code service is realized, the subway side and the side which generates the bus taking codes and completes the subway bus taking payment are all the cooperation sides of the subway bus taking code service, and then serve as different main bodies, a background server is constructed for the main bodies, the corresponding gate is the service front-end equipment for the main bodies of the subway side, and the corresponding user terminal is the service front-end equipment for the side which generates the bus taking codes and completes the subway bus taking payment. The two parties are independent of each other, and the existing interaction is achieved by scanning codes between the gate and the user terminal and verifying the scanned riding codes.
It should be understood that the deployment of the servers to which the service is directed depends on the actual service implemented, i.e., the implementation across the subject system is strongly tied to the underlying service.
Although a plurality of servers are deployed as required in the cross-subject system, the servers belong to each subject respectively, and are different from the clusters deployed uniformly, so that the cross-subject system is not suitable for a time synchronization mechanism built in the clusters, and the accuracy and the efficiency are limited.
It is desirable to synchronize the time between the servers in the execution of step 310 to achieve temporal consistency between the servers.
In an exemplary embodiment, for time synchronization between the servers, the system time between the servers may be directly aligned, and the system time of the servers is consistent.
In another exemplary embodiment, time synchronization between the various servers may also be performed by means of a time reference source in the internet. Specifically, each server performs time synchronization by accessing the same time reference source, and the time of the time reference source is configured as the system time.
Further, step 310 includes: all the servers targeted by the service align the time of the same time reference source according to the specified time interval, and align the system time of the server to the time of the time reference source.
The servers of all parties access the same time reference source through the internet to obtain the time of the time reference source, and the time is configured to be the system time of the servers, so that the system time is aligned according to the same time reference source.
And the time reference source is a time server deployed in the internet and used for realizing time calibration of the accessed machine equipment. The servers of all parties facing the service only need to carry out time synchronization through the same time reference source to achieve mutual time alignment.
In the operation of the service, the servers to which the service is directed automatically synchronize their times, and therefore, the time interval for performing time synchronization, that is, the specified time interval in step 310 is specified. The specific value corresponding to the designated time interval is flexibly adjusted according to the actual operation requirement, for example, the designated time interval may be 5 minutes.
In step 330, the time of the service front-end device is aligned by the corresponding one of the servers, so that the time of the service front-end device is synchronized to the system time of the corresponding one of the servers.
As mentioned above, the service implementation is supported by the constructed cross-subject system, and the service front-end devices deployed by the service operation facing the user correspond to all the servers in the cross-subject system. The correspondence between the service front-end device and one server means that when the service front-end device performs a certain operation for the service to be operated, for example, the operation of generating the car code by the user terminal mentioned above is realized by accessing one server, and therefore, the service front-end device corresponds to one server.
The service front-end equipment is equipment corresponding to the service front-end. In an exemplary embodiment, the service front-end device may be a device that is operated by a user to implement service operation, or may be a device that is not controllable by the user in service operation but is closely related to the user, such as the aforementioned gate, which is not listed here.
During operation of the service, the service front-end equipment accesses the corresponding one-side server. That is to say, after time synchronization is completed between the servers, since the service front-end device can access the corresponding server, the service front-end device can synchronize time by accessing the server of the corresponding server, so as to achieve consistency of all service front-end devices in time, and further ensure that interaction between the service front-end devices can be completed.
Specifically, the service front-end device obtains the system time of the server through one-side server access, and the system time is obtained by completing time synchronization between the two sides of the server, so that the service front-end device adjusts the self time according to the deviation between the self time and the obtained system time.
By analogy, all the business front-end devices finish the adjustment of self time through the server of the party, and then the consistency of all the business front-end devices on time is achieved.
In this case, time synchronization is achieved for the cross-subject system corresponding to the service, and the machine devices in the cross-subject system, whether the server or the service front-end device, have consistency in time.
As can be seen, in one exemplary embodiment, step 330 comprises: the service front-end equipment corresponding to each server carries out time synchronization by accessing the server corresponding to the service front-end equipment to obtain the system time of the server corresponding to the service front-end equipment.
In step 350, the service is run through the time synchronized by the service front-end equipment under the synchronization of the time between the service front-end equipment.
The service front-end equipment is used as the execution equipment of front-end operation and control and front-end response in the service, and the inconsistency of time can cause the failure of the front-end operation and control in the service, even refuse to perform the front-end response, so that the operation of the service is abnormal.
Therefore, after the time between the business front-end equipment is synchronized, the operation can be guaranteed in time, and the business operation failure caused by time failure and expiration is avoided.
By the exemplary embodiments described above, time control of service operation is realized, and no matter what kind of service is executed, as long as a plurality of parties are involved, rather than only a uniformly deployed cluster is involved, operation of the service can be guaranteed by the exemplary embodiments described above, and no longer operation failure of the service is caused by independence between different parties.
According to the exemplary embodiment, the time synchronization mechanism is set up for the machine devices which correspond to different main bodies and are independent of each other, so that the time synchronization of the machine devices across the main bodies can be realized with very high reliability even if the machine devices are not in the same cluster, and the performance across the main bodies and the reliability of service operation are enhanced.
Fig. 4 is a flowchart illustrating the description of step 350 shown in the corresponding embodiment of fig. 3. In an exemplary embodiment, as shown in FIG. 4, this step 350 includes:
in step 351, the service front-end device obtains its own time for the operation of the service when the time between the service front-end devices is synchronized.
The service operation needs to ensure the validity of interaction between the service front-end devices through time validity check, so as to ensure the operation safety of the service. As described above, the interaction performance between the main bodies is obtained through the interaction between the service front-end devices, and therefore, when one service front-end device initiates an interaction to the other service front-end device, the self-time is obtained.
For example, the interaction may be an action execution request initiated by one service front end device to another service front end device, and the request carries its own time, so that the other side verifies the validity of the initiated action execution request.
In step 353, the service front-end devices corresponding to the parties carry the acquired time to perform data interaction, so that the service front-end devices corresponding to at least one party obtain the interaction data carrying the time.
No matter the purpose of data interaction between the service front-end devices, the interactive data carries the acquired time, so that the service front-end devices receiving the interactive data can extract the time for initiating the interaction from the interactive data, and further verify whether the initiated interaction is expired.
In step 355, the service front-end device corresponding to at least one party performs time validity check through the time carried by the interactive data.
During operation of the service, one party service front-end equipment initiates interaction to the other party service front-end equipment, and correspondingly, the other party service front-end equipment verifies the time validity of the initiated interaction through the time carried in the received interaction data.
Taking the subway bus-taking code service listed above as an example, the user terminal and the gate which generate the bus-taking code are both service front-end devices in the subway bus-taking code service, and the interaction between the user terminal and the gate is oriented to a single user. Specifically, the user terminal generates a riding code under the support of a corresponding one-side server, the riding code comprises the generation time of the riding code, the code expiration time is calculated according to the configured code validity period, and the obtained code expiration times are stored in the code structure of the riding code.
The generated riding code is displayed on a screen of the user terminal, a user needs to ride through the gate, and at the moment, the user terminal is controlled, so that the riding code displayed on the screen of the user terminal is scanned by the gate, namely, the user scans the code through the gate and passes the gate.
The gate which finishes the code scanning checks the legality of the riding code through the running of the program of the gate, including the check of whether the riding code is overdue or not. And reading the code expiration time stored in the riding code by a program operated by the gate, judging whether the gate time exceeds the code expiration time, and if so, determining that the riding code is expired and fails.
It can be seen that the consistency of the gate time with the time on other machine devices is particularly important, and if the gate time is not synchronized, for example, the time on the user terminal is not consistent, the gate time is out of date relative to the expiration time of the code stored in the car code, and the user cannot pass through the gate to take the car.
The time validity check between the service front-end devices can ensure the system safety of the service and enhance the reliability of service operation.
In step 357, if the time validity check is passed, the service front-end device corresponding to at least one party operates the service by executing the specified action.
As described above, if the time validity check performed by the service front-end device passes, the service front-end device corresponding to at least one party performs a specified action, for example, for a gate, a gate opening and releasing action is performed, so that the subway train code service operates normally.
In another exemplary embodiment, if the time validity check fails, the business front-end device corresponding to at least one party refuses to execute the specified action, and the business operation is abnormal.
Once the time validity check fails, that is, the interaction performed has failed and expires, for example, for a car code, the gate time exceeds the code expiration time, for example, the car code is leaked by the user terminal, or a malicious user exchanges the car code, so that the generated car code is not used in time, and the timeout expires.
In this exemplary embodiment, at least one of the business front-end devices is a responder to the initiated interaction between the business front-end devices, for example, the aforementioned gate. Of course, it should be understood that, in the operation of other services, the service front-end device targeted is not limited to only two service front-end devices listed herein, but may also be multiple service front-end devices, and correspondingly, at least one of the service front-end devices is not limited to one, and will be adapted to flexible deployment of services.
Through the exemplary embodiment, interaction among the machine devices of the subjects in the cross subject system is realized, and operation of business is achieved through interaction.
Fig. 5 is a flow chart illustrating a method of time control in a business operation according to another embodiment. In another exemplary embodiment, as shown in fig. 5, the method for controlling time during service operation further includes:
in step 510, the system time of each server is monitored, and the system time offset of each server is obtained, wherein the system time offset is used for indicating the time deviation between each server.
As mentioned above, all the servers to which the service is directed are in continuous operation to ensure the operation of the service, and during the continuous operation of a certain server, too fast or too slow operation of the clock inevitably occurs, which causes inaccuracy of the system time.
Thus, there will be an inconsistency in system time with respect to other servers. It should be understood that if the time deviation corresponding to the system time is too large between the servers, the service operation may be abnormal, and therefore, the system time of each server needs to be monitored so as to ensure the reliability of the service operation.
The server in the cross-subject system supporting the service operation is monitored for the system time, so far, it should be added that, the time synchronization is performed between the servers, the execution of the time synchronization is the system time adjustment according to the existing system time offset, and the system time offset is obtained in the process of the time synchronization performed by the server.
It is further noted that the system time of each server is aligned to the same time reference source, in this case, the servers can obtain the system time offset by accessing the time reference source, and for the system time monitoring, only the collection of the system time offset needs to be performed on the servers.
Correspondingly, step 510 includes: the system time offsets existing in respective system times relative to the time of the time reference source are collected from the respective servers, and the respective servers obtain the system time offsets by accessing the same time reference source.
In step 530, an alarm is raised according to the system time offset and alarm threshold of each server, and the alarm is used for time synchronization between each server for which the service is initiated.
If the obtained system time offset exceeds the alarm threshold, an alarm is triggered, and the alarm indicates that the servers of all parties are inconsistent in time on one hand and indicates that the running service is possibly abnormal on the other hand, and the abnormal service needs to be processed on the other hand. Therefore, the triggered alarm synchronizes the time between the servers for which the service is initiated, i.e. triggers the embodiment corresponding to fig. 3.
Through the method embodiment, the cross-main-body system which is continuously emerged based on the internet can realize the service under the coordination of a plurality of main bodies, so that more and more traditional services are transferred to the internet, the online service is realized, the time control in the cross-main-body system is realized, the time consistency among the main bodies can be ensured, the time synchronization can be carried out in the cross-main-body system, more and more services which need the cooperation of all parties are required, the mutually-matched services can be realized based on the internet, and the human life is facilitated.
The subway bus taking code service is taken as an example, and the method is combined for implementation and explanation.
Fig. 6 is a schematic view of a scene of a subway ride code service according to an exemplary embodiment. In an exemplary embodiment, a social application partner and a subway partner exist in a cross-subject system corresponding to a subway bus code service, and an original card-holding and brake-passing bus mode is converted into the subway bus code service realized on the basis of an internet line through the cross-subject system.
The gate 810 and the server 830 are correspondingly deployed by the subway partner, and the server 830 serves as a background of the subway partner, namely, the server is a subway partner server. And gate 810 is a business front-end device of the subway partner.
The gate 810 is provided with a barrier 811 and a scanner 813, the scanner 813 is used for scanning the riding code, and the barrier 811 is used for performing a releasing action so that a user can pass through.
The social application partner deploys the user terminal 710 and the server 730 correspondingly, and the server 710 serves as a partner of the social application partner, that is, a server of the social application partner. The user terminal 710 runs a social application, and generates the riding code through the running social application.
It can be seen that the servers of the respective parties are independent from each other, and only service front-end equipment, namely, interaction between the gate 810 and the user terminal 710 exists between the cross-body systems corresponding to the subway bus code service. The social application operated by the user terminal 710 generates a riding code, the riding code includes generation time, and code expiration time is calculated according to the configured code validity time, so that the code expiration time and the generation time are stored in a code structure of the riding code.
In a specific implementation of an exemplary embodiment, the ride code is generated off-line, so that the code expiration time can only be generated using the time of the user terminal.
When the user holds the user terminal 710 and the gate 810 scans the code through the scanner 813, the gate program will check the legality of the riding code. The checking of the riding codes is carried out in offline time, so that the checking of whether the riding codes are out of service and overdue is carried out according to the time of the gate.
If the gate time does not reach the code expiration time, the ride code is valid and the barrier 811 of the gate 810 performs a release action.
If the gate time reaches the code expiration time, the bus code is expired and is in an unavailable state, and the barrier gate 811 of the gate 810 refuses to execute the release action.
Therefore, it can be seen that if the gate time is not synchronized with the time of the user terminal, the abnormal operation of the car code service is caused. If the time of the gate is faster than that of the user terminal, the bus taking code can be directly considered to be expired and invalid; if the gate time is slower than the time of the user terminal, the expiration time of the code in the riding code is meaningless, the valid period of the riding code is prolonged, and the possibility of code leakage and malicious user exchange codes entering and exiting the gate 810 is increased.
Therefore, a time synchronization mechanism in the cross-subject system is built in the cross-subject system shown in fig. 6.
Fig. 7 is a schematic diagram illustrating an implementation of the time synchronization mechanism in the scenario illustrated in fig. 6, according to an example embodiment. In an exemplary embodiment, as shown in fig. 7, time synchronization alignment is required for two parties of time, namely, the gate time and the user terminal time, i.e., consistency of the two parties of time is ensured. As indicated by the labeled 910 and 930, the gate time is aligned by access to the subway partner server 830 for gate time on the one hand, and the user terminal time is aligned by access to the social application partner server 730 for terminal time on the other hand.
Before this, time alignment between the subway partner server 830 and the social application partner server 730 needs to be done through reference 950.
In addition, time monitoring and warning are performed between the subway partner server 830 and the social application partner server 730 to ensure that the system time of each server has a large deviation to affect the warning when the service is running, as shown by reference 970.
In particular, fig. 8 is a diagram illustrating an implementation architecture for gate time alignment according to the corresponding embodiment of fig. 7. In an exemplary embodiment, FIG. 7, reference numeral 910, is an implementation of gate time alignment, including: a gate ntpdate client 911 is built in the gate to access the subway partner server 830 via the gate ntpdate client 911 to achieve alignment of the gate time with the system time in the subway partner server 830. The corresponding implementation is that the gate ntpdate client 911 runs the ntpdate command every 5 minutes to achieve time alignment.
Fig. 9 is an implementation architecture diagram illustrating time alignment of a user terminal according to the corresponding embodiment of fig. 7. In an exemplary embodiment, the implementation of time alignment 930 of fig. 7, i.e., the user terminal, includes: the social application partner server 730 is accessed via the user terminal time alignment interface 931 through the constructed user terminal time alignment interface 931 to achieve alignment of the user terminal time with the system time in the social application partner 710. The corresponding specific implementation is that, under the action of the user terminal time alignment interface 931, an ntp protocol is simulated, and a difference offset between the user terminal time and the system time in the social application partner server 730 is calculated, so as to perform time alignment calculation, that is, the actual time is calculated by adding the difference offset to the local time, so as to adjust the user terminal time.
Fig. 10 is an architecture diagram of an implementation of time alignment and monitoring between social applications and subway partners according to the corresponding embodiment shown in fig. 7. In an exemplary embodiment, as shown in fig. 10, monitoring of time alignment between social applications and subway partners is achieved through a deployed time alignment monitoring information collection apparatus 1030 and a monitoring alarm system 1010.
It should be noted first that the social application partner server 730 and the subway partner server 830 are both system time aligned through the internet time source server 1050. Specifically, the system time of the social application partner server 730 and the subway partner server 830 are aligned to the same time by using the ntpdate command at specified time intervals to cause the servers to initiate access to the internet time source server 1050. At this time, either the social application partner server 730 or the subway partner server 830 exists as an Ntp server.
On this basis, the time alignment monitoring information collecting device 1030 may cooperate with the ntpdate command to collect the offset difference values from the social application partner server 730 and the subway partner server 830, and report an alarm to the monitoring alarm system 1010 when the offset difference value exceeds an alarm threshold.
The following is an embodiment of the apparatus of the present invention, which is used to implement the embodiment of the time control method in the above-mentioned service operation of the present invention. For details not disclosed in the embodiment of the apparatus of the present invention, please refer to the embodiment of the time control method in the service operation of the present invention.
FIG. 11 is a block diagram illustrating a time control system in service operation according to an exemplary embodiment. In an exemplary embodiment, the time control system in service operation, as shown in fig. 11, at least includes: a server 1110 and business front-end equipment 1130.
The server 1110 is a server for each party to which the service is directed, and the servers are configured to perform time synchronization with each other, so that system time between the servers is aligned, and the servers are independent from each other in operation of the service;
the service front-end device 1130 is configured to align time with a corresponding server, so that the time of the service front-end device is synchronized to the system time of the corresponding server;
the service front-end equipment is also used for operating the service through the synchronized time under the condition that the mutual time is synchronized.
In another exemplary embodiment, each server to which the service is directed aligns the times of the same time reference source at specified time intervals, and aligns the system time of the server to the time of the time reference source.
In another exemplary embodiment, the service front-end device 1130 is further configured to perform time synchronization by accessing a server of a corresponding party to the service front-end device, and obtain the system time of the corresponding party server as the self time.
Fig. 12 is a block diagram illustrating a service front-end device according to the corresponding embodiment of fig. 11. In an exemplary embodiment, as shown in fig. 12, the business front-end devices 1130 include, but are not limited to: a self time acquisition module 1131, an interaction execution module 1133, a time check module 1135, and a designated action execution module 1137.
A self-time obtaining module 1131, configured to obtain time of the service front-end device where the self-time is located for operation of the service when time synchronization between the service front-end devices is achieved;
the interaction execution module 1133 is configured to perform data interaction between the service front-end devices corresponding to each party by carrying the obtained time, so that the service front-end device corresponding to at least one party obtains interaction data carrying time;
a time checking module 1135, configured to the service front-end device corresponding to at least one party, where the time checking module is configured to perform time validity checking through time carried by the interactive data;
and a designated action execution module 1137, configured to control the located service front-end device to operate the service by executing a designated action if the time validity check passes.
In another exemplary embodiment, the business front-end device 1130 also includes an action rejection execution module. The action rejection execution module is used for rejecting to execute the specified action if the time validity check is not passed, and the service operation is abnormal.
Fig. 13 is a block diagram illustrating a time control system in service operation according to another embodiment. In another exemplary embodiment, as shown in FIG. 13, the system further includes a monitoring module 1210 and an alarm module 1230.
A monitoring module 1210 configured to monitor system time of each server, and obtain system time offsets of each server, where the system time offsets are used to indicate time deviations between each server.
An alarm module 1230, configured to alarm according to the system time offset and an alarm threshold of each server, where the alarm is used to initiate time synchronization between each server to which the service is directed.
In another exemplary embodiment, the monitoring module 1210 is further configured to collect system time offsets existing for respective system times relative to the time of the time reference source from respective servers that obtained the system time offsets by accessing the same time reference source.
Optionally, the present invention further provides an electronic device, which may be used in the implementation environment shown in fig. 1 to execute all or part of the steps of the method shown in any one of fig. 3, fig. 4 and fig. 5. The device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute the method for realizing the foregoing.
The specific manner in which the processor of the apparatus in this embodiment performs operations has been described in detail in relation to the foregoing embodiments and will not be elaborated upon here.
In an exemplary embodiment, a storage medium is also provided that is a computer-readable storage medium, such as may be transitory and non-transitory computer-readable storage media, including instructions. The storage medium includes, for example, the memory 204 of instructions executable by the processor 218 of the device 200 to perform the methods described above.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (15)

1. A method for controlling time during operation of a service, the method comprising:
carrying out time synchronization between all parties of servers to which the service is oriented, so that system time between all parties of servers is aligned, and all parties of servers are mutually independent in the operation of the service;
aligning the time of the service front-end equipment through the corresponding party server, so that the time of the service front-end equipment is synchronized to the system time of the corresponding party server;
and under the condition that the time between the service front-end equipment is synchronized, the service is operated through the time synchronized by the service front-end equipment.
2. The method of claim 1, wherein time synchronization between the servers to which the service is directed to align system time between the servers comprises:
all the servers facing the service align the time of the same time reference source according to the appointed time interval, and align the system time of the server to the time of the time reference source.
3. The method of claim 1, wherein the aligning, by the corresponding one of the servers, the time of the service front-end device so that the time of the service front-end device is synchronized to the system time of the corresponding one of the servers comprises:
the service front-end equipment corresponding to each server carries out time synchronization by accessing the server corresponding to the service front-end equipment to obtain the system time of the server corresponding to the service front-end equipment.
4. The method of claim 1, wherein the running the service through the time synchronized by the service front-end equipment under the time synchronization between the service front-end equipment comprises:
under the condition that the time between the service front-end equipment is synchronized, the service front-end equipment acquires the time of the service for the operation of the service;
carrying the acquired time between the business front-end devices corresponding to each party to carry out data interaction, so that the business front-end devices corresponding to at least one party acquire the interactive data carrying the time;
the service front-end equipment corresponding to the at least one party carries out time validity check through time carried by the interactive data;
and if the time validity check is passed, the service front-end equipment corresponding to the at least one party operates the service by executing a specified action.
5. The method of claim 4, wherein the running the service through the time synchronized by the service front-end device under the time synchronization between the service front-end devices, further comprises:
and if the time validity check is not passed, the business front-end equipment corresponding to the at least one party refuses to execute the specified action, and the business operation is abnormal.
6. The method of claim 1, further comprising:
monitoring system time of each server, and obtaining system time offset of each server, wherein the system time offset is used for indicating time deviation between each server;
and alarming according to the system time offset and the alarm threshold of each server, wherein the alarm is used for initiating the time synchronization between each server to which the service faces.
7. The method of claim 6, wherein monitoring the system time of each server and obtaining the system time offset of each server comprises:
system time offsets existing for respective system times relative to the time of a time reference source are collected from respective servers that obtain the system time offsets by accessing the same time reference source.
8. A system for controlling time during operation of a business, the system comprising:
each party server which the business faces is used for carrying out time synchronization between the parties and aligning the system time between the parties, and the parties are independent in the operation of the business;
the service front-end equipment is used for aligning time through a corresponding party server to ensure that the time per se is synchronized to the system time of the corresponding party server;
the service front-end equipment is also used for operating the service through the synchronized time under the condition that the mutual time is synchronized.
9. The system of claim 8, wherein each server to which the service is directed aligns the times of the same time reference source at specified time intervals, and aligns its system time to the time of the time reference source.
10. The system according to claim 8, wherein the service front-end device is further configured to perform time synchronization by accessing a server corresponding to the service front-end device, and obtain the self time as the system time of the server corresponding to the service front-end device.
11. The system of claim 8, wherein the service front-end device comprises:
the self time acquisition module is used for acquiring the time of the self business front-end equipment for the operation of the business under the condition that the time among the business front-end equipment is synchronized;
the interaction execution module is used for carrying out data interaction between the business front-end equipment corresponding to each party by carrying the acquired time so that the business front-end equipment corresponding to at least one party acquires the interaction data carrying the time;
the time checking module is configured at the business front-end equipment corresponding to at least one party and used for carrying out time validity checking through time carried by the interactive data;
and the appointed action execution module is used for controlling the business front-end equipment to operate the business by executing the appointed action if the time validity check passes.
12. The system of claim 11, wherein the service front-end device further comprises:
and the action rejection execution module is used for rejecting to execute the specified action if the time validity check is not passed, and the service operation is abnormal.
13. The system of claim 8, further comprising:
the system comprises a monitoring module, a processing module and a processing module, wherein the monitoring module is used for monitoring the system time of each server and obtaining the system time offset of each server, and the system time offset is used for indicating the time deviation between each server;
and the alarm module is used for giving an alarm according to the system time offset and the alarm threshold of each server, and the alarm is used for initiating time synchronization between each server facing the service.
14. The system of claim 13, wherein the monitoring module is further configured to collect system time offsets that exist for respective system times relative to the time of the time reference source from respective servers that obtain the system time offsets by accessing the same time reference source.
15. A computer system, comprising:
a processor; and
a memory having computer readable instructions stored thereon which, when executed by the processor, implement the method of any of claims 1 to 7.
CN201810736148.XA 2018-07-06 2018-07-06 Time control method, system and computer system in service operation Active CN110690936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810736148.XA CN110690936B (en) 2018-07-06 2018-07-06 Time control method, system and computer system in service operation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810736148.XA CN110690936B (en) 2018-07-06 2018-07-06 Time control method, system and computer system in service operation

Publications (2)

Publication Number Publication Date
CN110690936A true CN110690936A (en) 2020-01-14
CN110690936B CN110690936B (en) 2021-09-24

Family

ID=69106799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810736148.XA Active CN110690936B (en) 2018-07-06 2018-07-06 Time control method, system and computer system in service operation

Country Status (1)

Country Link
CN (1) CN110690936B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111736970A (en) * 2020-06-23 2020-10-02 北京同邦卓益科技有限公司 Service processing method, device, equipment and computer readable storage medium
CN112332955A (en) * 2021-01-06 2021-02-05 北京和利时***工程有限公司 Data synchronization method, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080184060A1 (en) * 2007-01-31 2008-07-31 International Business Machines Corporation Facilitating recovery in a coordinated timing network
US20080183623A1 (en) * 2007-01-29 2008-07-31 Zhangwei Xu Secure Provisioning with Time Synchronization
CN103957258A (en) * 2014-04-30 2014-07-30 中国工商银行股份有限公司 Trans-regional data communication method and system
CN107453831A (en) * 2016-05-31 2017-12-08 阿里巴巴集团控股有限公司 The method for synchronizing time and device of distributed transaction system
CN107450998A (en) * 2017-07-31 2017-12-08 北京三快在线科技有限公司 Information real-time synchronization method, device, medium and electronic equipment between more applications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080183623A1 (en) * 2007-01-29 2008-07-31 Zhangwei Xu Secure Provisioning with Time Synchronization
US20080184060A1 (en) * 2007-01-31 2008-07-31 International Business Machines Corporation Facilitating recovery in a coordinated timing network
CN103957258A (en) * 2014-04-30 2014-07-30 中国工商银行股份有限公司 Trans-regional data communication method and system
CN107453831A (en) * 2016-05-31 2017-12-08 阿里巴巴集团控股有限公司 The method for synchronizing time and device of distributed transaction system
CN107450998A (en) * 2017-07-31 2017-12-08 北京三快在线科技有限公司 Information real-time synchronization method, device, medium and electronic equipment between more applications

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111736970A (en) * 2020-06-23 2020-10-02 北京同邦卓益科技有限公司 Service processing method, device, equipment and computer readable storage medium
CN112332955A (en) * 2021-01-06 2021-02-05 北京和利时***工程有限公司 Data synchronization method, system and storage medium
CN112332955B (en) * 2021-01-06 2021-04-13 北京和利时***工程有限公司 Data synchronization method, system and storage medium

Also Published As

Publication number Publication date
CN110690936B (en) 2021-09-24

Similar Documents

Publication Publication Date Title
US10643414B2 (en) Electronic key device utilizing user input to facilitate access by authorized persons
US10615964B2 (en) Cross-blockchain interaction method, apparatus, system, and electronic device
US10475315B2 (en) System and method for configuring surveillance cameras using mobile computing devices
US9405360B2 (en) IP camera smart controller
CN110690936B (en) Time control method, system and computer system in service operation
CN111224795B (en) Group application processing method and device, electronic equipment and storage medium
KR101165422B1 (en) Security system for providing security service of tracking and monitoring object which is not reconized using monitoring camera, and method for providing security service using the same security system
CN106454392A (en) Live broadcast processing method, device and terminal
US20180278422A1 (en) Systems and methods of providing and validating digital tickets
CN107078917A (en) Trustship videoconference
CN106713127B (en) Method and device for acquiring and processing instant chat records
CN111654415B (en) Block chain based information processing method, device, equipment and readable storage medium
US20170111497A1 (en) Communication device with video caller authentication and methods for use therewith
CN113987073A (en) Method and device for updating state information in delayed mode and electronic equipment
CN109426705A (en) A kind of interface display method, device, equipment and storage medium
CN107454660A (en) Network method and device are stayed after failed authentication
CN112017018A (en) Tax refunding method and system based on block chain and electronic equipment
CN105120201A (en) Visual help intercom system
US11589203B2 (en) Method and system for requesting and sharing information between mobile devices and phone systems
KR101716583B1 (en) Time synchronization server, system and method
CN102307121A (en) Self-checking method and device for multimedia terminal
KR20120079636A (en) Method for sharing document work in multilateral conference
WO2019079422A1 (en) Mobile app
CN109542644B (en) Application programming interface calling method and device
CN108923988B (en) Equipment grouping method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40018775

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant