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

WO2021233262A1 - Communication control - Google Patents

Communication control Download PDF

Info

Publication number
WO2021233262A1
WO2021233262A1 PCT/CN2021/094184 CN2021094184W WO2021233262A1 WO 2021233262 A1 WO2021233262 A1 WO 2021233262A1 CN 2021094184 W CN2021094184 W CN 2021094184W WO 2021233262 A1 WO2021233262 A1 WO 2021233262A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
network
server
channel
short message
Prior art date
Application number
PCT/CN2021/094184
Other languages
French (fr)
Chinese (zh)
Inventor
张旺明
徐斌
李冲
林玉山
陈志阁
付雅文
阴永俊
Original Assignee
北京三快在线科技有限公司
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 北京三快在线科技有限公司 filed Critical 北京三快在线科技有限公司
Publication of WO2021233262A1 publication Critical patent/WO2021233262A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • H04W36/305Handover due to radio link failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/18Management of setup rejection or failure

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular to a communication control.
  • the embodiments of the present application provide a communication control method, device, equipment, and computer-readable storage medium, which can be used to solve problems in related technologies.
  • the technical scheme is as follows:
  • an embodiment of the present application provides a communication control method, which is applied to a server, and the server and a client communicate through a network connection, and a plurality of link channels are established between the client and the server, and the method includes :
  • Detect whether the client has a network failure according to the client's network connection in response to the client's network failure, determine the client's network failure type; according to the network failure type, select from the multiple link channels The target link channel matching the network fault type; communicate with the client based on the target link channel.
  • the multiple link channels include HTTP hypertext transfer protocol short link channels, TCP transmission control protocol long link channels, and short message channels; according to the type of network failure, from the multiple Selecting a target link channel matching the network fault type from among the link channels includes: in response to the network fault type being that the network signal does not meet the requirements, using the short message channel as a target matching the network fault type Link channel.
  • the communicating with the client terminal based on the target link channel includes: obtaining a short message message by monitoring the short message channel, and the content of the short message message includes order information; The short message message is parsed to obtain the order information; the order information is transformed into a graphical interface, which includes operation instruction buttons; the graphical interface is sent to the client, and the client displays The graphic interface returns a corresponding operation instruction based on the operation instruction button; sends an updated graphic interface to the client according to the operation instruction, and the updated graphic interface includes order information corresponding to the operation instruction .
  • the communicating with the client based on the target link channel includes: sending a short message message to the client through the short message channel, and the content of the short message message includes an order Information; receiving the interactive instruction code returned by the client based on the order information, the interactive instruction code is used to indicate the corresponding interactive instruction; according to the interactive instruction code through the short message channel to return a new to the client A short message message.
  • the content of the new short message message includes order information corresponding to the interaction instruction code.
  • the method before communicating with the client based on the target link channel, the method further includes: receiving a request for opening a short message channel sent by the client; and according to the opening short message The channel requests to send the SMS verification code to the client; receives the SMS verification code returned by the client; in response to the SMS verification code returned by the client being consistent with the SMS verification code sent by the server, it is the client Open the short message channel.
  • the detecting whether the client has a network failure according to the network connection status of the client includes: determining the operator network used by the client, and according to the network connection status of the client Determine the network connection success rate of the operator network in the target time period; in response to the network connection success rate of the operator network in the target time period being less than the success rate threshold, determine that the client has a network failure.
  • the determining the type of network failure of the client includes: sending a network diagnosis instruction to the client, the network diagnosis instruction being used to instruct the client to feed back network-related information, so
  • the network-related information includes at least one of the basic information of the client, device information, network information, network connection information, and interface check information; the network-related information fed back by the client is received, and the network-related information is determined according to the network-related information. Describe the type of network failure of the client.
  • the selecting a target link channel matching the network failure type from the multiple link channels according to the network failure type further includes: responding to the network failure The type is that the network signal meets the requirements, but hijacking or network link failure occurs, select a target link channel matching the network failure type from the multiple link channels in any of the following ways; obtain the HTTP The connection success rate of the short link channel and the connection success rate of the TCP long link channel, using the channel with the highest connection success rate among the HTTP short link channel and the TCP long link channel as the target link channel; or, The TCP long link channel is used as the target link channel, and in response to the client's failure to communicate with the server through the TCP long link channel, the target link channel is connected to the TCP long link channel. The channel is switched to the HTTP short link channel.
  • an embodiment of the present application provides a communication control method, which is applied to a client, and the client and the server are in communication connection through a network, and multiple link channels are established between the client and the server.
  • the communicating with the server based on the target link channel includes: receiving a graphical interface sent by the server, and displaying the graphical interface, the graphical interface including order information And an operation instruction button; obtain a corresponding operation instruction based on the operation instruction button; send the operation instruction to the server; receive an updated graphical interface sent by the server based on the operation instruction, on the updated graphical interface Including the order information corresponding to the operation instruction; displaying the updated graphical interface.
  • the communicating with the client based on the target link channel includes: receiving a short message message sent by the server, the content of the short message message includes order information; and displaying the Order information, based on the order information to obtain the input interaction instruction code, the interaction instruction code is used to indicate the corresponding interaction instruction; return the interaction instruction code to the server; receive the server returns according to the interaction instruction code
  • the content of the new short message message includes the order information corresponding to the interaction instruction code; the new short message message is displayed.
  • the method before communicating with the client based on the target link channel, the method further includes: sending a request for opening a short message channel to the server, and receiving a short message sent by the server Verification code: Obtain the entered SMS verification code through the verification interface, return the entered SMS verification code to the server, and the server will open the SMS channel based on the entered SMS verification code.
  • an embodiment of the present application provides a communication control device, which is applied to a server, the server and a client communicate through a network, and multiple link channels are established between the client and the server, and the device includes:
  • the detection module is used to detect whether the client has a network failure according to the network connection status of the client;
  • the determining module is used to determine the type of network failure of the client in response to a network failure of the client;
  • the selection module is used to select a target link channel matching the network failure type from the multiple link channels according to the network failure type;
  • the communication module is used to communicate with the client based on the target link channel.
  • the multiple link channels include an HTTP hypertext transfer protocol short link channel, a TCP transmission control protocol long link channel, and a short message channel
  • the selection module is configured to respond to the network failure
  • the type is that the network signal does not meet the requirements, and the short message channel is used as the target link channel that matches the network fault type.
  • the communication module is configured to obtain an SMS message by monitoring the SMS channel, and the content of the SMS message includes order information; parse the SMS message to obtain the order information; Transform the order information into a graphical interface, the graphical interface includes an operation instruction button; send the graphical interface to the client, the client displays the graphical interface, and returns based on the operation instruction button Corresponding operating instructions; sending an updated graphical interface to the client according to the operating instructions, and the updated graphical interface includes order information corresponding to the operating instructions.
  • the communication module is configured to send a short message message to the client through the short message channel, and the content of the short message message includes order information; receiving the client based on the order information
  • the returned interaction instruction code the interaction instruction code is used to indicate the corresponding interaction instruction; according to the interaction instruction code, a new short message message is returned to the client through the short message channel, and the content of the new short message message includes Order information corresponding to the interactive instruction code.
  • the device further includes:
  • the receiving module is used to receive the SMS channel opening request sent by the client;
  • a sending module configured to send an SMS verification code to the client according to the SMS channel opening request
  • the receiving module is also used to receive the SMS verification code returned by the client;
  • the activation module is used for opening the SMS channel for the client in response to that the SMS verification code returned by the client is consistent with the SMS verification code sent by the server.
  • the detection module determines the operator network used by the client, and determines the network connection success rate of the operator's network in the target time period according to the network connection status of the client; In response to the network connection success rate of the operator's network in the target time period being less than the success rate threshold, it is determined that the client has a network failure.
  • the determining module is configured to send a network diagnostic instruction to the client, and the network diagnostic instruction is used to instruct the client to feed back network-related information, and the network-related information includes all At least one of the basic information, device information, network information, network connection information, and interface check information of the client; receiving network-related information fed back by the client, and determining the type of network failure of the client according to the network-related information .
  • the selection module is further configured to respond to the network fault type being that the network signal meets the requirements, but hijacking or network link failure occurs, from the multiple Select the target link channel matching the network fault type among the two link channels; obtain the connection success rate of the HTTP short link channel and the connection success rate of the TCP long link channel, and combine the HTTP short link channel and The channel with a high connection success rate in the TCP long link channel is used as the target link channel; or, the TCP long link channel is used as the target link channel, in response to the client failing to pass the TCP The long link channel communicates with the server, and the target link channel is switched from the TCP long link channel to the HTTP short link channel.
  • an embodiment of the present application provides a communication control device, which is applied to a client, and the client and the server are in communication connection through a network, and multiple link channels are established between the client and the server, and the device includes :
  • the sending module is used to send the network connection status to the server, and the server determines the target link channel based on the network connection status;
  • the communication module is used to communicate with the server based on the target link channel.
  • the communication module is configured to receive a graphical interface sent by the server, and display the graphical interface.
  • the graphical interface includes order information and operation instruction buttons; based on the operation instruction buttons Obtain a corresponding operation instruction; send the operation instruction to the server; receive an updated graphical interface sent by the server based on the operation instruction, the updated graphical interface including order information corresponding to the operation instruction; The updated graphical interface is displayed.
  • the communication module is configured to receive a short message message sent by the server, the content of the short message message includes order information; display the order information, and obtain the input interaction based on the order information Instruction code, the interaction instruction code is used to indicate a corresponding interaction instruction; return the interaction instruction code to the server; receive a new short message message returned by the server according to the interaction instruction code, the new short message message
  • the content includes the order information corresponding to the interactive instruction code; the new short message message is displayed.
  • the device also includes: a receiving module for receiving a short message verification code sent by the server;
  • the sending module is further configured to obtain the entered short message verification code through the verification interface, and return the entered short message verification code to the server, and the server opens a short message channel based on the entered short message verification code.
  • a server in one aspect, includes a processor and a memory, and at least one piece of program code is stored in the memory, and the at least one piece of program code is loaded and executed by the processor, so as to realize any of the above-mentioned possibilities of being applied to the server.
  • the communication control method provided by the implementation mode.
  • a client in one aspect, includes a processor and a memory, and at least one piece of program code is stored in the memory.
  • Communication control method provided by one possible implementation.
  • a computer-readable storage medium stores at least one piece of program code, and the at least one piece of program code is loaded and executed by a processor to implement any one of the above-mentioned communication control methods.
  • the technical solution provided by the embodiments of the present application determines the type of network failure of the client based on the network connection of the client after detecting the network failure of the client, so that the determination of the type of network failure of the client is more accurate.
  • a number of link channels are established between them, and the client communicates with the client based on the target link channel that matches the network fault type, so that the success rate of communication between the client and the server can be improved.
  • FIG. 1 is a schematic diagram of an implementation environment of a communication control method provided by an embodiment of the present application
  • FIG. 2 is a flowchart of a communication control method provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of determining the success rate of a network connection provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a network diagnosis system provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of network-related information of a client provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a process of opening a short message channel provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a client and a server using SMS messages to communicate according to an embodiment of the present application
  • FIG. 8 is a schematic diagram of a graphical interface of a short message channel provided by an embodiment of the present application.
  • FIG. 9 is a flowchart of a communication control method provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a communication control device provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a communication control device provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • a client application is installed and running in a computer device, and the client can communicate with the server.
  • the client is a takeaway client.
  • the client can communicate with the server to make the delivery process of the takeaway order transparent, so that the user can view the takeaway order in real time.
  • privacy protection for the key information of the rider and the user, such as the mobile phone number and user name of the rider and the user.
  • FIG. 1 is a schematic diagram of an implementation environment of a communication control method provided by an embodiment of the present application. As shown in FIG. 1, the implementation environment includes a server 101 and a terminal 102.
  • the server 101 may be one server or a server cluster composed of multiple servers.
  • the server 101 may be at least one of a cloud computing platform and a virtualization center, which is not limited in the embodiment of the present application.
  • the server 101 is connected to the terminal 102 through a wired network or a wireless network, and a client is installed and running on the terminal 102.
  • the terminal 102 may be a mobile terminal.
  • the server 101 is configured to detect whether the client has a network failure according to the network connection status of the client, and in response to the network failure of the client, determine the type of the network failure of the client.
  • the server 101 is also configured to select a target link channel matching the network failure type from multiple link channels according to the network failure type of the client.
  • the server 101 may also communicate with the client based on the target link channel.
  • the server 101 may also include other functional servers to provide more comprehensive and diversified services.
  • the terminal 102 can be a smart phone, a game console, a desktop computer, a tablet computer, an MP3 (Moving Picture Experts Group Audio Layer III, a moving picture expert compression standard audio layer 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, a moving picture Expert compression standard audio level 4) At least one of player and laptop computer.
  • the terminal 102 has a client installed and running.
  • the terminal 102 is configured to receive the network diagnosis instruction sent by the server, and the terminal 102 obtains the network related information of the client according to the network diagnosis instruction.
  • the terminal 102 is also used to feed back the network-related information to the server 101, so that the server 101 can determine the type of network failure of the client according to the network-related information.
  • the terminal 102 may also communicate with the server 101 based on the target link channel determined by the server 101.
  • an embodiment of the application provides a communication control method. Taking the flowchart of the communication control method provided in the embodiment of the application shown in FIG. 2 as an example, the method can be performed with the client in FIG. 1
  • the communication server 101 executes. There are multiple link channels established between the client and the server. As shown in Figure 2, the method includes the following steps:
  • step 201 it is detected whether the client has a network failure according to the network connection status of the client.
  • a client is installed and running in the terminal.
  • the client may be a take-out client or another type of client.
  • the embodiment of the present application does not limit the type of the client.
  • the server can communicate with the client, and the server can detect whether the client has a network failure according to the network connection of the client, including the following steps:
  • Step 2011 Determine the operator network used by the client, and determine the network connection success rate of the operator's network in the target time period according to the network connection status of the client.
  • the server may obtain the operator network used by the client, and based on the operator network, determine the network connection success rate of the operator network in the target time period.
  • the server may determine the network connection success rate of the operator's network in the target time period based on the following method: the server stores a network monitoring system, and the network monitoring system is used to monitor the operation of the client For the network connection status of the business network, enter the target time period in the network monitoring system, so that the network connection success rate of the operator’s network in the target time period can be obtained.
  • the operator network used by the client is the first operator network.
  • the start time is 00:00 on December 20, 2019, and the end time is It is 23:00 on December 20, 2019.
  • the network monitoring system determines the success rate of the client's network connection in the target time period based on the target time period.
  • FIG. 3 is a schematic diagram of determining the success rate of a network connection provided by an embodiment of the application.
  • the network connection success rate of the first operator during the time period from 00:00 on December 20, 2019 to 23:00 on December 20, 2019 is 85%.
  • the network monitoring system counts the network connection success rate of each time unit.
  • the network connection success rate of the time unit is taken as the network connection success rate of the target time period.
  • the network connection success rate of each time unit may be weighted and summed, and the result of the weighted summation may be used as the network connection success rate of the target time period.
  • the weights corresponding to the network connection success rates of different units may be the same or different. This embodiment does not limit the duration of the time unit, and the duration of the time unit is, for example, 5 minutes.
  • the start time of the target time period entered in the network monitoring system is 23:00, December 20, 2019, and the end time of the target time period is 23:10, December 20, 219
  • the network monitoring system determines the first network connection success rate for the time unit from 23:00 on December 20, 2019 to 23:05 on December 20, 2019, and determines the success rate of the first network connection from 23:05 on December 20, 2019 to December 2019
  • the second network connection success rate in the time unit of 23:10 on the 20th and then the weighted sum of the first network connection success rate and the second network connection success rate can get the target time period, which is December 2019
  • the first network connection success rate is 80%
  • the corresponding weight is 0.5
  • the second network connection success rate is 100%
  • the corresponding weight is 0.5
  • the network connection success rate in the target time period is 90%.
  • target time period can be any time period, which is not limited in the embodiment of the present application.
  • Step 2012 Determine whether the client has a network failure based on the network connection success rate of the operator's network in the target time period.
  • Case 1 In response to the network connection success rate of the operator's network in the target time period being less than the success rate threshold, it is determined that the client has a network failure.
  • the network connection success rate of the operator's network within the target time period is 85%, and the success rate threshold is 90%, it is determined that the client has a network failure.
  • Case 2 In response to the network connection success rate of the operator's network within the target time period being not less than the success rate threshold, it is determined that the client has no network failure.
  • the network connection success rate of the operator's network in the target time period is 95%, and the success rate threshold is 90%, it is determined that the client has no network failure.
  • the above-mentioned success rate threshold may be set based on experience, or may be adjusted according to application scenarios, which is not limited in the embodiment of the present application.
  • step 202 in response to a network failure of the client, the type of the network failure of the client is determined.
  • the following steps may be taken to determine the type of the client's network failure.
  • Step 2021 Send a network diagnosis instruction to the client.
  • the network diagnosis instruction is used to instruct the client to feed back network-related information.
  • the network-related information includes basic information, device information, network information, network connection information, and interface check information of the client. At least one.
  • the server in response to a network failure of the client, sends a network diagnosis instruction to the client.
  • the client receives the network diagnosis instruction, obtains network related information of the client based on the network diagnosis instruction, sends the network related information of the client to the server, and the server determines the type of network failure of the client based on the network related information.
  • the client receives the network diagnosis instruction, and based on the network diagnosis instruction, the process of obtaining the client's network-related information may be as follows: a network diagnosis system is stored in the terminal, and the network diagnosis system is used to obtain the The network-related information of the client.
  • the client terminal obtains the network related information of the client terminal based on the network diagnosis system.
  • the structural diagram of the network diagnosis system is shown in Figure 4.
  • the administrator of the server selects a region or client in the background, performs service management based on the client, and generates Push (instruction channel) by controlling the frequency of calling , Send a network diagnosis item to the client, the client diagnoses based on the network diagnosis item, and reports the diagnosis result to the server of the client.
  • the server of the client reports the diagnosis data (that is, network-related information) to the servicing transaction terminal,
  • the diagnostic data is written into the DB (Date Base) database, and the diagnostic data is stored in the service (management end) so that the administrator can view the diagnostic data.
  • Figure 5 shows a schematic diagram of the client's network-related information.
  • Figure 5 includes basic information, device information, network information, network connection information, and interface check information.
  • the basic information includes user ID, user mobile phone number, user city, client type, client version, inspection time and inspection time.
  • Device information includes terminal brand, terminal system model, terminal content capacity, terminal storage capacity, terminal device ID, and terminal device number.
  • Network information includes network type, network operator, network IP (Internet Protocol) address, and network DNS (Domain Name System, domain name server) address.
  • Network connection information includes domain name, domain name IP, number of transmissions, packet loss rate, maximum RIT, minimum RIT, average RIT, and TTL (Time To Live) value.
  • Interface inspection information includes Native (local) interface inspection information, Https (Hyper Text Transfer Protocol over Secure Socket Layer, Hypertext Transfer Protocol on the Secure Socket layer) interface inspection information and Html (Hyper Text Markup Language, Hypertext Markup Language) interface Check the information.
  • Native interface check information includes URL (Uniform Resource Locator) address, status, request speed, request time and content length.
  • URL Uniform Resource Locator
  • the information included in the Https interface check information and the Html interface check information is consistent with the information included in the Native interface check information.
  • the various information involved in the foregoing description are only examples, and the network-related information in the embodiments of the present application includes, but is not limited to, the various information in the foregoing examples.
  • Step 2022 Receive network-related information fed back by the client, and determine the type of network failure of the client according to the network-related information.
  • the server receives network-related information fed back by the client, and determines the type of network failure of the client according to the network-related information.
  • the network fault types include but are not limited to two types, namely the first fault type and the second fault type.
  • the network information of the first failure type meets the requirements, but hijacking or network link failure occurs, and the network signal of the second failure type does not meet the requirements.
  • the first failure type may be that the network information meets the requirements, but domain name hijacking (that is, DNS hijacking), link hijacking, DNS failure, parameter tampering, return value hijacking, long link failure, etc. occur.
  • domain name hijacking is a method of attacking the domain name resolution server or forging the domain name resolution server to resolve the domain name of the target website to the wrong IP address, so that the user cannot access the target website.
  • Link hijacking is to maliciously add devices or control network devices between the server and the client, causing the client's data or the server's data to be maliciously monitored.
  • the network signal of the second fault type does not meet the requirements, including but not limited to the second fault type being that the network signal is weak and there is no network signal.
  • a weak network signal may be a bad 3G or 4G network signal.
  • the network signal strength does not reach the strength threshold, the network signal is considered to be weak.
  • No network signal may mean that the client cannot connect to the network, for example, the client is a 2G network.
  • the first fault type and the second fault type may also include other network faults.
  • the embodiment of the present application only uses the network fault shown above as an example for illustration, and does not describe the network included in the first fault type and the second fault type. The fault is limited.
  • a target link channel matching the type of the network failure is selected from a plurality of link channels.
  • multiple link channels include HTTP (Hyper Text Transfer Protocol) short link channel, TCP (Transmission Control Protocol, transmission control protocol) long link channel and SMS channel.
  • HTTP Hyper Text Transfer Protocol
  • TCP Transmission Control Protocol, transmission control protocol
  • SMS channel SMS channel.
  • communicating with the server through the http protocol is a common communication method for the client. It is accessed through a domain name, and the network link is through a public network. It will happen that users in a certain area cannot access the domain name normally. The cause may be The quality of the Internet network link is poor, or the link is hijacked.
  • the method provided in the embodiments of the present application finds that the domain name cannot be accessed normally, and switches the operator network entry in the region where the domain name is located, that is, the IP address that the domain name resolves to respond to, so as to quickly solve the problem.
  • the httpDNS scheme may not be used in the method.
  • the server may select a target link channel matching the network failure from a plurality of link channels based on the type of the network failure of the client.
  • one of the HTTP short link channel and the TCP long link channel is selected as the target link channel.
  • Implementation method 1 Obtain the connection success rate of the HTTP short link channel and the connection success rate of the TCP long link channel, and use the channel with the highest connection success rate in the HTTP short link channel and the TCP long link channel as the target link channel.
  • the server can collect the connection status of the HTTP short link channel and the TCP long link channel, and obtain the connection success rate of the HTTP short link channel and the connection success rate of the TCP long link channel based on this.
  • the communication success rate between the client and the server can be further guaranteed.
  • Implementation mode 2 First, the TCP long link channel is used as the target link channel, and the client communicates with the server based on the TCP long link channel. If the client cannot communicate with the server through the TCP long link channel, it switches to the HTTP short link channel, and the client communicates with the server based on the HTTP short link channel.
  • the link channel of the HTTP protocol is routed and forwarded multiple times through the public network before reaching the server. Because it is a public network, the stability is not very reliable. Such as DNS hijacking, link failure, link hijacking, data tampering and other issues. For these problems, the client can preferentially select the TCP long link channel as the target link channel. When the client sends an HTTP request, it will be encapsulated into a data packet, and the TCP protocol is used to transmit through a private dedicated network line. The data transmission is faster, more stable, and encrypted, thereby effectively avoiding the data transmission on the public network. Series of questions.
  • the SDK Software Development Kit, software development kit
  • this embodiment transmits data packets through a CIP (Common Industrial Protocol) channel.
  • the CIP channel includes but is not limited to TCP sub-channel, http sub-channel and UDP (User Datagram Protocol, user data packet protocol) Sub-channel.
  • the data packet can be encrypted and can be sent using TCP or UDP protocol.
  • the client prefers to use the TCP long link channel, but the TCP long link channel may fail and become unavailable. Therefore, the client also needs to reserve the HTTP short link channel to communicate with the server.
  • the switch link configuration sent by the sensing server to the client That is to say, the method provided by the embodiment of the present application can switch to the HTTP short link channel in time when the TCP long link channel is unavailable.
  • the short message channel in response to the network failure type being the second failure type, is used as the target link channel matching the network failure type.
  • the short message channel please refer to the description under step 204 below, and I will not repeat it here.
  • step 204 communication with the client is performed based on the target link channel.
  • the server when the target link channel is an HTTP short link channel, the server communicates with the client based on the HTTP short link channel.
  • the target link channel is a TCP long link channel
  • the server communicates with the client based on the TCP long link channel.
  • the target link channel is a short message channel
  • the server communicates with the client based on the short message channel.
  • the server when the server detects that the client's network has a network failure, and determines that the network failure of the client's network is the second failure type, that is, the client's network failure type is network
  • the server uses the short message channel as the target link channel matching the network fault type.
  • the server communicates with the client based on the short message channel, it also needs to determine whether the client has opened the short message channel. If the client has opened the short message channel, it will directly communicate with the client based on the short message channel. If the client does not open the short message channel, Then the server needs to open a short message channel for the client.
  • the process for the server to open the SMS channel for the client can be as follows: the client sends an SMS channel opening request to the server, the server receives the SMS channel opening request sent by the client, and sends the SMS channel to the client according to the SMS channel opening request.
  • the client sends the SMS verification code, and the client receives the SMS verification code sent by the server.
  • the client user enters the SMS verification code on the verification interface.
  • the client responds to the SMS verification code entered by the client user and returns the entered SMS verification code to the server ,
  • the server opens the SMS channel based on the entered SMS verification code.
  • the server receives the SMS verification code returned by the client, verifies the SMS verification code returned by the client, and responds that the SMS verification code returned by the client is consistent with the SMS verification code sent by the server, and opens an SMS channel for the client.
  • the SMS verification code can be a 4-digit SMS verification code or a 6-digit SMS verification code, or the number of digits of the SMS verification code can be longer or shorter. Be qualified.
  • the process of the server opening a short message channel for the client can be as shown in FIG. 6.
  • the server receives the SMS channel opening request sent by the client, and determines whether the client has opened the SMS channel based on the SMS channel opening message. If the client has opened the SMS channel, then the SMS channel is used as the target chain Road channel, based on the short message channel to communicate with the client. If the client terminal has not opened the SMS channel, the server performs verification based on the mobile phone number of the client user. If the verification fails, it means that the client user's mobile phone number is provided incorrectly.
  • the server sends an SMS verification code to the client.
  • the client receives the SMS verification code sent by the server
  • the client user enters the SMS verification code in the verification interface, and the server is based on the SMS entered by the client user
  • the verification code is consistent with the SMS verification code sent by the server
  • the SMS channel is opened for the client.
  • the request for opening a short message channel sent by the client may include a first reference code, such as KQ, and the server executes the steps shown in FIG. 6 according to the first reference code, thereby opening the short message channel for the client.
  • the first reference code is only an example, and this embodiment does not limit the code used to open the short message channel.
  • the server is based on the client’s network fault type as the second fault type, and the client has opened a short message channel, the server can communicate with the client through the short message channel, and the communication method can be from the server to the client.
  • the way to send SMS messages is based on the client’s network fault type as the second fault type, and the client has opened a short message channel, the server can communicate with the client through the short message channel, and the communication method can be from the server to the client. The way to send SMS messages.
  • the server detects that the client has opened an SMS channel based on the network fault type of the client as the second fault type, and the server can use the SMS channel to communicate to the client Send a short message message
  • the content of the short message message includes order information, that is, the method of sending a short message message to the client to notify the client that the user has a new takeaway order assigned.
  • the client user can also use SMS messages to complete the entire process of order receiving, delivery, and delivery.
  • the order information includes but is not limited to the status of the order, the delivery address corresponding to the order, the user information corresponding to the order, etc. The embodiment of the present application does not limit the content of the order information.
  • the client can also send the SMS message to the server in order to obtain the latest status of the order.
  • the SMS message sent by the client to the server may include a second reference code, such as HQ, and the server determines the current status of the order according to the second reference code, and returns the current status of the order to the client as the latest status of the order.
  • HQ a second reference code
  • the server determines the current status of the order according to the second reference code, and returns the current status of the order to the client as the latest status of the order.
  • the second reference code is only an example, and this embodiment does not limit the code used to obtain the latest status of the order.
  • the server may also receive an interaction instruction code returned by the client based on the order message, the interaction instruction code is used to indicate a corresponding interaction instruction, the interaction instruction code may be composed of an order number and an interaction instruction, wherein, the interactive instruction may be the first letter of the interactive instruction, and the order number may be the target number of digits in the order number, for example, it may be the last two digits of the order number.
  • the interactive instructions can include order acceptance, store arrival, meal retrieval, delivery, etc.
  • the order acceptance interaction instruction code is represented by JD
  • the shop interaction instruction code is denoted by DD
  • the meal retrieval interaction instruction code is denoted by QC
  • the delivery interaction instruction code is It is represented by SD.
  • the interactive instruction code can also have other expressions, which is not limited in the embodiment of the present application.
  • the server returns a new short message message to the client through the short message channel according to the interactive instruction code sent by the client, and the content of the new short message message includes order information corresponding to the interactive instruction code.
  • Figure 7 shows a schematic diagram of a client and a server communicating using SMS messages according to an embodiment of the application.
  • the order number is 23, and the client user sends an interactive command code 23QC to the server to query the Whether the order is successfully taken, the server receives the interactive instruction code sent by the client, generates a new short message message, and returns a new short message message to the client through the short message channel.
  • the content of the new short message message includes the order information of the 23rd order.
  • the client user can also send other interactive instruction codes to the server, which is not limited in the embodiment of the present application.
  • the client terminal receives a new short message message returned by the server according to the interactive instruction code, the content of the new short message message includes order information corresponding to the interactive instruction code, and the client terminal may also display the new short message message.
  • the short message channel is used as the target link channel, and based on the target link channel to communicate with the client, there may be the following steps 1 to 10.
  • Step 1 The server obtains an SMS message by monitoring the SMS channel, and the content of the SMS message includes order information.
  • the server monitors the SMS channel of the client, so that the SMS message in the SMS channel can be obtained.
  • Step 2 The server parses the short message to obtain the order information.
  • the server performs analysis based on the obtained short message content, so as to obtain the order information included in the short message message.
  • Step 3 The server converts the order information into a graphical interface, and the graphical interface includes operation instruction buttons.
  • Step 4 The server sends the graphical interface to the client, and the client displays the graphical interface, and returns the corresponding operation instruction based on the operation instruction button.
  • the server may directly send the graphical interface to the client after converting the order information into a graphical interface, and the client may display the graphical interface.
  • the client obtains the operation instruction corresponding to the operation instruction button, and the client sends the operation instruction to the server. That is, the server receives the operation instruction corresponding to the operation instruction button returned by the client.
  • Step 5 The client receives the graphical interface sent by the server, and displays the graphical interface.
  • the graphical interface includes order information and operation instruction buttons.
  • the graphical interface is displayed on the client interface.
  • Step 6 The client obtains the corresponding operation instruction based on the operation instruction button.
  • the client user can click the operation instruction button in the graphical interface, and the client responds to the click operation of the client user to obtain the operation instruction corresponding to the operation instruction button .
  • Step 7. The client sends an operation instruction to the server.
  • the client after the client obtains the operation instruction corresponding to the operation instruction button, it can directly send the operation instruction to the server, and the embodiment of the present application does not limit the sending timing of the operation instruction.
  • Step 8 The server sends an updated graphical interface to the client according to the operating instruction, and the updated graphical interface includes order information corresponding to the operating instruction.
  • the server after receiving the operation instruction returned by the client, the server updates the graphical interface according to the operation instruction to obtain an updated graphical interface.
  • the process of the server updating the graphical interface according to the operation instruction is as follows: the server monitors the short message channel and obtains a new short message message.
  • the new short message message is a short message message corresponding to the operation instruction.
  • the short message message is analyzed to obtain the new order information included in the new short message message, and the new order information is converted into a graphical interface, that is, an updated graphical interface is obtained.
  • the server sends the updated graphical interface to the client, and the client displays the updated graphical interface.
  • the updated graphical interface may or may not include operation instruction buttons. If the updated graphical interface is the last delivery step of the order, the updated graphical interface may not include an operation instruction button. If the updated graphical interface is not the last delivery step of the order, the updated graphical interface may include an operation instruction button, and the client user can track and view the order information according to the operation instruction button.
  • Step 9 The client receives the updated graphic interface sent by the server based on the operation instruction button, and the updated graphic interface includes order information corresponding to the operation instruction.
  • Step 10 The client terminal displays the updated graphical interface.
  • the client terminal displays an updated graphical interface, so that the client user can see the order information more intuitively.
  • FIG. 8 is a schematic diagram of a graphical interface of a short message channel according to an embodiment of the application.
  • the server responds to the client's network failure, and detects that the network failure type of the client is the second failure type, and sends the graphical interface for opening the SMS channel to the client, and the client displays the opening of the SMS channel Graphical interface.
  • the client opens the SMS channel.
  • the server sends the graphical interface of the SMS delivery page to the client, and the client displays the graphical interface.
  • the unfinished order is displayed on the client interface. If there is no unfinished order on the interface, the client user can refresh the unfinished order list to obtain the unfinished order. The client user can perform the delivery operation in the uncompleted order.
  • the server parses the meal instruction , Thereby generating a new graphical interface according to the meal fetching instruction, and sending the new graphical interface to the client for display.
  • the server detects whether the client's network is faulty based on the client's network connection, and in response to the client's network failure, based on the network failure type, selects a target chain matching the network failure type from multiple link channels Channel, based on the target link channel to communicate with the client. Since the foregoing communication control method determines the type of network failure of the client based on the network connection status of the client after detecting the network failure of the client, the determination of the type of network failure of the client is more accurate. And because multiple link channels are established with the client, communication with the client is performed based on the target link channel matching the network fault type, so that the communication success rate between the client and the server can be improved.
  • FIG. 9 shows a flowchart of a communication control method provided by an embodiment of the present application.
  • the method can be implemented by the interaction process between the server 101 and the client installed and running in the terminal 102 in FIG. 1. Among them, the server 101 and the client installed and running in the terminal 102 communicate through a network. As shown in Figure 9, the method includes the following steps:
  • step 901 the client obtains the network connection status.
  • a client is installed and running on the terminal.
  • the client may be a take-out client or another type of client.
  • the type of the client is not limited in the embodiment of the present application.
  • a network monitoring system is stored in the client.
  • the network monitoring system is used to monitor the network connection of the operator’s network of the client.
  • the target time period is output in the network monitoring system, so that the client can be obtained.
  • step 902 the client sends the network connection status to the server, and the server determines the target link channel based on the network connection status.
  • the client after obtaining the network connection status, the client can directly send the network connection status to the server, and the server determines the target link channel based on the network connection status. It is also possible to send the network connection status to the server after receiving the acquisition request sent by the server.
  • the embodiment of the present application does not limit the timing of sending the network connection status.
  • step 903 the server receives the network connection status sent by the client, and detects whether the client has a network failure according to the network connection status.
  • the process for the server to determine whether the client has a network failure is the same as the process in step 201 above, and will not be repeated here.
  • step 904 in response to the client's network failure, the server determines the type of the client's network failure.
  • the server determines the type of the network failure of the client in response to the network failure of the client, and the process is the same as the process in step 202 described above, and will not be repeated here.
  • step 905 the server selects a target link channel matching the network failure type from a plurality of link channels according to the network failure type.
  • the process of the server selecting the target link channel matching the network fault type from the multiple link channels according to the network fault type is the same as the process in step 203 above, and will not be repeated here.
  • step 906 the server communicates with the client based on the target link channel.
  • the process of the server communicating with the client based on the target link channel is consistent with the process in step 204 described above, and will not be repeated here.
  • the server detects whether the client's network is faulty based on the client's network connection, and in response to the client's network failure, based on the network failure type, selects a target chain matching the network failure type from multiple link channels Channel, based on the target link channel to communicate with the client. Since the foregoing communication control method determines the type of network failure of the client based on the network connection status of the client after detecting the network failure of the client, the determination of the type of network failure of the client is more accurate. And because multiple link channels are established with the client, communication with the client is performed based on the target link channel matching the network fault type, so that the communication success rate between the client and the server can be improved.
  • FIG. 10 is a schematic structural diagram of a communication control device provided by an embodiment of the application.
  • the device is applied to a server, and the server and a client communicate through a network, and multiple links are established between the client and the server aisle.
  • the device includes:
  • the detection module 1001 is used to detect whether the client has a network failure according to the network connection status of the client;
  • the determining module 1002 is configured to determine the type of network failure of the client in response to a network failure of the client;
  • the selection module 1003 is configured to select a target link channel matching the network failure type from the multiple link channels according to the network failure type;
  • the communication module 1004 is configured to communicate with the client based on the target link channel.
  • the multiple link channels include an HTTP hypertext transfer protocol short link channel, a TCP transmission control protocol long link channel, and a short message channel;
  • the selection module 1003 is configured to respond to the network failure type being that the network signal does not meet the requirements, and use the short message channel as a target link channel matching the network failure type.
  • the communication module 1004 is configured to obtain an SMS message by monitoring the SMS channel, and the content of the SMS message includes order information; parse the SMS message to obtain the order information; Transform to a graphical interface, the graphical interface includes an operation instruction button; send the graphical interface to the client, the client displays the graphical interface, based on the operation instruction button to return the corresponding operation instruction; according to the operation instruction to the The client sends an updated graphical interface, and the updated graphical interface includes order information corresponding to the operation instruction.
  • the communication module 1004 is configured to send a short message message to the client through the short message channel, and the content of the short message message includes order information; receiving the interactive instruction code returned by the client based on the order information The interaction instruction code is used to indicate the corresponding interaction instruction; according to the interaction instruction code, a new short message message is returned to the client through the short message channel, and the content of the new short message message includes order information corresponding to the interaction instruction code.
  • the device further includes:
  • the receiving module is used to receive the SMS channel opening request sent by the client;
  • the sending module is used to send the SMS verification code to the client according to the SMS channel opening request;
  • the receiving module is also used to receive the SMS verification code returned by the client;
  • the activation module is used for opening the SMS channel for the client in response to the SMS verification code returned by the client being consistent with the SMS verification code sent by the server.
  • the detection module 1001 is configured to determine the operator network used by the client, and determine the network connection success rate of the operator's network in the target time period according to the network connection status of the client; If the network connection success rate of the operator's network in the target time period is less than the success rate threshold, it is determined that the client has a network failure.
  • the determining module 1002 is configured to send a network diagnosis instruction to the client, and the network diagnosis instruction is used to instruct the client to feed back network-related information, and the network-related information includes basic information of the client. , At least one of device information, network information, network connection information, and interface check information; receiving network-related information fed back by the client, and determining the type of network failure of the client according to the network-related information.
  • the selection module 1003 is also used to respond to the network failure type that the network signal meets the requirements, but hijacking or network link failure occurs, from multiple link channels in any of the following ways Select the target link channel that matches the network fault type; obtain the connection success rate of the HTTP short link channel and the connection success rate of the TCP long link channel, and use the channel with the highest connection success rate in the HTTP short link channel and the TCP long link channel as The target link channel; or, the TCP long link channel is used as the target link channel, and in response to the client's failure to communicate with the server through the TCP long link channel, the target link channel is switched from the TCP long link channel to the HTTP short link channel .
  • the above-mentioned device detects whether the client's network fails based on the client's network connection status, and in response to the client's network failure, selects a target link matching the network failure type from multiple link channels based on the network failure type Channel, based on the target link channel to communicate with the client. Since the foregoing communication control method determines the type of network failure of the client based on the network connection status of the client, the determination of the type of network failure of the client is more accurate. And because multiple link channels are established with the client, communication with the client is performed based on the target link channel matching the network fault type, so that the communication success rate between the client and the server can be improved.
  • Figure 11 is a schematic structural diagram of a communication control device provided by an embodiment of the application.
  • the device is applied to a client, and the client and the server are in communication connection through a network, and multiple links are established between the client and the server. Road channel.
  • the device includes:
  • the obtaining module 1101 is used to obtain network connection status
  • the sending module 1102 is configured to send the network connection status to the server, and the server determines the target link channel based on the network connection status;
  • the communication module 1103 is configured to communicate with the server based on the target link channel.
  • the communication module 1103 is configured to receive a graphical interface sent by the server, and display the graphical interface.
  • the graphical interface includes order information and operation instruction buttons; the corresponding operation is obtained based on the operation instruction buttons. Instruction; send the operating instruction to the server; receive an updated graphical interface sent by the server based on the operating instruction, the updated graphical interface including order information corresponding to the operating instruction; display the updated graphical interface.
  • the communication module 1103 is configured to receive a short message message sent by the server, the content of the short message message includes order information; display the order information, and obtain the input interaction instruction code based on the order information.
  • the interactive instruction code is used to indicate the corresponding interactive instruction;
  • the sending module 1102 is also used to send a request for opening a short message channel to the server;
  • the device also includes:
  • the receiving module is used to receive the SMS verification code sent by the server
  • the sending module 1102 is also used to obtain the entered short message verification code through the verification interface, and return the entered short message verification code to the server, and the server opens a short message channel based on the entered short message verification code.
  • the above device client sends its network connection status to the server, and the server determines the target link channel based on the client's network connection status, and communicates with the server based on the target link channel. Since there are multiple link channels established between the client and the server, communication with the client is performed based on the target link channel that matches the client, so that the success rate of communication between the client and the server can be improved.
  • the communication control device provided in the above embodiment performs communication control
  • only the division of the above-mentioned functional modules is used as an example.
  • the above-mentioned functions can be allocated by different functional modules as needed. That is, the internal structure of the communication device is divided into different functional modules to complete all or part of the functions described above.
  • the communication control device and the communication control method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.
  • FIG. 12 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
  • the terminal 1200 can be: a smartphone, a tablet computer, an MP3 (Moving Picture Experts Group Audio Layer III, moving picture expert compression standard audio layer 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, a moving picture expert compressing standard audio Level 4) Player, laptop or desktop computer.
  • the terminal 1200 may also be called user equipment, portable terminal, laptop terminal, desktop terminal and other names.
  • the terminal 1200 includes: one or more processors 1201 and one or more memories 1202.
  • the processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on.
  • the processor 1201 may adopt at least one hardware form among DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array, Programmable Logic Array). accomplish.
  • the processor 1201 may also include a main processor and a coprocessor.
  • the main processor is a processor used to process data in the awake state, also called a CPU (Central Processing Unit, central processing unit); the coprocessor is A low-power processor used to process data in the standby state.
  • the processor 1201 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used to render and draw content that needs to be displayed on the display screen.
  • the processor 1201 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computing operations related to machine learning.
  • AI Artificial Intelligence
  • the memory 1202 may include one or more computer-readable storage media, which may be non-transitory.
  • the memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices.
  • the non-transitory computer-readable storage medium in the memory 1202 is used to store at least one program code, and the at least one program code is used to be executed by the processor 1201 to implement the method embodiments in the embodiments of the present application.
  • the provided communication control method is used to store at least one program code, and the at least one program code is used to be executed by the processor 1201 to implement the method embodiments in the embodiments of the present application.
  • the terminal 1200 may optionally further include: a peripheral device interface 1203 and at least one peripheral device.
  • the processor 1201, the memory 1202, and the peripheral device interface 1203 may be connected by a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 1203 through a bus, a signal line, or a circuit board.
  • the peripheral device includes: at least one of a radio frequency circuit 1204, a display screen 1205, a camera 1206, an audio circuit 1207, a positioning component 1208, and a power supply 1209.
  • the peripheral device interface 1203 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 1201 and the memory 1202.
  • the processor 1201, the memory 1202, and the peripheral device interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 1201, the memory 1202, and the peripheral device interface 1203 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
  • the radio frequency circuit 1204 is used for receiving and transmitting RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals.
  • the radio frequency circuit 1204 communicates with a communication network and other communication devices through electromagnetic signals.
  • the radio frequency circuit 1204 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
  • the radio frequency circuit 1204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on.
  • the radio frequency circuit 1204 can communicate with other terminals through at least one wireless communication protocol.
  • the wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity, wireless fidelity) networks.
  • the radio frequency circuit 1204 may also include a circuit related to NFC (Near Field Communication), which is not limited in the embodiment of the present application.
  • the display screen 1205 is used to display a UI (User Interface, user interface).
  • the UI can include graphics, text, icons, videos, and any combination thereof.
  • the display screen 1205 also has the ability to collect touch signals on or above the surface of the display screen 1205.
  • the touch signal may be input to the processor 1201 as a control signal for processing.
  • the display screen 1205 may also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards.
  • the display screen 1205 may be one display screen 1205, which is provided with the front panel of the terminal 1200; in other embodiments, there may be at least two display screens 1205, which are respectively arranged on different surfaces of the terminal 1200 or in a folded design; In still other embodiments, the display screen 1205 may be a flexible display screen, which is arranged on the curved surface or the folding surface of the terminal 1200. Furthermore, the display screen 1205 can also be set as a non-rectangular irregular pattern, that is, a special-shaped screen.
  • the display screen 1205 may be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
  • the camera assembly 1206 is used to capture images or videos.
  • the camera assembly 1206 includes a front camera and a rear camera.
  • the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal.
  • the camera assembly 1206 may also include a flash.
  • the flash can be a single-color flash or a dual-color flash. Dual color temperature flash refers to a combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.
  • the audio circuit 1207 may include a microphone and a speaker.
  • the microphone is used to collect sound waves of the user and the environment, convert the sound waves into electrical signals and input them to the processor 1201 for processing, or input to the radio frequency circuit 1204 to implement voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively set in different parts of the terminal 1200.
  • the microphone can also be an array microphone or an omnidirectional collection microphone.
  • the speaker is used to convert the electrical signal from the processor 1201 or the radio frequency circuit 1204 into sound waves.
  • the speaker can be a traditional thin-film speaker or a piezoelectric ceramic speaker.
  • the speaker When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into human audible sound waves, but also convert the electrical signal into human inaudible sound waves for distance measurement and other purposes.
  • the audio circuit 1207 may also include a headphone jack.
  • the positioning component 1208 is used to locate the current geographic location of the terminal 1200 to implement navigation or LBS (Location Based Service, location-based service).
  • the positioning component 1208 may be a positioning component based on the GPS (Global Positioning System, Global Positioning System) of the United States, the Beidou system of China, the Granus system of Russia, or the Galileo system of the European Union.
  • the power supply 1209 is used to supply power to various components in the terminal 1200.
  • the power source 1209 may be alternating current, direct current, disposable batteries, or rechargeable batteries.
  • the rechargeable battery may support wired charging or wireless charging.
  • the rechargeable battery can also be used to support fast charging technology.
  • the terminal 1200 further includes one or more sensors 1210.
  • the one or more sensors 1210 include, but are not limited to: an acceleration sensor 1211, a gyroscope sensor 1212, a pressure sensor 1213, a fingerprint sensor 1214, an optical sensor 1215, and a proximity sensor 1216.
  • FIG. 12 does not constitute a limitation on the terminal 1200, and may include more or fewer components than shown in the figure, or combine certain components, or adopt different component arrangements.
  • FIG. 13 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server 1300 may have relatively large differences due to different configurations or performance, and may include one or more processors (Central Processing Units, CPU) 1301 and one Or multiple memories 1302, wherein at least one program instruction is stored in the one or more memories 1302, and the at least one program instruction is loaded and executed by the one or more processors 1301 to implement the methods provided in the foregoing various method embodiments Communication control method.
  • the server 1300 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface for input and output.
  • the server 1300 may also include other components for implementing device functions, which will not be repeated here.
  • a computer-readable storage medium stores at least one piece of program code, and the at least one piece of program code is loaded and executed by a processor of a server, so as to implement any of the foregoing communications. Control Method.
  • the foregoing computer-readable storage medium may be Read-Only Memory (ROM), Random Access Memory (RAM), Compact Disc Read-Only Memory, CD-ROM ), magnetic tapes, floppy disks and optical data storage devices.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • CD-ROM Compact Disc Read-Only Memory
  • magnetic tapes magnetic tapes
  • floppy disks optical data storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed is communication control, applied to a server in communication with a client. A plurality of link channels is established between the client and the server. The communication control comprises: detecting whether a network fault occurs in a client according to network connection situations of a client; in response to the network fault in the client, determining the type of network fault in the client; selecting, according to the type of network fault, a target link channel matching the type of network fault from a plurality of link channels; and communicating with the client on the basis of the target link channel.

