[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110351349A - A kind of method and system for realizing the work of cloud speaker - Google Patents

A kind of method and system for realizing the work of cloud speaker Download PDF

Info

Publication number
CN110351349A
CN110351349A CN201910577665.1A CN201910577665A CN110351349A CN 110351349 A CN110351349 A CN 110351349A CN 201910577665 A CN201910577665 A CN 201910577665A CN 110351349 A CN110351349 A CN 110351349A
Authority
CN
China
Prior art keywords
cloud
server
casting
push
box device
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
CN201910577665.1A
Other languages
Chinese (zh)
Other versions
CN110351349B (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.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies 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 Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201910577665.1A priority Critical patent/CN110351349B/en
Publication of CN110351349A publication Critical patent/CN110351349A/en
Application granted granted Critical
Publication of CN110351349B publication Critical patent/CN110351349B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention discloses a kind of method and system for realizing the work of cloud speaker, this method comprises: when message server detects that casting interface is called, according to the legitimacy of the Verification broadcast operation of casting interface, the push server address of corresponding long connection is obtained from cache server according to the cloud sound-box device number in parameter if legal;Judge whether there is corresponding long link information in corresponding with push server address push server, be, according to cloud sound-box device number, broadcasts payment amount in the parameter of interface and payment method generation PUSH message and be sent to push server corresponding with push server address;Push server judges whether to preserve corresponding long link information and context according to the cloud sound-box device number in the PUSH message received, is, by PUSH message payment amount and payment method generate casting information and be sent to the cloud speaker corresponding to cloud sound-box device number;Cloud speaker parses the casting information received and is broadcasted.

Description

A kind of method and system for realizing the work of cloud speaker
Technical field
The present invention relates to electronics field more particularly to a kind of method and system for realizing the work of cloud speaker.
Background technique
Online payment is a kind of form of e-payment, it is the payment interface between bank provided by third party The pay down mode of progress, this mode, which is advantageous in that, directly fund to be transferred accounts to website from the bank card of user In account, remittance arrives account at once, does not need manual confirmation.Credit card, stored value card, electronics branch can be used between client and businessman The a variety of electronic payment modes such as ticket and electronic cash carry out online payments, using saving transaction by the way of online e-payment Expense.In the prior art, an application scenarios correspond to a payment gateway, such as Mai Cai trade company is carried out using two dimensional code Gathering after customer passes through mobile phone barcode scanning, completes payment process by payment gateway, will receive " branch on last Mai Cai trade company mobile phone Pay precious gathering * member, wechat gathering * member, Unionpay's gathering * member " etc. voice reminder, if the restaurant client Zai Qu disappear under line Take, then another payment gateway needed to go to realize, has such as been intended to voice reminder when different application scene is consumed, it is necessary to It is completed with different payment gateways, it is inconvenient for use;And the consumption remind only have trade company's mobile phone have a prompting and Client handset without mentioning It wakes up, under normal circumstances, trade company will carry mobile phone, if trade company's mobile phone is not when paying scene, then without payment reminders, quotient Family can not know payment result, and user experience is very poor.And trade company's mobile phone influences sometimes because unstable networks can postpone to broadcast Broadcast result.
Summary of the invention
The purpose of the invention is to overcome the deficiencies of the prior art and provide a kind of method and be for realizing that cloud speaker works System.
The present invention provides a kind of method for realizing the work of cloud speaker, the method is suitable for inclusion in Internet of Things platform and Yun Yin The system of case, the Internet of Things platform include message server, push server and cache server, which comprises
Step S1: when the message server of Internet of Things platform detects that casting interface is called, the message server root According to the legitimacy of the Verification broadcast operation of casting interface, S2 is thened follow the steps Ru legal, is otherwise returned by casting interface Error message;
Step S2: the message server is according to the cloud sound-box device number in the parameter of casting interface from cache server Obtain the push server address of corresponding long connection;
Step S3: the message server judges whether have in push server corresponding with the push server address Corresponding long link information is to then follow the steps S4, otherwise sets off-line state for the state of current casting information;
Step S4: the message server according to the cloud sound-box device number, broadcast interface parameter in payment amount PUSH message is generated with payment method and is sent to push server corresponding with the push server address;
Step S5: when the push server receives PUSH message, the push server is according in PUSH message Cloud sound-box device number judge whether to preserve corresponding long link information and context, be to then follow the steps S6, otherwise give institute It states message server and returns to error message;
Step S6: the push server by PUSH message payment amount and payment method generate casting information it is concurrent Give the cloud speaker corresponding to the cloud sound-box device number;
Step S7: the cloud speaker parses the casting information received and is broadcasted according to sound template, and will casting As a result it is sent to the push server.
Further, before the step S1 further include: the cloud speaker and the push server establish connection.
Further, the cloud speaker establishes connection with the push server and includes:
Step T0: networking is checked whether after the cloud speaker booting, is to then follow the steps T2, otherwise prompts network failure;
Step T1: the cloud speaker obtains corresponding bank according to the cloud sound-box device number of preservation from shared data bank The sound template and configuration information;
Step T2: the cloud speaker judges whether to network for the first time, is then and to save association with configuration server arranging key The key consulted and cloud sound-box device number one-to-one correspondence are saved in shared data bank by the good key of quotient, configuration server, Step T3 is executed, it is no to then follow the steps T3;
Step T3: the cloud speaker generates account, password is generated according to the key of preservation and account, by cloud sound-box device Number, account and password generate connection request and be sent to push server;
Step T4: after the push server receives connection request, cloud speaker legitimacy is verified, if legal The corresponding context of current cloud speaker and link information are saved, step T5 is executed, otherwise returns to refusal connection response to cloud speaker;
Step T5: the push server sends out the push server address where the corresponding long connection of cloud sound-box device number Give cache server;
Step T6: the cache server is with receiving the push server where the corresponding long connection of cloud sound-box device number It is saved behind location, and is returned to push server and save successful information;
Step T7: the push server gives the return successful connection response of cloud speaker after receiving preservation successful information;
Step T8: the cloud speaker during idle time according to the heart time in the configuration information to push server Heartbeat packet is sent, safeguards long connection status.
Further, cloud speaker legitimacy is verified in the step T4, comprising: the push server is according to even The cloud sound-box device number connect in request obtains corresponding key in the shared data bank, is asked according to the key of acquisition and connection Account in asking generates password, judges whether the password generated consistent with the password in connection request, be it is then legal, otherwise do not conform to Method.
Further, the message server in the step S1 is according to the Verification broadcast operation for broadcasting interface Legitimacy, comprising: the message server judges whether the length for broadcasting the parameter of interface is legal, judges the shared data bank In whether save merchant number or cloud sound-box device number, judge whether cloud speaker can be used according to the equipment state of cloud speaker, such as Judgement be that then broadcast operation is legal, it is otherwise illegal.
It further, include cloud sound-box device number, the step S3 specifically: described to disappear in the parameter of the casting interface Breath server judges the long link information for whether having corresponding to cloud sound-box device number in push server, is that will execute step Otherwise S4 sets off-line state for the state of current casting information.
It further, further include merchant number in the parameter of the casting interface, the step S3 may be used also after being judged as YES To include: that the message server binds trade company and cloud speaker.
It is further, described that trade company and cloud speaker are carried out binding includes: when the message server detects that binding connects When mouth is called, merchant number is carried out corresponding binding with cloud sound-box device number by the message server, and returns to binding result.
It further, include merchant number, the step S3 in the parameter of the casting interface specifically: the message clothes Device be engaged according to the corresponding cloud sound-box device number of merchant number lookup, such as finds and judges whether have in push server corresponding to cloud sound The long link information of case device number is will then to execute step S4, otherwise sets off-line state for the state of current casting information.
Further, after the step S7 further include:
Step S8: the push server is according to the state of the current casting information of the casting result more new record received With the casting time.
Further, before the step S8 further include: whether the push server judgement receives within a preset time To casting as a result, as received, judges to broadcast whether result is to have broadcasted, be to execute S8, otherwise report an error, as do not received, sentence Disconnected benefit pushes away whether number is greater than preset value, is to report an error, and otherwise saves casting message and retransmits PUSH message and gives cloud speaker, It updates to mend and pushes away number, return step S7.
Further, before step S1 further include: when payment server receives the payment request of terminal transmission, institute It whether legal states payment server verifying payment request, is that the paying party account Payment Amount in payment request is transferred to and is collected money Cloud sound-box device number, payment amount and the payment method in payment request are called broadcasting for Internet of Things platform by code account Interface is reported, is otherwise reported an error.
Invention further provides a kind of systems for realizing the work of cloud speaker, include Internet of Things platform and cloud speaker, the Internet of Things Platform includes message server, push server and cache server,
The message server includes:
Judgment module is detected, for being broadcasted according to the Verification of casting interface when detecting that casting interface is called The legitimacy of operation triggers first if legal and obtains module, otherwise returns to error message by casting interface;
Described first obtains module, for the cloud sound-box device number in the parameter according to casting interface from cache server Obtain the push server address of corresponding long connection;
Setup module is judged, for judging push corresponding with the push server address of the first acquisition module acquisition Whether there is corresponding long link information in server, be to trigger the first sending module, otherwise by the state of current casting information It is set as off-line state;
First sending module, for the payment amount in the parameter according to the cloud sound-box device number, casting interface PUSH message is generated with payment method and is sent to push server corresponding with the push server address;
The cache server, for saving push server address;
The push server includes:
Judgment module is received, the PUSH message sent for receiving the message server, according to the cloud in PUSH message Sound-box device number judges corresponding long link information and context whether are preserved in the push server, is to trigger generation Otherwise sending module returns to error message to the message server;
The generation sending module, for by PUSH message payment amount and payment method generate casting information it is concurrent Give the cloud speaker corresponding to the cloud sound-box device number;
First receiving module, the casting result returned for receiving the cloud speaker;
The cloud speaker includes:
Sending module is received, for receiving the casting information of the push server, casting result is sent to described push away Send server;
Parse broadcasting module, for parse the casting information that receives of reception sending module and according to sound template into Row casting obtains the casting result.
Further, the cloud speaker further include: first establishes module, for described by cloud speaker and the Push Service Device establishes connection;
The push server further include: second establishes module, for building the push server and the cloud speaker Vertical connection.
Further, it described first establishes module and includes:
It checks prompt unit, is to trigger for checking whether the cloud speaker networks after the cloud speaker is switched on One acquiring unit, otherwise prompts network failure;
The first acquisition unit, for obtaining corresponding silver from shared data bank according to the cloud sound-box device number of preservation Capable sound template and configuration information;
Judge storage unit, is then close with configuration server negotiation for judging whether the cloud speaker networks for the first time Key, and the key consulted is saved, triggering generates transmission unit, and otherwise triggering generates transmission unit;
The generation transmission unit generates password according to the key of preservation and the account, by cloud sound for generating account Case device number, account and password generate connection request and are sent to push server;
Send maintenance unit, for receive push server send successful connection response after, during idle time in basis Heart time in the configuration information sends heartbeat packet to push server, safeguards long connection status;
The Internet of Things platform further include: configuration server key and will be consulted for holding consultation with the cloud speaker Key and cloud sound-box device number one-to-one correspondence be saved in shared data bank;
Described second establishes module, comprising:
Storage unit is verified, for being carried out after the push server receives connection request to cloud speaker legitimacy Verifying, such as it is legal, save the corresponding context of current cloud speaker and link information, trigger the first transmission unit, otherwise to cloud sound Case returns to refusal connection response;
First transmission unit, for sending out the push server address where the corresponding long connection of cloud sound-box device number Give cache server;
The reception return unit is returned after the preservation successful information that the cache server returns for receiving to cloud speaker Return successful connection response;
The cache server, the push server being also used to where receiving the corresponding long connection of cloud sound-box device number It is corresponded to cloud sound-box device number behind address to save, and is returned to the push server and saves successful information.
Further, the verifying storage unit is specifically used for according to the cloud sound-box device number in connection request described total It enjoys and obtains corresponding key in database, password is generated according to the account in the key and connection request of acquisition, judges generation Whether password is consistent with the password in connection request, is, saves the corresponding context of current cloud speaker and link information, triggering Otherwise first transmission unit returns to refusal connection response to cloud speaker.
Further, the detection judgment module is specifically used for broadcasting described in judgement when detecting that casting interface is called Report whether the length of the parameter of interface is legal, judges merchant number or cloud sound-box device whether are saved in the shared data bank Number, according to the equipment state of cloud speaker judge whether cloud speaker can be used, triggering first obtains module if judgement is to be, otherwise Error message is returned by casting interface.
Further, described to judge that setup module is specifically used for judging whether have in the push server corresponding to cloud sound The long link information of case device number is to trigger the first sending module, otherwise sets offline for the state of current casting information State.
It further, further include merchant number in the parameter of the casting interface, the message server further include: first Binding module, for when the judgement setup module is judged as YES, trade company and cloud speaker to be bound.
Further, first binding module is specifically used for when detecting that binding interface is called, by merchant number Corresponding binding is carried out with cloud sound-box device number, and returns to binding result.
It further, include merchant number in the parameter of the casting interface, the judgement setup module is specifically used for root Corresponding cloud sound-box device number is searched according to merchant number, if found, judges whether to have in push server and is set corresponding to cloud speaker Standby number long link information, is to trigger the first sending module, otherwise sets off-line state for the state of current casting information.
Further, the push server further include:
Update module, the current casting letter of the casting result more new record for being received according to first receiving module The state of breath and casting time.
Further, the push server further include:
First judgment module, for judge first receiving module within a preset time whether receive casting as a result, If received, judges to broadcast whether result is to have broadcasted, be to trigger the update module, otherwise report an error;As do not received, judge Benefit pushes away whether number is greater than preset value, is, reports an error, and otherwise saves casting message and retransmits PUSH message and give cloud speaker, more New mend pushes away number, triggers the reception sending module.
Further, the system also includes payment servers, for receiving the payment request of terminal transmission, and verify Whether the payment request is legal, is, the paying party account Payment Amount in payment request is transferred to a yard account of collecting money, and will pay Cloud sound-box device number, payment amount and payment method in money request call the casting interface of Internet of Things platform as parameter, otherwise It reports an error.
Compared with prior art, the present invention having the advantage that
Cloud speaker provided by the invention is that equipment is broadcasted in an independent gathering, can be adapted for any consumer applications field Scape, cloud speaker and background server establish long connection, and casting is more stable, and speed faster, without carrying, facilitates trade company to make With.
Detailed description of the invention
Fig. 1 is a kind of method flow diagram for realizing the work of cloud speaker that the embodiment of the present invention one provides;
Fig. 2 is a kind of method flow diagram for realizing the work of cloud speaker provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of method flow diagram for realizing the work of cloud speaker that the embodiment of the present invention three provides;
Fig. 4 is a kind of realization process flow broadcasted using cloud speaker in parking lot that the embodiment of the present invention four provides Figure;
Fig. 5 is a kind of system block diagram for realizing the work of cloud speaker that the embodiment of the present invention five provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those skilled in the art's every other implementation obtained without making creative work Example, shall fall within the protection scope of the present invention.
Embodiment one
The embodiment of the present invention one provide it is a kind of realize cloud speaker work method, this method be suitable for inclusion in Internet of Things platform and The system of cloud speaker, Internet of Things platform includes message server, push server and cache server, as shown in Figure 1, the present embodiment Method include:
Step S1: when the message server of Internet of Things platform detects that casting interface is called, message server is according to broadcasting The legitimacy for reporting the Verification broadcast operation of interface, thens follow the steps S2 Ru legal, does not conform to rule such as and is returned by broadcasting interface Return error message;
Specifically, in the present embodiment, according to the legitimacy of the Verification broadcast operation of casting interface, packet in step S1 Include: message server judges whether the length for broadcasting the parameter of interface is legal, judges whether save trade company in shared data bank Number or cloud sound-box device number judge whether cloud speaker can be used according to the equipment state of cloud speaker, if judgement is to be, broadcast It is legal to operate, otherwise illegal;
Specifically, before step S1 further include: when payment server receives the payment request of terminal transmission, verifying Whether payment request is legal, is, the paying party account Payment Amount in payment request is transferred to a yard account of collecting money, payment is asked Cloud sound-box device number, payment amount and payment method in asking call the casting interface of Internet of Things platform as parameter, otherwise report an error;
Step S2: message server is obtained from cache server according to the cloud sound-box device number in the parameter of casting interface The push server address of corresponding long connection;
Step S3: message server judges whether there is corresponding length in push server corresponding with push server address Link information is to then follow the steps S4, otherwise sets off-line state for the state of current casting information;
In the present embodiment, as included cloud sound-box device number, step S3 specifically: messaging service in the parameter of casting interface Device judges the long link information for whether having corresponding to cloud sound-box device number in push server, is that will then execute step S4, otherwise Off-line state is set by the state of current casting information;
Such as broadcasting further includes merchant number in the parameter of interface, step S3 be judged as YES after can also include: messaging service Device binds trade company and cloud speaker, specifically: when message server detects that binding interface is called, by merchant number Corresponding binding is carried out with cloud sound-box device number, and returns to binding result;Correspondingly, step S3 specifically: message server according to Merchant number searches corresponding cloud sound-box device number, such as finds and judges whether have in push server corresponding to cloud sound-box device number Long link information, be that will then execute step S4, otherwise set off-line state for the state of current casting information;
Step S4: message server according to cloud sound-box device number, broadcast interface parameter in payment amount and paying party Formula generates PUSH message and is sent to push server corresponding with push server address;
Step S5: when push server receives PUSH message, push server is according to the cloud speaker in PUSH message Device number judges whether to preserve corresponding long link information and context, is to then follow the steps S6, otherwise gives message server Return to error message;
Step S6: push server is by the payment amount and payment method generation casting information in PUSH message and is sent to Cloud speaker corresponding to cloud sound-box device number;
Step S7: cloud speaker parses the casting information received and is broadcasted according to sound template, and will broadcast result It is sent to push server.
Preferably, in the present embodiment, before step S1 further include: cloud speaker and push server establish connection, specifically Include:
Step T0: networking is checked whether after the booting of cloud speaker, is to then follow the steps T2, otherwise prompts network failure;
Step T1: cloud speaker obtains the voice of corresponding bank according to the cloud sound-box device number of preservation from shared data bank Template and configuration information;
Step T2: cloud speaker judge whether for the first time network, be then with configuration server arranging key, and save consult Key, configuration server by the key consulted and cloud sound-box device number one-to-one correspondence be saved in shared data bank, execute Step T3, it is no to then follow the steps T3;
Step T3: cloud speaker generates account, password is generated according to the key of preservation and account, by cloud sound-box device number, account Number and password generate and connection request and be sent to push server;
Step T4: after push server receives connection request, verifying cloud speaker legitimacy, as legal, saves The currently corresponding context of cloud speaker and link information, execute step T5, otherwise return to refusal connection response to cloud speaker;
Specifically, being verified to cloud speaker legitimacy, comprising: push server is set according to the cloud speaker in connection request Standby number obtains corresponding key in shared data bank, generates password according to the account in the key and connection request of acquisition, sentences Medium well at password it is whether consistent with the password in connection request, be it is then legal, it is otherwise illegal;
Step T5: the push server address where the corresponding long connection of cloud sound-box device number is sent to by push server Cache server;
Step T6: after cache server receives the push server address where the corresponding long connection of cloud sound-box device number It is saved, and is returned to push server and save successful information;
Step T7: push server gives the return successful connection response of cloud speaker after receiving preservation successful information;
Step T8: cloud speaker is interior during idle time to give push server to send heartbeat according to the heart time in configuration information Packet, safeguards long connection status.
Optionally, after the step S7 of the present embodiment method further include:
Step S8: push server is according to the state of the current casting information of the casting result more new record received and broadcasts It calls time.
Preferably, before step S8 further include: push server judgement whether receive within a preset time casting as a result, If received, judge to broadcast whether result is to have broadcasted, be to execute S8, otherwise report an error, if do not received, judges that benefit pushes away number and is No is to report an error greater than preset value, otherwise saves casting message and retransmits PUSH message and gives cloud speaker, update benefit pushes away secondary Number, return step S7.
Embodiment two
Second embodiment of the present invention provides a kind of methods for realizing the work of cloud speaker, message server, caching in this method Server and push server are arranged on Internet of Things platform, as shown in Fig. 2, the method for the present embodiment includes:
Step 100: the booting of cloud speaker checks whether networking, is to then follow the steps 101, otherwise prompts network failure;
Step 101: cloud speaker obtains the language of corresponding bank according to the cloud sound-box device number of preservation from shared data bank Sound template and configuration information;
In the present embodiment, the sound template and configuration information of bank are configured in advance by operator, and sound template can Think Unionpay's file, Alipay file, wechat file or other audio files;Configuration information includes: push server address, the heart Jump the time;
Step 102: cloud speaker judges whether to network for the first time, is then and to save negotiation with configuration server arranging key The key consulted and cloud sound-box device number one-to-one correspondence are saved in shared data bank, hold by good key, configuration server Row step 103, it is no to then follow the steps 103;
Step 103: cloud speaker generates account, password is generated according to the key of preservation and account, by cloud sound-box device number, account Number and password generate and connection request and be sent to push server;
In the present embodiment, meeting arranging key when cloud speaker and OTA server (configuration server) are attached for the first time, Cloud speaker saves the key consulted, and the key consulted is corresponded to cloud sound-box device number and is stored in shared data bank by OTA; Preferably, the account in the present embodiment is a random number;
Step 104: after push server receives connection request, cloud speaker legitimacy being verified, as legal, is protected The corresponding context of current cloud speaker and link information are deposited, step 105 is executed, otherwise returns to refusal connection response to cloud speaker;
Specifically, in the present embodiment, being verified to cloud speaker legitimacy, comprising: push server is asked according to connection The cloud sound-box device number asked obtains corresponding key in shared data bank, generates password according to the key of acquisition and account, Judge generate password it is whether consistent with the password in connection request, be it is then legal, it is otherwise illegal;
Step 105: push server sends the push server address where the corresponding long connection of cloud sound-box device number To cache server;
Step 106: cache server receives the push server address where the corresponding long connection of cloud sound-box device number After saved, and give push server return save successful information;
Step 107: push server gives the return successful connection response of cloud speaker after receiving preservation successful information;
Step 108: cloud speaker periodically gives push server to send heartbeat packet in during idle time, safeguards long connection status;
Step 109: after payment server receives Receiving information, calling casting interface for Receiving information as parameter;
In the present embodiment, customer inputs payment amount after scanning trade company's two dimensional code;Clicking will be comprising branch after confirmation is paid the bill The Receiving information for paying the amount of money, merchant number or cloud sound-box device number is sent to payment server;
Step 110: when message server detects that casting interface is called, being broadcasted according to the Verification of casting interface The legitimacy of operation thens follow the steps 111 Ru legal, does not conform to rule such as by casting interface and returns to error message;
Specifically, in the present embodiment, according to the legitimacy of the Verification broadcast operation of casting interface, comprising: judgement Whether the length of the parameter of casting interface is legal, judges merchant number or cloud sound-box device whether are saved in shared data bank Number, according to the equipment state of cloud speaker judge whether cloud speaker can be used, broadcast operation is legal if judgement is to be, does not otherwise conform to Method;
In the present embodiment, the equipment state of cloud speaker imports in cache server in advance, and equipment state includes: not initial Change, has initialized, disabled, having cancelled;If equipment state is to have initialized, then cloud speaker is available;
Step 111: message server obtains the push of corresponding long connection according to cloud sound-box device number from cache server Server address;
Step 112: whether message server judgement is corresponding corresponding to having in the push server of push server address Long link information is will then to execute step 113, otherwise sets off-line state for the state of current casting information;
In the present embodiment, such as broadcasting in the parameter of interface includes cloud sound-box device number, then step 112 specifically: message Server judges the long link information for whether having corresponding to cloud sound-box device number in cache server, is that will then execute step 113, Otherwise off-line state is set by the state of current casting information;Optionally, broadcasting in the parameter of interface further includes merchant number, Step 112 can also include: that message server binds merchant number and cloud sound-box device number after being judged as YES;It carries out down Message server directly searches the long link information corresponding to cloud speaker by merchant number when secondary push;Or implement in the present invention Trade company and cloud speaker are bound before example, specifically include: trade company's application system is according to merchant number and cloud sound-box device number Call binding interface;When message server detects that binding interface is called, merchant number and cloud sound-box device number are carried out Corresponding binding, and return to binding result;
Such as broadcasting includes merchant number in the parameter of interface, then step 112 specifically: message server is according to merchant number Corresponding cloud sound-box device number is searched, the long connection for judging whether to have in cache server corresponding to cloud sound-box device number is such as found Information is will then to execute step 113, otherwise sets off-line state for the state of current casting information;
Step 113: message server generates push according to cloud sound-box device number, payment amount and the payment method in parameter Message is sent to push server corresponding with push server address;
Preferably, the PUSH message in the present embodiment is the data of JSON format;
Step 114: when push server receives PUSH message, being judged whether according to the cloud sound-box device number in PUSH message Corresponding long link information and context are preserved, is to then follow the steps 115, otherwise returns to error message to message server;
Step 115: push server sends the payment amount and payment method generation casting information in PUSH message To the cloud speaker for corresponding to cloud sound-box device number;
Preferably, the casting message in the present embodiment is the data of TLV format;
Step 116: cloud speaker parses the casting information received and is broadcasted according to sound template, and will broadcast result It is sent to push server;
Step 117: push server according to the state of the current casting information of the casting result more new record received and Broadcast the time.
Preferably, in embodiment, before step 117 further include: whether push server judgement connects within a preset time Casting is received as a result, judging to broadcast whether result is to have broadcasted, being to execute 117, otherwise report an error, if not receiving as received Judge to mend and push away whether number is greater than preset value, be to report an error, otherwise retransmits PUSH message and give cloud speaker, update benefit pushes away secondary Number, return step 116.
Embodiment three
The embodiment of the present invention three provides a kind of working method of cloud speaker, as shown in Figure 3, comprising:
Step 200: the booting of cloud speaker checks whether networking, is to then follow the steps 201, otherwise prompts network failure;
Step 201: cloud speaker judges whether to network for the first time, is then and to save negotiation with platform of internet of things arranging key The key consulted and cloud sound-box device number one-to-one correspondence are stored in shared data bank, hold by good key, platform of internet of things Row step 202, it is no to then follow the steps 202;
Step 202: cloud speaker generates account, password is generated according to the key of preservation and account, by cloud sound-box device number, account Number and password generate and connection request and be sent to Internet of Things platform;
Step 203: after Internet of Things platform receives connection request, cloud speaker legitimacy being verified, as legal, is executed Step 204, refusal connection response otherwise is returned to cloud speaker;
Specifically, in the present embodiment, being verified to cloud speaker legitimacy, comprising: Internet of Things platform is according to connection request In cloud sound-box device number the counterpart keys of preservation are obtained from shared data bank, generated according to the key of acquisition and account close Key, judge generate key it is whether consistent with the password in connection request, be it is then legal, it is otherwise illegal;
Step 204: Internet of Things platform saves corresponding context corresponding with cloud sound-box device number and link information, gives cloud speaker Return is successfully established response;
Step 205: cloud speaker periodically gives cloud platform to send heartbeat packet in during idle time, safeguards long connection status;
Step 206: after payment server receives Receiving information, calling casting interface for Receiving information as parameter;
In the present embodiment, customer inputs payment amount after scanning trade company's two dimensional code;Clicking will be comprising branch after confirmation is paid the bill The Receiving information for paying the amount of money, merchant number or cloud sound-box device number is sent to payment server;In method in the present embodiment simultaneously It is not limited to two dimensional code, other codes with code board number can be achieved, such as bar code etc.;
Step 207: when Internet of Things detection of platform is called to casting interface, behaviour being broadcasted according to the Verification of casting interface The legitimacy of work thens follow the steps 208 Ru legal, does not conform to rule such as and report an error;
Specifically, in the present embodiment, according to the legitimacy of the Verification broadcast operation of casting interface, comprising: judgement Report whether the length of the parameter of interface legal, judge whether to save merchant number in shared data bank or cloud sound-box device number, Judge whether cloud speaker can be used according to the equipment state of cloud speaker, broadcast operation is legal if judgement is to be, otherwise illegal;
In the present embodiment, the equipment state of cloud speaker is preset, equipment state includes: no initializtion, initialized, Disabling is cancelled;If equipment state is to have initialized, then cloud speaker is available;
Step 208: Internet of Things platform judges whether to preserve the long link information corresponding to cloud sound-box device number, is that will hold Otherwise row step 209 sets off-line state for the state of current casting information;
In the present embodiment, such as broadcasting in the parameter of interface includes cloud sound-box device number, then step 208 specifically: Internet of Things Platform judges the long link information for whether having corresponding to cloud sound-box device number in cache server, is that will then execute step 209, no Then off-line state is set by the state of current casting information;
Such as broadcasting includes merchant number in the parameter of interface, then step 208 specifically: Internet of Things platform is looked into according to merchant number Corresponding cloud sound-box device number is looked for, the long connection letter for judging whether to have in cache server corresponding to cloud sound-box device number is such as found Breath is will then to execute step 209, otherwise sets off-line state for the state of current casting information;
Step 209: Internet of Things platform generates casting letter according to cloud sound-box device number, payment amount and the payment method in parameter Breath is sent to cloud speaker for information is broadcasted by push server corresponding with push server address;
Preferably, in the present embodiment, Internet of Things platform is constructed according to cloud sound-box device number, payment amount and payment method The casting information of TLV format is sent to cloud speaker for information is broadcasted by push server corresponding with push server address;
Step 210: cloud speaker parses the casting information received, and is broadcasted according to sound template, building casting knot Fruit simultaneously returns to Internet of Things platform;
Step 211: whether the judgement of Internet of Things platform receives casting as a result, being to then follow the steps 212 within a preset time, no Then follow the steps 213;
Step 212: whether the casting result that the judgement of Internet of Things platform receives is to have broadcasted, and is then to be updated according to casting result It the state of the current casting message of record and casting time, otherwise reports an error;
Step 213: Internet of Things platform, which judges to mend, pushes away whether number is greater than preset value, is to report an error, otherwise saves casting message And retransmit PUSH message and give cloud speaker, it updates benefit and pushes away number, return step 210.
Example IV
The embodiment of the present invention four provides a kind of realization process broadcasted using cloud speaker in parking lot, such as Fig. 4 institute Show, comprising:
Step 301: parking lot trade company, which generates parking lot and collects money, code and is sent to payment server;
Step 302: payment server will be prompted to trade company's input cloud sound-box device number, will when receiving cloud sound-box device Its code of collecting money with the parking lot received is bound;
Step 303: after car owner reaches parking lot, being collected money code using mobile phone scanning parking lot, then input payment information, hand Machine generates payment request according to payment information and is sent to payment server;
In the present embodiment, payment request includes casting information, paying party account information, beneficiary account information etc.;It broadcasts Breath of notifying includes cloud sound-box device number (or code of collecting money), payment amount and payment method etc.;
Step 304: whether payment server verifying payment request is legal, is then to pay the paying party account in payment request The money amount of money is transferred to a yard account of collecting money, and the casting interface of Internet of Things platform is called to send out the casting information in payment request after the completion of transferring accounts Message server is given, is otherwise reported an error;
Step 305: when message server detects that casting interface is called, according to the cloud sound in the parameter of casting interface Case device number obtains the push server address of corresponding long connection from cache server;
Step 306: it is corresponding whether message server judges to have in push server corresponding with push server address Long link information is will then to execute step 307, otherwise sets off-line state for the state of current casting information;
Step 307: message server according to cloud sound-box device number, broadcast interface parameter in payment amount and paying party Formula generates PUSH message and is sent to push server corresponding with push server address;
Step 308: when push server receives PUSH message, being judged whether according to the cloud sound-box device number in PUSH message Corresponding long link information and context are preserved, is to then follow the steps 309, otherwise reports an error;
Step 309: push server is by the payment amount and payment method generation casting information in PUSH message and sends To the cloud speaker for corresponding to cloud sound-box device number;
Step 310: cloud speaker parses the casting information received and is broadcasted according to voice module, and will broadcast result It is sent to push server.
Three methods in the present embodiment are equally applicable to other application scenarios, such as buffet etc..
Embodiment five
The embodiment of the present invention five provides a kind of system for realizing the work of cloud speaker, as shown in figure 5, including Internet of Things platform and cloud Speaker 1, Internet of Things platform include message server 2, push server 3 and cache server 4,
Message server 2 includes:
Judgment module 21 is detected, for being broadcast according to the Verification of casting interface when detecting that casting interface is called The legitimacy for reporting operation triggers first if legal and obtains module 22, otherwise returns to error message by casting interface;
In the present embodiment, detection judgment module 21 is specifically used for judging to broadcast when detecting that casting interface is called Whether the length of the parameter of interface is legal, judges whether to save merchant number or cloud sound-box device number, setting according to cloud speaker 1 Standby state judges whether cloud speaker 1 can be used, and triggering first obtains module 22 if judgement is to be, is otherwise returned by broadcasting interface Return error message;
First obtains module 22, for the cloud sound-box device number in the parameter according to casting interface from cache server 4 Obtain the push server address of corresponding long connection;
Setup module 23 is judged, for judging push corresponding with the push server address of the first acquisition acquisition of module 22 Whether there is corresponding long link information in server 3, be to trigger the first sending module 24, otherwise by the shape of current casting information State is set as off-line state;
In the present embodiment, judge that setup module 23 is specifically used for judging whether have in cache server 4 corresponding to cloud sound The long link information of case device number is to trigger the first sending module 24, otherwise by the state of current casting information be set as from Linear state;
First sending module 24, for the payment amount and payment in the parameter according to cloud sound-box device number, casting interface Mode generates PUSH message and is sent to push server 3 corresponding with push server address;
Cache server 4, for saving push server address;
Push server 3 includes:
Judgment module 31 is received, for receiving the PUSH message of the transmission of message server 2, according to the cloud sound in PUSH message Case device number judges corresponding long link information and context whether are preserved in push server 4, is to trigger generation to send Otherwise module 32 returns to error message to message server 2;
Generate sending module 32, for by PUSH message payment amount and payment method generate casting and information and send To the cloud speaker 1 for corresponding to cloud sound-box device number;
First receiving module 33, for receiving the casting result of the return of cloud speaker 1;
Cloud speaker 1 includes:
Sending module 11 is received, for receiving the casting information of push server 3, casting result is sent to Push Service Device 3;
Parse broadcasting module 12, for parse the casting information that receives of reception sending module 11 and according to sound template into Row casting obtains casting result.
Cloud speaker 1 in the present embodiment further include: first establishes module, for building cloud speaker 1 and push server 3 Vertical connection;
Correspondingly, push server 3 further include: second establishes module, for establishing push server 3 and cloud speaker 1 Connection.
Specifically, first establishes module and includes:
It checks prompt unit, is that then triggering first obtains for checking whether cloud speaker 1 networks after cloud speaker 1 is switched on Otherwise unit prompts network failure;
First acquisition unit, for obtaining corresponding bank from shared data bank according to the cloud sound-box device number of preservation Sound template and configuration information;
Judge storage unit, for judge cloud speaker 1 whether for the first time network, be then with configuration server arranging key, And the key consulted is saved, triggering generates transmission unit, and otherwise triggering generates transmission unit;
Transmission unit is generated, for generating account, password is generated according to the key of preservation and account, by cloud sound-box device Number, account and password generate connection request and be sent to push server 3;
Send maintenance unit, for receive push server 3 send successful connection response after, during idle time in basis Heart time in configuration information sends heartbeat packet to push server 3, safeguards long connection status;
Internet of Things platform further include: configuration server, for cloud speaker 1 hold consultation key and by the key consulted with Cloud sound-box device number row, which corresponds, to be saved in shared data bank;
Second establishes module, comprising:
Storage unit is verified, for testing 1 legitimacy of cloud speaker after push server 3 receives connection request Card, such as it is legal, save the corresponding context of current cloud speaker 1 and link information, trigger the first transmission unit, otherwise to cloud sound Case 1 returns to refusal connection response;
Preferably, in the present embodiment, verifying storage unit is specifically used for according to the cloud sound-box device number in connection request Corresponding key is obtained in shared data bank, and password is generated according to the account in the key and connection request of acquisition, judges to give birth to At password it is whether consistent with the password in connection request, be to save the corresponding context of current cloud speaker 1 and link information, The first transmission unit is triggered, otherwise returns to refusal connection response to cloud speaker 1.
First transmission unit, for the push server address where the corresponding long connection of cloud sound-box device number to be sent to Cache server 4;
Return unit is received, returns to connection to cloud speaker 1 after the preservation successful information for receiving the return of cache server 4 Success response;
Cache server 4, with being also used to the push server where receiving the corresponding long connection of cloud sound-box device number It is corresponded to cloud sound-box device number behind location to save, and is returned to push server 3 and saves successful information.
Optionally, in the present embodiment, broadcasting further includes merchant number in the parameter of interface, message server 2 further include: First binding module, for when judging that setup module 23 is judged as YES, trade company and cloud speaker 1 to be bound;First binding Module is specifically used for that merchant number is carried out corresponding binding with cloud sound-box device number when detecting that binding interface is called, and Return to binding result.
Optionally, broadcasting includes merchant number in the parameter of interface, judges that setup module 23 is specifically used for compiling according to trade company Number corresponding cloud sound-box device number is searched, such as finds the length for judging whether there is corresponding to cloud sound-box device number in push server 3 Link information is to trigger the first sending module 24, otherwise sets off-line state for the state of current casting information.
In the present embodiment, push server 3 further include:
Update module, the current casting information of the casting result more new record for being received according to the first receiving module 33 State and casting the time.
Preferably, push server 3 further include:
First judgment module, for judging whether the first receiving module 33 receives casting as a result, such as within a preset time It receives, judges to broadcast whether result is to have broadcasted, be to trigger update module, otherwise report an error, if do not received, it is secondary to judge that benefit pushes away Whether number is greater than preset value, is to report an error, and otherwise saves casting message and retransmits PUSH message to cloud speaker 1, updates and mend Number is pushed away, triggering receives sending module 11.
Preferably, the system in the present embodiment further include: payment server, for receiving the payment request of terminal transmission, And whether legal, be that the paying party account Payment Amount in payment request is transferred to a yard account of collecting money if verifying payment request, it will Cloud sound-box device number, payment amount and payment method in payment request call the casting interface of Internet of Things platform as parameter, no Then report an error.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto, Anyone skilled in the art is in technical scope disclosed by the invention, and any changes or substitutions that can be easily thought of, It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with scope of protection of the claims Subject to.

Claims (24)

1. a kind of method for realizing the work of cloud speaker, which is characterized in that the method is suitable for inclusion in Internet of Things platform and cloud speaker System, the Internet of Things platform includes message server, push server and cache server, which comprises
Step S1: when the message server of Internet of Things platform detects that casting interface is called, the message server is according to broadcasting The legitimacy for reporting the Verification broadcast operation of interface, thens follow the steps S2 Ru legal, otherwise returns to mistake by casting interface Information;
Step S2: the message server is obtained from cache server according to the cloud sound-box device number in the parameter of casting interface The push server address of corresponding long connection;
Step S3: it is corresponding whether the message server judges to have in push server corresponding with the push server address Long link information, be to then follow the steps S4, otherwise set off-line state for the state of current casting information;
Step S4: the message server according to the cloud sound-box device number, broadcast interface parameter in payment amount and pay Money mode generates PUSH message and is sent to push server corresponding with the push server address;
Step S5: when the push server receives PUSH message, the push server is according to the cloud in PUSH message Sound-box device number judges whether to preserve corresponding long link information and context, is to then follow the steps S6, otherwise disappears to described It ceases server and returns to error message;
Step S6: the push server is by the payment amount and payment method generation casting information in PUSH message and is sent to Cloud speaker corresponding to the cloud sound-box device number;
Step S7: the cloud speaker parses the casting information received and is broadcasted according to sound template, and will broadcast result It is sent to the push server.
2. the method as described in claim 1, which is characterized in that before the step S1 further include: the cloud speaker with it is described Push server establishes connection.
3. method according to claim 2, which is characterized in that the cloud speaker and the push server establish connection packet It includes:
Step T0: networking is checked whether after the cloud speaker booting, is to then follow the steps T2, otherwise prompts network failure;
Step T1: the cloud speaker obtains described in corresponding bank according to the cloud sound-box device number of preservation from shared data bank Sound template and configuration information;
Step T2: the cloud speaker judge whether for the first time network, be then with configuration server arranging key, and save consult Key, configuration server by the key consulted and cloud sound-box device number one-to-one correspondence be saved in shared data bank, execute Step T3, it is no to then follow the steps T3;
Step T3: the cloud speaker generates account, password is generated according to the key of preservation and account, by cloud sound-box device number, account Number and password generate and connection request and be sent to push server;
Step T4: after the push server receives connection request, verifying cloud speaker legitimacy, as legal, saves The currently corresponding context of cloud speaker and link information, execute step T5, otherwise return to refusal connection response to cloud speaker;
Step T5: the push server address where the corresponding long connection of cloud sound-box device number is sent to by the push server Cache server;
Step T6: after the cache server receives the push server address where the corresponding long connection of cloud sound-box device number It is saved, and is returned to push server and save successful information;
Step T7: the push server gives the return successful connection response of cloud speaker after receiving preservation successful information;
Step T8: the cloud speaker is sent according to the heart time in the configuration information to push server in during idle time Heartbeat packet safeguards long connection status.
4. method as claimed in claim 3, which is characterized in that verify, wrap to cloud speaker legitimacy in the step T4 Include: the push server obtains in the shared data bank corresponding close according to the cloud sound-box device number in connection request Key generates password according to the account in the key and connection request of acquisition, judges the password in the password and connection request that generate It is whether consistent, be it is then legal, it is otherwise illegal.
5. the method as described in claim 1, which is characterized in that the message server in the step S1 connects according to casting Mouthful Verification broadcast operation legitimacy, comprising: the message server judge casting interface parameter length whether It is legal, judge merchant number or cloud sound-box device number, the equipment shape according to cloud speaker whether are saved in the shared data bank State judges whether cloud speaker can be used, and broadcast operation is legal if judgement is to be, otherwise illegal.
6. the method as described in claim 1, which is characterized in that it include cloud sound-box device number in the parameter of the casting interface, The step S3 specifically: whether the message server judges to have in push server connects corresponding to the long of cloud sound-box device number Information is connect, is that will then execute step S4, otherwise sets off-line state for the state of current casting information.
7. the method as described in claim 1, which is characterized in that it further include merchant number in the parameter of the casting interface, institute Stating after step S3 is judged as YES can also include: that the message server binds trade company and cloud speaker.
8. the method for claim 7, which is characterized in that described trade company and cloud speaker are carried out binding includes: when described When message server detects that binding interface is called, the message server carries out merchant number and cloud sound-box device number pair It should bind, and return to binding result.
9. the method as described in claim 1, which is characterized in that it include merchant number in the parameter of the casting interface, it is described Step S3 specifically: the message server searches corresponding cloud sound-box device number according to merchant number, such as finds judgement push Whether there is the long link information corresponding to cloud sound-box device number in server, is that will then execute step S4, otherwise will currently broadcast The state of information is set as off-line state.
10. the method as described in claim 1, which is characterized in that after the step S7 further include:
Step S8: the push server is according to the state of the current casting information of the casting result more new record received and broadcasts It calls time.
11. method as claimed in claim 10, which is characterized in that before the step S8 further include: the push server Whether judgement receives casting as a result, as received within a preset time, judges to broadcast whether result is to have broadcasted, is to execute Otherwise S8 reports an error, if do not received, judge that benefit pushes away whether number is greater than preset value, be to report an error, otherwise save casting message simultaneously It retransmits PUSH message and gives cloud speaker, update benefit and push away number, return step S7.
12. the method as described in claim 1, which is characterized in that before step S1 further include: when payment server receives When the payment request that terminal is sent, whether the payment server verifying payment request is legal, is then by paying in payment request Money side's account Payment Amount is transferred to a yard account of collecting money, by cloud sound-box device number, payment amount and the payment method in payment request The casting interface that Internet of Things platform is called as parameter, otherwise reports an error.
13. a kind of system for realizing the work of cloud speaker, which is characterized in that include Internet of Things platform and cloud speaker, the Internet of Things platform Including message server, push server and cache server,
The message server includes:
Judgment module is detected, for when detecting that casting interface is called, according to the Verification broadcast operation of casting interface Legitimacy, if legal trigger first obtain module, otherwise by casting interface return error message;
Described first obtains module, obtains from cache server for the cloud sound-box device number in the parameter according to casting interface The push server address of corresponding long connection;
Setup module is judged, for judging Push Service corresponding with the push server address of the first acquisition module acquisition Whether there is corresponding long link information in device, be to trigger the first sending module, otherwise the state of current casting information is arranged For off-line state;
First sending module for the payment amount in the parameter according to the cloud sound-box device number, casting interface and is paid Money mode generates PUSH message and is sent to push server corresponding with the push server address;
The cache server, for saving push server address;
The push server includes:
Judgment module is received, the PUSH message sent for receiving the message server, according to the cloud speaker in PUSH message Device number judges corresponding long link information and context whether are preserved in the push server, is to trigger generation to send Otherwise module returns to error message to the message server;
The generation sending module, for by PUSH message payment amount and payment method generate casting and information and be sent to Cloud speaker corresponding to the cloud sound-box device number;
First receiving module, the casting result returned for receiving the cloud speaker;
The cloud speaker includes:
Sending module is received, for receiving the casting information of the push server, casting result is sent to the push and is taken Business device;
Broadcasting module is parsed, for parsing the casting information that receives of reception sending module and being broadcast according to sound template Report obtains the casting result.
14. system as claimed in claim 13, which is characterized in that the cloud speaker further include: first establishes module, is used for institute It states and cloud speaker and the push server is established into connection;
The push server further include: second establishes module, connects for establishing the push server and the cloud speaker It connects.
15. system as claimed in claim 14, which is characterized in that described first, which establishes module, includes:
It checks prompt unit, is that triggering first obtains for checking whether the cloud speaker networks after cloud speaker booting Unit is taken, network failure is otherwise prompted;
The first acquisition unit, for obtaining corresponding bank from shared data bank according to the cloud sound-box device number of preservation Sound template and configuration information;
Judge storage unit, for judging whether the cloud speaker networks for the first time, be then with configuration server arranging key, and The key consulted is saved, triggering generates transmission unit, and otherwise triggering generates transmission unit;
The generation transmission unit generates password according to the key of preservation and the account, cloud speaker is set for generating account Standby number, account and password generate connection request and are sent to push server;
Maintenance unit is sent, it is interior according to during idle time after receiving push server transmission successful connection response Heart time in configuration information sends heartbeat packet to push server, safeguards long connection status;
The Internet of Things platform further include: configuration server, for the cloud speaker hold consultation key and by what is consulted it is close Key and cloud sound-box device number one-to-one correspondence are saved in shared data bank;
Described second establishes module, comprising:
Storage unit is verified, for being verified to cloud speaker legitimacy after the push server receives connection request, As legal, the corresponding context of current cloud speaker and link information are saved, the first transmission unit is triggered, is otherwise returned to cloud speaker Return refusal connection response;
First transmission unit, for the push server address where the corresponding long connection of cloud sound-box device number to be sent to Cache server;
The reception return unit, for giving cloud speaker return company after receiving the preservation successful information that the cache server returns Connect success response;
The cache server is also used to the push server address where receiving the corresponding long connection of cloud sound-box device number It is corresponded to cloud sound-box device number afterwards to save, and is returned to the push server and saves successful information.
16. system as claimed in claim 15, which is characterized in that the verifying storage unit is specifically used for according to connection request In cloud sound-box device number corresponding key is obtained in the shared data bank, according in the key and connection request of acquisition Account generates password, judges whether the password generated is consistent with the password in connection request, is to save current cloud speaker to correspond to Context and link information, trigger the first transmission unit, otherwise to cloud speaker return refusal connection response.
17. system as claimed in claim 13, which is characterized in that the detection judgment module, which is specifically used for working as, detects casting When interface is called, judges whether the length of the parameter of the casting interface is legal, judges whether protect in the shared data bank It deposited merchant number or cloud sound-box device number, judged whether cloud speaker can be used according to the equipment state of cloud speaker, as judgement is It is that then triggering first obtains module, error message is otherwise returned to by casting interface.
18. system as claimed in claim 13, which is characterized in that the judgement setup module is specifically used for judging the push Whether there is the long link information corresponding to cloud sound-box device number in server, is to trigger the first sending module, it otherwise will be current The state of casting information is set as off-line state.
19. system as claimed in claim 13, which is characterized in that it further include merchant number in the parameter of the casting interface, The message server further include: the first binding module, for when the judgement setup module is judged as YES, by trade company and cloud Speaker is bound.
20. system as claimed in claim 19, which is characterized in that first binding module, which is specifically used for working as, detects binding When interface is called, merchant number is subjected to corresponding binding with cloud sound-box device number, and return to binding result.
21. system as claimed in claim 13, which is characterized in that include merchant number, institute in the parameter of the casting interface It states and judges that setup module is specifically used for judging Push Service if found according to the corresponding cloud sound-box device number of merchant number lookup Whether there is the long link information corresponding to cloud sound-box device number in device, is to trigger the first sending module, otherwise will currently broadcast The state of information is set as off-line state.
22. system as claimed in claim 13, which is characterized in that the push server further include:
Update module, the current casting information of the casting result more new record for being received according to first receiving module State and casting time.
23. the system as claimed in claim 22, which is characterized in that the push server further include:
First judgment module, for judging whether first receiving module receives casting as a result, as received within a preset time To then judge broadcast result whether be to have broadcasted, be to trigger the update module, otherwise report an error;If do not received, judge that benefit pushes away Whether number is greater than preset value, is, reports an error, and otherwise saves casting message and retransmits PUSH message and give cloud speaker, updates and mend Number is pushed away, the reception sending module is triggered.
24. system as claimed in claim 13, which is characterized in that further include: payment server, for receiving terminal transmission Payment request, and whether legal, be to be transferred to the paying party account Payment Amount in payment request if verifying the payment request It collects money a yard account, calls Internet of Things platform for cloud sound-box device number, payment amount and the payment method in payment request as parameter Casting interface, otherwise report an error.
CN201910577665.1A 2019-06-28 2019-06-28 Method and system for realizing work of cloud sound box Active CN110351349B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910577665.1A CN110351349B (en) 2019-06-28 2019-06-28 Method and system for realizing work of cloud sound box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910577665.1A CN110351349B (en) 2019-06-28 2019-06-28 Method and system for realizing work of cloud sound box

Publications (2)

Publication Number Publication Date
CN110351349A true CN110351349A (en) 2019-10-18
CN110351349B CN110351349B (en) 2021-09-28

Family

ID=68176866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910577665.1A Active CN110351349B (en) 2019-06-28 2019-06-28 Method and system for realizing work of cloud sound box

Country Status (1)

Country Link
CN (1) CN110351349B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111027955A (en) * 2019-10-24 2020-04-17 艾体威尔电子技术(北京)有限公司 Cloud horn service platform and use method thereof
CN111178870A (en) * 2019-11-19 2020-05-19 广东小天才科技有限公司 Payment processing method and sound box equipment
CN112040067A (en) * 2020-11-06 2020-12-04 南京研利科技有限公司 Method, electronic device, and medium for audio playing of messages
CN113395315A (en) * 2021-02-23 2021-09-14 福建创识科技股份有限公司 Message broadcasting method, cloud sound box and cloud pushing platform
CN114501232A (en) * 2022-01-20 2022-05-13 福建慧捷通科技有限公司 Method and device for improving standby time of cloud broadcast sound box

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140156788A1 (en) * 2012-12-05 2014-06-05 Microsoft Corporation Persistent Connection between Network Devices
US20150170136A1 (en) * 2013-12-18 2015-06-18 PayRange Inc. Method and System for Performing Mobile Device-To-Machine Payments
CN105897550A (en) * 2015-12-23 2016-08-24 乐视致新电子科技(天津)有限公司 Off-line message pushing method and device
CN107423974A (en) * 2017-08-15 2017-12-01 阿里巴巴集团控股有限公司 Intellectual broadcast method and apparatus
CN107480965A (en) * 2017-09-07 2017-12-15 阿里巴巴集团控股有限公司 Information-pushing method and device under line
CN108055653A (en) * 2017-12-27 2018-05-18 深圳市阿乐卡科技有限公司 cloud broadcasting method and system
CN109087468A (en) * 2018-07-03 2018-12-25 阿里巴巴集团控股有限公司 A kind of aobvious code casting equipment, account binding and payment transaction processing method and processing device
CN109348521A (en) * 2018-09-30 2019-02-15 百度在线网络技术(北京)有限公司 Distribution method, apparatus, equipment and the computer-readable medium of smart machine

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140156788A1 (en) * 2012-12-05 2014-06-05 Microsoft Corporation Persistent Connection between Network Devices
US20150170136A1 (en) * 2013-12-18 2015-06-18 PayRange Inc. Method and System for Performing Mobile Device-To-Machine Payments
CN105897550A (en) * 2015-12-23 2016-08-24 乐视致新电子科技(天津)有限公司 Off-line message pushing method and device
CN107423974A (en) * 2017-08-15 2017-12-01 阿里巴巴集团控股有限公司 Intellectual broadcast method and apparatus
CN107480965A (en) * 2017-09-07 2017-12-15 阿里巴巴集团控股有限公司 Information-pushing method and device under line
CN108055653A (en) * 2017-12-27 2018-05-18 深圳市阿乐卡科技有限公司 cloud broadcasting method and system
CN109087468A (en) * 2018-07-03 2018-12-25 阿里巴巴集团控股有限公司 A kind of aobvious code casting equipment, account binding and payment transaction processing method and processing device
CN109348521A (en) * 2018-09-30 2019-02-15 百度在线网络技术(北京)有限公司 Distribution method, apparatus, equipment and the computer-readable medium of smart machine

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JIN YEONG TAN,PIN JERN KER,DINEIS MANI,PUVANESAN ARUMUGAM: ""Development of a GPS-based highway toll collection system"", 《2016 6TH IEEE INTERNATIONAL CONFERENCE ON CONTROL SYSTEM, COMPUTING》 *
谭华,林克: ""物联网热点技术及应用发展分析"", 《移动通信》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111027955A (en) * 2019-10-24 2020-04-17 艾体威尔电子技术(北京)有限公司 Cloud horn service platform and use method thereof
CN111178870A (en) * 2019-11-19 2020-05-19 广东小天才科技有限公司 Payment processing method and sound box equipment
CN112040067A (en) * 2020-11-06 2020-12-04 南京研利科技有限公司 Method, electronic device, and medium for audio playing of messages
CN113395315A (en) * 2021-02-23 2021-09-14 福建创识科技股份有限公司 Message broadcasting method, cloud sound box and cloud pushing platform
CN113395315B (en) * 2021-02-23 2024-04-05 福建创识科技股份有限公司 Message broadcasting method, cloud loudspeaker box and cloud pushing platform
CN114501232A (en) * 2022-01-20 2022-05-13 福建慧捷通科技有限公司 Method and device for improving standby time of cloud broadcast sound box

Also Published As

Publication number Publication date
CN110351349B (en) 2021-09-28

Similar Documents

Publication Publication Date Title
CN110351349A (en) A kind of method and system for realizing the work of cloud speaker
US7702581B2 (en) Method and system for initiating and/or conducting a transaction that is associated with at least two corresponding declarations of intent
JP5144514B2 (en) Mobile account management
US20090006254A1 (en) Virtual prepaid or credit card and process and system for providing same and for electronic payments
JP2009543493A (en) Customer identification and authentication procedure for online internet payment using mobile phone
CN102880959A (en) Quick internet payment method and system
CN103020820A (en) Transaction payment method and system
CN103246977A (en) Method for sending and receiving TV payment information
KR20040037074A (en) Financial transaction system and method using electronic messaging
CN105814591A (en) Verification information transmission method and terminal
KR20120068759A (en) Transaction system and method
CN104221408B (en) The system and method for misuse abuse of emergency calling is prevented using smart mobile phone
CN104702644B (en) Information transmitting methods, device and logistics information server
CN104683966A (en) Payment service processing method and system
CN101751627A (en) Bank card payment system and corresponding payment method used for non-face-to-face payment
US20110246360A1 (en) Money Transfer Using Cellular Networks
CN101976403A (en) Phone number payment platform, payment trading system and method thereof
CN101998225A (en) Method, system and device for realizing user terminal service
CN102208069A (en) Bank online payment system of confirmation by using mobile phone as another way and method thereof
CN103701762B (en) Security information interaction system, equipment and method
CN102270326A (en) Authentication charging system and method based on intelligent network payment value added service
CN114449520A (en) Remote acquisition method and device for bank flow
CN101789150B (en) Method for implementing Push Money from mobile phone or Internet to electronic purse of mobile phone
CN116436967A (en) Secure payment confirmation method and device
KR20160080102A (en) Method for Processing Settlement by using Program Installing Handheld Phone

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
GR01 Patent grant
GR01 Patent grant