CN107241311A - One kind selects seat method and device in real time - Google Patents
One kind selects seat method and device in real time Download PDFInfo
- Publication number
- CN107241311A CN107241311A CN201710338553.1A CN201710338553A CN107241311A CN 107241311 A CN107241311 A CN 107241311A CN 201710338553 A CN201710338553 A CN 201710338553A CN 107241311 A CN107241311 A CN 107241311A
- Authority
- CN
- China
- Prior art keywords
- seat
- service end
- web
- web socket
- chosen
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer And Data Communications (AREA)
Abstract
Embodiments of the invention disclose one kind and select seat method and device in real time, are related to online booking technology, can lift booking efficiency.It is described real-time to select seat method to include:Establishment is connected with the Web Sockets of service end;After monitoring that being plotted as the seat of optional state is selected, the seat information that will be chosen is connected by the Web Sockets described in establishment with service end to transmit to service end, so that the seat information chosen described in service end to the client transmission of Web Sockets connections, and make the client for receiving the seat information chosen that selected seat is plotted as into not optional state.The present invention is applied in line selection seat booking.
Description
Technical field
Seat method and device is selected the present invention relates to online booking technology, more particularly to one kind in real time.
Background technology
The development of Internet technology has brought great convenience, and new opportunity is also brought to traditional industry.
By taking traditional movie theatre as an example, the development of Internet technology makes it possible the electronization of movie theatre ticketing service, is provided by internet
Subscribed on movie theatre ticketing service line/in line selection seat business so that user can browse the film shown recently in advance, and accordingly carry out electricity
Sub- booking, it is to avoid need that the stand-by period is longer caused by live booking and can not predict institute's film playback when film is watched before user
The technical problem of piece.
For movie theatre, provide one for client quickly can effectively lift core competitive power in line selection seat booking platform
Power, and from the angle of domestic consumer, how quickly, simply, comfortably carry out online booking be only it is most important.Especially
When user buys the concert admission ticket or a long-expected popular modern drama show ticket of idol, line selection seat booking platform how
It is that each user quickly buys the ticket that user wants in the case where on-hand inventory ticketing service is insufficient for powerful purchasing power
Business, effectively shortens user's booking time, and maximization meets user's purchasing demand and is particularly important.
Subscribe/generally comprised in line selection seat business booking on line and log into line selection seat booking platform, select seat, confirmation choosing
Seat effectively, pay, the multiple flows of generation order etc., wherein, select seat be booking by a sub-process most time-consuming in flow, be also most
The key factor that easily influence user booking is experienced.
The choosing seat method subscribed/provided in line selection seat business on current line, uses the non-reality based on http protocol
When select seat mode, i.e., when user enter line selection seat booking platform after, user is simultaneously unaware of which seat has been selected, and works as click
Selection one is expected behind seat, and by the way that the seat information of selection is sent to the service end of management ticketing service, service end differentiates the seat
Whether selected by other users, if the seat is selected by other users, in such a case, service end returns to related letter
Breath, for example, playing frame by form (View) with one ejects a prompt message, to inform that the user seat is selected by other users
In, other seats please be select.Browse to after the prompt message, user can only close bullet frame, then proceed to select seat.So,
When buying ticketing service especially popular ticketing service, user generally requires that by repeatedly selection booking could be completed, or, by several times
What is selected delays, and seat is finished by other users selection so that select seat to take user's more time, booking is less efficient,
Online booking success rate is not high.
The content of the invention
In view of this, the embodiment of the present invention provides one kind and selects seat method and device in real time, can lift booking efficiency, to solve
Certainly existing select in seat method selects seat mode to carry out caused by online booking booking efficiency and booking success rate not using non real-time
High the problem of.
In a first aspect, the embodiment of the present invention provides one kind selects seat method in real time, including:
Establishment is connected with the Web Sockets of service end;
After monitoring that being plotted as the seat of optional state is selected, pass through the Web described in establishment with service end
Sockets connections transmit the seat information chosen to service end, so that service end is sent out to the client of Web Sockets connections
The seat information chosen is sent, and the client for receiving the seat information chosen is plotted as selected seat
Not optional state.
With reference in a first aspect, in the first embodiment of first aspect, the establishment and the Web of service end
Sockets connections include:
Obtain the Web Socket link addresses of service end;
The Web Socket link addresses of a Web Socket objects and incoming acquisition, wound are instantiated by Javascript
Build and be connected with the Web Socket of the incoming Web Socket link addresses.
It is described to obtain clothes in second of embodiment of first aspect with reference to the first embodiment of first aspect
The Web Socket link addresses at business end include:
Client obtains the Push Service interface of service end in an asynchronous manner, obtains described by the Push Service interface
Web Socket link addresses.
With reference to the first embodiment of first aspect, in the third embodiment of first aspect, obtained described
After the Web Socket link addresses of service end, a Web Socket objects and incoming acquisition are instantiated by Javascript
Web Socket link addresses before, this method also includes:
Judge whether the current browser of client supports Web Socket API, if supported, pass through described in execution
The step of Javascript instantiates a Web Socket objects and the Web Socket link addresses of incoming acquisition.
With reference to first aspect, first aspect the first into the third any embodiment, the of first aspect
In four kinds of embodiments, described transmit the seat information chosen to service end includes:
Lock interface is called, in POST modes by the seat information asynchronous transmission chosen to service end.
It is described to call lock in the 5th kind of embodiment of first aspect with reference to the 4th kind of embodiment of first aspect
Seated connection mouthful, is included the seat information asynchronous transmission chosen to service end in POST modes:
The seat information chosen is encapsulated as Javascript objects;
The lock interface provided by FETCH API Calls service end, by POST modes by described Javascript pairs
As transmitting to service end.
With reference to first aspect, first aspect the first into the third any embodiment, the of first aspect
It is described selected seat is plotted as not optional state to include in six kinds of embodiments:
Successively by the seat information chosen, screening is transferred in the single datum stream mode based on REACT&REDUX frameworks
The calculating of seating maps is carried out in device with rendering.
With reference in a first aspect, in the 7th kind of embodiment of first aspect, methods described also includes:
After selected at seat, start timing;
Still without receiving ordering comprising the seat chosen after timing exceedes the first timing threshold value pre-set
Single successful information, judges whether the Web Socket connections are abnormal, if abnormal, call websocket.close () method
The Web Socket connections are closed, and after Web Socket connections are rebuild, the seat that will be chosen is transmitted to service end
Information updating is not selected information.
With reference to the 7th kind of embodiment of first aspect, in the 8th kind of embodiment of first aspect, the judgement institute
Stating Web Socket connections, whether exception includes:
The readyState property values of the Web Socket objects of instantiation are extracted, are belonged to using the readyState
Property value judge whether the Web Socket connections abnormal.
Second aspect, the embodiment of the present invention provides one kind and selects base device in real time, including:
Creation module is connected, is connected for creating with the Web Sockets of service end;
Seat locking module is selected, for after monitoring that being plotted as the seat of optional state is selected, by described in establishment
The seat information that will be chosen is connected with the Web Sockets of service end to transmit to service end, so that service end is to Web Sockets
The seat information chosen described in the client transmission of connection, and make the client for receiving the seat information chosen will be selected
In seat be plotted as not optional state.
One kind provided in an embodiment of the present invention selects seat method and device in real time, by creating the Web with service end
Sockets connections;After monitoring that being plotted as the seat of optional state is selected, pass through the Web described in establishment with service end
Sockets connections transmit the seat information chosen to service end, so that service end is sent out to the client of Web Sockets connections
The seat information chosen is sent, and the client for receiving the seat information chosen is plotted as selected seat
Not optional state, can lift online booking efficiency, select seat mode to carry out using non real-time to solve existing select in seat method
The problem of booking is inefficient caused by online booking.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is that embodiments of the invention one select seat method flow schematic diagram in real time;
Fig. 2 is that embodiments of the invention two select base device structural representation in real time.
Embodiment
The embodiment of the present invention is described in detail below in conjunction with the accompanying drawings.
It will be appreciated that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Base
Embodiment in the present invention, those of ordinary skill in the art obtained under the premise of creative work is not made it is all its
Its embodiment, belongs to the scope of protection of the invention.
Fig. 1 is that embodiments of the invention one select seat method flow schematic diagram in real time, as shown in figure 1, the method for the present embodiment
It can include:
Step 101, create and be connected with the Web Sockets of service end;
In the present embodiment, Web sockets (Sockets) are the new API technologies occurred in HTML5, are of future generation
The asynchronous communication mode of client and service end, compared to traditional modes such as long poll (AJAX Long-Polling) technologies,
No matter Web Sockets technologies can be more advanced in technology realization or performance, are provided on one individually persistently connection
Full duplex, both-way communication, service end and client can in any time mutual pushed information in given time range, and
And allow cross-domain communication.
In the present embodiment, service end is to support the server of Web Socket agreements, and existing use standard HTTP
Service end can not realize Web Sockets agreements, because http protocol can only realize unidirectional communication, thus, either take turns
(polling) or long connection (long polling) are ask, is required for sending service end HTTP request, Ran Houyou by browser
Service end returns to newest data to the browser of client, it is necessary to which browser constantly sends request, service end to service end
Respective response is returned according to request, because the HTTP connections between client and service end need authentication, can be produced frequently
Authentication and repeat information send., can and Web Socket agreements are a kind of new procotols based on TCP
Realize that browser communicates with service end full duplex (full-duplex) so that service end can actively send (push) information to
Request of the client without waiting client, service end carries out two-way communication with client, frequently body can be avoided completely
Part checking etc. expense, meanwhile, using Web Socket agreements, can between service end and client transmission packet it is very small
Low volume data, service end no longer passively receives just returned data after the request of client browser, but is having new data
When with regard to active push to client browser, can effectively reduce the time for waiting request, real-time is high.
In the present embodiment, as an alternative embodiment, establishment be connected with the Web Sockets of service end including:
A11, obtains the Web Socket link addresses of service end;
In the present embodiment, Web Socket link addresses include:The Web Socket link addresses of unencryption and encryption
Web Socket link addresses, wherein, the Web Socket link addresses pattern of unencryption is ws://, the Web of encryption
Socket link addresses pattern is wss://.
In the present embodiment, as an alternative embodiment, the Web Socket port informations of service end can also be obtained.
In the present embodiment, as an alternative embodiment, obtaining the Web Socket link addresses of service end includes:
Client obtains the Push Service interface of service end in an asynchronous manner, obtains described by the Push Service interface
Web Socket link addresses.
In the present embodiment, as an alternative embodiment, asynchronous system is FETCH API asynchronous systems, Push Service interface
When needing to be connected with service end structure for@push_service interfaces, i.e. client, obtained with FETCH API asynchronous systems
(GET) the@push_service interfaces of service end, Web Socket connections ground is obtained by the@push_service interfaces
Location.
A12, a Web Socket objects and the Web Socket connections ground of incoming acquisition are instantiated by Javascript
Location, establishment is connected with the Web Socket of the incoming Web Socket link addresses.
In the present embodiment, Web Socket connections are the initial handshake ranks of the http protocol between client and service end
Section, is upgraded to Web Socket agreements to set up, the bottom of Web Socket connections is still TCP/IP connections by http protocol.
Specifically, client is created in Javascript after Web Sockets objects, is generated HTTP request and is transmitted to browsing
Device to service end to initiate Web Sockets connections, and after the HTTP request response that service end is returned is obtained, triggering connection is carried out
Upgrading, will connect the http protocol used and upgrade to Web Socket agreements.
As another alternative embodiment, after the Web Socket link addresses of the acquisition service end, pass through
Javascript is instantiated before a Web Socket objects and the Web Socket link addresses of incoming acquisition, and this method is also wrapped
Include:
Judge whether the current browser of client supports Web Socket API, if supported, pass through described in execution
The step of Javascript instantiates a Web Socket objects and the Web Socket link addresses of incoming acquisition.
In the present embodiment, if current browser does not support Web Socket API, choosing seat is carried out according to prior art
Booking flow.
In the present embodiment, after instantiation, browser creates a Web Socket with service end and is connected.
Step 102, monitor to be plotted as the seat of optional state it is selected after, by described in establishment with service end
Web Sockets connections transmit the seat information chosen to service end, so that client of the service end to Web Sockets connections
The seat information chosen described in the transmission of end, and the client for receiving the seat information chosen is painted selected seat
It is made as not optional state.
In the present embodiment, the client of Web Sockets connections refers to be built with what Web Sockets were connected with service end
All clients, including:With service end be built with the seat information that the transmission that Web Sockets are connected is chosen client and
Other clients that Web Sockets are connected are built with service end.
In the present embodiment, by taking movie theatre as an example, a project is voted in a performance to divide many different according to admission fee and venue
Subregion, each subregion be provided with some seats.For the quick-fried fund mesh being much sought after, invoicing time start after one section when
Interior is generally all the peak period of booking, at this time has a large number of users and carries out booking into the project, and at present, user is choosing
During seat, it is impossible to know whether the seat is chosen by other users, only the seat information of the selection is transmitted to service end,
The corresponding differentiation result of differentiation and return by service end, can just know whether the seat chosen is chosen by other users,
In the case where being chosen by other users, it is necessary to choose seat again again and perform similar flow, only in selection
In the case of seat is not chosen by other users, carry out paying generation order so that booking success rate and efficiency are all relatively low.
In the present embodiment, user is being logged into after line selection seat booking platform, and the seat that can be selected for user is clear
Device of looking at is plotted as optional state, it is impossible to which the seat selected for user is plotted as not optional state by browser, so that in user
While selecting seat, whether one or more seats of the energy real-time awareness subregion are chosen by other users, so that from
Seat is chosen in the seat do not chosen by other users and carries out booking.
In the present embodiment, as an alternative embodiment, by taking movie theatre as an example, seat information includes but is not limited to:Seat identification
(seatID), play mark (showID, partition identification (areaID) etc..Certainly, in practical application, seat information can also be
Seat information, pleasure boat on long-distance bus and the seat information on train, the seat information on aircraft, court seat information
Deng the present embodiment is not construed as limiting to this.
, can be by setting monitoring process in a browser, to monitor user as an alternative embodiment in the present embodiment
Selection to seat.
In the present embodiment, as an alternative embodiment, the seat information chosen, which is transmitted to service end, to be included:
Lock interface is called, in POST modes by the seat information asynchronous transmission chosen to service end.
In the present embodiment, lock interface is POST/tickets lock interfaces, when a certain in line selection seat booking platform
When individual seat is selected, the Web Sockets passages for choosing the client at seat to be connected by Web Sockets call@
POST/tickets lock interfaces, in POST modes by the seat information asynchronous transmission chosen to service end.
In the present embodiment, as an alternative embodiment, lock interface is called, it is in POST modes that the seat information chosen is different
Step, which is transferred to service end, to be included:
The seat information chosen is encapsulated as Javascript objects;
The lock interface provided by FETCH API Calls service end, by POST modes by described Javascript pairs
As transmitting to service end.
In the present embodiment, when user is selecting the seat page to choose a seat, provided by FETCH API Calls service end
One lock interface, (showID, partition identification are identified by POST modes by the seat identification chosen (seatID), play
(areaID) the Javascript objects packaged by are transmitted to service end.
In the present embodiment, service end is received after the seat information (Javascript objects) chosen, by the seat chosen
Information push (push) into the lock list pre-set, then from lock list, by Web Sockets passages to
The all clients of its Web Sockets connection push the seat information chosen, when service end is to client push information,
Message (message) event of client is triggered, client utilizes onmeassage readjustment after the triggering of message events
Function, the Javascript objects received are parsed, and the seat information chosen simultaneously is saved in the lock pre-set
In the State Tree (state) of seat memory (lockedSeatStore), then, according to the seat information in State Tree, it will choose
Seat be depicted as not optional state.
In the present embodiment, as an alternative embodiment, selected seat is plotted as into not optional state includes:
Successively by the seat information chosen (each single seat), with the single datum stream based on REACT&REDUX frameworks
Mode, which is transferred in screening washer (selector), carries out the calculating of seating maps with rendering.
In the present embodiment, seat is rendered each time, screening washer all can according to the seat list (seats list) of storage, use
The seat list (userSeats list) of family oneself selection and the information at the seat (lockedSeat) that has been lockable are counted
New seating state data acquisition system is calculated, obtains updating seat list (new seat list), to replace seat list
(seats list), whenever receive it is new pinned in real time seat when, carry out a seat render.
In the present embodiment, due to using Web Sockets connections, seat is chosen extremely to paint at the seat chosen in each client
The whole process that not optional state is made is asynchronous procedure, it is not necessary to which each client refreshes page will can be just selected
The seat real-time rendering of (pinning) behind user's selection seat, can directly be paid into seating maps, generate the stream such as order
The seat time is selected caused by journey, the situation selected by other users so as to the seat that effectively reduction user selects.
In the present embodiment, as an alternative embodiment, after the establishment is connected with the Web Sockets of service end,
Before monitoring to be plotted as after the seat of optional state is selected, this method also includes:
Newest ticketing service seat list is obtained from the service end and is stored.
In the present embodiment, after establishment and the Web Sockets connections of service end, it can be selected in line selection seat booking platform
The ticketing service type of purchase needed for taking, for example, ticket, triggers and newest ticket ticketing service seat list is obtained from service end
And store.Can also directly obtain newest each ticketing service seat list from service end and store.
In the present embodiment, as an alternative embodiment, this method also includes:
After selected at seat, start timing;
Still without receiving ordering comprising the seat chosen after timing exceedes the first timing threshold value pre-set
Single successful information, judges whether the Web Socket connections are abnormal, if abnormal, call websocket.close () method
The Web Socket connections are closed, and after Web Socket connections are rebuild, the seat that will be chosen is transmitted to service end
Information updating is not selected information.
In the present embodiment, as an alternative embodiment, judging whether the Web Socket connections are abnormal includes:
The readyState property values of the Web Socket objects of instantiation are extracted, are belonged to using the readyState
Property value judge whether the Web Socket connections abnormal.
In the present embodiment, when there are abnormal conditions, the onclose methods of the Web Socket objects of instantiation are triggered,
I.e. whether client judges current Web Socket connections according to the readyState attributes of Web Socket objects
Abnormality is entered, if it is, the onclose method calls of the Web Socket objects of triggering instantiation
Websocket.close () method closes Web Socket connections to discharge resource.
In the present embodiment, if receiving ordering comprising the seat chosen in the first timing threshold value pre-set
Single successful information, then normal switching-off Web Socket connections.
, can be by setting heartbeat detection to be reconnected to complete heartbeat, i.e., in visitor as an alternative embodiment in the present embodiment
Family end sets timer to re-create Web Socket connections.
In the present embodiment, as another alternative embodiment, seat can also be selected to enter next page behaviour in user
Make after (for example, paying the page), then directly disconnect Web Socket connections, revert to HTTP connections.
In the present embodiment, by real-time lock method, i.e., when user enters a subregion selection seat, it has been chosen
The seat selected can put ash in real time and become not optional state, so as to displaying live view to which of subregion seating maps seat
Selected by others, thus, as long as the visual range of oneself is directly targeted to the seat of those optional states by user,
The seat oneself admired quickly is chosen, effectively lifting booking success rate, the user time that booking takes is few, booking efficiency high.
Fig. 2 is that embodiments of the invention two select base device structural representation in real time, as shown in Fig. 2 the device of the present embodiment
It can include:Connect creation module 21 and select seat locking module 22, wherein,
Creation module 21 is connected, is connected for creating with the Web Sockets of service end;
Seat locking module 22 is selected, for after monitoring that being plotted as the seat of optional state is selected, passing through the institute of establishment
State and be connected the seat information that will be chosen with the Web Sockets of service end and transmit to service end, so that service end is to Web
The clients of Sockets connections sends the seat information chosen, and the client for the seat information chosen described in making to receive
Hold and selected seat is plotted as not optional state.
In the present embodiment, as an alternative embodiment, connection creation module 21 includes:Link address acquiring unit and reality
Example creating unit (not shown), wherein,
Link address acquiring unit, the Web Socket link addresses for obtaining service end;
In the present embodiment, Web Socket link addresses include:The Web Socket link addresses of unencryption and encryption
Web Socket link addresses, wherein, the Web Socket link addresses pattern of unencryption is ws://, the Web of encryption
Socket link addresses pattern is wss://.
In the present embodiment, as an alternative embodiment, the Web Socket link addresses of the acquisition service end include:
Client obtains the Push Service interface of service end in an asynchronous manner, obtains described by the Push Service interface
Web Socket link addresses.
In the present embodiment, as an alternative embodiment, asynchronous system is FETCH API asynchronous systems, Push Service interface
For@push_service interfaces.
Example creating unit, for instantiating a Web Socket objects and the Web of incoming acquisition by Javascript
Socket link addresses, establishment is connected with the Web Socket of the incoming Web Socket link addresses.
In the present embodiment, as another alternative embodiment, connection creation module can also include:
Interface supports judging unit, for after the Web Socket link addresses of the acquisition service end, judging visitor
Whether the current browser at family end supports Web Socket API, if supported, notifies example creating unit.
In the present embodiment, as an alternative embodiment, seat locking module 22 is selected to include:Monitoring unit and transmission unit
(not shown), wherein,
Monitoring unit, for monitor to be plotted as the seat of optional state it is selected after, notification transmission unit;
Transmission unit, for by the Web Sockets call connected lock interfaces described in establishment with service end, with
POST modes are by the seat information asynchronous transmission chosen to service end, so that client of the service end to Web Sockets connections
The seat information chosen described in sending, and the client for receiving the seat information chosen is drawn selected seat
For not optional state.
In the present embodiment, as an alternative embodiment, by taking movie theatre as an example, seat information includes but is not limited to:Seat identification
(seatID), play mark (showID, partition identification (areaID) etc..Certainly, in practical application, seat information can also be
Seat information, pleasure boat on long-distance bus and the seat information on train, the seat information on aircraft, court seat information
Deng the present embodiment is not construed as limiting to this.
In the present embodiment, as an alternative embodiment, transmission unit includes:
Subelement is encapsulated, for the seat information chosen to be encapsulated as into Javascript objects;
Transmission subelement, for the lock interface provided by FETCH API Calls service end, by POST modes by institute
Javascript object transfers are stated to service end.
In the present embodiment, when user is selecting the seat page to choose a seat, provided by FETCH API Calls service end
One lock interface, (showID, partition identification are identified by POST modes by the seat identification chosen (seatID), play
(areaID) the Javascript objects packaged by are transmitted to service end.
It is described selected seat is plotted as not optional state to include as an alternative embodiment in the present embodiment:
Successively by the seat information chosen, screening is transferred in the single datum stream mode based on REACT&REDUX frameworks
The calculating of seating maps is carried out in device with rendering.
In the present embodiment, as another alternative embodiment, described device also includes:Timing module and connection status monitoring
Module (not shown), wherein,
Timing module, for after seat is selected, starting timing;
Connection status monitoring modular, for after timing exceedes the first timing threshold value pre-set still without receiving bag
Order successful information containing the seat chosen, judges whether the Web Socket connections are abnormal, if abnormal, call
Websocket.close () device closes the Web Socket connections, and after Web Socket connections are rebuild, to
The seat information chosen is updated to not selected information by service end transmission.
It is described to judge whether exception includes for the Web Socket connections as an alternative embodiment in the present embodiment:
The readyState property values of the Web Socket objects of instantiation are extracted, are belonged to using the readyState
Property value judge whether the Web Socket connections abnormal.
In the present embodiment, if receiving ordering comprising the seat chosen in the first timing threshold value pre-set
Single successful information, then normal switching-off Web Socket connections.
In the present embodiment, as yet another alternative embodiment, the device also includes:
Seat update module, for obtaining newest ticketing service seat list from the service end and storing.
The device of the present embodiment, can be used for the technical scheme for performing embodiment of the method shown in Fig. 1, its realization principle and skill
Art effect is similar, and here is omitted.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality
Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposited between operating
In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to
Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those
Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment
Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Also there is other identical element in process, method, article or equipment including the key element.
Each embodiment in this specification is described by the way of related, identical similar portion between each embodiment
Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.
For device embodiment, because it is substantially similar to embodiment of the method, so the comparison of description is simple
Single, the relevent part can refer to the partial explaination of embodiments of method.
Represent in flow charts or logic and/or step described otherwise above herein, for example, being considered use
In the order list for the executable instruction for realizing logic function, it may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (such as computer based system including the system of processor or other can be held from instruction
The system of row system, device or equipment instruction fetch and execute instruction) use, or combine these instruction execution systems, device or set
It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicate, propagate or pass
Defeated program is for instruction execution system, device or equipment or the dress for combining these instruction execution systems, device or equipment and using
Put.The more specifically example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wirings
Connecting portion (electronic installation), portable computer diskette box (magnetic device), random access memory (RAM), read-only storage
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device, and portable optic disk is read-only deposits
Reservoir (CDROM).In addition, can even is that can be in the paper of printing described program thereon or other are suitable for computer-readable medium
Medium, because can then enter edlin, interpretation or if necessary with it for example by carrying out optical scanner to paper or other media
His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.
In the above-described embodiment, multiple steps or method can in memory and by suitable instruction be performed with storage
The software or firmware that system is performed are realized.If for example, being realized with hardware, with another embodiment, can use
Any one of following technology well known in the art or their combination are realized:With for realizing logic work(to data-signal
The discrete logic of the logic gates of energy, the application specific integrated circuit with suitable combinational logic gate circuit, programmable gate
Array (PGA), field programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method is carried
Rapid to can be by program to instruct the hardware of correlation to complete, described program can be stored in a kind of computer-readable storage medium
In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
For convenience of description, description apparatus above is to be divided into various units/modules with function to describe respectively.Certainly, exist
Implement the function of each unit/module can be realized in same or multiple softwares and/or hardware during the present invention.
As seen through the above description of the embodiments, those skilled in the art can be understood that the present invention can
Realized by the mode of software plus required general hardware platform.Understood based on such, technical scheme essence
On the part that is contributed in other words to prior art can be embodied in the form of software product, the computer software product
It can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are to cause a computer equipment
(can be personal computer, server, or network equipment etc.) performs some of each of the invention embodiment or embodiment
Method described in part.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, the change or replacement that can be readily occurred in, all should
It is included within the scope of the present invention.Therefore, protection scope of the present invention should be defined by scope of the claims.
Claims (10)
1. one kind selects seat method in real time, it is characterised in that including:
Establishment is connected with the Web Sockets of service end;
After monitoring that being plotted as the seat of optional state is selected, pass through the Web Sockets described in establishment with service end and connect
Connect the seat information that will be chosen to transmit to service end, so that service end sends the choosing to the client of Web Sockets connections
In seat information, and make to receive the client of the seat information chosen selected seat be plotted as not optional shape
State.
2. real-time seat method is selected according to claim 1, it is characterised in that the Web of the establishment and service end
Sockets connections include:
Obtain the Web Socket link addresses of service end;
The Web Socket link addresses of a Web Socket objects and incoming acquisition are instantiated by Javascript, create with
The Web Socket connections of the incoming Web Socket link addresses.
3. real-time seat method is selected according to claim 2, it is characterised in that the Web Socket of the acquisition service end connect
Ground connection location includes:
Client obtains the Push Service interface of service end in an asynchronous manner, and the Web is obtained by the Push Service interface
Socket link addresses.
4. real-time seat method is selected according to claim 2, it is characterised in that in the Web Socket of the acquisition service end
After link address, a Web Socket objects and the Web Socket connections ground of incoming acquisition are instantiated by Javascript
Before location, this method also includes:
Judge whether the current browser of client supports Web Socket API, if supported, pass through described in execution
The step of Javascript instantiates a Web Socket objects and the Web Socket link addresses of incoming acquisition.
5. the real-time choosing seat method according to any one of Claims 1-4, it is characterised in that described to believe the seat chosen
Breath, which is transmitted to service end, to be included:
Lock interface is called, in POST modes by the seat information asynchronous transmission chosen to service end.
6. real-time seat method is selected according to claim 5, it is characterised in that described to call lock interface, in POST modes
The seat information asynchronous transmission chosen is included to service end:
The seat information chosen is encapsulated as Javascript objects;
The lock interface provided by FETCH API Calls service end, is passed the Javascript objects by POST modes
Transport to service end.
7. the real-time choosing seat method according to any one of Claims 1-4, it is characterised in that described by selected seat
Being plotted as not optional state includes:
Successively by the seat information chosen, it is transferred in the single datum stream mode based on REACT&REDUX frameworks in screening washer
The calculating of seating maps is carried out with rendering.
8. real-time seat method is selected according to claim 1, it is characterised in that methods described also includes:
After selected at seat, start timing;
After timing exceedes the first timing threshold value pre-set still without receive the order comprising the seat chosen into
Work(information, judges whether the Web Socket connections are abnormal, if abnormal, calls websocket.close () method to close
The Web Socket connections, and after Web Socket connections are rebuild, the seat information that will be chosen is transmitted to service end
It is updated to not selected information.
9. real-time seat method is selected according to claim 8, it is characterised in that the judgement Web Socket connections are
No exception includes:
The readyState property values of the Web Socket objects of instantiation are extracted, the readyState property values are utilized
Judge whether the Web Socket connections are abnormal.
10. one kind selects base device in real time, it is characterised in that including:
Creation module is connected, is connected for creating with the Web Sockets of service end;
Select seat locking module, for monitor to be plotted as the seat of optional state it is selected after, by described in establishment with clothes
The Web Sockets connections at business end transmit the seat information chosen to service end, so that service end is to Web Sockets connections
Client send the seat information chosen, and make to receive the client of the seat information chosen and will be selected
Seat is plotted as not optional state.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710338553.1A CN107241311A (en) | 2017-05-15 | 2017-05-15 | One kind selects seat method and device in real time |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710338553.1A CN107241311A (en) | 2017-05-15 | 2017-05-15 | One kind selects seat method and device in real time |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107241311A true CN107241311A (en) | 2017-10-10 |
Family
ID=59984995
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710338553.1A Pending CN107241311A (en) | 2017-05-15 | 2017-05-15 | One kind selects seat method and device in real time |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107241311A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109087459A (en) * | 2018-06-28 | 2018-12-25 | 深圳市智莱科技股份有限公司 | A method of quickly accessing article in Intelligent storage cabinet |
CN109901893A (en) * | 2017-12-07 | 2019-06-18 | 腾讯科技(武汉)有限公司 | The method for managing data flow of applet |
CN110837367A (en) * | 2018-08-16 | 2020-02-25 | 阿里巴巴集团控股有限公司 | User interface processing method and device and electronic equipment |
CN113838214A (en) * | 2020-06-24 | 2021-12-24 | 阿里巴巴集团控股有限公司 | Data generation method and device, electronic equipment and computer readable medium |
CN114127751A (en) * | 2019-05-17 | 2022-03-01 | 好莱坞网络有限责任公司 | Aggregate adaptive purchasing process and interface |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120059875A1 (en) * | 2010-09-07 | 2012-03-08 | Daniel Matthew Clark | Control of computing devices and user interfaces |
US20140109041A1 (en) * | 2012-10-09 | 2014-04-17 | Tamer Yunten | Yunten's Web Application Methodology & Web Programming Language (YWAM & WPL) |
CN103905504A (en) * | 2012-12-27 | 2014-07-02 | 海尔集团公司 | Information pushing method and system |
CN104410538A (en) * | 2014-12-22 | 2015-03-11 | 上海斐讯数据通信技术有限公司 | Network topological structure management method and system |
CN104503755A (en) * | 2014-12-22 | 2015-04-08 | 中软信息系统工程有限公司 | Dynamic information fusing and presenting method based on HTML5 (hypertext markup language 5) high-definition bitmaps |
CN105228080A (en) * | 2014-06-27 | 2016-01-06 | 上海视九信息科技有限公司 | Multi-screen interaction method, system and browser |
CN106209857A (en) * | 2016-07-14 | 2016-12-07 | 腾讯科技(深圳)有限公司 | Data transmission method and device |
CN106534241A (en) * | 2015-09-11 | 2017-03-22 | 北京奇虎科技有限公司 | Real-time data updating method, device and system |
-
2017
- 2017-05-15 CN CN201710338553.1A patent/CN107241311A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120059875A1 (en) * | 2010-09-07 | 2012-03-08 | Daniel Matthew Clark | Control of computing devices and user interfaces |
US20140109041A1 (en) * | 2012-10-09 | 2014-04-17 | Tamer Yunten | Yunten's Web Application Methodology & Web Programming Language (YWAM & WPL) |
CN103905504A (en) * | 2012-12-27 | 2014-07-02 | 海尔集团公司 | Information pushing method and system |
CN105228080A (en) * | 2014-06-27 | 2016-01-06 | 上海视九信息科技有限公司 | Multi-screen interaction method, system and browser |
CN104410538A (en) * | 2014-12-22 | 2015-03-11 | 上海斐讯数据通信技术有限公司 | Network topological structure management method and system |
CN104503755A (en) * | 2014-12-22 | 2015-04-08 | 中软信息系统工程有限公司 | Dynamic information fusing and presenting method based on HTML5 (hypertext markup language 5) high-definition bitmaps |
CN106534241A (en) * | 2015-09-11 | 2017-03-22 | 北京奇虎科技有限公司 | Real-time data updating method, device and system |
CN106209857A (en) * | 2016-07-14 | 2016-12-07 | 腾讯科技(深圳)有限公司 | Data transmission method and device |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109901893A (en) * | 2017-12-07 | 2019-06-18 | 腾讯科技(武汉)有限公司 | The method for managing data flow of applet |
CN109087459A (en) * | 2018-06-28 | 2018-12-25 | 深圳市智莱科技股份有限公司 | A method of quickly accessing article in Intelligent storage cabinet |
CN110837367A (en) * | 2018-08-16 | 2020-02-25 | 阿里巴巴集团控股有限公司 | User interface processing method and device and electronic equipment |
CN114127751A (en) * | 2019-05-17 | 2022-03-01 | 好莱坞网络有限责任公司 | Aggregate adaptive purchasing process and interface |
CN114127751B (en) * | 2019-05-17 | 2023-05-30 | 好莱坞网络有限责任公司 | Aggregation self-adaptive ticket purchasing system and ticket purchasing method |
US11899914B2 (en) | 2019-05-17 | 2024-02-13 | Hollywood.com LLC | Aggregated adaptive purchase process and interface |
CN113838214A (en) * | 2020-06-24 | 2021-12-24 | 阿里巴巴集团控股有限公司 | Data generation method and device, electronic equipment and computer readable medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107241311A (en) | One kind selects seat method and device in real time | |
CN102231686B (en) | A kind of system and method for realizing automated test of network security equipment | |
CN106484622B (en) | Test method, apparatus and system | |
CN106713389B (en) | Monitoring method and monitoring system | |
CN105338061B (en) | A kind of implementation method and system of lightweight messages middleware | |
US10491462B1 (en) | Port verification for customer interconnection in a data center | |
CN108009028A (en) | Message treatment method, device, equipment and computer-readable recording medium | |
CN108667861A (en) | By browser to the method, system and server of device real-time monitoring | |
US20020103886A1 (en) | Non-local aggregation of system management data | |
CN110247784A (en) | The method and apparatus for determining network topology structure | |
CN106559488A (en) | A kind of method of the electrical network geographical information space service for setting up tenant's driving | |
US9332074B2 (en) | Memory to memory communication and storage for hybrid systems | |
CN108960857A (en) | A kind of after-sale service management method, system and device | |
CN103475743B (en) | A kind of method, apparatus and system for cloud service | |
CN106156133A (en) | Method that control table substance is submitted to again, Apparatus and system | |
CN109886683A (en) | Monitor the method, apparatus and storage medium of block chain data | |
CN107370796A (en) | A kind of intelligent learning system based on Hyper TF | |
CN106877464A (en) | Charge control method and charging equipment | |
CN109074287A (en) | Infrastructure resources state | |
CN109325836A (en) | A kind of intelligent remote Sharing computer host lease operation system and its method | |
CN109495378A (en) | Detect method, apparatus, server and the storage medium of abnormal account number | |
CN104683252B (en) | A kind of gateway applied to gaming network is connected into method and system | |
CN107786671A (en) | A kind of power equipment remote test system | |
CN108022126A (en) | Definite method, apparatus, server and the storage medium of prize drawing qualification | |
CN108096838A (en) | Gift bag gets method, apparatus, server, mobile terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20171129 Address after: 100000 Beijing City, Dongcheng District Tripitaka hall alley No. 17 Building 1 room 2129 Applicant after: Beijing micro era Entertainment Technology Co., Ltd. Address before: 100085, No. 3, courtyard 3, No. 1, ten Street, Shanghai Beijing City, 902, 902 Applicant before: Beijing Micro shadow Era Technology Co., Ltd. |
|
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20171010 |