Description

通信控制Communication control
本申请要求于2020年05月21日提交的申请号为202010438213.8、申请名称为“通信控制方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on May 21, 2020 with the application number 202010438213.8 and the application title "communication control method, device, equipment and computer-readable storage medium", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请实施例涉及计算机技术领域,特别涉及一种通信控制。The embodiments of the present application relate to the field of computer technology, and in particular to a communication control.
背景技术Background technique
随着计算机技术的不断发展,外卖行业与计算机技术的联系越来越紧密,外卖行业也逐渐受到广大消费者的青睐。外卖包括所有可提供外送服务的业务,如餐饮、水果、糕点、药品等,使人们足不出户就可以买到想要的东西。With the continuous development of computer technology, the food delivery industry is getting closer and closer to computer technology, and the food delivery industry is gradually being favored by consumers. Take-out includes all businesses that can provide delivery services, such as catering, fruits, pastries, medicines, etc., so that people can buy what they want without leaving their homes.
发明内容Summary of the invention
本申请实施例提供了一种通信控制方法、装置、设备及计算机可读存储介质,可用于解决相关技术中的问题。该技术方案如下:The embodiments of the present application provide a communication control method, device, equipment, and computer-readable storage medium, which can be used to solve problems in related technologies. The technical scheme is as follows:
一方面,本申请实施例提供了一种通信控制方法,该方法应用于服务器,该服务器与客户端通过网络进行通信连接,该客户端与服务器之间建立有多个链路通道,该方法包括:On the one hand, an embodiment of the present application provides a communication control method, which is applied to a server, and the server and a client communicate through a network connection, and a plurality of link channels are established between the client and the server, and the method includes :
根据该客户端的网络连接情况检测该客户端是否发生网络故障;响应于该客户端发生网络故障,确定该客户端的网络故障类型;根据该网络故障类型,从该多个链路通道中选择与该网络故障类型匹配的目标链路通道;基于该目标链路通道与该客户端进行通信。Detect whether the client has a network failure according to the client's network connection; in response to the client's network failure, determine the client's network failure type; according to the network failure type, select from the multiple link channels The target link channel matching the network fault type; communicate with the client based on the target link channel.
在一种可能的实现方式中,所述多个链路通道包括HTTP超文本传输协议短链接通道、TCP传输控制协议长链接通道及短信通道;所述根据所述网络故障类型,从所述多个链路通道中选择与所述网络故障类型匹配的目标链路通道,包括:响应于所述网络故障类型为网络信号不满足要求,将所述短信通道作为与所述网络故障类型匹配的目标链路通道。In a possible implementation manner, the multiple link channels include HTTP hypertext transfer protocol short link channels, TCP transmission control protocol long link channels, and short message channels; according to the type of network failure, from the multiple Selecting a target link channel matching the network fault type from among the link channels includes: in response to the network fault type being that the network signal does not meet the requirements, using the short message channel as a target matching the network fault type Link channel.
在一种可能的实现方式中,所述基于所述目标链路通道与所述客户端进行通信,包括:通过监听所述短信通道获取短信消息,所述短信消息的内容包括订单信息;对所述短信消息进行解析,得到所述订单信息;将所述订单信息转化到图形界面,所述图形界面上包括操作指令按钮;将所述图形界面发送至所述客户端,由所述客户端展示所述图形界面,基于所述操作指令按钮返回对应的操作指令;根据所述操作指令向所述客户端发送更新的图形界面,所述更新的图形界面上包括与所述操作指令对应的订单信息。In a possible implementation manner, the communicating with the client terminal based on the target link channel includes: obtaining a short message message by monitoring the short message channel, and the content of the short message message includes order information; The short message message is parsed to obtain the order information; the order information is transformed into a graphical interface, which includes operation instruction buttons; the graphical interface is sent to the client, and the client displays The graphic interface returns a corresponding operation instruction based on the operation instruction button; sends an updated graphic interface to the client according to the operation instruction, and the updated graphic interface includes order information corresponding to the operation instruction .
在一种可能的实现方式中,所述基于所述目标链路通道与所述客户端进行通信,包括:通过所述短信通道向所述客户端发送短信消息,所述短信消息的内容包括订单信息;接收所述客户端基于所述订单信息返回的交互指令代码,所述交互指令代码用于指示对应的交互指令;根据所述交互指令代码通过所述短信通道向所述客户端返回新的短信消息,所述新的短信消息的内容包括与所述交互指令代码对应的订单信息。In a possible implementation manner, the communicating with the client based on the target link channel includes: sending a short message message to the client through the short message channel, and the content of the short message message includes an order Information; receiving the interactive instruction code returned by the client based on the order information, the interactive instruction code is used to indicate the corresponding interactive instruction; according to the interactive instruction code through the short message channel to return a new to the client A short message message. The content of the new short message message includes order information corresponding to the interaction instruction code.
在一种可能的实现方式中,所述基于所述目标链路通道与所述客户端进行通信之前,所述方法还包括:接收所述客户端发送的开通短信通道请求;根据所述开通短信通道请求向所述客户端发送短信验证码;接收所述客户端返回的短信验证码;响应于所述客户端返回的短信验证码与所述服务器发送的短信验证码一致,为所述客户端开通所述短信通道。In a possible implementation manner, before communicating with the client based on the target link channel, the method further includes: receiving a request for opening a short message channel sent by the client; and according to the opening short message The channel requests to send the SMS verification code to the client; receives the SMS verification code returned by the client; in response to the SMS verification code returned by the client being consistent with the SMS verification code sent by the server, it is the client Open the short message channel.
在一种可能的实现方式中,所述根据所述客户端的网络连接情况检测所述客户端是否发生网络故障,包括:确定所述客户端使用的运营商网络,根据所述客户端的网络连接情况确定所述运营商网络在目标时间段内的网络连接成功率;响应于所述运营商网络在所述目标时间段内的网络连接成功率小于成功率阈值,确定所述客户端发生网络故障。In a possible implementation manner, the detecting whether the client has a network failure according to the network connection status of the client includes: determining the operator network used by the client, and according to the network connection status of the client Determine the network connection success rate of the operator network in the target time period; in response to the network connection success rate of the operator network in the target time period being less than the success rate threshold, determine that the client has a network failure.
在一种可能的实现方式中,所述确定所述客户端的网络故障类型,包括:向所述客户端发送网络诊断指令,所述网络诊断指令用于指示所述客户端反馈网络相关信息,所述网络相关信息包括所述客户端的基本信息、设备信息、网络信息、网络连接信息及接口检查信息中的至少一种;接收所述客户端反馈的网络相关信息,根据所述网络相关信息确定所述客户端的网络故障类型。In a possible implementation manner, the determining the type of network failure of the client includes: sending a network diagnosis instruction to the client, the network diagnosis instruction being used to instruct the client to feed back network-related information, so The network-related information includes at least one of the basic information of the client, device information, network information, network connection information, and interface check information; the network-related information fed back by the client is received, and the network-related information is determined according to the network-related information. Describe the type of network failure of the client.
在一种可能的实现方式中,所述根据所述网络故障类型,从所述多个链路通道中选择与所述网络故障类型匹配的目标链路通道,还包括:响应于所述网络故障类型为网络信号满足要求,但发生劫持或网络链路故障,按照如下的任一种方式从所述多个链路通道中选择与所述网络故障类型匹配的目标链路通道;获取所述HTTP短链接通道的连接成功率以及所述TCP长链接通道的连接成功率,将所述HTTP短链接通道和所述TCP长链接通道中连接成功率高的通道作为所述目标链路通道;或者,将所述TCP长链接通道作为所述目标链路通道,响应于所述客户端未能通过所述TCP长链接通道与所述服务器进行通信,将所述目标链路通 道由所述TCP长连接通道切换为所述HTTP短链接通道。In a possible implementation manner, the selecting a target link channel matching the network failure type from the multiple link channels according to the network failure type further includes: responding to the network failure The type is that the network signal meets the requirements, but hijacking or network link failure occurs, select a target link channel matching the network failure type from the multiple link channels in any of the following ways; obtain the HTTP The connection success rate of the short link channel and the connection success rate of the TCP long link channel, using the channel with the highest connection success rate among the HTTP short link channel and the TCP long link channel as the target link channel; or, The TCP long link channel is used as the target link channel, and in response to the client's failure to communicate with the server through the TCP long link channel, the target link channel is connected to the TCP long link channel. The channel is switched to the HTTP short link channel.
一方面,本申请实施例提供了一种通信控制方法,该方法应用于客户端,该客户端与服务器通过网络进行通信连接,该客户端与服务器之间建立有多个链路通道,该方法包括:On the one hand, an embodiment of the present application provides a communication control method, which is applied to a client, and the client and the server are in communication connection through a network, and multiple link channels are established between the client and the server. include:
获取网络连接情况;将该网络连接情况发送至该服务器,由该服务器基于该网络连接情况确定目标链路通道;基于该目标链路通道与该服务器进行通信。Obtain the network connection status; send the network connection status to the server, and the server determines the target link channel based on the network connection status; communicates with the server based on the target link channel.
在一种可能的实现方式中,所述基于所述目标链路通道与所述服务器进行通信,包括:接收所述服务器发送的图形界面,显示所述图形界面,所述图形界面上包括订单信息及操作指令按钮;基于所述操作指令按钮获取对应的操作指令;向所述服务器发送所述操作指令;接收所述服务器基于所述操作指令发送的更新的图形界面,所述更新的图形界面上包括与所述操作指令对应的订单信息;显示所述更新的图形界面。In a possible implementation manner, the communicating with the server based on the target link channel includes: receiving a graphical interface sent by the server, and displaying the graphical interface, the graphical interface including order information And an operation instruction button; obtain a corresponding operation instruction based on the operation instruction button; send the operation instruction to the server; receive an updated graphical interface sent by the server based on the operation instruction, on the updated graphical interface Including the order information corresponding to the operation instruction; displaying the updated graphical interface.
在一种可能的实现方式中,所述基于所述目标链路通道与所述客户端进行通信,包括:接收所述服务器发送的短信消息,所述短信消息的内容包括订单信息;显示所述订单信息,基于所述订单信息获取输入的交互指令代码,所述交互指令代码用于指示对应的交互指令;向所述服务器返回所述交互指令代码;接收所述服务器根据所述交互指令代码返回的新的短信消息,所述新的短信消息的内容包括与所述交互指令代码对应的订单信息;显示所述新的短信消息。In a possible implementation manner, the communicating with the client based on the target link channel includes: receiving a short message message sent by the server, the content of the short message message includes order information; and displaying the Order information, based on the order information to obtain the input interaction instruction code, the interaction instruction code is used to indicate the corresponding interaction instruction; return the interaction instruction code to the server; receive the server returns according to the interaction instruction code The content of the new short message message includes the order information corresponding to the interaction instruction code; the new short message message is displayed.
在一种可能的实现方式中,所述基于所述目标链路通道与所述客户端进行通信之前,所述方法还包括:向所述服务器发送开通短信通道请求,接收所述服务器发送的短信验证码;通过验证界面获取输入的短信验证码,向所述服务器返回所述输入的短信验证码,由所述服务器基于所述输入的短信验证码开通短信通道。In a possible implementation, before communicating with the client based on the target link channel, the method further includes: sending a request for opening a short message channel to the server, and receiving a short message sent by the server Verification code: Obtain the entered SMS verification code through the verification interface, return the entered SMS verification code to the server, and the server will open the SMS channel based on the entered SMS verification code.
一方面,本申请实施例提供了一种通信控制装置,该装置应用于服务器,该服务器与客户端通过网络进行通信连接,客户端与服务器之间建立有多个链路通道,该装置包括:On the one hand, an embodiment of the present application provides a communication control device, which is applied to a server, the server and a client communicate through a network, and multiple link channels are established between the client and the server, and the device includes:
检测模块,用于根据该客户端的网络连接情况检测该客户端是否发生网络故障;The detection module is used to detect whether the client has a network failure according to the network connection status of the client;
确定模块,用于响应于该客户端发生网络故障,则确定该客户端的网络故障类型;The determining module is used to determine the type of network failure of the client in response to a network failure of the client;
选择模块,用于根据该网络故障类型,从该多个链路通道中选择与该网络故障类型匹配的目标链路通道;The selection module is used to select a target link channel matching the network failure type from the multiple link channels according to the network failure type;
通信模块,用于基于该目标链路通道与该客户端进行通信。The communication module is used to communicate with the client based on the target link channel.
在一种可能的实现方式中,所述多个链路通道包括HTTP超文本传输协议短链接通道、TCP传输控制协议长链接通道及短信通道,所述选择模块,用于响应于所述网络故障类型为网络信号不满足要求,将所述短信通道作为与所述网络故障类型匹配的目标链路通道。In a possible implementation manner, the multiple link channels include an HTTP hypertext transfer protocol short link channel, a TCP transmission control protocol long link channel, and a short message channel, and the selection module is configured to respond to the network failure The type is that the network signal does not meet the requirements, and the short message channel is used as the target link channel that matches the network fault type.
在一种可能的实现方式中,所述通信模块,用于通过监听所述短信通道获取短信消息,所述短信消息的内容包括订单信息;对所述短信消息进行解析,得到所述订单信息;将所述订单信息转化到图形界面,所述图形界面上包括操作指令按钮;将所述图形界面发送至所述客户端,由所述客户端展示所述图形界面,基于所述操作指令按钮返回对应的操作指令;根据所述操作指令向所述客户端发送更新的图形界面,所述更新的图形界面上包括与所述操作指令对应的订单信息。In a possible implementation manner, the communication module is configured to obtain an SMS message by monitoring the SMS channel, and the content of the SMS message includes order information; parse the SMS message to obtain the order information; Transform the order information into a graphical interface, the graphical interface includes an operation instruction button; send the graphical interface to the client, the client displays the graphical interface, and returns based on the operation instruction button Corresponding operating instructions; sending an updated graphical interface to the client according to the operating instructions, and the updated graphical interface includes order information corresponding to the operating instructions.
在一种可能的实现方式中,所述通信模块,用于通过所述短信通道向所述客户端发送短信消息,所述短信消息的内容包括订单信息;接收所述客户端基于所述订单信息返回的交互指令代码,所述交互指令代码用于指示对应的交互指令;根据所述交互指令代码通过所述短信通道向所述客户端返回新的短信消息,所述新的短信消息的内容包括与所述交互指令代码对应的订单信息。In a possible implementation manner, the communication module is configured to send a short message message to the client through the short message channel, and the content of the short message message includes order information; receiving the client based on the order information The returned interaction instruction code, the interaction instruction code is used to indicate the corresponding interaction instruction; according to the interaction instruction code, a new short message message is returned to the client through the short message channel, and the content of the new short message message includes Order information corresponding to the interactive instruction code.
在一种可能的实现方式中,所述装置还包括:In a possible implementation manner, the device further includes:
接收模块,用于接收所述客户端发送的开通短信通道请求;The receiving module is used to receive the SMS channel opening request sent by the client;
发送模块,用于根据所述开通短信通道请求向所述客户端发送短信验证码;A sending module, configured to send an SMS verification code to the client according to the SMS channel opening request;
所述接收模块,还用于接收所述客户端返回的短信验证码;The receiving module is also used to receive the SMS verification code returned by the client;
开通模块,用于响应于所述客户端返回的短信验证码与所述服务器发送的短信验证码一致,为所述客户端开通所述短信通道。The activation module is used for opening the SMS channel for the client in response to that the SMS verification code returned by the client is consistent with the SMS verification code sent by the server.
在一种可能的实现方式中,所述检测模块,确定所述客户端使用的运营商网络,根据所述客户端的网络连接情况确定所述运营商网络在目标时间段内的网络连接成功率;响应于所述运营商网络在所述目标时间段内的网络连接成功率小于成功率阈值,确定所述客户端发生网络故障。In a possible implementation manner, the detection module determines the operator network used by the client, and determines the network connection success rate of the operator's network in the target time period according to the network connection status of the client; In response to the network connection success rate of the operator's network in the target time period being less than the success rate threshold, it is determined that the client has a network failure.
在一种可能的实现方式中,所述确定模块,用于向所述客户端发送网络诊断指令,所述网络诊断指令用于指示所述客户端反馈网络相关信息,所述网络相关信息包括所述客户端的基本信息、设备信息、网络信息、网络连接信息及接口检查信息中的至少一种;接收所述客户端反馈的网络相关信息,根据所述网络相关信息确定所述客户端的网络故障类型。In a possible implementation manner, the determining module is configured to send a network diagnostic instruction to the client, and the network diagnostic instruction is used to instruct the client to feed back network-related information, and the network-related information includes all At least one of the basic information, device information, network information, network connection information, and interface check information of the client; receiving network-related information fed back by the client, and determining the type of network failure of the client according to the network-related information .
在一种可能的实现方式中,所述选择模块,还用于响应于所述网络故障类型为网络信号满足要求,但发生劫持或网络链路故障,按照如下的任一种方式从所述多个链路通道中选择与所述网络故障类型匹配的目标链路通道;获取所述HTTP短链接通道的连接成功率以及所述TCP长链接通道的连接成功率,将所述HTTP短链接通道和所述TCP长链接通道中连接 成功率高的通道作为所述目标链路通道;或者,将所述TCP长链接通道作为所述目标链路通道,响应于所述客户端未能通过所述TCP长链接通道与所述服务器进行通信,将所述目标链路通道由所述TCP长连接通道切换为所述HTTP短链接通道。In a possible implementation manner, the selection module is further configured to respond to the network fault type being that the network signal meets the requirements, but hijacking or network link failure occurs, from the multiple Select the target link channel matching the network fault type among the two link channels; obtain the connection success rate of the HTTP short link channel and the connection success rate of the TCP long link channel, and combine the HTTP short link channel and The channel with a high connection success rate in the TCP long link channel is used as the target link channel; or, the TCP long link channel is used as the target link channel, in response to the client failing to pass the TCP The long link channel communicates with the server, and the target link channel is switched from the TCP long link channel to the HTTP short link channel.
一方面,本申请实施例提供了一种通信控制装置,该装置应用于客户端,该客户端与服务器通过网络进行通信连接,客户端与服务器之间建立有多个链路通道,该装置包括:On the one hand, an embodiment of the present application provides a communication control device, which is applied to a client, and the client and the server are in communication connection through a network, and multiple link channels are established between the client and the server, and the device includes :
获取模块,用于获取网络连接情况;Obtaining module, used to obtain network connection status;
发送模块,用于将该网络连接情况发送至该服务器,由该服务器基于该网络连接情况确定目标链路通道;The sending module is used to send the network connection status to the server, and the server determines the target link channel based on the network connection status;
通信模块,用于基于该目标链路通道与该服务器进行通信。The communication module is used to communicate with the server based on the target link channel.
在一种可能的实现方式中,所述通信模块,用于接收所述服务器发送的图形界面,显示所述图形界面,所述图形界面上包括订单信息及操作指令按钮;基于所述操作指令按钮获取对应的操作指令;向所述服务器发送所述操作指令;接收所述服务器基于所述操作指令发送的更新的图形界面,所述更新的图形界面上包括与所述操作指令对应的订单信息;显示所述更新的图形界面。In a possible implementation manner, the communication module is configured to receive a graphical interface sent by the server, and display the graphical interface. The graphical interface includes order information and operation instruction buttons; based on the operation instruction buttons Obtain a corresponding operation instruction; send the operation instruction to the server; receive an updated graphical interface sent by the server based on the operation instruction, the updated graphical interface including order information corresponding to the operation instruction; The updated graphical interface is displayed.
在一种可能的实现方式中,所述通信模块,用于接收所述服务器发送的短信消息,所述短信消息的内容包括订单信息;显示所述订单信息,基于所述订单信息获取输入的交互指令代码,所述交互指令代码用于指示对应的交互指令;向所述服务器返回所述交互指令代码;接收所述服务器根据所述交互指令代码返回的新的短信消息,所述新的短信消息的内容包括与所述交互指令代码对应的订单信息;显示所述新的短信消息。In a possible implementation manner, the communication module is configured to receive a short message message sent by the server, the content of the short message message includes order information; display the order information, and obtain the input interaction based on the order information Instruction code, the interaction instruction code is used to indicate a corresponding interaction instruction; return the interaction instruction code to the server; receive a new short message message returned by the server according to the interaction instruction code, the new short message message The content includes the order information corresponding to the interactive instruction code; the new short message message is displayed.
在一种可能的实现方式中,所述发送模块,还用于向所述服务器发送开通短信通道请求;In a possible implementation manner, the sending module is further configured to send a request for opening a short message channel to the server;
所述装置还包括:接收模块,用于接收所述服务器发送的短信验证码;The device also includes: a receiving module for receiving a short message verification code sent by the server;
发送模块,还用于通过验证界面获取输入的短信验证码,向所述服务器返回所述输入的短信验证码,由所述服务器基于所述输入的短信验证码开通短信通道。The sending module is further configured to obtain the entered short message verification code through the verification interface, and return the entered short message verification code to the server, and the server opens a short message channel based on the entered short message verification code.
一方面,提供了一种服务器,该服务器包括处理器和存储器,该存储器中存储有至少一条程序代码,该至少一条程序代码由处理器加载并执行,以实现上述应用于服务器的任一种可能的实现方式提供的通信控制方法。In one aspect, a server is provided. The server includes a processor and a memory, and at least one piece of program code is stored in the memory, and the at least one piece of program code is loaded and executed by the processor, so as to realize any of the above-mentioned possibilities of being applied to the server. The communication control method provided by the implementation mode.
一方面,提供了一种客户端,该客户端包括处理器和存储器,该存储器中存储有至少一条程序代码,该至少一条程序代码由处理器加载并执行,以实现上述应用于客户端的任一种可能的实现方式提供的通信控制方法。In one aspect, a client is provided. The client includes a processor and a memory, and at least one piece of program code is stored in the memory. Communication control method provided by one possible implementation.
另一方面,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有至少一条程序代码,该至少一条程序代码由处理器加载并执行,以实现上述任一通信控制方法。On the other hand, a computer-readable storage medium is also provided, and the computer-readable storage medium stores at least one piece of program code, and the at least one piece of program code is loaded and executed by a processor to implement any one of the above-mentioned communication control methods.
本申请实施例提供的技术方案至少带来如下有益效果:The technical solutions provided by the embodiments of the present application at least bring the following beneficial effects:
本申请实施例提供的技术方案在检测到客户端发生网络故障后,基于客户端的网络连接情况确定客户端的网络故障类型,以使得客户端的网络故障类型的确定更加准确,且由于与该客户端之间建立有多个链路通道,基于与网络故障类型匹配的目标链路通道与客户端进行通信,从而可以提高该客户端与服务器之间的通信成功率。The technical solution provided by the embodiments of the present application determines the type of network failure of the client based on the network connection of the client after detecting the network failure of the client, so that the determination of the type of network failure of the client is more accurate. A number of link channels are established between them, and the client communicates with the client based on the target link channel that matches the network fault type, so that the success rate of communication between the client and the server can be improved.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1是本申请实施例提供的一种通信控制方法的实施环境示意图;FIG. 1 is a schematic diagram of an implementation environment of a communication control method provided by an embodiment of the present application;
图2是本申请实施例提供的一种通信控制方法的流程图;FIG. 2 is a flowchart of a communication control method provided by an embodiment of the present application;
图3是本申请实施例提供的一种确定网络连接成功率的示意图;FIG. 3 is a schematic diagram of determining the success rate of a network connection provided by an embodiment of the present application;
图4是本申请实施例提供的一种网络诊断系统的结构示意图;FIG. 4 is a schematic structural diagram of a network diagnosis system provided by an embodiment of the present application;
图5是本申请实施例提供的一种客户端的网络相关信息的示意图;FIG. 5 is a schematic diagram of network-related information of a client provided by an embodiment of the present application;
图6是本申请实施例提供的一种开通短信通道的过程示意图;FIG. 6 is a schematic diagram of a process of opening a short message channel provided by an embodiment of the present application;
图7是本申请实施例提供的一种客户端和服务器使用短信消息进行通信的示意图;FIG. 7 is a schematic diagram of a client and a server using SMS messages to communicate according to an embodiment of the present application;
图8是本申请实施例提供的一种短信通道的图形界面示意图;FIG. 8 is a schematic diagram of a graphical interface of a short message channel provided by an embodiment of the present application;
图9是本申请实施例提供的一种通信控制方法的流程图;FIG. 9 is a flowchart of a communication control method provided by an embodiment of the present application;
图10是本申请实施例提供的一种通信控制装置的结构示意图;FIG. 10 is a schematic structural diagram of a communication control device provided by an embodiment of the present application;
图11是本申请实施例提供的一种通信控制装置的结构示意图;FIG. 11 is a schematic structural diagram of a communication control device provided by an embodiment of the present application;
图12是本申请实施例提供的一种终端的结构示意图;FIG. 12 is a schematic structural diagram of a terminal provided by an embodiment of the present application;
图13是本申请实施例提供的一种服务器的结构示意图。FIG. 13 is a schematic structural diagram of a server provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following further describes the embodiments of the present application in detail with reference to the accompanying drawings.
随着计算机技术的不断发展,外卖行业与计算机技术的联系越来越紧密,外卖行业也逐渐受到广大消费者的青睐。外卖包括所有可提供外送服务的业务,如餐饮、水果、糕点、药品等,使人们足不出户就可以买到想要的东西。With the continuous development of computer technology, the food delivery industry is getting closer and closer to computer technology, and the food delivery industry is gradually being favored by consumers. Take-out includes all businesses that can provide delivery services, such as catering, fruits, pastries, medicines, etc., so that people can buy what they want without leaving their homes.
相关技术中,计算机设备中安装和运行有客户端应用程序,该客户端可以和服务器进行通信连接。例如,该客户端为外卖客户端,当用户在该客户端中下单后,客户端可以和服务器进行通信连接,将该外卖订单的配送过程透明化,从而使用户可以实时查看该外卖订单的走向。其中,对骑手和用户的关键信息是有隐私保护的,例如骑手和用户的手机号、用户名等信息。In the related art, a client application is installed and running in a computer device, and the client can communicate with the server. For example, the client is a takeaway client. After the user places an order in the client, the client can communicate with the server to make the delivery process of the takeaway order transparent, so that the user can view the takeaway order in real time. Towards. Among them, there is privacy protection for the key information of the rider and the user, such as the mobile phone number and user name of the rider and the user.
然而,当客户端发生网络故障时,会降低该客户端和服务器之间的通信连接的成功率。因此,亟需一种通信控制方法,提高客户端和服务器之间的通信连接成功率,以使得客户端发生网络故障时,照常可以和服务器进行通信。However, when the client has a network failure, the success rate of the communication connection between the client and the server will be reduced. Therefore, there is an urgent need for a communication control method to improve the success rate of the communication connection between the client and the server, so that the client can communicate with the server as usual when a network failure occurs.
图1是本申请实施例提供的一种通信控制方法的实施环境示意图,如图1所示,该实施环境包括:服务器101和终端102。FIG. 1 is a schematic diagram of an implementation environment of a communication control method provided by an embodiment of the present application. As shown in FIG. 1, the implementation environment includes a server 101 and a terminal 102.
服务器101可以是一台服务器,也可以是多台服务器组成的服务器集群。服务器101可以是云计算平台和虚拟化中心中的至少一种,本申请实施例对此不做限定。服务器101通过有线网络或无线网络和终端102相连,终端102上安装和运行有客户端,示例性地,该终端102可以为移动终端。服务器101用于根据客户端的网络连接情况检测客户端是否发生网络故障,响应于客户端发生网络故障时,确定客户端的网络故障类型。服务器101还用于根据客户端的网络故障类型,从多个链路通道中选择与网络故障类型匹配的目标链路通道。服务器101还可以基于该目标链路通道与客户端进行通信。当然,该服务器101还可以包括其他功能服务器,以便提供更加全面且多样化的服务。The server 101 may be one server or a server cluster composed of multiple servers. The server 101 may be at least one of a cloud computing platform and a virtualization center, which is not limited in the embodiment of the present application. The server 101 is connected to the terminal 102 through a wired network or a wireless network, and a client is installed and running on the terminal 102. Illustratively, the terminal 102 may be a mobile terminal. The server 101 is configured to detect whether the client has a network failure according to the network connection status of the client, and in response to the network failure of the client, determine the type of the network failure of the client. The server 101 is also configured to select a target link channel matching the network failure type from multiple link channels according to the network failure type of the client. The server 101 may also communicate with the client based on the target link channel. Of course, the server 101 may also include other functional servers to provide more comprehensive and diversified services.
终端102可以是智能手机、游戏主机、台式计算机、平板电脑、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器和膝上型便携计算机中的至少一种。终端102上安装和运行有客户端。终端102用于接收服务器发送的网络诊断指令,终端102根据该网络诊断指令获取客户端的网络相关信息。终端102还用于将该网络相关信息反馈给服务器101,以便于服务器101根据该网络相关信息确定客户端的网络故障类型。终端102还可以基于服务器101确定的目标链路通道与服务器101进行通信。The terminal 102 can be a smart phone, a game console, a desktop computer, a tablet computer, an MP3 (Moving Picture Experts Group Audio Layer III, a moving picture expert compression standard audio layer 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, a moving picture Expert compression standard audio level 4) At least one of player and laptop computer. The terminal 102 has a client installed and running. The terminal 102 is configured to receive the network diagnosis instruction sent by the server, and the terminal 102 obtains the network related information of the client according to the network diagnosis instruction. The terminal 102 is also used to feed back the network-related information to the server 101, so that the server 101 can determine the type of network failure of the client according to the network-related information. The terminal 102 may also communicate with the server 101 based on the target link channel determined by the server 101.
基于上述实施环境,本申请实施例提供了一种通信控制方法,以图2所示的本申请实施例提供的一种通信控制方法的流程图为例,该方法可由图1中与客户端进行通信的服务器101执行。客户端和服务器之间建立有多个链路通道。如图2所示,该方法包括下述步骤:Based on the foregoing implementation environment, an embodiment of the application provides a communication control method. Taking the flowchart of the communication control method provided in the embodiment of the application shown in FIG. 2 as an example, the method can be performed with the client in FIG. 1 The communication server 101 executes. There are multiple link channels established between the client and the server. As shown in Figure 2, the method includes the following steps:
在步骤201中,根据客户端的网络连接情况检测客户端是否发生网络故障。In step 201, it is detected whether the client has a network failure according to the network connection status of the client.
在示例性实施例中,终端中安装和运行有客户端,例如,该客户端可以是外卖客户端,也可以是其他类型的客户端,本申请实施例对该客户端的类型不做限定。服务器可以与该客户端进行通信,服务器可以根据该客户端的网络连接情况检测该客户端是否发生网络故障,包括下述步骤:In an exemplary embodiment, a client is installed and running in the terminal. For example, the client may be a take-out client or another type of client. The embodiment of the present application does not limit the type of the client. The server can communicate with the client, and the server can detect whether the client has a network failure according to the network connection of the client, including the following steps:
步骤2011、确定客户端使用的运营商网络,根据客户端的网络连接情况确定运营商网络在目标时间段内的网络连接成功率。Step 2011: Determine the operator network used by the client, and determine the network connection success rate of the operator's network in the target time period according to the network connection status of the client.
在一种可能的实现方式中,服务器可以获取该客户端所使用的运营商网络,基于该运营商网络,确定该运营商网络在目标时间段内的网络连接成功率。In a possible implementation manner, the server may obtain the operator network used by the client, and based on the operator network, determine the network connection success rate of the operator network in the target time period.
在一种可能的实现方式中,服务器可以基于下述方法确定该运营商网络在目标时间段内的网络连接成功率:该服务器中存储有网络监控系统,该网络监控系统用于监控客户端的运营商网络的网络连接情况,在该网络监控系统中输入目标时间段,从而可以得到该运营商网络在目标时间段内的网络连接成功率。In a possible implementation manner, the server may determine the network connection success rate of the operator's network in the target time period based on the following method: the server stores a network monitoring system, and the network monitoring system is used to monitor the operation of the client For the network connection status of the business network, enter the target time period in the network monitoring system, so that the network connection success rate of the operator’s network in the target time period can be obtained.
例如,该客户端使用的运营商网络为第一运营商网络,在该网络监控系统中输入目标时间段的开始时间和结束时间,如开始时间为2019年12月20日00:00,结束时间为2019年12月20日23:00。网络监控系统基于该目标时间段,确定该客户端在该目标时间段内的网络连接成功率。如图3所示为本申请实施例提供的一种确定网络连接成功率的示意图。在该图3中,第一运营商在该2019年12月20日00:00至2019年12月20日23:00的时间段内的网络连接成功率为85%。For example, the operator network used by the client is the first operator network. Enter the start time and end time of the target time period in the network monitoring system. For example, the start time is 00:00 on December 20, 2019, and the end time is It is 23:00 on December 20, 2019. The network monitoring system determines the success rate of the client's network connection in the target time period based on the target time period. FIG. 3 is a schematic diagram of determining the success rate of a network connection provided by an embodiment of the application. In Figure 3, the network connection success rate of the first operator during the time period from 00:00 on December 20, 2019 to 23:00 on December 20, 2019 is 85%.
示例性地,网络监控系统统计各个时间单元的网络连接成功率。响应于目标时间段的时长等于该时间单元的时长,则将该时间单元的网络连接成功率作为目标时间段的网络连接成功率。响应于目标时间段包括两个以上的时间单元,则可以对各个时间单元的网络连接成功率进行加权求和,将加权求和的结果作为目标时间段的网络连接成功率。其中,不同单元的网络连接成功率对应的权重可以相同,也可以不同。本实施例不对时间单元的时长进行限定,时间单元的时长例如为5分钟。Exemplarily, the network monitoring system counts the network connection success rate of each time unit. In response to the duration of the target time period being equal to the duration of the time unit, the network connection success rate of the time unit is taken as the network connection success rate of the target time period. In response to the target time period including more than two time units, the network connection success rate of each time unit may be weighted and summed, and the result of the weighted summation may be used as the network connection success rate of the target time period. Among them, the weights corresponding to the network connection success rates of different units may be the same or different. This embodiment does not limit the duration of the time unit, and the duration of the time unit is, for example, 5 minutes.
以时间单元为5分钟为例,在网络监控系统中输入目标时间段的开始时间为2019年12月20日23:00,目标时间段的结束时间为219年12月20日23:10,则网络监控系统确定2019年12月20日23:00-2019年12月20日23:05这一时间单元的第一网络连接成功率,确定2019 年12月20日23:05-2019年12月20日23:10这一时间单元的第二网络连接成功率,再对第一网络连接成功率和第二网络连接成功率进行加权求和,便能够得到目标时间段,也就是2019年12月20日23:00-2019年12月20日23:10这一时间段的网络连接成功率。例如,第一网络连接成功率为80%、对应的权重为0.5,第二网络连接成功率为100%、对应的权重为0.5,则目标时间段的网络连接成功率为90%。Taking the time unit of 5 minutes as an example, the start time of the target time period entered in the network monitoring system is 23:00, December 20, 2019, and the end time of the target time period is 23:10, December 20, 219, then The network monitoring system determines the first network connection success rate for the time unit from 23:00 on December 20, 2019 to 23:05 on December 20, 2019, and determines the success rate of the first network connection from 23:05 on December 20, 2019 to December 2019 The second network connection success rate in the time unit of 23:10 on the 20th, and then the weighted sum of the first network connection success rate and the second network connection success rate can get the target time period, which is December 2019 The network connection success rate during the time period from 23:00 on the 20th to 23:10 on the 20th December, 2019. For example, if the first network connection success rate is 80%, the corresponding weight is 0.5, the second network connection success rate is 100%, and the corresponding weight is 0.5, then the network connection success rate in the target time period is 90%.
需要说明的是,该目标时间段可以是任意时间段,本申请实施例对此不做限定。It should be noted that the target time period can be any time period, which is not limited in the embodiment of the present application.
步骤2012、基于运营商网络在目标时间段内的网络连接成功率,确定该客户端是否发生网络故障。Step 2012: Determine whether the client has a network failure based on the network connection success rate of the operator's network in the target time period.
在本申请实施例中,基于上述步骤2011确定的运营商网络在目标时间段的网络连接成功率,确定该客户端是否发生网络故障,有下述两种情况。In the embodiment of the present application, based on the network connection success rate of the operator's network in the target time period determined in step 2011, it is determined whether the client has a network failure, and there are the following two situations.
情况一、响应于运营商网络在目标时间段内的网络连接成功率小于成功率阈值,确定客户端发生网络故障。Case 1: In response to the network connection success rate of the operator's network in the target time period being less than the success rate threshold, it is determined that the client has a network failure.
基于上述步骤2011确定的运营商网络在目标时间段内的网络连接成功率,若该网络连接成功率小于成功率阈值,则确定该客户端发生网络故障。Based on the network connection success rate of the operator's network in the target time period determined in step 2011, if the network connection success rate is less than the success rate threshold, it is determined that the client has a network failure.
例如,该运营商网络在目标时间段内的网络连接成功率为85%,成功率阈值为90%,则确定该客户端发生网络故障。For example, if the network connection success rate of the operator's network within the target time period is 85%, and the success rate threshold is 90%, it is determined that the client has a network failure.
情况二、响应于运营商网络在目标时间段内的网络连接成功率不小于成功率阈值,确定客户端未发生网络故障。Case 2: In response to the network connection success rate of the operator's network within the target time period being not less than the success rate threshold, it is determined that the client has no network failure.
基于上述步骤2011确定的运营商网络在目标时间段内的网络连接成功率,若该网络连接成功率不小于成功率阈值,则确定该客户端未发生网络故障。Based on the network connection success rate of the operator's network in the target time period determined in the above step 2011, if the network connection success rate is not less than the success rate threshold, it is determined that the client has no network failure.
例如,该运营商网络在目标时间段内的网络连接成功率为95%,成功率阈值为90%,则确定该客户端未发生网络故障。For example, if the network connection success rate of the operator's network in the target time period is 95%, and the success rate threshold is 90%, it is determined that the client has no network failure.
上述成功率阈值可以基于经验设置,也可以根据应用场景进行调整,本申请实施例对此不进行限定。The above-mentioned success rate threshold may be set based on experience, or may be adjusted according to application scenarios, which is not limited in the embodiment of the present application.
在步骤202中,响应于客户端发生网络故障,确定客户端的网络故障类型。In step 202, in response to a network failure of the client, the type of the network failure of the client is determined.
在本申请实施例中,响应于客户端发生网络故障,可以有下述步骤确定该客户端的网络故障类型。In the embodiment of the present application, in response to the client's network failure, the following steps may be taken to determine the type of the client's network failure.
步骤2021、向客户端发送网络诊断指令,该网络诊断指令用于指示客户端反馈网络相关信息,该网络相关信息包括客户端的基本信息、设备信息、网络信息、网络连接信息及接口检查信息中的至少一种。Step 2021: Send a network diagnosis instruction to the client. The network diagnosis instruction is used to instruct the client to feed back network-related information. The network-related information includes basic information, device information, network information, network connection information, and interface check information of the client. At least one.
在一种可能的实现方式中,响应于该客户端发生网络故障,服务器向该客户端发送网络诊断指令。客户端接收该网络诊断指令,基于该网络诊断指令,获取该客户端的网络相关信息,将该客户端的网络相关信息发送至服务器,由服务器基于该网络相关信息确定该客户端的网络故障类型。In a possible implementation manner, in response to a network failure of the client, the server sends a network diagnosis instruction to the client. The client receives the network diagnosis instruction, obtains network related information of the client based on the network diagnosis instruction, sends the network related information of the client to the server, and the server determines the type of network failure of the client based on the network related information.
在一种可能的实现方式中,客户端接收该网络诊断指令,基于该网络诊断指令,获取客户端的网络相关信息的过程可以如下:终端中存储有网络诊断系统,该网络诊断系统用于获取该客户端的网络相关信息。客户端基于该网络诊断系统,获取该客户端的网络相关信息。其中,网络诊断系统的结构示意图如图4所示,在该图4中,服务器的管理员后台选择区域或客户端,基于该客户端进行服务化管理,通过控制调用频率生成Push(指令通道),向客户端下发网络诊断项,客户端基于该网络诊断项进行诊断,向客户端的服务器上报诊断结果,客户端的服务器向服务化交易端上报诊断数据(也即是网络相关信息),将该诊断数据写入DB(Date Base)数据库中,将该诊断数据保存在服务化(管理端),以便于管理员查看诊断数据。In a possible implementation manner, the client receives the network diagnosis instruction, and based on the network diagnosis instruction, the process of obtaining the client's network-related information may be as follows: a network diagnosis system is stored in the terminal, and the network diagnosis system is used to obtain the The network-related information of the client. The client terminal obtains the network related information of the client terminal based on the network diagnosis system. Among them, the structural diagram of the network diagnosis system is shown in Figure 4. In Figure 4, the administrator of the server selects a region or client in the background, performs service management based on the client, and generates Push (instruction channel) by controlling the frequency of calling , Send a network diagnosis item to the client, the client diagnoses based on the network diagnosis item, and reports the diagnosis result to the server of the client. The server of the client reports the diagnosis data (that is, network-related information) to the servicing transaction terminal, The diagnostic data is written into the DB (Date Base) database, and the diagnostic data is stored in the service (management end) so that the administrator can view the diagnostic data.
图5所示为客户端的网络相关信息的示意图,该图5中包括基本信息、设备信息、网络信息、网络连接信息和接口检查信息。其中,基本信息包括用户ID、用户手机号、用户所在城市、客户端类型、客户端版本、检查耗时和检查时间。设备信息包括终端品牌、终端系统型号、终端内容容量、终端存储容量、终端设备ID以及终端设备号。网络信息包括网络类型、网络运营商、网络IP(Internet Protocol,网际互连协议)地址以及网络DNS(Domain Name System,域名服务器)地址。网络连接信息包括域名、域名IP、发送次数、丢包率、最大RIT、最小RIT、平均RIT以及TTL(Time To Live,生存时间)值。接口检查信息包括Native(本地)接口检查信息、Https(Hyper Text Transfer Protocol over Secure Socket Layer,Secure Socket层上的超文本传输协议)接口检查信息和Html(Hyper Text Markup Language,超文本标记语言)接口检查信息。Native接口检查信息包括URL(Uniform Resource Locator,统一资源定位符)地址、状态、请求速度、请求耗时和内容长度。Https接口检查信息和Html接口检查信息中包括的信息与Native接口检查信息中包括的信息一致。其中,上述说明中涉及的各个信息仅为举例,本申请实施例中的网络相关信息包括但不限于上述举例的各个信息。Figure 5 shows a schematic diagram of the client's network-related information. Figure 5 includes basic information, device information, network information, network connection information, and interface check information. Among them, the basic information includes user ID, user mobile phone number, user city, client type, client version, inspection time and inspection time. Device information includes terminal brand, terminal system model, terminal content capacity, terminal storage capacity, terminal device ID, and terminal device number. Network information includes network type, network operator, network IP (Internet Protocol) address, and network DNS (Domain Name System, domain name server) address. Network connection information includes domain name, domain name IP, number of transmissions, packet loss rate, maximum RIT, minimum RIT, average RIT, and TTL (Time To Live) value. Interface inspection information includes Native (local) interface inspection information, Https (Hyper Text Transfer Protocol over Secure Socket Layer, Hypertext Transfer Protocol on the Secure Socket layer) interface inspection information and Html (Hyper Text Markup Language, Hypertext Markup Language) interface Check the information. Native interface check information includes URL (Uniform Resource Locator) address, status, request speed, request time and content length. The information included in the Https interface check information and the Html interface check information is consistent with the information included in the Native interface check information. Among them, the various information involved in the foregoing description are only examples, and the network-related information in the embodiments of the present application includes, but is not limited to, the various information in the foregoing examples.
步骤2022、接收客户端反馈的网络相关信息,根据该网络相关信息确定客户端的网络故障类型。Step 2022: Receive network-related information fed back by the client, and determine the type of network failure of the client according to the network-related information.
在一种可能的实现方式中,服务器接收客户端反馈的网络相关信息,根据该网络相关信 息确定客户端的网络故障类型。其中,网络故障类型包括但不限于两种,分别是第一故障类型和第二故障类型。其中,第一故障类型的网络信息满足要求,但发生劫持或网络链路故障,第二故障类型的网络信号不满足要求。例如,该第一故障类型可以为网络信息满足要求,但发生域名劫持(也即是DNS劫持)、链路劫持、DNS故障、参数篡改、返回值劫持、长链接故障等。In a possible implementation manner, the server receives network-related information fed back by the client, and determines the type of network failure of the client according to the network-related information. Among them, the network fault types include but are not limited to two types, namely the first fault type and the second fault type. Among them, the network information of the first failure type meets the requirements, but hijacking or network link failure occurs, and the network signal of the second failure type does not meet the requirements. For example, the first failure type may be that the network information meets the requirements, but domain name hijacking (that is, DNS hijacking), link hijacking, DNS failure, parameter tampering, return value hijacking, long link failure, etc. occur.
其中,域名劫持为通过攻击域名解析服务器,或者伪造域名解析服务器的方法,把目标网站域名解析到错误的IP地址,从而使得用户无法访问目标网站。链路劫持为在服务器和客户端之间恶意添加设备或者控制网络设备,导致客户端的数据或服务器的数据被恶意监听。Among them, domain name hijacking is a method of attacking the domain name resolution server or forging the domain name resolution server to resolve the domain name of the target website to the wrong IP address, so that the user cannot access the target website. Link hijacking is to maliciously add devices or control network devices between the server and the client, causing the client's data or the server's data to be maliciously monitored.
示例性地,第二故障类型的网络信号不满足要求,包括但不限于第二故障类型为网络信号较弱、无网络信号。其中,网络信号较弱可以是3G或4G网络信号不好,例如网络信号强度未达到强度阈值,则认为网络信号较弱。无网络信号可以是客户端无法连接到网络,例如客户端是2G网络。当然,该第一故障类型和第二故障类型还可以包括其他的网络故障,本申请实施例仅以上述示出的网络故障为例进行说明,不对第一故障类型和第二故障类型包括的网络故障进行限定。Exemplarily, the network signal of the second fault type does not meet the requirements, including but not limited to the second fault type being that the network signal is weak and there is no network signal. Among them, a weak network signal may be a bad 3G or 4G network signal. For example, if the network signal strength does not reach the strength threshold, the network signal is considered to be weak. No network signal may mean that the client cannot connect to the network, for example, the client is a 2G network. Of course, the first fault type and the second fault type may also include other network faults. The embodiment of the present application only uses the network fault shown above as an example for illustration, and does not describe the network included in the first fault type and the second fault type. The fault is limited.
在步骤203中,根据网络故障类型,从多个链路通道中选择与网络故障类型匹配的目标链路通道。In step 203, according to the type of the network failure, a target link channel matching the type of the network failure is selected from a plurality of link channels.
其中,多个链路通道包括HTTP(Hyper Text Transfer Protocol,超文本传输协议)短链接通道、TCP(Transmission Control Protocol,传输控制协议)长链接通道和短信通道。Among them, multiple link channels include HTTP (Hyper Text Transfer Protocol) short link channel, TCP (Transmission Control Protocol, transmission control protocol) long link channel and SMS channel.
示例性地,通过http协议与服务器端进行通信,是客户端常用的通信手段,通过域名方式访问,网络链路是通过公共网络,就会发生某地区的用户无法正常访问域名,造成的原因可能是Internet网络链路质量不好,或链路被劫持。针对该问题,本申请实施例提供的方法在发现无法正常访问域名,切换该域名所在地区的运营商网络入口,也就是域名解析应对的IP地址,从而快速解决该问题。另外,在示例性实施例中,由于在本申请实施例提供的方法中,请求速度并不是优先考虑的指标,因而该方法可以不使用httpDNS方案。Exemplarily, communicating with the server through the http protocol is a common communication method for the client. It is accessed through a domain name, and the network link is through a public network. It will happen that users in a certain area cannot access the domain name normally. The cause may be The quality of the Internet network link is poor, or the link is hijacked. In response to this problem, the method provided in the embodiments of the present application finds that the domain name cannot be accessed normally, and switches the operator network entry in the region where the domain name is located, that is, the IP address that the domain name resolves to respond to, so as to quickly solve the problem. In addition, in the exemplary embodiment, since the request speed is not a priority index in the method provided in the embodiment of the present application, the httpDNS scheme may not be used in the method.
在本申请实施例中,服务器可以基于客户端的网络故障类型,从多个链路通道中选择与网络故障匹配的目标链路通道。In the embodiment of the present application, the server may select a target link channel matching the network failure from a plurality of link channels based on the type of the network failure of the client.
在一种可能的实现方式中,响应于网络故障类型为第一故障类型,则从HTTP短链接通道和TCP长链接通道中选择一个通道作为目标链路通道。在本申请实施例中,可以有下述任一种实现方式在HTTP短链接通道和TCP长链接通道中选择一个通道作为目标链路通道。In a possible implementation manner, in response to the network failure type being the first failure type, one of the HTTP short link channel and the TCP long link channel is selected as the target link channel. In the embodiment of the present application, there may be any one of the following implementation manners to select one of the HTTP short link channel and the TCP long link channel as the target link channel.
实现方式一、获取HTTP短链接通道的连接成功率以及TCP长链接通道的连接成功率,将HTTP短链接通道和TCP长链接通道中连接成功率高的通道作为目标链路通道。Implementation method 1: Obtain the connection success rate of the HTTP short link channel and the connection success rate of the TCP long link channel, and use the channel with the highest connection success rate in the HTTP short link channel and the TCP long link channel as the target link channel.
针对该种方式,服务器可收集HTTP短链接通道和TCP长链接通道的连接情况,据此得到HTTP短链接通道的连接成功率以及TCP长链接通道的连接成功率。通过将HTTP短链接通道和TCP长链接通道中连接成功率高的通道作为目标链路通道,可以进一步保证该客户端与服务器之间的通信成功率。For this method, the server can collect the connection status of the HTTP short link channel and the TCP long link channel, and obtain the connection success rate of the HTTP short link channel and the connection success rate of the TCP long link channel based on this. By using the channel with a high connection success rate in the HTTP short link channel and the TCP long link channel as the target link channel, the communication success rate between the client and the server can be further guaranteed.
实现方式二、先将TCP长链接通道作为目标链路通道,由客户端基于该TCP长链接通道与服务器进行通信。若客户端无法通过该TCP长链接通道与服务器进行通信,则切换至HTTP短链接通道,由客户端基于该HTTP短链接通道与服务器进行通信。Implementation mode 2: First, the TCP long link channel is used as the target link channel, and the client communicates with the server based on the TCP long link channel. If the client cannot communicate with the server through the TCP long link channel, it switches to the HTTP short link channel, and the client communicates with the server based on the HTTP short link channel.
针对实现方式二,HTTP协议的链路通道,在网络数据传输时,是通过公共网络经过了多次被路由转发才到达服务端,由于是公共网络,稳定性不是很可靠。如DNS劫持、链路故障、链路劫持、数据篡改等问题。对于这些问题,客户端可以优先选择TCP长链接通道作为目标链路通道。当客户端发出http请求时会被封装为数据包,使用TCP协议通过私有的专用网络线路传输,传输数据更快、更稳定,且被加密,从而有效避免数据在公共网传输的遇到的一系列问题。For the second implementation mode, the link channel of the HTTP protocol, during network data transmission, is routed and forwarded multiple times through the public network before reaching the server. Because it is a public network, the stability is not very reliable. Such as DNS hijacking, link failure, link hijacking, data tampering and other issues. For these problems, the client can preferentially select the TCP long link channel as the target link channel. When the client sends an HTTP request, it will be encapsulated into a data packet, and the TCP protocol is used to transmit through a private dedicated network line. The data transmission is faster, more stable, and encrypted, thereby effectively avoiding the data transmission on the public network. Series of questions.
其中,当客户端发出http请求时,由SDK(Software Development Kit,软件开发工具包)将该http请求封装为数据包。示例性地,本实施例通过CIP(Common Industrial Protocol,通用工业协议)通道进行数据包的发送,CIP通道包括但不限于TCP子通道、http子通道和UDP(User Datagram Protocol,用户数据包协议)子通道。该数据包可以被加密,且可以使用TCP或者UDP协议进行发送。Wherein, when the client sends an http request, the SDK (Software Development Kit, software development kit) encapsulates the http request into a data packet. Exemplarily, this embodiment transmits data packets through a CIP (Common Industrial Protocol) channel. The CIP channel includes but is not limited to TCP sub-channel, http sub-channel and UDP (User Datagram Protocol, user data packet protocol) Sub-channel. The data packet can be encrypted and can be sent using TCP or UDP protocol.
在示例性实施例中,客户端优先使用TCP长链接通道,但该TCP长链接通道可能发生故障,出现不可用的情况,所以客户端还需要保留HTTP短链接通道与服务器端进行通信,用来感知服务器给客户端下发的切换链路配置。也就是说,本申请实施例提供的方法可以在TCP长链接通道不可用的情况下,及时切换至HTTP短链接通道。In an exemplary embodiment, the client prefers to use the TCP long link channel, but the TCP long link channel may fail and become unavailable. Therefore, the client also needs to reserve the HTTP short link channel to communicate with the server. The switch link configuration sent by the sensing server to the client. That is to say, the method provided by the embodiment of the present application can switch to the HTTP short link channel in time when the TCP long link channel is unavailable.
在一种可能的实现方式中,响应于该网络故障类型为第二故障类型,则将短信通道作为与网络故障类型匹配的目标链路通道。关于短信通道的介绍,详见下面步骤204下面的描述,此处先暂不赘述。In a possible implementation manner, in response to the network failure type being the second failure type, the short message channel is used as the target link channel matching the network failure type. For the introduction of the short message channel, please refer to the description under step 204 below, and I will not repeat it here.
在步骤204中,基于目标链路通道与客户端进行通信。In step 204, communication with the client is performed based on the target link channel.
在本申请实施例中,基于上述步骤203确定的目标链路通道,当该目标链路通道为HTTP短链接通道时,服务器基于该HTTP短链接通道与客户端进行通信。当该目标链路通道为TCP 长链接通道时,服务器基于该TCP长链接通道与客户端进行通信。当该目标链路通道为短信通道时,服务器基于该短信通道与客户端进行通信。In the embodiment of the present application, based on the target link channel determined in step 203 above, when the target link channel is an HTTP short link channel, the server communicates with the client based on the HTTP short link channel. When the target link channel is a TCP long link channel, the server communicates with the client based on the TCP long link channel. When the target link channel is a short message channel, the server communicates with the client based on the short message channel.
在一种可能的实现方式中,当服务器检测到客户端的网络发生网络故障,且确定该客户端的网络发生的网络故障的故障类型为第二故障类型时,也即是客户端的网络故障类型为网络信号不满足要求时,服务器将短信通道作为与该网络故障类型匹配的目标链路通道。服务器基于该短信通道与客户端进行通信时,还需要确定客户端是否开通短信通道,如果客户端已开通短信通道,则直接基于该短信通道与客户端进行通信,如果客户端没有开通短信通道,则服务器需要为该客户端开通短信通道。In a possible implementation, when the server detects that the client's network has a network failure, and determines that the network failure of the client's network is the second failure type, that is, the client's network failure type is network When the signal does not meet the requirements, the server uses the short message channel as the target link channel matching the network fault type. When the server communicates with the client based on the short message channel, it also needs to determine whether the client has opened the short message channel. If the client has opened the short message channel, it will directly communicate with the client based on the short message channel. If the client does not open the short message channel, Then the server needs to open a short message channel for the client.
在一种可能的实现方式中,服务器为该客户端开通短信通道的过程可以如下:客户端向服务器发送开通短信通道请求,服务器接收客户端发送的开通短信通道请求,根据该开通短信通道请求向客户端发送短信验证码,客户端接收服务器发送的短信验证码,由客户端用户在验证界面输入短信验证码,客户端响应于客户端用户输入的短信验证码,向服务器返回输入的短信验证码,由服务器基于该输入的短信验证码开通短信通道。服务器接收客户端返回的短信验证码,对客户端返回的短信验证码进行验证,响应于客户端返回的短信验证码与服务器发送的短信验证码一致,为该客户端开通短信通道。其中,短信验证码可以是4位短信验证码,也可以是6位短信验证码,或者该短信验证码的位数可以更长或更短,本申请实施例对该短信验证码的位数不加以限定。In a possible implementation, the process for the server to open the SMS channel for the client can be as follows: the client sends an SMS channel opening request to the server, the server receives the SMS channel opening request sent by the client, and sends the SMS channel to the client according to the SMS channel opening request. The client sends the SMS verification code, and the client receives the SMS verification code sent by the server. The client user enters the SMS verification code on the verification interface. The client responds to the SMS verification code entered by the client user and returns the entered SMS verification code to the server , The server opens the SMS channel based on the entered SMS verification code. The server receives the SMS verification code returned by the client, verifies the SMS verification code returned by the client, and responds that the SMS verification code returned by the client is consistent with the SMS verification code sent by the server, and opens an SMS channel for the client. Among them, the SMS verification code can be a 4-digit SMS verification code or a 6-digit SMS verification code, or the number of digits of the SMS verification code can be longer or shorter. Be qualified.
在一种可能的实现方式中,服务器为该客户端开通短信通道的过程可以如图6所示。在该图6中,服务器接收客户端发送的开通短信通道请求,基于该开通短信通道消息确定该客户端是否已经开通短信通道,若该客户端已经开通短信通道,则将该短信通道作为目标链路通道,基于该短信通道与客户端进行通信。若该客户端未开通短信通道,则服务器基于该客户端用户的手机号进行验证,若验证失败,则说明该客户端用户的手机号提供有误。若验证成功,进一步判断用户是否存在,若存在则执行后续的发送短信验证码过程;若用户不存在,则无需执行后续的发送短信验证码过程。响应于用户存在,服务器向该客户端发送短信验证码,客户端接收到服务器发送的短信验证码后,由客户端用户在验证界面中输入该短信验证码,服务器基于该客户端用户输入的短信验证码与服务器发送的短信验证码一致,则为该客户端开通该短信通道。示例性地,客户端发送的开通短信通道请求中可以包括第一参考代码,例如KQ,服务器根据该第一参考代码执行上述图6所示的各步骤,从而为客户端开通短信通道。当然,该第一参考代码仅为举例,本实施例不对用于开通短信通道的代码加以限定。In a possible implementation manner, the process of the server opening a short message channel for the client can be as shown in FIG. 6. In Figure 6, the server receives the SMS channel opening request sent by the client, and determines whether the client has opened the SMS channel based on the SMS channel opening message. If the client has opened the SMS channel, then the SMS channel is used as the target chain Road channel, based on the short message channel to communicate with the client. If the client terminal has not opened the SMS channel, the server performs verification based on the mobile phone number of the client user. If the verification fails, it means that the client user's mobile phone number is provided incorrectly. If the verification is successful, it is further judged whether the user exists, if there is, then the subsequent process of sending SMS verification code is executed; if the user does not exist, there is no need to perform the subsequent process of sending SMS verification code. In response to the existence of the user, the server sends an SMS verification code to the client. After the client receives the SMS verification code sent by the server, the client user enters the SMS verification code in the verification interface, and the server is based on the SMS entered by the client user If the verification code is consistent with the SMS verification code sent by the server, the SMS channel is opened for the client. Exemplarily, the request for opening a short message channel sent by the client may include a first reference code, such as KQ, and the server executes the steps shown in FIG. 6 according to the first reference code, thereby opening the short message channel for the client. Of course, the first reference code is only an example, and this embodiment does not limit the code used to open the short message channel.
在本申请实施例中,服务器基于客户端的网络故障类型为第二故障类型,且该客户端已开通短信通道,则服务器可以通过短信通道与客户端进行通信,其通信方式可以为服务器向客户端发送短信消息的方式。In the embodiment of this application, the server is based on the client’s network fault type as the second fault type, and the client has opened a short message channel, the server can communicate with the client through the short message channel, and the communication method can be from the server to the client. The way to send SMS messages.
在示例性实施例中,当该客户端为外卖客户端时,服务器基于该客户端的网络故障类型为第二故障类型,检测到该客户端已开通短信通道,则服务器可以使用短信通道向客户端发送短信消息,该短信消息的内容包括订单信息,也即是向客户端发送短信消息的方式以通知该客户端用户有新的外卖订单被指派。此时客户端用户也可以使用短信消息来完成接单、配送以及送达的整个流程。示例性地,订单信息包括但不限于订单的状态、订单对应的配送地址、订单对应的用户信息等,本申请实施例不对订单信息的内容进行限定。另外,在检测到该客户端已开通短信通道的情况下,除了服务器向客户端发送短信消息以外,客户端也可以向服务器发送短信消息,以便于获取订单最新状态。客户端向服务器发送的短信消息中可以包括第二参考代码,例如HQ,则服务器根据该第二参考代码确定订单当前状态,将订单当前状态作为订单最新状态返回给客户端。应当理解的是,该第二参考代码仅为举例,本实施例不对用于获取订单最新状态的代码加以限定。In an exemplary embodiment, when the client is a takeaway client, the server detects that the client has opened an SMS channel based on the network fault type of the client as the second fault type, and the server can use the SMS channel to communicate to the client Send a short message message, the content of the short message message includes order information, that is, the method of sending a short message message to the client to notify the client that the user has a new takeaway order assigned. At this time, the client user can also use SMS messages to complete the entire process of order receiving, delivery, and delivery. Exemplarily, the order information includes but is not limited to the status of the order, the delivery address corresponding to the order, the user information corresponding to the order, etc. The embodiment of the present application does not limit the content of the order information. In addition, when it is detected that the client has opened the SMS channel, in addition to the server sending the SMS message to the client, the client can also send the SMS message to the server in order to obtain the latest status of the order. The SMS message sent by the client to the server may include a second reference code, such as HQ, and the server determines the current status of the order according to the second reference code, and returns the current status of the order to the client as the latest status of the order. It should be understood that the second reference code is only an example, and this embodiment does not limit the code used to obtain the latest status of the order.
在一种可能的实现方式中,服务器还可以接收客户端基于该订单消息返回的交互指令代码,该交互指令代码用于指示对应的交互指令,该交互指令代码可以由订单号和交互指令组成,其中,交互指令可以是交互指令的首写字母,订单号可以是订单号中的目标位数,例如,可以是订单号的后两位。交互指令可以有接单、到店、取餐、送达等,其中接单交互指令代码用JD表示,到店交互指令代码用DD表示,取餐交互指令代码用QC表示,送达交互指令代码用SD表示,当然该交互指令代码还可以有其他的表达方式,本申请实施例对此不加以限定。In a possible implementation manner, the server may also receive an interaction instruction code returned by the client based on the order message, the interaction instruction code is used to indicate a corresponding interaction instruction, the interaction instruction code may be composed of an order number and an interaction instruction, Wherein, the interactive instruction may be the first letter of the interactive instruction, and the order number may be the target number of digits in the order number, for example, it may be the last two digits of the order number. The interactive instructions can include order acceptance, store arrival, meal retrieval, delivery, etc. The order acceptance interaction instruction code is represented by JD, the shop interaction instruction code is denoted by DD, the meal retrieval interaction instruction code is denoted by QC, and the delivery interaction instruction code is It is represented by SD. Of course, the interactive instruction code can also have other expressions, which is not limited in the embodiment of the present application.
服务器根据客户端发送的交互指令代码通过短信通道向客户端返回新的短信消息,该新的短信消息的内容包括与该交互指令代码对应的订单信息。如图7所示为本申请实施例提供的一种客户端与服务器使用短信消息进行通信的示意图,在该图7中订单号为23,客户端用户向服务器发送交互指令代码23QC,以查询该订单是否取餐成功,服务器接收到客户端发送的交互指令代码,生成新的短信消息,通过短信通道向客户端返回新的短信消息,该新的短信消息的内容包括23号订单的订单信息。当然该客户端用户还可以向服务器发送其他交互指令代码,本申请实施例对此不加以限定。客户端接收到服务器根据交互指令代码返回的新的短信消息,该新的短息消息的内容包括与交互指令代码对应的订单信息,客户端还可以显示该新的短信消息。The server returns a new short message message to the client through the short message channel according to the interactive instruction code sent by the client, and the content of the new short message message includes order information corresponding to the interactive instruction code. Figure 7 shows a schematic diagram of a client and a server communicating using SMS messages according to an embodiment of the application. In Figure 7, the order number is 23, and the client user sends an interactive command code 23QC to the server to query the Whether the order is successfully taken, the server receives the interactive instruction code sent by the client, generates a new short message message, and returns a new short message message to the client through the short message channel. The content of the new short message message includes the order information of the 23rd order. Of course, the client user can also send other interactive instruction codes to the server, which is not limited in the embodiment of the present application. The client terminal receives a new short message message returned by the server according to the interactive instruction code, the content of the new short message message includes order information corresponding to the interactive instruction code, and the client terminal may also display the new short message message.
需要说明的是,以该客户端为外卖客户端为例进行说明,当该客户端的类型为其他类型的客户端时,其通过短信通道与服务器进行通信的过程与外卖客户端的通信过程一致,在此不再赘述。It should be noted that, taking the client as a takeaway client as an example, when the type of the client is another type of client, the process of communicating with the server through the SMS channel is consistent with the communication process of the takeaway client. This will not be repeated here.
在一种可能的实现方式中,由于采用上述短信消息的方式进行服务器和客户端之间的通信时,需要客户端用户记住交互指令代码,会使得客户端用户的使用体验较差,因此,提出一种将短信消息转换为客户端用户熟悉的图形界面的方式,以使得客户端用户感知不到短信消息的存在,从而提高客户端用户使用短信通道的用户体验。In a possible implementation, since the communication between the server and the client is carried out in the manner of the above-mentioned short message message, the client user is required to remember the interactive instruction code, which will make the client user's experience worse. Therefore, A method of converting SMS messages into a graphical interface familiar to client users is proposed, so that the client users cannot perceive the existence of the SMS messages, thereby improving the user experience of the client users using the SMS channel.
在一种可能的实现方式中,将短信通道作为目标链路通道,基于该目标链路通道与客户端进行通信,可以有下述步骤1至步骤10。In a possible implementation manner, the short message channel is used as the target link channel, and based on the target link channel to communicate with the client, there may be the following steps 1 to 10.
步骤1、服务器通过监听短信通道获取短信消息,该短信消息的内容包括订单信息。 Step 1. The server obtains an SMS message by monitoring the SMS channel, and the content of the SMS message includes order information.
在一种可能的实现方式中,服务器对客户端的短信通道进行监听,从而可以获取该短信通道中的短信消息。In a possible implementation, the server monitors the SMS channel of the client, so that the SMS message in the SMS channel can be obtained.
步骤2、服务器对短信消息进行解析,得到订单信息。Step 2. The server parses the short message to obtain the order information.
在一种可能的实现方式中。服务器基于获取到的短信内容进行解析,从而得到该短信消息中包括的订单信息。In one possible implementation. The server performs analysis based on the obtained short message content, so as to obtain the order information included in the short message message.
步骤3、服务器将订单信息转化为图形界面,该图形界面上包括操作指令按钮。Step 3. The server converts the order information into a graphical interface, and the graphical interface includes operation instruction buttons.
步骤4、服务器将图形界面发送至客户端,由客户端展示图形界面,基于操作指令按钮返回对应的操作指令。 Step 4. The server sends the graphical interface to the client, and the client displays the graphical interface, and returns the corresponding operation instruction based on the operation instruction button.
在一种可能的实现方式中,服务器可以在将订单信息转化为图形界面后,直接将该图形界面发送至客户端,由客户端对该图形界面进行展示。响应于客户端用户对操作指令按钮的点击操作,客户端获取该操作指令按钮对应的操作指令,客户端向服务器发送该操作指令。也即是,服务器接收到客户端返回的操作指令按钮对应的操作指令。In a possible implementation manner, the server may directly send the graphical interface to the client after converting the order information into a graphical interface, and the client may display the graphical interface. In response to the click operation of the operation instruction button by the client user, the client obtains the operation instruction corresponding to the operation instruction button, and the client sends the operation instruction to the server. That is, the server receives the operation instruction corresponding to the operation instruction button returned by the client.
步骤5、客户端接收服务器发送的图形界面,显示该图形界面,该图形界面上包括订单信息及操作指令按钮。Step 5. The client receives the graphical interface sent by the server, and displays the graphical interface. The graphical interface includes order information and operation instruction buttons.
在一种可能的实现方式中,客户端接收到服务器发送的图形界面后,将该图形界面显示在客户端界面。In a possible implementation manner, after the client receives the graphical interface sent by the server, the graphical interface is displayed on the client interface.
步骤6、客户端基于操作指令按钮获取对应的操作指令。Step 6. The client obtains the corresponding operation instruction based on the operation instruction button.
在一种可能的实现方式中,客户端显示图形界面后,客户端用户可以在该图形界面中点击操作指令按钮,客户端响应于客户端用户的点击操作,获取该操作指令按钮对应的操作指令。In a possible implementation, after the client displays the graphical interface, the client user can click the operation instruction button in the graphical interface, and the client responds to the click operation of the client user to obtain the operation instruction corresponding to the operation instruction button .
步骤7、客户端向服务器发送操作指令。Step 7. The client sends an operation instruction to the server.
在一种可能的实现方式中,客户端获取到操作指令按钮对应的操作指令后,可以直接向服务器发送该操作指令,本申请实施例对该操作指令的发送时机不加以限定。In a possible implementation manner, after the client obtains the operation instruction corresponding to the operation instruction button, it can directly send the operation instruction to the server, and the embodiment of the present application does not limit the sending timing of the operation instruction.
步骤8、服务器根据操作指令向客户端发送更新的图形界面,该更新的图形界面上包括与操作指令对应的订单信息。Step 8. The server sends an updated graphical interface to the client according to the operating instruction, and the updated graphical interface includes order information corresponding to the operating instruction.
在一种可能的实现方式中,服务器接收到客户端返回的操作指令后,根据该操作指令更新图形界面,得到更新的图形界面。In a possible implementation manner, after receiving the operation instruction returned by the client, the server updates the graphical interface according to the operation instruction to obtain an updated graphical interface.
在一种可能的实现方式中,服务器根据操作指令更新图形界面的过程如下:服务器监听短信通道,获取新的短信消息,该新的短信消息为与操作指令对应的短信消息,服务器对该新的短信消息进行解析,得到该新的短信消息中包括的新的订单信息,将该新的订单信息转化为图形界面,也即是得到更新的图形界面。服务器将该更新的图形界面发送至客户端,由客户端展示该更新的图形界面。需要说明的是,更新的图形界面上可以包括操作指示按钮,也可以不包括操作指示按钮。如果更新的图形界面为该订单的最后一个派送步骤,则该更新的图形界面上可以不包括操作指示按钮。如果更新的图形界面不是该订单的最后一个派送步骤,则该更新的图形界面上可以包括操作指示按钮,可以由客户端用户根据该操作指示按钮跟踪查看订单信息。In a possible implementation manner, the process of the server updating the graphical interface according to the operation instruction is as follows: the server monitors the short message channel and obtains a new short message message. The new short message message is a short message message corresponding to the operation instruction. The short message message is analyzed to obtain the new order information included in the new short message message, and the new order information is converted into a graphical interface, that is, an updated graphical interface is obtained. The server sends the updated graphical interface to the client, and the client displays the updated graphical interface. It should be noted that the updated graphical interface may or may not include operation instruction buttons. If the updated graphical interface is the last delivery step of the order, the updated graphical interface may not include an operation instruction button. If the updated graphical interface is not the last delivery step of the order, the updated graphical interface may include an operation instruction button, and the client user can track and view the order information according to the operation instruction button.
步骤9、客户端接收服务器基于操作指令按钮发送的更新的图形界面,该更新的图形界面上包括与操作指令对应的订单信息。Step 9. The client receives the updated graphic interface sent by the server based on the operation instruction button, and the updated graphic interface includes order information corresponding to the operation instruction.
步骤10、客户端显示更新的图形界面。Step 10. The client terminal displays the updated graphical interface.
在一种可能的实现方式中,客户端显示更新的图形界面,以使得客户端用户可以更加直观的看到订单信息。In a possible implementation manner, the client terminal displays an updated graphical interface, so that the client user can see the order information more intuitively.
在示例性实施例中,同样以该客户端为外卖客户端为例进行说明,如图8所示为本申请实施例一种短信通道的图形界面示意图。在该图8中,服务器响应于客户端发生网络故障,且检测到客户端发生的网络故障类型为第二故障类型,将开启短信通道的图形界面发送至客户端,客户端展示该开启短信通道的图形界面。客户端响应于客户端用户点击“进入短信通道”的按钮,开通短信通道。开通短信通道后,服务器向客户端发送短信送单页面的图形界面,客户端展示该图形界面。响应于客户端用户点击“确认”按钮,则在该客户端界面上显示未完成的订单。如果界面上不存在未完成的订单,则客户端用户可以刷新未完成订单列表,从而获得未完成订单。客户端用户可以在该未完成订单中进行配送操作,当客户端用户点击取餐 指令按钮时,客户端向服务器发送该取餐指令按钮对应的取餐指令时,服务器对该取餐指令进行解析,从而根据该取餐指令生成新的图形界面,将该新的图形界面发送至客户端,由客户端进行展示。In the exemplary embodiment, the description is also given by taking the client as a take-out client as an example. FIG. 8 is a schematic diagram of a graphical interface of a short message channel according to an embodiment of the application. In Figure 8, the server responds to the client's network failure, and detects that the network failure type of the client is the second failure type, and sends the graphical interface for opening the SMS channel to the client, and the client displays the opening of the SMS channel Graphical interface. In response to the client user clicking the "Enter SMS Channel" button, the client opens the SMS channel. After the SMS channel is opened, the server sends the graphical interface of the SMS delivery page to the client, and the client displays the graphical interface. In response to the client user clicking the "confirm" button, the unfinished order is displayed on the client interface. If there is no unfinished order on the interface, the client user can refresh the unfinished order list to obtain the unfinished order. The client user can perform the delivery operation in the uncompleted order. When the client user clicks the meal instruction button, when the client sends the meal instruction corresponding to the meal instruction button to the server, the server parses the meal instruction , Thereby generating a new graphical interface according to the meal fetching instruction, and sending the new graphical interface to the client for display.
上述方法服务器基于客户端的网络连接情况,检测客户端的网络是否发生故障,响应于该客户端网络发生故障,则基于该网络故障类型,从多个链路通道中选择与网络故障类型匹配的目标链路通道,基于该目标链路通道与客户端进行通信。由于上述通信控制方法在检测到客户端发生网络故障后,基于客户端的网络连接情况确定该客户端的网络故障类型,因此,该客户端的网络故障类型的确定更加准确。且由于与该客户端之间建立有多个链路通道,基于与网络故障类型匹配的目标链路通道与客户端进行通信,从而可以提高该客户端与服务器之间的通信成功率。In the above method, the server detects whether the client's network is faulty based on the client's network connection, and in response to the client's network failure, based on the network failure type, selects a target chain matching the network failure type from multiple link channels Channel, based on the target link channel to communicate with the client. Since the foregoing communication control method determines the type of network failure of the client based on the network connection status of the client after detecting the network failure of the client, the determination of the type of network failure of the client is more accurate. And because multiple link channels are established with the client, communication with the client is performed based on the target link channel matching the network fault type, so that the communication success rate between the client and the server can be improved.
图9所示的本申请实施例提供的一种通信控制方法的流程图,该方法可由图1中的服务器101和终端102中安装和运行的客户端之间的交互过程实现。其中,服务器101和终端102中安装和运行的客户端通过网络进行通信连接。如图9所示,该方法包括下述步骤:FIG. 9 shows a flowchart of a communication control method provided by an embodiment of the present application. The method can be implemented by the interaction process between the server 101 and the client installed and running in the terminal 102 in FIG. 1. Among them, the server 101 and the client installed and running in the terminal 102 communicate through a network. As shown in Figure 9, the method includes the following steps:
在步骤901中,客户端获取网络连接情况。In step 901, the client obtains the network connection status.
在本申请实施例中,终端上安装和运行有客户端,该客户端可以是外卖类客户端,也可以是其他类型的客户端,本申请实施例对该客户端的类型不加以限定。In the embodiment of the present application, a client is installed and running on the terminal. The client may be a take-out client or another type of client. The type of the client is not limited in the embodiment of the present application.
在一种可能的实现方式中,客户端中存储有网络监控系统,该网络监控系统用于监控客户端的运行商网络的网络连接情况,在该网络监控系统中输出目标时间段,从而可以得到客户端的运行商网络在目标时间段内的网络连接情况。该过程与上述步骤201中服务器获取客户端在目标时间段的网络连接成功率的过程一致,在此不再详细说明。In a possible implementation, a network monitoring system is stored in the client. The network monitoring system is used to monitor the network connection of the operator’s network of the client. The target time period is output in the network monitoring system, so that the client can be obtained. The network connection status of the terminal’s operator’s network during the target time period. This process is consistent with the process in which the server obtains the client's network connection success rate in the target time period in the above step 201, and will not be described in detail here.
在步骤902中,客户端将该网络连接情况发送至服务器,由服务器基于网络连接情况确定目标链路通道。In step 902, the client sends the network connection status to the server, and the server determines the target link channel based on the network connection status.
在本申请实施例中,客户端在获取到网络连接情况后,可以直接将该网络连接情况发送至服务器,由服务器基于网络连接情况确定目标链路通道。也可以在接收到服务器发送的获取请求后,将该网络连接情况发送至服务器,本申请实施例对该网络连接情况的发送时机不加以限定。In the embodiment of the present application, after obtaining the network connection status, the client can directly send the network connection status to the server, and the server determines the target link channel based on the network connection status. It is also possible to send the network connection status to the server after receiving the acquisition request sent by the server. The embodiment of the present application does not limit the timing of sending the network connection status.
在步骤903中,服务器接收客户端发送的网络连接情况,根据该网络连接情况检测客户端是否发生网络故障。In step 903, the server receives the network connection status sent by the client, and detects whether the client has a network failure according to the network connection status.
在本申请实施例中,服务器确定客户端是否发生网络故障的过程与上述步骤201中的过程一致,在此不再赘述。In the embodiment of the present application, the process for the server to determine whether the client has a network failure is the same as the process in step 201 above, and will not be repeated here.
在步骤904中,服务器响应于客户端发生网络故障,确定客户端的网络故障类型。In step 904, in response to the client's network failure, the server determines the type of the client's network failure.
在本申请实施例中,服务器响应于客户端发生网络故障,确定客户端的网络故障类型的过程与上述步骤202中的过程一致,在此不再赘述。In the embodiment of the present application, the server determines the type of the network failure of the client in response to the network failure of the client, and the process is the same as the process in step 202 described above, and will not be repeated here.
在步骤905中,服务器根据该网络故障类型,从多个链路通道中选择与该网络故障类型匹配的目标链路通道。In step 905, the server selects a target link channel matching the network failure type from a plurality of link channels according to the network failure type.
在本申请实施例中,服务器根据网络故障类型,从多个链路通道中选择与网络故障类型匹配的目标链路通道的过程与上述步骤203中的过程一致,在此不再赘述。In the embodiment of the present application, the process of the server selecting the target link channel matching the network fault type from the multiple link channels according to the network fault type is the same as the process in step 203 above, and will not be repeated here.
在步骤906中,服务器基于该目标链路通道与客户端进行通信。In step 906, the server communicates with the client based on the target link channel.
在本申请实施例中,服务器基于目标链路通道与客户端进行通信的过程与上述步骤204中的过程一致,在此不再赘述。In the embodiment of the present application, the process of the server communicating with the client based on the target link channel is consistent with the process in step 204 described above, and will not be repeated here.
上述方法服务器基于客户端的网络连接情况,检测客户端的网络是否发生故障,响应于该客户端网络发生故障,则基于该网络故障类型,从多个链路通道中选择与网络故障类型匹配的目标链路通道,基于该目标链路通道与客户端进行通信。由于上述通信控制方法在检测到客户端发生网络故障后,基于客户端的网络连接情况确定该客户端的网络故障类型,因此,该客户端的网络故障类型的确定更加准确。且由于与该客户端之间建立有多个链路通道,基于与网络故障类型匹配的目标链路通道与客户端进行通信,从而可以提高该客户端与服务器之间的通信成功率。In the above method, the server detects whether the client's network is faulty based on the client's network connection, and in response to the client's network failure, based on the network failure type, selects a target chain matching the network failure type from multiple link channels Channel, based on the target link channel to communicate with the client. Since the foregoing communication control method determines the type of network failure of the client based on the network connection status of the client after detecting the network failure of the client, the determination of the type of network failure of the client is more accurate. And because multiple link channels are established with the client, communication with the client is performed based on the target link channel matching the network fault type, so that the communication success rate between the client and the server can be improved.
图10所示为本申请实施例提供的一种通信控制装置的结构示意图,该装置应用于服务器,该服务器与客户端通过网络进行通信连接,该客户端与服务器之间建立有多个链路通道。如图10所示,该装置包括:FIG. 10 is a schematic structural diagram of a communication control device provided by an embodiment of the application. The device is applied to a server, and the server and a client communicate through a network, and multiple links are established between the client and the server aisle. As shown in Figure 10, the device includes:
检测模块1001,用于根据该客户端的网络连接情况检测该客户端是否发生网络故障;The detection module 1001 is used to detect whether the client has a network failure according to the network connection status of the client;
确定模块1002,用于响应于该客户端发生网络故障,则确定该客户端的网络故障类型;The determining module 1002 is configured to determine the type of network failure of the client in response to a network failure of the client;
选择模块1003,用于根据该网络故障类型,从该多个链路通道中选择与该网络故障类型匹配的目标链路通道;The selection module 1003 is configured to select a target link channel matching the network failure type from the multiple link channels according to the network failure type;
通信模块1004,用于基于该目标链路通道与该客户端进行通信。The communication module 1004 is configured to communicate with the client based on the target link channel.
在一种可能的实现方式中,该多个链路通道包括HTTP超文本传输协议短链接通道、TCP传输控制协议长链接通道及短信通道;In a possible implementation manner, the multiple link channels include an HTTP hypertext transfer protocol short link channel, a TCP transmission control protocol long link channel, and a short message channel;
该选择模块1003,用于响应于该网络故障类型为网络信号不满足要求,将该短信通道作为与该网络故障类型匹配的目标链路通道。The selection module 1003 is configured to respond to the network failure type being that the network signal does not meet the requirements, and use the short message channel as a target link channel matching the network failure type.
在一种可能的实现方式中,该通信模块1004,用于通过监听该短信通道获取短信消息,该短信消息的内容包括订单信息;对该短信消息进行解析,得到该订单信息;将该订单信息转化到图形界面,该图形界面上包括操作指令按钮;将该图形界面发送至该客户端,由该客户端展示该图形界面,基于该操作指令按钮返回对应的操作指令;根据该操作指令向该客户端发送更新的图形界面,该更新的图形界面上包括与该操作指令对应的订单信息。In a possible implementation manner, the communication module 1004 is configured to obtain an SMS message by monitoring the SMS channel, and the content of the SMS message includes order information; parse the SMS message to obtain the order information; Transform to a graphical interface, the graphical interface includes an operation instruction button; send the graphical interface to the client, the client displays the graphical interface, based on the operation instruction button to return the corresponding operation instruction; according to the operation instruction to the The client sends an updated graphical interface, and the updated graphical interface includes order information corresponding to the operation instruction.
在一种可能的实现方式中,该通信模块1004,用于通过该短信通道向该客户端发送短信消息,该短信消息的内容包括订单信息;接收该客户端基于该订单信息返回的交互指令代码,该交互指令代码用于指示对应的交互指令;根据该交互指令代码通过该短信通道向该客户端返回新的短信消息,该新的短信消息的内容包括与该交互指令代码对应的订单信息。In a possible implementation manner, the communication module 1004 is configured to send a short message message to the client through the short message channel, and the content of the short message message includes order information; receiving the interactive instruction code returned by the client based on the order information The interaction instruction code is used to indicate the corresponding interaction instruction; according to the interaction instruction code, a new short message message is returned to the client through the short message channel, and the content of the new short message message includes order information corresponding to the interaction instruction code.
在一种可能的实现方式中,该装置还包括:In a possible implementation manner, the device further includes:
接收模块,用于接收该客户端发送的开通短信通道请求;The receiving module is used to receive the SMS channel opening request sent by the client;
发送模块,用于根据该开通短信通道请求向该客户端发送短信验证码;The sending module is used to send the SMS verification code to the client according to the SMS channel opening request;
该接收模块,还用于接收该客户端返回的短信验证码;The receiving module is also used to receive the SMS verification code returned by the client;
开通模块,用于响应于该客户端返回的短信验证码与该服务器发送的短信验证码一致,为该客户端开通该短信通道。The activation module is used for opening the SMS channel for the client in response to the SMS verification code returned by the client being consistent with the SMS verification code sent by the server.
在一种可能的实现方式中,该检测模块1001,用于确定该客户端使用的运营商网络,根据该客户端的网络连接情况确定该运营商网络在目标时间段内的网络连接成功率;响应于该运营商网络在该目标时间段内的网络连接成功率小于成功率阈值,确定该客户端发生网络故障。In a possible implementation manner, the detection module 1001 is configured to determine the operator network used by the client, and determine the network connection success rate of the operator's network in the target time period according to the network connection status of the client; If the network connection success rate of the operator's network in the target time period is less than the success rate threshold, it is determined that the client has a network failure.
在一种可能的实现方式中,该确定模块1002,用于向该客户端发送网络诊断指令,该网络诊断指令用于指示该客户端反馈网络相关信息,该网络相关信息包括该客户端的基本信息、设备信息、网络信息、网络连接信息及接口检查信息中的至少一种;接收该客户端反馈的网络相关信息,根据该网络相关信息确定该客户端的网络故障类型。In a possible implementation, the determining module 1002 is configured to send a network diagnosis instruction to the client, and the network diagnosis instruction is used to instruct the client to feed back network-related information, and the network-related information includes basic information of the client. , At least one of device information, network information, network connection information, and interface check information; receiving network-related information fed back by the client, and determining the type of network failure of the client according to the network-related information.
在一种可能的实现方式中,该选择模块1003,还用于响应于网络故障类型为网络信号满足要求,但发生劫持或网络链路故障,按照如下的任一种方式从多个链路通道中选择与网络故障类型匹配的目标链路通道;获取HTTP短链接通道的连接成功率以及TCP长链接通道的连接成功率,将HTTP短链接通道和TCP长链接通道中连接成功率高的通道作为目标链路通道;或者,将TCP长链接通道作为目标链路通道,响应于客户端未能通过TCP长链接通道与服务器进行通信,将目标链路通道由TCP长连接通道切换为HTTP短链接通道。In a possible implementation, the selection module 1003 is also used to respond to the network failure type that the network signal meets the requirements, but hijacking or network link failure occurs, from multiple link channels in any of the following ways Select the target link channel that matches the network fault type; obtain the connection success rate of the HTTP short link channel and the connection success rate of the TCP long link channel, and use the channel with the highest connection success rate in the HTTP short link channel and the TCP long link channel as The target link channel; or, the TCP long link channel is used as the target link channel, and in response to the client's failure to communicate with the server through the TCP long link channel, the target link channel is switched from the TCP long link channel to the HTTP short link channel .
上述装置基于客户端的网络连接情况,检测客户端的网络是否发生故障,响应于该客户端网络发生故障,则基于该网络故障类型,从多个链路通道中选择与网络故障类型匹配的目标链路通道,基于该目标链路通道与客户端进行通信。由于上述通信控制方法基于客户端的网络连接情况确定该客户端的网络故障类型,因此,该客户端的网络故障类型的确定更加准确。且由于与该客户端之间建立有多个链路通道,基于与网络故障类型匹配的目标链路通道与客户端进行通信,从而可以提高该客户端与服务器之间的通信成功率。The above-mentioned device detects whether the client's network fails based on the client's network connection status, and in response to the client's network failure, selects a target link matching the network failure type from multiple link channels based on the network failure type Channel, based on the target link channel to communicate with the client. Since the foregoing communication control method determines the type of network failure of the client based on the network connection status of the client, the determination of the type of network failure of the client is more accurate. And because multiple link channels are established with the client, communication with the client is performed based on the target link channel matching the network fault type, so that the communication success rate between the client and the server can be improved.
图11所示为本申请实施例提供的一种通信控制装置的结构示意图,该装置应用于客户端,该客户端与服务器通过网络进行通信连接,该客户端与服务器之间建立有多个链路通道。如图11所示,该装置包括:Figure 11 is a schematic structural diagram of a communication control device provided by an embodiment of the application. The device is applied to a client, and the client and the server are in communication connection through a network, and multiple links are established between the client and the server. Road channel. As shown in Figure 11, the device includes:
获取模块1101,用于获取网络连接情况;The obtaining module 1101 is used to obtain network connection status;
发送模块1102,用于将该网络连接情况发送至该服务器,由该服务器基于该网络连接情况确定目标链路通道;The sending module 1102 is configured to send the network connection status to the server, and the server determines the target link channel based on the network connection status;
通信模块1103,用于基于该目标链路通道与该服务器进行通信。The communication module 1103 is configured to communicate with the server based on the target link channel.
在一种可能的实现方式中,该通信模块1103,用于接收该服务器发送的图形界面,显示该图形界面,该图形界面上包括订单信息及操作指令按钮;基于该操作指令按钮获取对应的操作指令;向该服务器发送该操作指令;接收该服务器基于该操作指令发送的更新的图形界面,该更新的图形界面上包括与该操作指令对应的订单信息;显示该更新的图形界面。In a possible implementation, the communication module 1103 is configured to receive a graphical interface sent by the server, and display the graphical interface. The graphical interface includes order information and operation instruction buttons; the corresponding operation is obtained based on the operation instruction buttons. Instruction; send the operating instruction to the server; receive an updated graphical interface sent by the server based on the operating instruction, the updated graphical interface including order information corresponding to the operating instruction; display the updated graphical interface.
在一种可能的实现方式中,该通信模块1103,用于接收该服务器发送的短信消息,该短信消息的内容包括订单信息;显示该订单信息,基于该订单信息获取输入的交互指令代码,该交互指令代码用于指示对应的交互指令;In a possible implementation, the communication module 1103 is configured to receive a short message message sent by the server, the content of the short message message includes order information; display the order information, and obtain the input interaction instruction code based on the order information. The interactive instruction code is used to indicate the corresponding interactive instruction;
向该服务器返回该交互指令代码;接收该服务器根据该交互指令代码返回的新的短信消息,该新的短信消息的内容包括与该交互指令代码对应的订单信息;显示该新的短信消息。Return the interactive instruction code to the server; receive a new short message message returned by the server according to the interactive instruction code, the content of the new short message message including order information corresponding to the interactive instruction code; display the new short message message.
在一种可能的实现方式中,该发送模块1102,还用于向该服务器发送开通短信通道请求;In a possible implementation, the sending module 1102 is also used to send a request for opening a short message channel to the server;
该装置还包括:The device also includes:
接收模块,用于接收该服务器发送的短信验证码;The receiving module is used to receive the SMS verification code sent by the server;
该发送模块1102,还用于通过验证界面获取输入的短信验证码,向该服务器返回该输入的短信验证码,由该服务器基于该输入的短信验证码开通短信通道。The sending module 1102 is also used to obtain the entered short message verification code through the verification interface, and return the entered short message verification code to the server, and the server opens a short message channel based on the entered short message verification code.
上述装置客户端将其网络连接情况发送至服务器,由服务器基于客户端的网络连接情况确定目标链路通道,基于该目标链路通道与服务器进行通信。由于客户端和服务器之间建立 有多条链路通道,基于与客户端匹配的目标链路通道与客户端进行通信,从而可以提高该客户端与服务器之间的通信成功率。The above device client sends its network connection status to the server, and the server determines the target link channel based on the client's network connection status, and communicates with the server based on the target link channel. Since there are multiple link channels established between the client and the server, communication with the client is performed based on the target link channel that matches the client, so that the success rate of communication between the client and the server can be improved.
需要说明的是:上述实施例提供的通信控制装置在进行通信控制时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将通信装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的通信控制装置与通信控制方法实施例属于同一构思,其实现过程详见方法实施例,这里不再赘述。It should be noted that when the communication control device provided in the above embodiment performs communication control, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be allocated by different functional modules as needed. That is, the internal structure of the communication device is divided into different functional modules to complete all or part of the functions described above. In addition, the communication control device and the communication control method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.
图12是本申请实施例提供的一种终端的结构示意图。该终端1200可以是:智能手机、平板电脑、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端1200还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。FIG. 12 is a schematic structural diagram of a terminal provided by an embodiment of the present application. The terminal 1200 can be: a smartphone, a tablet computer, an MP3 (Moving Picture Experts Group Audio Layer III, moving picture expert compression standard audio layer 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, a moving picture expert compressing standard audio Level 4) Player, laptop or desktop computer. The terminal 1200 may also be called user equipment, portable terminal, laptop terminal, desktop terminal and other names.
通常,终端1200包括有:一个或多个处理器1201和一个或多个存储器1202。Generally, the terminal 1200 includes: one or more processors 1201 and one or more memories 1202.
处理器1201可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器1201可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器1201也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器1201可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器1201还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 1201 may adopt at least one hardware form among DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array, Programmable Logic Array). accomplish. The processor 1201 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the awake state, also called a CPU (Central Processing Unit, central processing unit); the coprocessor is A low-power processor used to process data in the standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used to render and draw content that needs to be displayed on the display screen. In some embodiments, the processor 1201 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computing operations related to machine learning.
存储器1202可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1202还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1202中的非暂态的计算机可读存储介质用于存储至少一个程序代码,该至少一个程序代码用于被处理器1201所执行以实现本申请实施例中方法实施例提供的通信控制方法。The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1202 is used to store at least one program code, and the at least one program code is used to be executed by the processor 1201 to implement the method embodiments in the embodiments of the present application. The provided communication control method.
在一些实施例中,终端1200还可选包括有:外围设备接口1203和至少一个外围设备。处理器1201、存储器1202和外围设备接口1203之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口1203相连。示例性地,外围设备包括:射频电路1204、显示屏1205、摄像头1206、音频电路1207、定位组件1208和电源1209中的至少一种。In some embodiments, the terminal 1200 may optionally further include: a peripheral device interface 1203 and at least one peripheral device. The processor 1201, the memory 1202, and the peripheral device interface 1203 may be connected by a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 1203 through a bus, a signal line, or a circuit board. Exemplarily, the peripheral device includes: at least one of a radio frequency circuit 1204, a display screen 1205, a camera 1206, an audio circuit 1207, a positioning component 1208, and a power supply 1209.
外围设备接口1203可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器1201和存储器1202。在一些实施例中,处理器1201、存储器1202和外围设备接口1203被集成在同一芯片或电路板上;在一些其他实施例中,处理器1201、存储器1202和外围设备接口1203中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。The peripheral device interface 1203 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, the memory 1202, and the peripheral device interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 1201, the memory 1202, and the peripheral device interface 1203 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
射频电路1204用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路1204通过电磁信号与通信网络以及其他通信设备进行通信。射频电路1204将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路1204包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路1204可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路1204还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请实施例对此不加以限定。The radio frequency circuit 1204 is used for receiving and transmitting RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals. The radio frequency circuit 1204 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1204 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 1204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on. The radio frequency circuit 1204 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity, wireless fidelity) networks. In some embodiments, the radio frequency circuit 1204 may also include a circuit related to NFC (Near Field Communication), which is not limited in the embodiment of the present application.
显示屏1205用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏1205是触摸显示屏时,显示屏1205还具有采集在显示屏1205的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器1201进行处理。此时,显示屏1205还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏1205可以为一个,设置终端1200的前面板;在另一些实施例中,显示屏1205可以为至少两个,分别设置在终端1200的不同表面或呈折叠设计;在再一些实施例中,显示屏1205可以是柔性显示屏,设置在终端1200的弯曲表面上或折叠面上。甚至,显示屏1205还可以设置成非矩形的不规则图形,也即异形屏。显示屏1205可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。The display screen 1205 is used to display a UI (User Interface, user interface). The UI can include graphics, text, icons, videos, and any combination thereof. When the display screen 1205 is a touch display screen, the display screen 1205 also has the ability to collect touch signals on or above the surface of the display screen 1205. The touch signal may be input to the processor 1201 as a control signal for processing. At this time, the display screen 1205 may also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards. In some embodiments, there may be one display screen 1205, which is provided with the front panel of the terminal 1200; in other embodiments, there may be at least two display screens 1205, which are respectively arranged on different surfaces of the terminal 1200 or in a folded design; In still other embodiments, the display screen 1205 may be a flexible display screen, which is arranged on the curved surface or the folding surface of the terminal 1200. Furthermore, the display screen 1205 can also be set as a non-rectangular irregular pattern, that is, a special-shaped screen. The display screen 1205 may be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
摄像头组件1206用于采集图像或视频。可选地,摄像头组件1206包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像 头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件1206还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。The camera assembly 1206 is used to capture images or videos. Optionally, the camera assembly 1206 includes a front camera and a rear camera. Generally, the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal. In some embodiments, there are at least two rear cameras, each of which is a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth-of-field camera to realize the background blur function, the main camera Integrate with the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, the camera assembly 1206 may also include a flash. The flash can be a single-color flash or a dual-color flash. Dual color temperature flash refers to a combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.
音频电路1207可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,将声波转换为电信号输入至处理器1201进行处理,或者输入至射频电路1204以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端1200的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器1201或射频电路1204的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路1207还可以包括耳机插孔。The audio circuit 1207 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, convert the sound waves into electrical signals and input them to the processor 1201 for processing, or input to the radio frequency circuit 1204 to implement voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively set in different parts of the terminal 1200. The microphone can also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signal from the processor 1201 or the radio frequency circuit 1204 into sound waves. The speaker can be a traditional thin-film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into human audible sound waves, but also convert the electrical signal into human inaudible sound waves for distance measurement and other purposes. In some embodiments, the audio circuit 1207 may also include a headphone jack.
定位组件1208用于定位终端1200的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件1208可以是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统、俄罗斯的格雷纳斯系统或欧盟的伽利略系统的定位组件。The positioning component 1208 is used to locate the current geographic location of the terminal 1200 to implement navigation or LBS (Location Based Service, location-based service). The positioning component 1208 may be a positioning component based on the GPS (Global Positioning System, Global Positioning System) of the United States, the Beidou system of China, the Granus system of Russia, or the Galileo system of the European Union.
电源1209用于为终端1200中的各个组件进行供电。电源1209可以是交流电、直流电、一次性电池或可充电电池。当电源1209包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。The power supply 1209 is used to supply power to various components in the terminal 1200. The power source 1209 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 1209 includes a rechargeable battery, the rechargeable battery may support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,终端1200还包括有一个或多个传感器1210。该一个或多个传感器1210包括但不限于:加速度传感器1211、陀螺仪传感器1212、压力传感器1213、指纹传感器1214、光学传感器1215以及接近传感器1216。In some embodiments, the terminal 1200 further includes one or more sensors 1210. The one or more sensors 1210 include, but are not limited to: an acceleration sensor 1211, a gyroscope sensor 1212, a pressure sensor 1213, a fingerprint sensor 1214, an optical sensor 1215, and a proximity sensor 1216.
本领域技术人员可以理解,图12中示出的结构并不构成对终端1200的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art can understand that the structure shown in FIG. 12 does not constitute a limitation on the terminal 1200, and may include more or fewer components than shown in the figure, or combine certain components, or adopt different component arrangements.
图13是本申请实施例提供的一种服务器的结构示意图,该服务器1300可因配置或性能不同而产生比较大的差异,可以包括一个或多个处理器(Central Processing Units,CPU)1301和一个或多个的存储器1302,其中,该一个或多个存储器1302中存储有至少一条程序指令,该至少一条程序指令由该一个或多个处理器1301加载并执行以实现上述各个方法实施例提供的通信控制方法。当然,该服务器1300还可以具有有线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该服务器1300还可以包括其他用于实现设备功能的部件,在此不做赘述。FIG. 13 is a schematic structural diagram of a server provided by an embodiment of the present application. The server 1300 may have relatively large differences due to different configurations or performance, and may include one or more processors (Central Processing Units, CPU) 1301 and one Or multiple memories 1302, wherein at least one program instruction is stored in the one or more memories 1302, and the at least one program instruction is loaded and executed by the one or more processors 1301 to implement the methods provided in the foregoing various method embodiments Communication control method. Of course, the server 1300 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface for input and output. The server 1300 may also include other components for implementing device functions, which will not be repeated here.
在示例性实施例中,还提供了一种计算机可读存储介质,该存储介质中存储有至少一条程序代码,该至少一条程序代码由服务器的处理器加载并执行,以实现上述任一种通信控制方法。In an exemplary embodiment, a computer-readable storage medium is also provided, the storage medium stores at least one piece of program code, and the at least one piece of program code is loaded and executed by a processor of a server, so as to implement any of the foregoing communications. Control Method.
可选地,上述计算机可读存储介质可以是只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)、磁带、软盘和光数据存储设备等。Optionally, the foregoing computer-readable storage medium may be Read-Only Memory (ROM), Random Access Memory (RAM), Compact Disc Read-Only Memory, CD-ROM ), magnetic tapes, floppy disks and optical data storage devices.
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。It should be understood that the "plurality" mentioned herein refers to two or more. "And/or" describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects before and after are in an "or" relationship.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the foregoing embodiments of the present application are for description only, and do not represent the superiority or inferiority of the embodiments.
以上仅为本申请的示例性实施例,不用于造成限制,凡在本申请实施例的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请实施例的保护范围之内。The above are only exemplary embodiments of the present application, and are not used to create limitations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present application shall be included in the protection of the embodiments of the present application. Within range.

Claims (26)

  1. 一种通信控制方法,其中,所述方法应用于服务器,所述服务器与客户端通过网络进行通信连接,所述客户端与所述服务器之间建立有多个链路通道,所述方法包括:A communication control method, wherein the method is applied to a server, the server and a client communicate through a network, and a plurality of link channels are established between the client and the server, and the method includes:
    根据所述客户端的网络连接情况检测所述客户端是否发生网络故障;Detecting whether the client has a network failure according to the network connection status of the client;
    响应于所述客户端发生网络故障,确定所述客户端的网络故障类型;In response to a network failure of the client, determining the type of network failure of the client;
    根据所述网络故障类型,从所述多个链路通道中选择与所述网络故障类型匹配的目标链路通道;According to the network failure type, selecting a target link channel matching the network failure type from the multiple link channels;
    基于所述目标链路通道与所述客户端进行通信。Communicating with the client based on the target link channel.
  2. 根据权利要求1所述的方法,其中,所述多个链路通道包括HTTP超文本传输协议短链接通道、TCP传输控制协议长链接通道及短信通道;The method according to claim 1, wherein the multiple link channels include HTTP hypertext transfer protocol short link channel, TCP transmission control protocol long link channel and short message channel;
    所述根据所述网络故障类型,从所述多个链路通道中选择与所述网络故障类型匹配的目标链路通道,包括:The selecting a target link channel matching the network failure type from the multiple link channels according to the network failure type includes:
    响应于所述网络故障类型为网络信号不满足要求,将所述短信通道作为与所述网络故障类型匹配的目标链路通道。In response to the network failure type being that the network signal does not meet the requirements, the short message channel is used as a target link channel matching the network failure type.
  3. 根据权利要求2所述的方法,其中,所述基于所述目标链路通道与所述客户端进行通信,包括:The method according to claim 2, wherein the communicating with the client based on the target link channel comprises:
    通过监听所述短信通道获取短信消息,所述短信消息的内容包括订单信息;Obtain an SMS message by monitoring the SMS channel, and the content of the SMS message includes order information;
    对所述短信消息进行解析,得到所述订单信息;Parse the short message to obtain the order information;
    将所述订单信息转化到图形界面,所述图形界面上包括操作指令按钮;Transforming the order information into a graphical interface, the graphical interface including operation instruction buttons;
    将所述图形界面发送至所述客户端,由所述客户端展示所述图形界面,基于所述操作指令按钮返回对应的操作指令;Sending the graphical interface to the client, the client displays the graphical interface, and returns a corresponding operation instruction based on the operation instruction button;
    根据所述操作指令向所述客户端发送更新的图形界面,所述更新的图形界面上包括与所述操作指令对应的订单信息。Send an updated graphical interface to the client according to the operation instruction, and the updated graphical interface includes order information corresponding to the operation instruction.
  4. 根据权利要求2所述的方法,其中,所述基于所述目标链路通道与所述客户端进行通信,包括:The method according to claim 2, wherein the communicating with the client based on the target link channel comprises:
    通过所述短信通道向所述客户端发送短信消息,所述短信消息的内容包括订单信息;Sending a short message message to the client through the short message channel, and the content of the short message message includes order information;
    接收所述客户端基于所述订单信息返回的交互指令代码,所述交互指令代码用于指示对应的交互指令;Receiving an interaction instruction code returned by the client based on the order information, where the interaction instruction code is used to indicate a corresponding interaction instruction;
    根据所述交互指令代码通过所述短信通道向所述客户端返回新的短信消息,所述新的短信消息的内容包括与所述交互指令代码对应的订单信息。A new short message message is returned to the client through the short message channel according to the interaction instruction code, and the content of the new short message message includes order information corresponding to the interaction instruction code.
  5. 根据权利要求2-4任一所述的方法,其中,所述基于所述目标链路通道与所述客户端进行通信之前,所述方法还包括:The method according to any one of claims 2-4, wherein, before the communication with the client based on the target link channel, the method further comprises:
    接收所述客户端发送的开通短信通道请求;Receiving an SMS channel opening request sent by the client;
    根据所述开通短信通道请求向所述客户端发送短信验证码;Sending an SMS verification code to the client according to the SMS channel opening request;
    接收所述客户端返回的短信验证码;Receiving the SMS verification code returned by the client;
    响应于所述客户端返回的短信验证码与所述服务器发送的短信验证码一致,为所述客户端开通所述短信通道。In response to the SMS verification code returned by the client being consistent with the SMS verification code sent by the server, the SMS channel is opened for the client.
  6. 根据权利要求1-4任一所述的方法,其中,所述根据所述客户端的网络连接情况检测所述客户端是否发生网络故障,包括:The method according to any one of claims 1 to 4, wherein the detecting whether the client has a network failure according to the network connection status of the client comprises:
    确定所述客户端使用的运营商网络,根据所述客户端的网络连接情况确定所述运营商网络在目标时间段内的网络连接成功率;Determine the operator network used by the client, and determine the network connection success rate of the operator network in the target time period according to the network connection status of the client;
    响应于所述运营商网络在所述目标时间段内的网络连接成功率小于成功率阈值,确定所述客户端发生网络故障。In response to the network connection success rate of the operator's network in the target time period being less than the success rate threshold, it is determined that the client has a network failure.
  7. 根据权利要求1-4任一所述的方法,其中,所述确定所述客户端的网络故障类型,包括:The method according to any one of claims 1 to 4, wherein said determining the type of network failure of the client terminal comprises:
    向所述客户端发送网络诊断指令,所述网络诊断指令用于指示所述客户端反馈网络相关信息,所述网络相关信息包括所述客户端的基本信息、设备信息、网络信息、网络连接信息及接口检查信息中的至少一种;Send a network diagnosis instruction to the client. The network diagnosis instruction is used to instruct the client to feed back network-related information. The network-related information includes the client's basic information, device information, network information, network connection information, and At least one of the interface check information;
    接收所述客户端反馈的网络相关信息,根据所述网络相关信息确定所述客户端的网络故障类型。Receive network-related information fed back by the client, and determine the type of network failure of the client according to the network-related information.
  8. 根据权利要求2-4任一所述的方法,其中,所述根据所述网络故障类型,从所述多个链路通道中选择与所述网络故障类型匹配的目标链路通道,还包括:The method according to any one of claims 2-4, wherein the selecting a target link channel matching the network failure type from the multiple link channels according to the network failure type, further comprising:
    响应于所述网络故障类型为网络信号满足要求,但发生劫持或网络链路故障,按照如下的任一种方式从所述多个链路通道中选择与所述网络故障类型匹配的目标链路通道;In response to the network failure type that the network signal meets the requirements, but hijacking or network link failure occurs, select a target link matching the network failure type from the multiple link channels in any of the following ways aisle;
    获取所述HTTP短链接通道的连接成功率以及所述TCP长链接通道的连接成功率,将所述HTTP短链接通道和所述TCP长链接通道中连接成功率高的通道作为所述目标链路通道;Acquire the connection success rate of the HTTP short link channel and the connection success rate of the TCP long link channel, and use the channel with the high connection success rate among the HTTP short link channel and the TCP long link channel as the target link aisle;
    或者,将所述TCP长链接通道作为所述目标链路通道,响应于所述客户端未能通过所述TCP长链接通道与所述服务器进行通信,将所述目标链路通道由所述TCP长连接通道切换为所述HTTP短链接通道。Alternatively, the TCP long link channel is used as the target link channel, and in response to the client's failure to communicate with the server through the TCP long link channel, the target link channel is transferred from the TCP The long connection channel is switched to the HTTP short link channel.
  9. 一种通信控制方法,其中,所述方法应用于客户端,所述客户端与服务器通过网络进行通信连接,所述客户端与所述服务器之间建立有多个链路通道,所述方法包括:A communication control method, wherein the method is applied to a client, the client and the server communicate through a network, and a plurality of link channels are established between the client and the server, and the method includes :
    获取网络连接情况;Get network connection status;
    将所述网络连接情况发送至所述服务器,由所述服务器基于所述网络连接情况确定目标链路通道;Sending the network connection status to the server, and the server determines a target link channel based on the network connection status;
    基于所述目标链路通道与所述服务器进行通信。Communicating with the server based on the target link channel.
  10. 根据权利要求9所述的方法,其中,所述基于所述目标链路通道与所述服务器进行通信,包括:The method according to claim 9, wherein the communicating with the server based on the target link channel comprises:
    接收所述服务器发送的图形界面,显示所述图形界面,所述图形界面上包括订单信息及操作指令按钮;Receiving a graphical interface sent by the server, and displaying the graphical interface, the graphical interface including order information and operation instruction buttons;
    基于所述操作指令按钮获取对应的操作指令;Obtaining a corresponding operation instruction based on the operation instruction button;
    向所述服务器发送所述操作指令;Sending the operation instruction to the server;
    接收所述服务器基于所述操作指令发送的更新的图形界面,所述更新的图形界面上包括与所述操作指令对应的订单信息;Receiving an updated graphical interface sent by the server based on the operating instruction, where the updated graphical interface includes order information corresponding to the operating instruction;
    显示所述更新的图形界面。The updated graphical interface is displayed.
  11. 根据权利要求9所述的方法,其中,所述基于所述目标链路通道与所述客户端进行通信,包括:The method according to claim 9, wherein the communicating with the client based on the target link channel comprises:
    接收所述服务器发送的短信消息,所述短信消息的内容包括订单信息;Receiving a short message message sent by the server, where the content of the short message message includes order information;
    显示所述订单信息,基于所述订单信息获取输入的交互指令代码,所述交互指令代码用于指示对应的交互指令;Displaying the order information, obtaining an input interaction instruction code based on the order information, the interaction instruction code being used to indicate a corresponding interaction instruction;
    向所述服务器返回所述交互指令代码;Return the interactive instruction code to the server;
    接收所述服务器根据所述交互指令代码返回的新的短信消息,所述新的短信消息的内容包括与所述交互指令代码对应的订单信息;Receiving a new short message message returned by the server according to the interaction instruction code, where the content of the new short message message includes order information corresponding to the interaction instruction code;
    显示所述新的短信消息。Display the new short message message.
  12. 根据权利要求9-11任一所述的方法,其中,所述基于所述目标链路通道与所述客户端进行通信之前,所述方法还包括:The method according to any one of claims 9-11, wherein, before the communication with the client based on the target link channel, the method further comprises:
    向所述服务器发送开通短信通道请求,接收所述服务器发送的短信验证码;Sending an SMS channel opening request to the server, and receiving an SMS verification code sent by the server;
    通过验证界面获取输入的短信验证码,向所述服务器返回所述输入的短信验证码,由所述服务器基于所述输入的短信验证码开通短信通道。The entered SMS verification code is acquired through the verification interface, and the entered SMS verification code is returned to the server, and the SMS channel is opened by the server based on the entered SMS verification code.
  13. 一种通信控制装置,其中,所述装置应用于服务器,所述服务器与客户端通过网络进行通信连接,所述客户端与所述服务器之间建立有多个链路通道,所述装置包括:A communication control device, wherein the device is applied to a server, the server and a client communicate through a network, and a plurality of link channels are established between the client and the server, and the device includes:
    检测模块,用于根据所述客户端的网络连接情况检测所述客户端是否发生网络故障;The detection module is configured to detect whether the client has a network failure according to the network connection status of the client;
    确定模块,用于响应于所述客户端发生网络故障,确定所述客户端的网络故障类型;The determining module is configured to determine the type of network failure of the client in response to a network failure of the client;
    选择模块,用于根据所述网络故障类型,从所述多个链路通道中选择与所述网络故障类型匹配的目标链路通道;A selection module, configured to select a target link channel matching the network failure type from the multiple link channels according to the network failure type;
    通信模块,用于基于所述目标链路通道与所述客户端进行通信。The communication module is configured to communicate with the client based on the target link channel.
  14. 根据权利要求13所述的装置,其中,所述多个链路通道包括HTTP超文本传输协议短链接通道、TCP传输控制协议长链接通道及短信通道,所述选择模块,用于响应于所述网络故障类型为网络信号不满足要求,将所述短信通道作为与所述网络故障类型匹配的目标链路通道。The device according to claim 13, wherein the multiple link channels include HTTP hypertext transfer protocol short link channel, TCP transmission control protocol long link channel and short message channel, and the selection module is configured to respond to the The network fault type is that the network signal does not meet the requirements, and the short message channel is used as the target link channel matching the network fault type.
  15. 根据权利要求14所述的装置,其中,所述通信模块,用于通过监听所述短信通道获取短信消息,所述短信消息的内容包括订单信息;对所述短信消息进行解析,得到所述订单信息;将所述订单信息转化到图形界面,所述图形界面上包括操作指令按钮;将所述图形界面发送至所述客户端,由所述客户端展示所述图形界面,基于所述操作指令按钮返回对应的操作指令;根据所述操作指令向所述客户端发送更新的图形界面,所述更新的图形界面上包括与所述操作指令对应的订单信息。The device according to claim 14, wherein the communication module is configured to obtain a short message message by monitoring the short message channel, and the content of the short message message includes order information; the short message message is parsed to obtain the order Information; the order information is transformed into a graphical interface, the graphical interface includes an operation instruction button; the graphical interface is sent to the client, the client displays the graphical interface, based on the operation instruction The button returns a corresponding operation instruction; according to the operation instruction, an updated graphical interface is sent to the client, and the updated graphical interface includes order information corresponding to the operation instruction.
  16. 根据权利要求14所述的装置,其中,所述通信模块,用于通过所述短信通道向所述客户端发送短信消息,所述短信消息的内容包括订单信息;接收所述客户端基于所述订单信息返回的交互指令代码,所述交互指令代码用于指示对应的交互指令;根据所述交互指令代码通过所述短信通道向所述客户端返回新的短信消息,所述新的短信消息的内容包括与所述交互指令代码对应的订单信息。The apparatus according to claim 14, wherein the communication module is configured to send a short message message to the client through the short message channel, and the content of the short message message includes order information; receiving the client based on the The interaction instruction code returned by the order information, the interaction instruction code is used to indicate the corresponding interaction instruction; according to the interaction instruction code, a new short message message is returned to the client through the short message channel, and the value of the new short message message is The content includes order information corresponding to the interactive instruction code.
  17. 根据权利要求14-16任一所述的装置,其中,所述装置还包括:The device according to any one of claims 14-16, wherein the device further comprises:
    接收模块,用于接收所述客户端发送的开通短信通道请求;The receiving module is used to receive the SMS channel opening request sent by the client;
    发送模块,用于根据所述开通短信通道请求向所述客户端发送短信验证码;A sending module, configured to send an SMS verification code to the client according to the SMS channel opening request;
    所述接收模块,还用于接收所述客户端返回的短信验证码;The receiving module is also used to receive the SMS verification code returned by the client;
    开通模块,用于响应于所述客户端返回的短信验证码与所述服务器发送的短信验证码一致,为所述客户端开通所述短信通道。The activation module is used for opening the SMS channel for the client in response to that the SMS verification code returned by the client is consistent with the SMS verification code sent by the server.
  18. 根据权利13-16任一所述的装置,其中,所述检测模块,确定所述客户端使用的运营商网络,根据所述客户端的网络连接情况确定所述运营商网络在目标时间段内的网络连接成 功率;响应于所述运营商网络在所述目标时间段内的网络连接成功率小于成功率阈值,确定所述客户端发生网络故障。The apparatus according to any one of claims 13-16, wherein the detection module determines the operator network used by the client, and determines the network connection of the operator in the target time period according to the network connection of the client Network connection success rate; in response to the network connection success rate of the operator's network in the target time period being less than the success rate threshold, it is determined that the client has a network failure.
  19. 根据权利要求13-16任一所述的装置,其中,所述确定模块,用于向所述客户端发送网络诊断指令,所述网络诊断指令用于指示所述客户端反馈网络相关信息,所述网络相关信息包括所述客户端的基本信息、设备信息、网络信息、网络连接信息及接口检查信息中的至少一种;接收所述客户端反馈的网络相关信息,根据所述网络相关信息确定所述客户端的网络故障类型。The device according to any one of claims 13-16, wherein the determining module is configured to send a network diagnostic instruction to the client, and the network diagnostic instruction is used to instruct the client to feed back network-related information, so The network-related information includes at least one of the basic information of the client, device information, network information, network connection information, and interface check information; the network-related information fed back by the client is received, and the network-related information is determined according to the network-related information. Describe the type of network failure of the client.
  20. 根据权利要求14-16任一所述的装置,其中,所述选择模块,还用于响应于所述网络故障类型为网络信号满足要求,但发生劫持或网络链路故障,按照如下的任一种方式从所述多个链路通道中选择与所述网络故障类型匹配的目标链路通道;获取所述HTTP短链接通道的连接成功率以及所述TCP长链接通道的连接成功率,将所述HTTP短链接通道和所述TCP长链接通道中连接成功率高的通道作为所述目标链路通道;或者,将所述TCP长链接通道作为所述目标链路通道,响应于所述客户端未能通过所述TCP长链接通道与所述服务器进行通信,将所述目标链路通道由所述TCP长连接通道切换为所述HTTP短链接通道。The device according to any one of claims 14-16, wherein the selection module is further configured to respond to the network failure type that the network signal meets the requirements, but hijacking or network link failure occurs, according to any one of the following This method selects the target link channel matching the network fault type from the multiple link channels; obtains the connection success rate of the HTTP short link channel and the connection success rate of the TCP long link channel, and compares all The HTTP short link channel and the channel with a high connection success rate among the TCP long link channels are used as the target link channel; or, the TCP long link channel is used as the target link channel, in response to the client Fail to communicate with the server through the TCP long link channel, and switch the target link channel from the TCP long link channel to the HTTP short link channel.
  21. 一种通信控制装置,其中,所述装置应用于客户端,所述客户端与服务器通过网络进行通信连接,所述客户端与所述服务器之间建立有多个链路通道,所述装置包括:A communication control device, wherein the device is applied to a client, the client and the server are in communication connection through a network, a plurality of link channels are established between the client and the server, and the device includes :
    获取模块,用于获取网络连接情况;Obtaining module, used to obtain network connection status;
    发送模块,用于将所述网络连接情况发送至所述服务器,由所述服务器基于所述网络连接情况确定目标链路通道;A sending module, configured to send the network connection status to the server, and the server determines the target link channel based on the network connection status;
    通信模块,用于基于所述目标链路通道与所述服务器进行通信。The communication module is configured to communicate with the server based on the target link channel.
  22. 根据权利要求21所述的装置,其中,所述通信模块,用于接收所述服务器发送的图形界面,显示所述图形界面,所述图形界面上包括订单信息及操作指令按钮;基于所述操作指令按钮获取对应的操作指令;向所述服务器发送所述操作指令;接收所述服务器基于所述操作指令发送的更新的图形界面,所述更新的图形界面上包括与所述操作指令对应的订单信息;显示所述更新的图形界面。The device according to claim 21, wherein the communication module is configured to receive a graphical interface sent by the server and display the graphical interface, the graphical interface including order information and operation instruction buttons; based on the operation The instruction button acquires the corresponding operation instruction; sends the operation instruction to the server; receives an updated graphical interface sent by the server based on the operation instruction, and the updated graphical interface includes an order corresponding to the operation instruction Information; display the updated graphical interface.
  23. 根据权利要求21所述的装置,其中,所述通信模块,用于接收所述服务器发送的短信消息,所述短信消息的内容包括订单信息;显示所述订单信息,基于所述订单信息获取输入的交互指令代码,所述交互指令代码用于指示对应的交互指令;向所述服务器返回所述交互指令代码;接收所述服务器根据所述交互指令代码返回的新的短信消息,所述新的短信消息的内容包括与所述交互指令代码对应的订单信息;显示所述新的短信消息。The device according to claim 21, wherein the communication module is configured to receive a short message message sent by the server, the content of the short message message includes order information; display the order information, and obtain input based on the order information The interactive instruction code is used to indicate the corresponding interactive instruction; the interactive instruction code is returned to the server; the new short message message returned by the server according to the interactive instruction code is received, and the new The content of the short message message includes the order information corresponding to the interaction instruction code; the new short message message is displayed.
  24. 根据权利要求21-23任一所述的装置,其中,所述发送模块,还用于向所述服务器发送开通短信通道请求;The device according to any one of claims 21-23, wherein the sending module is further configured to send a request for opening a short message channel to the server;
    所述装置还包括:接收模块,用于接收所述服务器发送的短信验证码;The device also includes: a receiving module for receiving a short message verification code sent by the server;
    发送模块,还用于通过验证界面获取输入的短信验证码,向所述服务器返回所述输入的短信验证码,由所述服务器基于所述输入的短信验证码开通短信通道。The sending module is further configured to obtain the entered short message verification code through the verification interface, and return the entered short message verification code to the server, and the server opens a short message channel based on the entered short message verification code.
  25. 一种通信控制设备,其中,所述通信控制设备包括处理器和存储器,所述存储器中存储有至少一条程序代码,所述至少一条程序代码由所述处理器加载并执行,以实现如权利要求1至8任一所述的通信控制方法,或者,实现权利要求9-12任一所述的通信控制方法。A communication control device, wherein the communication control device includes a processor and a memory, and at least one piece of program code is stored in the memory, and the at least one piece of program code is loaded and executed by the processor to realize The communication control method according to any one of 1 to 8, or implements the communication control method according to any one of claims 9-12.
  26. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有至少一条程度代码,所述至少一条程序代码由处理器加载并执行,以实现如权利要求1至8任一所述的通信控制方法,或者,实现权利要求9-12任一所述的通信控制方法。A computer-readable storage medium, wherein at least one piece of degree code is stored in the computer-readable storage medium, and the at least one piece of program code is loaded and executed by a processor, so as to implement any one of claims 1 to 8 , Or implement the communication control method according to any one of claims 9-12.
PCT/CN2021/094184 2020-05-21 2021-05-17 Communication control WO2021233262A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010438213.8 2020-05-21
CN202010438213.8A CN113727406B (en) 2020-05-21 2020-05-21 Communication control method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2021233262A1 true WO2021233262A1 (en) 2021-11-25

Family

ID=78671419

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094184 WO2021233262A1 (en) 2020-05-21 2021-05-17 Communication control

Country Status (2)

Country Link
CN (1) CN113727406B (en)
WO (1) WO2021233262A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039884A (en) * 2021-12-15 2022-02-11 中国建设银行股份有限公司 Network link exception handling method and device
CN114302349A (en) * 2021-12-07 2022-04-08 北京羽乐创新科技有限公司 Method and system for extracting number by client
CN114979313A (en) * 2022-06-13 2022-08-30 深圳市宏电技术股份有限公司 Data supplementary reporting method and device for communication equipment, communication equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679443A (en) * 2022-03-03 2022-06-28 北京百度网讯科技有限公司 Method and device for downloading video data, electronic equipment and storage medium
CN114691237A (en) * 2022-03-30 2022-07-01 西安易朴通讯技术有限公司 Parameter configuration method of server, client and computing device
CN115361388B (en) * 2022-10-20 2023-04-11 阿里巴巴(中国)有限公司 Resource scheduling method and device in edge cloud computing system
CN115914065B (en) * 2022-12-06 2024-05-14 中国联合网络通信集团有限公司 Terminal self-help diagnosis method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130295854A1 (en) * 2006-02-17 2013-11-07 Timothy S. Olson Troubleshooting Link and Protocol in a Wireless Network
CN104065508A (en) * 2014-06-23 2014-09-24 浪潮(北京)电子信息产业有限公司 Application service health examination method, device and system
CN105451197A (en) * 2014-09-29 2016-03-30 阿里巴巴集团控股有限公司 Method and device of sending communication information
CN107196854A (en) * 2017-06-20 2017-09-22 西安交通大学 Datum plane abnormality eliminating method in a kind of software defined network

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103874035B (en) * 2012-12-13 2018-10-02 中国移动通信集团公司 A kind of Mobile terminal message push method and equipment
CN107846330A (en) * 2017-12-18 2018-03-27 深圳创维数字技术有限公司 A kind of network fault detecting method, terminal and computer-readable medium
CN110417915B (en) * 2019-08-22 2021-12-31 北京大米科技有限公司 Push message transmission method and device, storage medium and electronic equipment
CN110795336A (en) * 2019-09-25 2020-02-14 腾讯科技(深圳)有限公司 Application program control method, device, equipment and readable storage medium
CN110855792B (en) * 2019-11-19 2023-04-18 南京领行科技股份有限公司 Message pushing method, device, equipment and medium
CN111064795B (en) * 2019-12-20 2021-05-14 腾讯科技(深圳)有限公司 Web page access acceleration method, system, computer equipment, server and medium
CN111030873A (en) * 2019-12-24 2020-04-17 迈普通信技术股份有限公司 Fault diagnosis method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130295854A1 (en) * 2006-02-17 2013-11-07 Timothy S. Olson Troubleshooting Link and Protocol in a Wireless Network
CN104065508A (en) * 2014-06-23 2014-09-24 浪潮(北京)电子信息产业有限公司 Application service health examination method, device and system
CN105451197A (en) * 2014-09-29 2016-03-30 阿里巴巴集团控股有限公司 Method and device of sending communication information
CN107196854A (en) * 2017-06-20 2017-09-22 西安交通大学 Datum plane abnormality eliminating method in a kind of software defined network

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114302349A (en) * 2021-12-07 2022-04-08 北京羽乐创新科技有限公司 Method and system for extracting number by client
CN114039884A (en) * 2021-12-15 2022-02-11 中国建设银行股份有限公司 Network link exception handling method and device
CN114039884B (en) * 2021-12-15 2023-08-08 中国建设银行股份有限公司 Network link exception handling method and device
CN114979313A (en) * 2022-06-13 2022-08-30 深圳市宏电技术股份有限公司 Data supplementary reporting method and device for communication equipment, communication equipment and storage medium
CN114979313B (en) * 2022-06-13 2024-05-17 深圳市宏电技术股份有限公司 Communication equipment data report supplementing method and device, communication equipment and storage medium

Also Published As

Publication number Publication date
CN113727406B (en) 2022-11-29
CN113727406A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
WO2021233262A1 (en) Communication control
US11050683B2 (en) System for providing dialog content
US11711670B2 (en) Method for activating service based on user scenario perception, terminal device, and system
US10182101B2 (en) Method, apparatus and system for sharing webpage
CN108471376B (en) Data processing method, device and system
US11798107B2 (en) Scenario-based application recommendation method and apparatus
CN107204989B (en) Advertisement blocking method, terminal, server and storage medium
CN110020293B (en) Multimedia data display method, device and storage medium
CN112420217B (en) Message pushing method, device, equipment and storage medium
JP2018506793A (en) Method, apparatus, system and computer program for providing a rich menu of official accounts in an instant messaging service
CN111597455A (en) Social relationship establishing method and device, electronic equipment and storage medium
WO2015003636A1 (en) Method and device for interception of page elements
JP6915074B2 (en) Message notification method and terminal
CN108429668B (en) Message processing method, device, terminal and system
WO2022127200A1 (en) Content display method and apparatus
CN109145182B (en) Data acquisition method and device, computer equipment and system
CN111682983B (en) Interface display method and device, terminal and server
CN116980851A (en) Method and device for sharing subroutines between locomotives, electronic equipment and storage medium
CN112667868B (en) Data detection method and device
CN113468260B (en) Data analysis method and device, electronic equipment and storage medium
CN107798008B (en) Content pushing system, method and device
CN115801717A (en) Welcome language selection method, device, medium and equipment for chat tool
CN115018574A (en) Information display method and device, electronic equipment and storage medium
JP2019511142A (en) Information display method, apparatus and system
CN112748835A (en) Terminal, server, recent task list display method and application recommendation method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21809808

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21809808

Country of ref document: EP

Kind code of ref document: A1