CN108156221B - Communication method and device and electronic equipment - Google Patents

Communication method and device and electronic equipment Download PDF

Info

Publication number
CN108156221B
CN108156221B CN201711262914.5A CN201711262914A CN108156221B CN 108156221 B CN108156221 B CN 108156221B CN 201711262914 A CN201711262914 A CN 201711262914A CN 108156221 B CN108156221 B CN 108156221B
Authority
CN
China
Prior art keywords
target
domain name
identification information
target message
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711262914.5A
Other languages
Chinese (zh)
Other versions
CN108156221A (en
Inventor
陈顺
董红光
董俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201711262914.5A priority Critical patent/CN108156221B/en
Publication of CN108156221A publication Critical patent/CN108156221A/en
Application granted granted Critical
Publication of CN108156221B publication Critical patent/CN108156221B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/148Migration or transfer of sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • 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/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

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

Abstract

The disclosure relates to a communication method, a communication device and an electronic device, wherein the method comprises the following steps: acquiring a target domain name request corresponding to identification information of a target message through an operating system, wherein the target message is used for indicating the operating system to execute target operation; acquiring identification information of the target message based on the target domain name request; determining the target message based on the identification information; and executing the target operation according to the target message. According to the technical scheme, the functions of the operating system can be enhanced, and the user experience of the terminal equipment is improved. In addition, because the target domain name request is generated according to the identification information of the target message, the problem that the domain name request cannot be generated because the format and the length of the target message do not accord with the requirements on the domain name information in the related technology can be avoided.

Description

Communication method and device and electronic equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a communication method and apparatus, and an electronic device.
Background
With the development of computer communication technology, various web pages and local application software bring excellent communication experience to people. Through a message channel provided by a web proxy service, such as a browser, a web page may send a request to an operating system to access a system resource. Jump between applications can be realized by additionally arranging an API interface. For example, in a browser adapted to the Deeplink technology, a web page running in the browser executes a target operation passing through the operating system, such as a request to jump to the local application, and the browser may forward the request to the operating system to jump to the local application through the operating system. However, if the API interface is not added to the browser, the above functions may not be implemented, which affects the user experience of the terminal.
Disclosure of Invention
In order to overcome the problems in the related art, embodiments of the present disclosure provide a communication method, a communication device and an electronic device, so as to solve the deficiencies in the related art.
According to a first aspect of the embodiments of the present disclosure, there is provided a communication method, including:
acquiring a target domain name request corresponding to identification information of a target message through an operating system, wherein the target message is used for indicating the operating system to execute target operation;
acquiring identification information of the target message based on the target domain name request;
determining the target message based on the identification information;
and executing the target operation according to the target message.
In an embodiment, the obtaining, by the operating system, a target domain name request corresponding to the identification information of the target message includes:
the method comprises the steps of obtaining a target domain name request which is sent by a webpage through a webpage client and corresponds to identification information of a target message, wherein the target domain name request comprises target domain name information generated according to the identification information of the target message.
In an embodiment, before the obtaining, by the operating system, the target domain name request corresponding to the identification information of the target message, the method further includes:
when a preset trigger condition is detected, acquiring identification information of a target message;
performing domain name character conversion on the identification information to obtain a target character sequence;
generating a target domain name request corresponding to the target message according to the target character sequence, wherein the target domain name request at least comprises the target character sequence;
and sending the target domain name request to the operating system.
In an embodiment, the obtaining the identification information of the target message includes:
acquiring the target message;
and determining the identification information of the target message based on the corresponding relation between the target message and the identification information.
In an embodiment, the determining the identification information of the target message based on the correspondence between the target message and the identification information includes:
sending the target message to a server, wherein the server is used for determining the identification information of the target message based on the corresponding relation between the target message and the identification information;
and receiving the identification information returned by the server.
In an embodiment, the generating a target domain name request corresponding to the target message according to the target character sequence includes:
determining target domain name information according to the target character sequence, wherein the target domain name information has preset characteristic information;
and generating the target domain name request according to the target domain name information.
In an embodiment, the acquiring identification information of the target message based on the target domain name request includes:
identifying a target domain name request sent by a webpage client through a preset component;
determining target domain name information corresponding to the target message according to the target domain name request;
and analyzing the identification information of the target message based on the target domain name information.
In an embodiment, the identifying, by a preset component, a target domain name request sent by a web client includes:
and identifying a target domain name request sent by the webpage client through a preset DNS interface or a firewall component.
In an embodiment, the identifying, by a preset component, a target domain name request sent by a web client includes:
receiving a domain name request sent by a webpage client through a preset component, wherein the domain name request comprises domain name information;
determining whether the domain name information has preset characteristic information, wherein the preset characteristic information is used for identifying identification information of a target message carried by the current domain name information;
and if the domain name information is determined to have the preset characteristic information, determining the domain name request as a target domain name request.
In an embodiment, the method further comprises:
sending the target domain name information to a preset message service;
and executing the step of resolving the identification information of the target message based on the target domain name information through the preset message service.
In an embodiment, the parsing the identification information of the target message based on the target domain name information includes:
determining a target character sequence according to the target domain name information;
and determining the identification information of the target message according to the target character sequence.
In an embodiment, the determining the target message based on the identification information includes:
and inquiring the target message corresponding to the identification information based on the corresponding relation between the target message and the identification information.
In an embodiment, the querying, based on a correspondence between a target message and identification information, the target message corresponding to the identification information includes:
sending the identification information to a server, wherein the server is used for determining a target message corresponding to the identification information based on the corresponding relation between the target message and the identification information;
and receiving the target message returned by the server.
In an embodiment, the method further comprises:
and if the operation of acquiring the target message is determined to be completed within the effective acquisition duration, executing the step of executing the target operation according to the target message.
In an embodiment, the target domain name request conforms to a format requirement of a domain name request, the domain name request is used for executing a first operation, and the target operation is an operation other than the first operation.
In one embodiment, the performing the target operation according to the target message includes:
extracting target application parameters from the target message;
and opening the target application according to the target application parameters.
In one embodiment, the target application parameters include at least an identity of the target application;
the opening of the target application according to the target application parameters comprises:
determining whether the target application is installed locally or not according to the identity;
if the target application is not installed locally, downloading and installing the target application;
and opening the target application according to the target message through a preset application platform.
According to a second aspect of the embodiments of the present disclosure, there is provided a communication method, applied to a server, including:
receiving a target message sent by a webpage of a terminal device through a webpage client, wherein the target message is a message acquired when a preset trigger condition is detected by the webpage;
determining identification information corresponding to the target message, and storing the corresponding relation between the target message and the identification information;
sending the identification information to the webpage or the webpage client for generating a target domain name request according to the identification information;
receiving identification information sent by an operating system of the terminal equipment;
inquiring the target message corresponding to the identification information based on the corresponding relation;
and sending the target message to the operating system for instructing the operating system to execute the target operation according to the target message.
In an embodiment, the method further comprises:
and if the target message is determined to be inquired within the effective inquiry duration, executing the step of sending the target message to the operating system.
According to a third aspect of the embodiments of the present disclosure, there is provided a communication apparatus including:
the domain name request acquisition module is used for acquiring a target domain name request corresponding to the identification information of a target message through an operating system, wherein the target message is used for indicating the operating system to execute target operation;
the identification information acquisition module is used for acquiring the identification information of the target message based on the target domain name request;
a target message determination module for determining the target message based on the identification information;
and the target operation execution module is used for executing the target operation according to the target message.
In an embodiment, the domain name request obtaining module includes:
the domain name request acquiring unit is used for acquiring a target domain name request which is sent by a webpage through a webpage client and corresponds to the identification information of the target message, and the target domain name request comprises target domain name information generated according to the identification information of the target message.
In one embodiment, the apparatus further comprises: the domain name request generating module and the domain name request sending module;
the domain name request generating module comprises:
the identification information acquisition unit is used for acquiring the identification information of the target message when a preset trigger condition is detected;
the domain name character conversion unit is used for carrying out domain name character conversion on the identification information to obtain a target character sequence;
a domain name request generating unit, configured to generate a target domain name request corresponding to the target message according to the target character sequence, where the target domain name request at least includes the target character sequence;
the domain name request sending module is used for sending the target domain name request to the operating system.
In an embodiment, the identification information obtaining unit is further configured to:
acquiring the target message;
and determining the identification information of the target message based on the corresponding relation between the target message and the identification information.
In an embodiment, the identification information obtaining unit is further configured to:
sending the target message to a server, wherein the server is used for determining the identification information of the target message based on the corresponding relation between the target message and the identification information;
and receiving the identification information returned by the server.
In an embodiment, the domain name request generating unit is further configured to:
determining target domain name information according to the target character sequence, wherein the target domain name information has preset characteristic information;
and generating the target domain name request according to the target domain name information.
In an embodiment, the identification information obtaining module includes:
the domain name request identification unit is used for identifying a target domain name request sent by a webpage client through a preset component;
a domain name information determining unit, configured to determine, according to the target domain name request, target domain name information corresponding to the target message;
and the identification information analyzing unit is used for analyzing the identification information of the target message based on the target domain name information.
In an embodiment, the domain name request identification unit is further configured to identify a target domain name request sent by the web client through a preset DNS interface or a firewall component.
In an embodiment, the domain name request identification unit is further configured to:
receiving a domain name request sent by a webpage client through a preset component, wherein the domain name request comprises domain name information;
determining whether the domain name information has preset characteristic information, wherein the preset characteristic information is used for identifying identification information of a target message carried by the current domain name information;
and when the preset characteristic information is determined to be contained in the domain name information, determining the domain name request as a target domain name request.
In an embodiment, the identification information obtaining module further includes:
a domain name information sending unit, configured to send the target domain name information to a preset message service;
the identification information parsing unit is further configured to perform, through the preset message service, the step of parsing the identification information of the target message based on the target domain name information.
In an embodiment, the identification information parsing unit is further configured to:
determining a target character sequence according to the target domain name information;
and determining the identification information of the target message according to the target character sequence.
In an embodiment, the target message determining module is further configured to query a target message corresponding to the identification information based on a correspondence between the target message and the identification information.
In one embodiment, the target message determination module includes:
the identification information sending unit is used for sending the identification information to a server, and the server is used for determining a target message corresponding to the identification information based on the corresponding relation between the target message and the identification information;
and the target message receiving unit is used for receiving the identification information returned by the server.
In an embodiment, the target operation execution module is further configured to execute the step of executing the target operation according to the target message when it is determined that the operation of acquiring the target message is completed within the valid acquisition duration.
In an embodiment, the target domain name request conforms to a format requirement of a domain name request, the domain name request is used for executing a first operation, and the target operation is an operation other than the first operation.
In one embodiment, the target operation execution module further includes:
an application parameter extraction unit, configured to extract a target application parameter from the target message;
and the target application opening unit is used for opening the target application according to the target message, wherein the target message at least comprises the identity of the target application.
In an embodiment, the target application opening unit is further configured to:
determining whether the target application is installed locally or not according to the identity;
if the target application is not installed locally, downloading and installing the target application;
and opening the target application according to the target message through a preset application platform.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a communication apparatus including:
the target message receiving module is used for receiving a target message sent by a webpage of the terminal equipment through a webpage client, wherein the target message is a message acquired when the webpage detects a preset trigger condition;
the identification determining and storing module is used for determining identification information corresponding to the target message and storing the corresponding relation between the target message and the identification information;
the identification information sending module is used for sending the identification information to the webpage or the webpage client and generating a target domain name request according to the identification information;
the identification information receiving module is used for receiving the identification information sent by the operating system of the terminal equipment;
the target message query module is used for querying the target message corresponding to the identification information based on the corresponding relation;
and the target message sending module is used for sending the target message to the operating system and instructing the operating system to execute the target operation according to the target message.
In an embodiment, the target message sending module is further configured to execute the step of sending the target message to the operating system when it is determined that querying the target message is completed within a valid query duration.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory configured to store processor-executable instructions;
wherein the processor is configured to:
acquiring a target domain name request corresponding to identification information of a target message through an operating system, wherein the target message is used for indicating the operating system to execute target operation;
acquiring identification information of the target message based on the target domain name request;
determining the target message based on the identification information;
and executing the target operation according to the target message.
According to a sixth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when processed by a processor, implements:
acquiring a target domain name request corresponding to identification information of a target message through an operating system, wherein the target message is used for indicating the operating system to execute target operation;
acquiring identification information of the target message based on the target domain name request;
determining the target message based on the identification information;
and executing the target operation according to the target message.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
as can be seen from the foregoing embodiments, according to the present disclosure, an operating system obtains a target domain name request corresponding to identification information of a target message, obtains the identification information of the target message based on the target domain name request, determines the target message based on the identification information, and then executes the target operation according to the target message, so that functions of the operating system can be enhanced, and user experience of a terminal device is improved. In addition, because the target domain name request is generated according to the identification information of the target message, the problem that the domain name request cannot be generated because the format and the length of the target message do not accord with the requirements on the domain name information in the related technology can be avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a method of communication according to a first exemplary embodiment;
fig. 2 is a flow chart illustrating a method of communication according to a second exemplary embodiment;
fig. 3 is a flow chart illustrating a method of communication according to a third exemplary embodiment;
FIG. 4 is a flow diagram illustrating how identification information for a target message is obtained in accordance with an illustrative embodiment;
FIG. 5 is a flowchart illustrating how to obtain identification information for a target message in accordance with yet another illustrative embodiment;
FIG. 6 is a flowchart illustrating how a target domain name request corresponding to a target message is generated in accordance with an illustrative embodiment;
FIG. 7 is a flowchart illustrating how to obtain identification information for a target message based on a target domain name request in accordance with an example embodiment;
FIG. 8 is a flowchart illustrating how to obtain identification information for a target message based on a target domain name request in accordance with yet another illustrative embodiment;
FIG. 9 is a flow diagram illustrating how a target domain name request sent by a web client is identified by a preset component in accordance with an exemplary embodiment;
FIG. 10 is a flowchart illustrating how to resolve identification information for a target message based on target domain name information in accordance with an exemplary embodiment;
FIG. 11 is a flowchart illustrating how to parse the identification information of a target message in accordance with an example embodiment;
fig. 12 is a flow chart illustrating a method of communication according to a fourth exemplary embodiment;
FIG. 13 is a flowchart illustrating how a target message corresponds based on query identification information in accordance with an illustrative embodiment;
fig. 14 is a flow chart illustrating a method of communication according to a fifth exemplary embodiment;
FIG. 15 is a flowchart illustrating how the targeted operations are performed based on the targeted message in accordance with an illustrative embodiment;
FIG. 16 is a flowchart illustrating how a target application may be opened based on the target message in accordance with an illustrative embodiment;
fig. 17 is a flow chart illustrating a method of communication according to a sixth exemplary embodiment;
fig. 18 is a flow chart illustrating a method of communication according to the seventh exemplary embodiment;
FIG. 19A is an application scenario diagram illustrating one application interaction according to an exemplary embodiment of the present disclosure;
FIG. 19B is a diagram of an application scenario of an application interaction in the related art;
fig. 20 is a block diagram illustrating a structure of a communication device according to an exemplary embodiment;
fig. 21 is a block diagram showing a structure of a communication apparatus according to still another exemplary embodiment;
fig. 22 is a block diagram illustrating a structure of a communication apparatus applied to a server according to an exemplary embodiment;
FIG. 23 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The present disclosure provides a communication method, and a related execution main body includes: the terminal device is installed with a client capable of sending a domain name request, for example, client software capable of displaying a Web page, such as a Web browser or other network proxy services such as chat, wechat, and the like, which are collectively referred to as a Web page client in the present disclosure. The client sends the identification information of the target message in the domain name format to the operating system of the terminal device, so that the operating system can acquire the corresponding target message by using the identification information, and further execute a target operation according to the target message, such as shutdown, starting a timer, opening an application program and the like.
FIG. 1 is a flow chart illustrating a method of communication according to an exemplary embodiment; this embodiment may be applied to a terminal device (e.g., a mobile phone, a tablet computer, a personal computer, etc.), as shown in fig. 1, the method includes the following steps S11-S14:
s11: and acquiring a target domain name request corresponding to the identification information of the target message through the operating system, wherein the target message is used for indicating the operating system to execute target operation.
In an embodiment, the terminal device obtains the target domain name request through the operating system, where the target domain name request may be, but is not limited to, a domain name request generated by a webpage (shown by a webpage client) in the terminal device according to the identification information of the target message. Because the target domain name request is generated according to the identification information of the target message, but not directly according to the target message, the problem that the domain name request cannot be generated because the format and the length of the target message do not accord with the requirements on the domain name information in the related technology can be avoided.
In an embodiment, the target domain name request conforms to a format requirement of a domain name request, the domain name request is used for executing a first operation, and the target operation is an operation other than the first operation.
For example, the target domain name request may be for requesting the operating system to perform a domain name resolution operation, while the target operation is a preset operation other than the domain name resolution operation.
S12: and acquiring the identification information of the target message based on the target domain name request.
In an embodiment, the operating system may obtain the identification information by resolving a target domain name request.
In the related art, after a web page sends a Domain Name request to an operating System through a web page client, a preset component of the operating System, such as a Domain Name System (DNS) component, is expected to resolve Domain Name information included in the Domain Name request into a corresponding IP address, so that a subsequent terminal device establishes a network connection, such as a Transmission Control Protocol (TCP) connection, with a network device (such as a network server) corresponding to the IP address, and further transmits information with the network device based on the network connection. That is, the domain name request in the related art includes domain name information that can be resolved into a corresponding IP address.
In one embodiment, the target domain name request is a carrier for the target message, and may not contain domain name information that can resolve the corresponding IP address.
In an embodiment, the specific manner of the operating system resolving the target domain name request may refer to the embodiments shown in fig. 7 to 11, which will not be described herein again.
S13: determining the target message based on the identification information.
In one embodiment, after obtaining the identification information of the target message, the operating system may determine the target message based on the identification information.
In an embodiment, a specific manner of determining, by the operating system, the target message based on the identification information may refer to the following embodiment shown in fig. 12, which is not described herein again.
S14: and executing the target operation according to the target message.
In an embodiment, after the operating system determines the target message, the target operation corresponding to the target message may be determined according to a preset correspondence between the target message and the target operation, and then the target operation is executed.
In an embodiment, a specific manner for the operating system to execute the target operation may be as shown in the following embodiment shown in fig. 15, which is not described herein again.
As can be seen from the foregoing embodiments, according to the present disclosure, an operating system obtains a target domain name request corresponding to identification information of a target message, obtains the identification information of the target message based on the target domain name request, determines the target message based on the identification information, and then executes the target operation according to the target message, so that functions of the operating system can be enhanced, and user experience of a terminal device is improved. In addition, because the target domain name request is generated according to the identification information of the target message, the problem that the domain name request cannot be generated because the format and the length of the target message do not accord with the requirements on the domain name information in the related technology can be avoided.
Fig. 2 is a flow chart illustrating a method of communication according to a second exemplary embodiment; this embodiment may be applied to a terminal device (e.g., a mobile phone, a tablet computer, a personal computer, etc.), as shown in fig. 2, the method includes the following steps S21-S24:
s21: and acquiring a target domain name request which is sent by a webpage through a webpage client and corresponds to the identification information of the target message.
The target domain name request comprises target domain name information generated according to the identification information of the target message, and the target message is used for indicating an operating system to execute target operation.
In an embodiment, an operating system obtains a target domain name request sent by a webpage in a terminal device through a webpage client. For example, after a target domain name request is generated by a web page in the terminal device according to the identification information of the target message, the target domain name request is sent to the operating system through the web page client.
S22: and acquiring the identification information of the target message based on the target domain name request.
S23: determining the target message based on the identification information.
S24: and executing the target operation according to the target message.
The steps S22-S24 are the same as the steps S12-S14 in the embodiment shown in fig. 1, and for related explanation, reference may be made to the aforementioned embodiment, which is not repeated herein.
According to the embodiment, the target domain name request which is sent by the webpage through the webpage client and corresponds to the identification information of the target message is obtained through the operating system, the identification information of the target message is obtained based on the target domain name request, the target message is determined based on the identification information, and then the target operation is executed according to the target message, so that the target operation of the webpage in the terminal equipment, which passes through the operating system, is not limited by whether the API interface is added, and the user experience of the terminal equipment is improved.
Fig. 3 is a flow chart illustrating a method of communication according to a third exemplary embodiment; this embodiment may be applied to a terminal device (e.g., a mobile phone, a tablet computer, a personal computer, etc.), as shown in fig. 3, the method includes the following steps S31-S38:
s31: and when the preset trigger condition is detected, acquiring the identification information of the target message.
In an embodiment, when a preset trigger condition is detected by a web page in a terminal device, identification information of a target message is acquired.
In one embodiment, each target message has identification information that can be used to distinguish the target message from other target messages.
In an embodiment, when it is determined that a preset trigger condition is met, the identification information of the target message is determined through the web page.
In an embodiment, the preset trigger condition may be a preset user trigger operation. The preset user triggering operation may be an operation that a user triggers a preset action on a preset area in the current webpage, for example, an operation of clicking a virtual button, a picture link, and the like in the current webpage, or an operation of performing a preset gesture action on the preset area in the current webpage, and the like.
In an embodiment, the preset trigger condition may also be a preset trigger condition in a web page, and is not directly expressed as a user trigger operation, for example, an event such as loading the web page, or a preset duration for opening the current web page. Taking the preset time length as one hour as an example, correspondingly, after the current webpage detects that the opening time length reaches one hour, the identification information of the target message to be sent is determined.
In an embodiment, determining, by the current web page, the identification information of the target message according to a preset trigger condition may include the following two cases:
in the first case, the current web page is preset with identification information of the target message, and when the web page detects a preset trigger condition, the identification information of the target message may be output according to the trigger condition.
In the second case, the current webpage does not have the identification information of the preset target message, and when the preset trigger condition is detected, the webpage server is requested to generate the identification information of the target message in real time.
And when the webpage detects a preset trigger condition, sending a message request to the webpage server, wherein the message request is used for requesting the webpage server to generate identification information of a target message in real time. After receiving the message request, the web page server generates identification information of a target message and sends the identification information to the web page, so that the web page can acquire the identification information when updating the web page information in real time.
The current web page may be a web page in an HTTP (Hypertext Transfer Protocol) communication mode, or may be a web page in a HTTPs (Secure Hypertext Transfer Protocol) communication mode.
In an embodiment, the manner of obtaining the identification information of the target message may also refer to the embodiment described in fig. 4, which is not described herein again.
S32: and performing domain name character conversion on the identification information to obtain a target character sequence.
In an embodiment, the web page may perform domain name character conversion on the identification information to obtain a target character sequence. According to the domain name protocol specification, the domain name information needs to be composed of characters in a preset character space. In general, the identification information of the target message determined by the web page may not be composed of characters in the preset domain name character space, and thus, each character in the identification information of the target message needs to be converted into a domain name character to obtain the target character sequence.
S33: and generating a target domain name request corresponding to the target message according to the target character sequence, wherein the target domain name request at least comprises the target character sequence.
In an embodiment, after obtaining the target character sequence, the web page may generate a target domain name request according to the target character sequence.
It should be noted that the execution subject of steps S32 and S33 in this embodiment may be a web page or a web page client, or may be a server. In an embodiment, when a preset trigger condition is detected on a web page in a terminal device, identification information of a target message is acquired, and the identification information may be sent to a server to request the server to execute steps S32 and S33 according to the identification information to generate a target domain name request, and then, after the server generates the target domain name request, the target domain name request may be returned to the web page.
In an embodiment, a specific manner of generating the target domain name request may refer to the following embodiment shown in fig. 6, which is not described herein again.
S34: and sending the target domain name request to the operating system.
S35: and acquiring a target domain name request corresponding to the identification information of the target message through the operating system, wherein the target message is used for indicating the operating system to execute target operation.
S36: and acquiring the identification information of the target message based on the target domain name request.
S37: determining the target message based on the identification information.
S38: and executing the target operation according to the target message.
The steps S35-S38 are the same as the steps S11-S14 in the embodiment shown in fig. 1, and for related explanation, reference may be made to the aforementioned embodiment, which is not repeated herein.
As can be seen from the above description, in the embodiment of the present disclosure, by obtaining the identification information of the target message when the preset trigger condition is detected, performing domain name character conversion on the identification information to obtain the target character sequence, then generating the target domain name request corresponding to the target message according to the target character sequence, and further sending the target domain name request to the operating system, the operating system can receive the target domain name request generated by the web page according to the identification information of the target message, so as to obtain the target message from the domain name request through the operating system, and execute the target operation corresponding to the target message, the function of the operating system can be enhanced, so that the web page running in the browser is not limited by whether the browser is provided with an API interface or not to execute the target operation through the operating system, and the user experience of the terminal device is improved. In addition, because the target message is converted into the identification information to generate the target domain name request, the trouble that the format and the length of the target message do not meet the requirements on the domain name information in the related technology and the domain name information can be generated only by further processing can be avoided, the flow of generating the target domain name request can be simplified, and the communication efficiency is improved.
FIG. 4 is a flow diagram illustrating how identification information for a target message is obtained in accordance with an illustrative embodiment; on the basis of the foregoing embodiments, the present embodiment takes an example of how to acquire the identification information of the target message. As shown in fig. 4, the obtaining of the identification information of the target message in the step S31 may include the following steps S41-S42:
s41: and acquiring the target message.
In an embodiment, when it is determined that a preset trigger condition is satisfied, the target message is determined through the web page.
In an embodiment, for explanation of the preset trigger condition, reference may be made to the embodiment shown in fig. 3, which is not described herein again.
In an embodiment, the determining, by the current webpage, the target message according to the preset trigger condition may include the following two cases:
in the first case, a target message is preset in the current webpage, and when the preset trigger condition is detected by the webpage, the corresponding target message can be output according to the trigger condition.
In the second case, the current webpage has no preset target message, and when the preset trigger condition is detected, the webpage server is requested to generate a target message in real time.
And when the webpage detects a preset trigger condition, sending a message request to the webpage server, wherein the message request is used for requesting the webpage server to generate a target message in real time. And after receiving the message request, the webpage server generates a target message and sends the target message to the webpage, so that the webpage can acquire the target message when updating webpage information in real time.
S42: and determining the identification information of the target message based on the corresponding relation between the target message and the identification information.
In an embodiment, after the target message is acquired, the identification information of the target message may be queried according to a pre-stored correspondence between the target message and the identification information.
In an embodiment, the correspondence relationship may be as shown in the following table one:
watch 1
Targeted message xleid abcde ……
Identification information 0 1 ……
For example, if the obtained target message is "xleid", the identification information "0" of the target message may be determined according to table one.
In an embodiment, the identification information of the target message may be queried according to the correspondence locally stored in the terminal device. For example, after the webpage acquires the target message, the identification information of the target message may be queried according to the locally stored correspondence.
In an embodiment, the identifier information of the target message may also be queried according to the correspondence stored in the server, which may specifically refer to the embodiment shown in fig. 5, and is not described herein again.
As can be seen from the above description, in the embodiment of the present disclosure, by obtaining the target message and determining the identification information of the target message based on the corresponding relationship between the target message and the identification information, the identification information of the target message can be quickly and accurately obtained, so as to improve the rate of generating the target domain name request. Because the target message is converted into the identification information to generate the target domain name request, the trouble that the format and the length of the target message do not meet the requirements on the domain name information in the related technology and the domain name information can be generated only by further processing can be avoided, the flow of generating the target domain name request can be simplified, and the communication efficiency is improved.
FIG. 5 is a flowchart illustrating how to obtain identification information for a target message in accordance with yet another illustrative embodiment; on the basis of the above implementation, the present embodiment takes an example of how to acquire the identification information of the target message. As shown in fig. 5, the determining the identification information of the target message based on the correspondence between the target message and the identification information in step S42 may include the following steps S51-S52:
s51: sending the target message to a server, wherein the server is used for determining the identification information of the target message based on the corresponding relation between the target message and the identification information;
in an embodiment, the web page sends the acquired target message to the server, so that the server determines the identification information of the target message according to the corresponding relationship. The server may be a server or a server cluster.
In an embodiment, for explanation of the corresponding relationship, reference may be made to the embodiment described in fig. 4, which is not described herein again.
S52: and receiving the identification information returned by the server.
In an embodiment, the server side queries the locally stored correspondence according to the received target message to obtain the identification information of the target message, and returns the identification information to the web page in the terminal device.
In one embodiment, the server and the terminal device may be connected through a wireless network.
As can be seen from the above description, in the embodiment of the present disclosure, the target message is sent to the server, so that the server is configured to determine the identification information of the target message based on the corresponding relationship between the target message and the identification information, and then receive the identification information returned by the server, thereby quickly and accurately obtaining the identification information of the target message, and further increasing the rate of generating the target domain name request. Because the target message is converted into the identification information to generate the target domain name request, the trouble that the format and the length of the target message do not meet the requirements on the domain name information in the related technology and the domain name information can be generated only by further processing can be avoided, the flow of generating the target domain name request can be simplified, and the communication efficiency is improved.
FIG. 6 is a flowchart illustrating how a target domain name request corresponding to a target message is generated in accordance with an illustrative embodiment; in the embodiment, how to generate the target domain name request corresponding to the target message is taken as an example to be exemplarily described. As shown in fig. 6, the step S33 of generating the target domain name request corresponding to the target message according to the target character sequence includes the following steps S61-S62:
s61: and determining target domain name information according to the target character sequence, wherein the target domain name information has preset characteristic information.
In an embodiment, the preset feature information is used to identify that the current domain name request belongs to a domain name request carrying identification information of a target message, and is different from a domain name request in the related art.
In an embodiment, the preset feature information may be information with an identification function, such as a preset feature code and a preset encryption mode. It is assumed that a preset feature code "- - -" is added to the target character sequence to obtain first character information, where the first character information is the target character sequence with preset characteristic information. Referring to the embodiment shown in fig. 4, if the identification information "0" of the target message "xleid" is subjected to domain name character conversion to obtain a target character sequence "abc", a preset feature code "- -" is added to the target character sequence "abc", and then the first character information "abc- -".
In one embodiment, the process of determining the target domain name information according to the target character sequence may include the following two cases:
the first condition is as follows: and if the first character information meets the preset domain name format, directly determining the first character information as target domain name information.
Taking the first character information "abc-" as an example, if it satisfies the domain name format specified by the future DNS protocol, it can be directly determined as the target domain name information, that is, the target domain name information output in step S61 is "abc-".
Case two: and if the first character information does not meet the preset domain name format, adding preset domain name identification information to the first character information to obtain target domain name information.
Still taking the first character information "abc- - - -" as an example, the domain name information may include top-level domain names such as ". com". net ". cn". org "according to the specification of the relevant DNS protocol. In one embodiment, preset domain name identification information, such as a top-level domain name ″. com', may be added to the first character information, "abc —" to generate a target domain name information, "abc —. com".
S62: and generating the target domain name request according to the target domain name information.
In one embodiment, the current web page may generate a target domain name request based on the target domain name information, the target domain name request conforming to the format requirements of the domain name request, and may be represented as a network link address, such as Http:// abc- -. com, or Http:// abc- -. com, for example. The domain name request is generally used for requesting an operating system to perform a preset first operation on the domain name request, for example, a resolution operation.
The above process describes a generation process of a target domain name request, and similarly, the steps S61-S62 may be performed for other target character sequences, thereby generating corresponding target domain name requests. For example, three target domain name requests are generated according to three target character sequences "ab", "cd", and "e", as shown in table two:
watch two
Target character sequence Target domain name request
abc Https://abc---.com
cd2 Https://cd2---.com
e3 Https://e3---.com
As can be seen from the above description, in the embodiments of the present disclosure, the target domain name information is determined according to the target character sequence, and the target domain name request is generated according to the target domain name information, so that the rate of generating the target domain name request can be increased, the generation process of the target domain name request is simplified, and further, the communication efficiency is improved.
FIG. 7 is a flowchart illustrating how to obtain identification information for a target message based on a target domain name request in accordance with an example embodiment; on the basis of the foregoing embodiments, this embodiment takes an example of how to acquire the identification information of the target message based on the target domain name request. As shown in fig. 7, the step S12 of obtaining the identification information of the target message based on the target domain name request may include the following steps S71-S73:
s71: and identifying a target domain name request sent by the webpage client through a preset component.
In an embodiment, the web page client displaying the current web page sends the target domain name request to an operating system, and the target domain name request is identified by a preset component in the operating system.
In an embodiment, the preset component is disposed on a domain name transmission channel of an operating system, and may be a preset interface with a target domain name request identification function, or a newly added service program disposed in the operating system, or a service process externally hung in an existing operating system component, which is not limited in this embodiment.
In an embodiment, a manner of identifying a target domain name request sent by a web client through a preset component may refer to the following embodiments shown in fig. 8 and fig. 9, which is not repeated herein.
S72: and determining target domain name information corresponding to the target message according to the target domain name request.
In an embodiment, after the preset component in the operating system identifies the target domain name request, the target domain name information corresponding to the target message may be extracted from the target domain name request.
In an embodiment, since the target domain name request may be a domain name request generated according to the target domain name information, and the target domain name request includes the target domain name information, the corresponding target domain name information may be extracted from the target domain name request. Referring to the embodiment of FIG. 6 above, if the target domain name request is "http:// abc- -. com", then the target domain name information "abc- -. com" may be extracted from the target domain name request.
S73: and analyzing the identification information of the target message based on the target domain name information.
In an embodiment, since the target domain name information may be domain name information generated according to the identification information of the target message, and the target domain name information includes the identification information of the target message, the identification information of the target message may be parsed from the target domain name information.
In an embodiment, if the target domain name information "abc-. com", the identification information "0" of the target message may be parsed from the target domain name information.
In an embodiment, the resolution manner of the target domain name information may refer to the following embodiment shown in fig. 11, which is not described herein again.
As can be seen from the above description, in the embodiment of the present disclosure, the preset component identifies the target domain name request sent by the web client, and determines the target domain name information corresponding to the target message according to the target domain name request, and then resolves the identification information of the target message based on the target domain name information, so that obtaining the identification information of the target message based on the target domain name request can be achieved, a rate of resolving the identification information of the target message can be ensured, and further, communication efficiency is improved.
Fig. 8 is a flowchart illustrating how to obtain the identification information of the target message based on the target domain name request according to still another exemplary embodiment, and this embodiment is still exemplified by how to obtain the identification information of the target message based on the target domain name request on the basis of the above-described embodiments. As shown in fig. 8, the step S12 of obtaining the identification information of the target message based on the target domain name request may include the following steps S81-S83:
s81: and identifying a target domain name request sent by the webpage client through a preset DNS interface or a firewall component.
In an embodiment, the web page client displaying the current web page sends the target domain name request to an operating system, and the target domain name request is identified through a preset DNS interface or a firewall component in the operating system.
In an embodiment, the preset DNS interface or the firewall component is disposed on a domain name transmission channel of the operating system, and may be a preset interface with a target domain name request identification function, such as a DNS interface added with a Hook function, or a newly added service program disposed in the operating system, or a service process externally hung in a DNS component of an existing operating system, which is not limited in this embodiment.
In this embodiment, a target domain name request may be identified from a large number of domain name requests sent by a web client through a preset DNS interface or a firewall component, where the target domain name request includes target domain name information.
Compared with the DNS interface in the related art, the preset DNS interface or the firewall component in the embodiment of the present disclosure adds the capability of recognizing the target domain name request.
Because the DNS interface belongs to the original component of the operating system, the present embodiment can perform parameter configuration on the original DNS interface or add a preset function, such as a Hook function, so that the DNS interface has the capability of identifying the target domain name request, and a new component does not need to be added, thereby saving the equipment cost.
S82: and determining target domain name information corresponding to the target message according to the target domain name request.
S83: and analyzing the identification information of the target message based on the target domain name information.
The steps S82-S83 are the same as the steps S72-S73 in the embodiment shown in fig. 7, and for related explanation, reference may be made to the aforementioned embodiment, which is not repeated herein.
As can be seen from the above description, in the embodiment of the present disclosure, the target domain name request is identified from a large number of domain name requests sent by the web client through the preset DNS interface or the firewall component, and since the DNS interface belongs to the original component of the operating system, the embodiment can perform parameter configuration on the original DNS interface or add a preset function, so that the DNS interface has the capability of identifying the target domain name request, and does not need to add a new component, thereby saving the equipment cost.
FIG. 9 is a flow diagram illustrating how a target domain name request sent by a web client is identified by a preset component in accordance with an exemplary embodiment; on the basis of the foregoing embodiments, the present embodiment takes an example of how to identify a target domain name request sent by a web client through a preset component. As shown in fig. 9, the identifying, by the preset component, the target domain name request sent by the web client in step S71 may include:
s91: receiving a domain name request sent by a webpage client through a preset component, wherein the domain name request comprises domain name information.
In one embodiment, assuming the web page client is a browser, each web page may send a domain name request through the browser to a pre-configured DNS interface or firewall component of the operating system.
In an embodiment, the domain name request may be a real domain name request, that is, a request DNS component resolves domain name information into an IP address; it may also be the above-mentioned target domain name request, i.e. not requesting the DNS component to look up the IP address based on the domain name information.
S92: and determining whether the domain name information has preset characteristic information, wherein the preset characteristic information is used for identifying the identification information of the target message carried by the current domain name information.
In an embodiment, the preset feature information is used to identify that the current domain name information carries identification information of the target message.
In an embodiment, each time the predetermined DNS interface or the firewall component receives a domain name request, it may first detect whether domain name information included in the domain name request includes predetermined characteristic information, for example, whether the domain name information includes a predetermined characteristic code "- - -".
S93: and if the domain name information is determined to have the preset characteristic information, determining the domain name request as a target domain name request.
In an embodiment, if it is determined that the domain name information includes the preset feature information "- - -", the domain name request is determined as a target domain name request; if the domain name request does not contain the preset characteristic information, determining that the current domain name request is a real domain name request, and further sending the domain name request to a DNS module to inquire an IP address corresponding to the domain name information.
As can be seen from the above description, in the embodiment of the present disclosure, a preset component receives a domain name request sent by a web client, and determines whether the domain name information includes preset feature information, and then determines the domain name request as a target domain name request when it is determined that the domain name information includes the preset feature information, and the real domain name request and the target domain name request can be accurately distinguished by detecting the preset feature information, so as to improve the efficiency of subsequent communication.
FIG. 10 is a flowchart illustrating how to resolve identification information for a target message based on target domain name information in accordance with an exemplary embodiment; on the basis of the foregoing embodiments, this embodiment takes an example of how to acquire the identification information of the target message based on the target domain name request. As shown in fig. 7, the step S12 of obtaining the identification information of the target message based on the target domain name request may include the following steps S101 to S104:
s101: and identifying a target domain name request sent by the webpage client through a preset component.
S102: and determining target domain name information corresponding to the target message according to the target domain name request.
Steps S101 to S102 are the same as steps S71 to S72 in the embodiment shown in fig. 7, and for related explanation, reference may be made to the embodiment shown in fig. 7, which is not repeated herein.
S103: and sending the target domain name information to a preset message service.
In an embodiment, the preset message service is configured to determine, according to the target domain name information, identification information corresponding to the target message.
In an embodiment, after the operating system identifies the target domain name information through the monitoring component, the resolution of the identified target domain name information may be performed by handing over to a preset Message service.
S104: and analyzing the identification information of the target message based on the target domain name information through the preset message service.
In an embodiment, the operating system sends the identified target domain name information to the Message service through a monitoring component, so as to execute the operation of analyzing the identified target domain name information through the preset Message service.
In an embodiment, a specific manner of resolving the identified target domain name information may be as shown in the embodiment shown in fig. 11, which will not be described in detail herein.
As can be seen from the above description, in this embodiment, the identified target domain name information is sent to a preset message service, and the operation of analyzing the identified target domain name information is executed by the preset message service, so that the identification process and the analysis process of the target domain name information can be decoupled, so that the monitoring component is only responsible for identifying the target domain name information and is not responsible for analyzing the target domain name information, thereby improving the detection efficiency of the target domain name information.
FIG. 11 is a flowchart illustrating how to parse the identification information of a target message in accordance with an example embodiment; on the basis of the foregoing embodiments, the present embodiment takes an example of how to parse the identification information of the target message. As shown in fig. 11, the parsing the identification information of the target message based on the target domain name information in step S73 may include the following steps S111-S112:
s111: and determining a target character sequence according to the target domain name information.
In an embodiment, since the target domain name information may be domain name information generated according to the identification information of the target message, and the target domain name information includes the identification information of the target message, the identification information of the target message may be parsed from the target domain name information. Still referring to the embodiment shown in fig. 6, if the target domain name information "abc- -. com" is obtained, the first character information "abc- -" may be parsed from the target domain name information, and then the preset feature code "- -" is removed from the first character information, so as to obtain the target character sequence "abc".
S112: and determining the identification information of the target message according to the target character sequence.
In an embodiment, after the target character sequence is determined, the target character sequence may be decoded according to a preset decoding manner (corresponding to a domain name character conversion manner), so as to obtain the identification information of the target message.
In an embodiment, following the embodiment of the target character sequence in step S111, after determining the target character sequence, the target character sequence may be decoded according to a preset decoding manner (corresponding to a domain name character conversion manner), so as to obtain the identification information "0" of the target message.
As can be seen from the above description, in the embodiment of the present disclosure, by determining the target character sequence according to the target domain name information and determining the identification information of the target message according to the target character sequence, the identification information of the target message can be resolved based on the target domain name information, the speed of resolving the identification information of the target message can be ensured, and thus, the communication efficiency is improved.
Fig. 12 is a flow chart illustrating a method of communication according to a fourth exemplary embodiment; this embodiment may be used for a terminal device (e.g., a mobile phone, a tablet computer, a personal computer, etc.), as shown in fig. 12, the method includes the following steps S121-S124:
s121: and acquiring a target domain name request corresponding to the identification information of the target message through the operating system, wherein the target message is used for indicating the operating system to execute target operation.
S122: and acquiring the identification information of the target message based on the target domain name request.
S123: and inquiring the target message corresponding to the identification information based on the corresponding relation between the target message and the identification information.
In an embodiment, after the identification information is obtained, the identification information of the target message may be queried according to a pre-stored correspondence between the target message and the identification information.
In an embodiment, the correspondence relationship can be referred to as the first table. For example, if the obtained identification information is "0", the target message "xleid" corresponding to the identification information may be determined according to the first table.
In an embodiment, the operating system may query the target message corresponding to the identification information according to the correspondence locally stored in the terminal device. For example, after the operating system obtains the identification information of the target message, the target message corresponding to the message information may be queried according to the locally stored correspondence.
In an embodiment, the target message corresponding to the identifier information may also be queried according to the correspondence relationship stored in the server, and a specific manner may refer to the embodiment shown in fig. 13, which is not described herein again.
As can be seen from the above description, in the embodiment of the present disclosure, the target message corresponding to the identification information is queried based on the corresponding relationship between the target message and the identification information, so that the corresponding target message can be quickly determined according to the identification information, and the rate of executing the target operation according to the target message can be increased subsequently.
FIG. 13 is a flowchart illustrating how a target message corresponds based on query identification information in accordance with an illustrative embodiment; based on the above embodiment, this embodiment takes how to query the target message corresponding to the identification information as an example, where the querying, in step S123, the target message corresponding to the identification information based on the corresponding relationship between the target message and the identification information includes the following steps S131 to S132:
s131: and sending the identification information to a server, wherein the server is used for determining a target message corresponding to the identification information based on the corresponding relation between the target message and the identification information.
The server may be a server or a server cluster.
In an embodiment, the correspondence relationship can be referred to as the first table.
In an embodiment, the operating system sends the acquired identification information to the server, so that the server determines a target message corresponding to the identification information according to the correspondence, and further receives the target message returned by the server.
For example, the operating system sends the acquired identification information "0" to the server, and the server may determine, according to the first table, a target message "xleid" corresponding to the identification information.
S132: and receiving the target message returned by the server.
In an embodiment, after the server determines the corresponding target message according to the received identification information, the target message may be returned to the operating system of the terminal device.
In one embodiment, the server and the terminal device may be connected through a wireless network.
As can be seen from the above description, in the embodiment of the present disclosure, the identification information is sent to the server, so that the server determines the target message corresponding to the identification information based on the corresponding relationship between the target message and the identification information, and then receives the identification information returned by the server, thereby improving the efficiency of determining the target message according to the identification information, and further improving the rate of performing the target operation according to the target message subsequently.
Fig. 14 is a flow chart illustrating a method of communication according to a fifth exemplary embodiment; this embodiment can be used for terminal devices (e.g., mobile phones, tablet computers, personal computers, etc.), as shown in fig. 14, the method includes the following steps S141-S144:
s141: and acquiring a target domain name request corresponding to the identification information of the target message through the operating system, wherein the target message is used for indicating the operating system to execute target operation.
S142: and acquiring the identification information of the target message based on the target domain name request.
S143: determining the target message based on the identification information.
The steps S141 to S143 are the same as the steps S11 to S13 in the embodiment shown in fig. 1, and for related explanation, reference may be made to the foregoing embodiment, which is not repeated herein.
S144: and if the operation of acquiring the target message is determined to be completed within the effective acquisition duration, executing the target operation according to the target message.
In an embodiment, in a generation phase of the target domain name request, for example, when the identification information of the target message is acquired (or when the target domain name request is generated, or when the target domain name request is sent to an operating system, specifically which time may be selected by a user or a developer according to actual needs), a timestamp may be generated. Further, when the operating system determines a target message based on the identification information, determining actual acquisition time of the target message based on the timestamp, and further comparing the actual acquisition time with effective acquisition duration to determine whether the target message is acquired within the effective acquisition duration, if so, executing the target operation according to the target message; if not, the target message is discarded.
In an embodiment, in a generation stage of a target domain name request, when identification information of a target message is acquired (or when the target domain name request is generated, or when the target domain name request is sent to an operating system, specifically which time can be selected and set by a user or a developer according to actual needs), a timer is started, when an effective acquisition duration is reached, whether an operation of the target message is completed or not is determined by the operating system based on the identification information, and if so, the target operation is executed according to the target message; if not, the target message may be discarded.
As can be seen from the above description, in this embodiment, by determining whether the operation of acquiring the target message is completed within the effective acquisition time, and when it is determined that the operation of acquiring the target message is not completed within the effective acquisition time, determining that the target message is expired, discarding the target message, and not performing the target operation according to the target message, and when it is determined that the operation of acquiring the target message is completed within the effective acquisition time, determining that the target message is valid, and performing the target operation according to the target message, the target message with an excessively long processing time can be effectively filtered, so that the target operation is guaranteed to be performed within a relatively short time, and user experience is effectively improved.
After the operating system parses the target message, a target operation may be performed according to the target message, where the target operation belongs to an operation other than the first operation corresponding to the domain name request in the related art, that is, a non-domain name parsing operation. The target operation may be a jump to a target application, or other operations such as executing a command, for example, executing shutdown, restart, starting a timer, etc., and the present disclosure does not limit the type of the target operation. The specific way how the operating system performs the target operation, such as how to shut down, how to restart, how to start a timer, etc., can refer to the related art, which belongs to the capabilities of the operating system and/or the application installed thereon, and the disclosure is not detailed again.
How to open the target application is taken as an example to explain how to perform the target operation based on the target message (see the embodiment shown in fig. 15 described below).
FIG. 15 is a flowchart illustrating how the targeted operations are performed based on the targeted message in accordance with an illustrative embodiment; on the basis of the above embodiments, the present embodiment takes as an example that the executed target operation is to open a target application. As shown in fig. 15, the executing the target operation according to the target message may include:
s151: extracting target application parameters from the target message;
in an embodiment, after acquiring the target message, the operating system of the terminal device may extract a target application parameter included in the target message, where the target application parameter may be used to open a corresponding target application.
S152: and opening the target application according to the target application parameters.
In an embodiment, the operating system of the terminal device may open the target application according to the extracted target application parameter. The target application may be an installed application in the terminal device, or may be a new application that is not installed.
In an embodiment, if the target application belongs to an installed application, the operating system may start the target application according to the identity of the target application in the target application parameters, for example, open an application home page or open a login or registration page of the target application.
In an embodiment, if the target application parameter further includes other information, the started target application program may further perform corresponding operations according to the information, such as opening an inner page of the target application, for example, a detailed page of a sales commodity in an e-commerce platform; or playing audio and video files and the like in a preset interface; or pop up a preset dialog box, etc.
In an embodiment, if the target application is not installed in the terminal device, the operating system may prompt the user to download and install the target application by opening an application store or the like; alternatively, the target message is discarded.
In an embodiment, if the target application belongs to an uninstalled new application, refer to fig. 16, which is a flowchart illustrating how to open the target application according to the target application parameters according to an exemplary embodiment. As shown in fig. 16, the target application parameters at least include an identity of the target application;
on this basis, the step S152 of opening the target application according to the target application parameter may include the following steps S161 to S163:
s161: and determining whether the target application is installed locally or not according to the identity.
In an embodiment, the operating system may determine whether the new application is installed locally on the terminal device according to the identity of the target application through a preset new application platform, that is, new application service software. For example, the installed new application list is traversed according to the identity of the target application, and whether the target new application is installed locally on the terminal device is determined.
S162: and if the target application is not locally installed, downloading and installing the target application.
In an embodiment, if it is determined that the target new application is not installed locally, the new application platform may trigger the terminal device to automatically download the compressed package of the target new application to install the target new application. In an embodiment, after acquiring the compressed packet of the new application, the terminal device may install or update itself in the background, where the installation process may not be visible in the foreground, and the update process may not be presented to the user in the foreground.
S163: and opening the target application according to the target application parameters through a preset application platform.
In an embodiment, after acquiring the new application installation package or the update data package, the preset application platform may directly run the new application program and open the target new application.
In an embodiment, the preset application platform is a service program preset in the terminal device, and the new application platform may be set in an operating system as a system software; the terminal device still takes a smart phone as an example, and the new application platform may be set when the mobile phone leaves a factory. The preset application platform can also be used as upper application software to independently run in the terminal equipment, and the setting position of the preset application platform is not limited by the disclosure.
In an embodiment, the preset application platform may open a corresponding target application, that is, a new application, according to an application parameter of any one target application. The process of opening the new application by the preset application platform may be to directly run an installation or update package of the new application, and open a new application interface specified by the target application parameter, for example, a home interface of the new application, or an inner page thereof.
In an embodiment, it is assumed that the preset application platform is a service program C running multiple new applications, and the target application is named as: in a new application of the quick-view caricature, the service program C can directly open the quick-view caricature according to the obtained target application parameters, such as the identity of the quick-view caricature APP.
As can be seen from the above description, in this embodiment, after the operating system obtains the target application parameters, it may be determined whether the target application is currently installed on the user terminal according to the identity of the target application, if not, a data packet for installing the target application may be automatically downloaded, and the target application is opened according to the target application parameters through the preset application platform, so that automatic installation and accurate skip of the target application are realized, and a user does not need to perform information interaction with the terminal in a skip process, thereby improving the intelligent degree of application interaction, and further improving the user experience of the terminal.
Fig. 17 is a flow chart illustrating a method of communication according to a sixth exemplary embodiment; the embodiment can be used for a server. As shown in fig. 17, the method includes the following steps S171 to S176:
s171: receiving a target message sent by a webpage of a terminal device through a webpage client, wherein the target message is a message acquired when the webpage detects a preset trigger condition.
In an embodiment, when a preset trigger condition is detected by a web page in the terminal device, the target message is determined, and the target message is sent to the server side through the web page client side.
In an embodiment, the server may be a server or a server cluster.
S172: and determining identification information corresponding to the target message, and storing the corresponding relation between the target message and the identification information.
In an embodiment, the server may determine the identification information corresponding to the target message according to a preset algorithm, for example, may determine a preset table for storing the correspondence, and determine a self-increment primary key value of the preset table as the identification information of the target message.
For example, as shown in table one, a corresponding relationship between a first target message "xleid" and first identification information "0" has been stored in a current preset table, and if a server currently receives a second target message "abcde" sent by a web page through a web page server, the second target message "abcde" is recorded in the preset table, so that an autonomous key value "1" of the preset table may be determined as second identification information of the second target message "abcde", and the preset table may be stored to store the corresponding relationship between the second target message and the second identification information.
S173: and sending the identification information to the webpage or the webpage client for generating a target domain name request according to the identification information.
In an embodiment, if the server sends the determined identifier information to a web page, the web page may generate the target domain name request according to the identifier information, and a specific generation process may refer to the embodiment shown in fig. 3 or fig. 6, which is not described herein again.
S174: and receiving the identification information sent by the operating system of the terminal equipment.
In an embodiment, after the operating system of the terminal device parses the identifier information according to the received target domain name request, the identifier information may be sent to the server, where the parsing process of the target domain name request may refer to the embodiments shown in fig. 7 to 11, which is not described herein again.
S175: and inquiring the target message corresponding to the identification information based on the corresponding relation.
In an embodiment, after receiving the identification information sent by the operating system of the terminal device, the server may query the target message corresponding to the identification information based on the correspondence between the locally stored target message and the identification information, and the relevant explanation may refer to the embodiment shown in fig. 13, which is not described herein again.
S176: and sending the target message to the operating system for instructing the operating system to execute the target operation according to the target message.
In an embodiment, after querying the target message, the server may send the target message to an operating system of the terminal device to instruct the operating system to execute a corresponding target operation according to the target message, and for a relevant explanation on an execution process of the target operation, reference may be made to the embodiments shown in fig. 15 and fig. 16, which is not described herein again.
As can be seen from the above description, in the embodiment of the present disclosure, a target message sent by a web page of a terminal device through a web page client is received, identification information corresponding to the target message is determined, a corresponding relationship between the target message and the identification information is stored, the identification information is sent to the web page or the web page client, the identification information sent by an operating system of the terminal device is received, and then the target message corresponding to the identification information is queried based on the corresponding relationship to send the target message to the operating system, so that a function of the operating system of the terminal device can be enhanced, so that a target operation executed by a web page running in a browser through the operating system is not limited by whether the browser is provided with an API interface, and user experience of the terminal device is improved.
Fig. 18 is a flow chart illustrating a method of communication according to the seventh exemplary embodiment; the embodiment can be used for a server. As shown in fig. 18, the method includes the following steps S181-S186:
s181: receiving a target message sent by a webpage of a terminal device through a webpage client, wherein the target message is a message acquired when the webpage detects a preset trigger condition.
S182: and determining identification information corresponding to the target message, and storing the corresponding relation between the target message and the identification information.
S183: and sending the identification information to the webpage or the webpage client for generating a target domain name request according to the identification information.
S184: and receiving the identification information sent by the operating system of the terminal equipment.
S185: and inquiring the target message corresponding to the identification information based on the corresponding relation.
Steps S181 to S185 are the same as steps S171 to S175 in the embodiment described in fig. 17, and for related explanation, reference may be made to the embodiment described above, which is not repeated herein.
S186: and if the target message is determined to be inquired within the effective inquiry duration, the target message is sent to the operating system.
In an embodiment, when the server stores a corresponding relationship between a target message and identification information, a timestamp may be generated, when the server queries the target message corresponding to the identification information based on the corresponding relationship, an actual query time of the target message is determined based on the timestamp, and the actual query time is compared with an effective query duration to determine whether the target message completes querying within the effective query duration, and if yes, the target message is sent to the operating system; if not, the target message may be discarded.
In an embodiment, when the server stores the correspondence between the target message and the identification information, a timer is started, when the effective query duration is reached, whether the current target message completes the query is determined, and if yes, the target message is sent to the operating system; if not, the target message may be discarded.
As can be seen from the above description, in this embodiment, by determining whether the operation of querying the target message is completed within the valid query time, and when it is determined that the querying operation of the target message is not completed within the valid query time, determining that the target message is expired, the target message may be discarded, and the target message is not sent to the operating system, and when it is determined that the querying operation of the target message is completed within the valid query time, the target message is sent to the operating system, so that the target message with too long processing time may be effectively filtered, the target message is guaranteed to be sent within a short time, and user experience is effectively improved.
In the communication method provided by the present disclosure, when a web page detects a preset trigger condition, identification information of a target message in a domain name format may be sent to an operating system of a terminal device through a DNS interface facing the operating system through a web page client, so that the operating system may obtain the corresponding target message by using the identification information, and further perform a target operation according to the target message, such as operations of shutting down, starting a timer, opening an application program, and the like. The following is an exemplary description taking an application scenario of opening an application program as an example.
FIG. 19A is a schematic diagram illustrating an application scenario of a communication method in accordance with an illustrative embodiment; as shown in fig. 19A, when a user clicks a link (for example, a link known to be daily) of a target application page in a browser page 1001 of the smartphone 100, a preset trigger condition is met, the browser page executes a JS (javascript) script in the background, and the JS script is responsible for acquiring a target message sent by a webpage (the target message includes a target application parameter of a target application to be opened). And the JS script determines corresponding identification information according to the target message, and then generates a target domain name request according to the identification information. The JS script sends a domain name request through the operating system via the system interface, which is heard and identified as a target domain name request when passing through a preset listening component (such as DNS) provided in the operating system. The preset monitoring component sends the target domain name request to a preset Message service for extracting target application parameters, and then sends the target application parameters to a preset application platform, namely a target application platform; the preset application platform opens a detail page in the known applications according to the target application parameters, such as the known daily detail page 1002, and presents the page to the user.
Fig. 19B is a schematic view of an application scenario of a communication method in the related art; as shown in fig. 19B, in the related art, if the link of "daily report known" is clicked on the browser page 1001, the browser first pops up a floating window 1003 prompting the user to select the open mode according to the additional API interface, and prompts the user to select the open mode of the target page. The page opening mode selected by the user comprises the following steps: the application opening mode and the browser opening mode can also comprise other modes, and a target application interface, namely a known daily report interface known as the application, cannot be directly presented for the user. If the browser is not provided with the API interface, jumping from the browser to the known application cannot be realized.
As can be seen from the above description, in the communication method of this embodiment, when a user wants to perform a target operation (for example, jump to local application software) using a certain web page running in the browser, an operating system of the user terminal may detect a target domain name request including identification information, further extract the identification information, determine a target message corresponding to the identification information (the target message includes a target application parameter of a target application to be opened), and send the target application parameter to a preset application platform, open the target application for the user through the preset application platform, without being limited by whether an API interface is added for both applications, i.e., jump directly from the current application to the target application, and make no request on the version and configuration of the application software of both parties, i.e., make no request on compatibility of both parties, so as to improve user experience of the terminal. Moreover, under the condition that the target application belongs to the new application, for a user, after the user clicks the link of the target application page in an application interface such as a Web browser page, the user terminal can directly and accurately jump to the specified page of the target application without other human-computer interaction, so that the process and time of human-computer interaction between the user and the terminal are saved, and the user experience of the terminal is further improved.
Fig. 20 is a block diagram illustrating a structure of a communication device according to an exemplary embodiment; as shown in fig. 20, the apparatus includes: a domain name request obtaining module 110, an identification information obtaining module 120, a target message determining module 130, and a target operation executing module 140, wherein:
a domain name request obtaining module 110, configured to obtain, by an operating system, a target domain name request corresponding to identification information of a target message, where the target message is used to instruct the operating system to execute a target operation;
an identification information obtaining module 120, configured to obtain identification information of the target message based on the target domain name request;
a target message determination module 130 for determining the target message based on the identification information;
and a target operation executing module 140, configured to execute the target operation according to the target message.
Fig. 21 is a block diagram showing a structure of a communication apparatus according to still another exemplary embodiment; the domain name request obtaining module 230, the identification information obtaining module 240, the target message determining module 250, and the target operation executing module 260 have the same functions as the domain name request obtaining module 110, the identification information obtaining module 120, the target message determining module 130, and the target operation executing module 140 in fig. 20, and are not described herein again. As shown in fig. 21, the domain name request obtaining module 230 may include:
a domain name request obtaining unit 231, configured to obtain a target domain name request corresponding to the identification information of the target message, where the target domain name request is sent by a web page through a web page client, and the target domain name request includes target domain name information generated according to the identification information of the target message.
In an embodiment, the apparatus may further include: a domain name request generating module 210 and a domain name request sending module 220;
the domain name request generating module 210 may include:
an identification information obtaining unit 211, configured to obtain identification information of a target message when a preset trigger condition is detected;
a domain name character conversion unit 212, configured to perform domain name character conversion on the identification information to obtain a target character sequence;
a domain name request generating unit 213, configured to generate a target domain name request corresponding to the target message according to the target character sequence, where the target domain name request at least includes the target character sequence;
the domain name request sending module is used for sending the target domain name request to the operating system.
In an embodiment, the identification information obtaining unit 211 may be further configured to:
acquiring the target message;
and determining the identification information of the target message based on the corresponding relation between the target message and the identification information.
In an embodiment, the identification information obtaining unit 211 may be further configured to:
sending the target message to a server, wherein the server is used for determining the identification information of the target message based on the corresponding relation between the target message and the identification information;
and receiving the identification information returned by the server.
In an embodiment, the domain name request generating unit 213 may further be configured to:
determining target domain name information according to the target character sequence, wherein the target domain name information has preset characteristic information;
and generating the target domain name request according to the target domain name information.
In an embodiment, the identification information obtaining module 240 may include:
a domain name request identification unit 241, configured to identify a target domain name request sent by a web client through a preset component;
a domain name information determining unit 242, configured to determine, according to the target domain name request, target domain name information corresponding to the target message;
an identification information parsing unit 244 for parsing the identification information of the target message based on the target domain name information.
In an embodiment, the domain name request identification unit 241 may also be configured to identify a target domain name request sent by the web client through a preset DNS interface or a firewall component.
In an embodiment, the domain name request identifying unit 241 may further be configured to:
receiving a domain name request sent by a webpage client through a preset component, wherein the domain name request comprises domain name information;
determining whether the domain name information has preset characteristic information, wherein the preset characteristic information is used for identifying identification information of a target message carried by the current domain name information;
and when the preset characteristic information is determined to be contained in the domain name information, determining the domain name request as a target domain name request.
In an embodiment, the identification information obtaining module 240 may further include:
a domain name information sending unit 243, configured to send the target domain name information to a preset message service;
the identification information parsing unit 244 is further configured to perform the step of parsing the identification information of the target message based on the target domain name information through the preset message service.
In an embodiment, the identification information parsing unit 244 may be further configured to:
determining a target character sequence according to the target domain name information;
and determining the identification information of the target message according to the target character sequence.
In an embodiment, the target message determining module 250 may be further configured to query the target message corresponding to the identification information based on a correspondence between the target message and the identification information.
In one embodiment, the target message determination module 250 includes:
an identification information sending unit 251, configured to send the identification information to a server, where the server is configured to determine, based on a correspondence between a target message and the identification information, a target message corresponding to the identification information;
a target message receiving unit 252, configured to receive the target message returned by the server.
In an embodiment, the target operation execution module 260 is further configured to execute the step of executing the target operation according to the target message when it is determined that the operation of acquiring the target message is completed within the valid acquisition duration.
In an embodiment, the target domain name request is for performing a first operation, the target operation being an operation other than the first operation.
In an embodiment, the target operation execution module 260 may further include:
an application parameter extracting unit 261, configured to extract a target application parameter from the target message;
a target application opening unit 262, configured to open a target application according to the target message, where the target message at least includes an identity of the target application.
In an embodiment, the target application opening unit 262 may be further configured to:
determining whether the target application is installed locally or not according to the identity;
if the target application is not installed locally, downloading and installing the target application;
and opening the target application according to the target message through a preset application platform.
Fig. 22 is a block diagram illustrating a structure of a communication apparatus applied to a server according to an exemplary embodiment; as shown in fig. 22, the apparatus includes:
a target message receiving module 310, configured to receive a target message sent by a web page of a terminal device through a web page client, where the target message is a message obtained when a preset trigger condition is detected by the web page;
an identifier determining and storing module 320, configured to determine identifier information corresponding to the target message, and store a corresponding relationship between the target message and the identifier information;
an identification information sending module 330, configured to send the identification information to the web page or the web page client, and configured to generate a target domain name request according to the identification information;
an identification information receiving module 340, configured to receive identification information sent by an operating system of the terminal device;
a target message query module 350, configured to query a target message corresponding to the identification information based on the correspondence;
a target message sending module 360, configured to send the target message to the operating system, and instruct the operating system to execute the target operation according to the target message.
In an embodiment, the target message sending module 360 may be further configured to execute the step of sending the target message to the operating system when it is determined that querying the target message is completed within the valid query duration.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 23 is a block diagram illustrating an electronic device in accordance with an example embodiment. For example, the apparatus 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 23, the apparatus 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing elements 702 may include one or more processors 320 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 can include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operation at the device 700. Examples of such data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power component 706 provides power to the various components of the device 700. The power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the apparatus 700.
The multimedia component 708 includes a screen that provides an output interface between the device 700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, audio component 710 includes a Microphone (MIC) configured to receive external audio signals when apparatus 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the apparatus 700. For example, sensor assembly 714 may detect an open/closed state of device 700, the relative positioning of components, such as a display and keypad of device 700, sensor assembly 714 may also detect a change in position of device 700 or a component of device 700, the presence or absence of user contact with device 700, orientation or acceleration/deceleration of device 700, and a change in temperature of device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the apparatus 700 and other devices. The apparatus 700 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication section 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described communication methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 320 of the device 700 to perform the above-described communication method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (38)

1. A method of communication, comprising:
acquiring a target domain name request corresponding to identification information of a target message through an operating system, wherein the target message is used for indicating the operating system to execute target operation;
acquiring identification information of the target message based on the target domain name request;
determining the target message based on the identification information;
executing the target operation according to the target message;
before the obtaining, by the operating system, the target domain name request corresponding to the identification information of the target message, the method further includes:
when a preset trigger condition is detected, acquiring identification information of a target message;
performing domain name character conversion on the identification information to obtain a target character sequence;
generating a target domain name request corresponding to the target message according to the target character sequence, wherein the target domain name request at least comprises the target character sequence;
and sending the target domain name request to the operating system.
2. The method according to claim 1, wherein the obtaining, by the operating system, the target domain name request corresponding to the identification information of the target message includes:
the method comprises the steps of obtaining a target domain name request which is sent by a webpage through a webpage client and corresponds to identification information of a target message, wherein the target domain name request comprises target domain name information generated according to the identification information of the target message.
3. The method of claim 1, wherein the obtaining identification information of the target message comprises:
acquiring the target message;
and determining the identification information of the target message based on the corresponding relation between the target message and the identification information.
4. The method of claim 3, wherein determining the identification information of the target message based on the correspondence between the target message and the identification information comprises:
sending the target message to a server, wherein the server is used for determining the identification information of the target message based on the corresponding relation between the target message and the identification information;
and receiving the identification information returned by the server.
5. The method according to claim 1, wherein the generating a target domain name request corresponding to the target message according to the target character sequence comprises:
determining target domain name information according to the target character sequence, wherein the target domain name information has preset characteristic information;
and generating the target domain name request according to the target domain name information.
6. The method of claim 1, wherein the requesting for obtaining the identification information of the target message based on the target domain name comprises:
identifying a target domain name request sent by a webpage client through a preset component;
determining target domain name information corresponding to the target message according to the target domain name request;
and analyzing the identification information of the target message based on the target domain name information.
7. The method of claim 6, wherein the identifying, by a preset component, the target domain name request sent by the web client comprises:
and identifying a target domain name request sent by the webpage client through a preset DNS interface or a firewall component.
8. The method of claim 6, wherein the identifying, by a preset component, the target domain name request sent by the web client comprises:
receiving a domain name request sent by a webpage client through a preset component, wherein the domain name request comprises domain name information;
determining whether the domain name information has preset characteristic information, wherein the preset characteristic information is used for identifying identification information of a target message carried by the current domain name information;
and if the domain name information is determined to have the preset characteristic information, determining the domain name request as a target domain name request.
9. The method of claim 6, further comprising:
sending the target domain name information to a preset message service;
and executing the step of resolving the identification information of the target message based on the target domain name information through the preset message service.
10. The method of claim 6, wherein the resolving the identification information of the target message based on the target domain name information comprises:
determining a target character sequence according to the target domain name information;
and determining the identification information of the target message according to the target character sequence.
11. The method of claim 1, wherein the determining the target message based on the identification information comprises:
and inquiring the target message corresponding to the identification information based on the corresponding relation between the target message and the identification information.
12. The method according to claim 11, wherein the querying the target message corresponding to the identification information based on the correspondence between the target message and the identification information comprises:
sending the identification information to a server, wherein the server is used for determining a target message corresponding to the identification information based on the corresponding relation between the target message and the identification information;
and receiving the target message returned by the server.
13. The method of claim 1, further comprising:
and if the operation of acquiring the target message is determined to be completed within the effective acquisition duration, executing the step of executing the target operation according to the target message.
14. The method of claim 1, wherein the target domain name request conforms to a format requirement of a domain name request, wherein the domain name request is used to perform a first operation, and wherein the target operation is an operation other than the first operation.
15. The method of claim 1, wherein performing the target operation according to the target message comprises:
extracting target application parameters from the target message;
and opening the target application according to the target application parameters.
16. The method of claim 15, wherein the target application parameters comprise at least an identity of the target application;
the opening of the target application according to the target application parameters comprises:
determining whether the target application is installed locally or not according to the identity;
if the target application is not installed locally, downloading and installing the target application;
and opening the target application according to the target message through a preset application platform.
17. A communication method applied to a server is characterized by comprising the following steps:
receiving a target message sent by a webpage of a terminal device through a webpage client, wherein the target message is a message acquired when a preset trigger condition is detected by the webpage;
determining identification information corresponding to the target message, and storing the corresponding relation between the target message and the identification information;
sending the identification information to the webpage or the webpage client for generating a target domain name request according to the identification information;
receiving identification information sent by an operating system of the terminal equipment;
inquiring the target message corresponding to the identification information based on the corresponding relation;
sending the target message to the operating system, wherein the target message is used for instructing the operating system to execute target operation according to the target message;
when the terminal device detects the preset trigger condition, acquiring identification information of the target message, performing domain name character conversion on the identification information to obtain a target character sequence, generating a target domain name request corresponding to the target message according to the target character sequence, wherein the target domain name request at least comprises the target character sequence, and sending the target domain name request to the operating system.
18. The method of claim 17, further comprising:
and if the target message is determined to be inquired within the effective inquiry duration, executing the step of sending the target message to the operating system.
19. A communications apparatus, comprising:
the domain name request acquisition module is used for acquiring a target domain name request corresponding to the identification information of a target message through an operating system, wherein the target message is used for indicating the operating system to execute target operation;
the identification information acquisition module is used for acquiring the identification information of the target message based on the target domain name request;
a target message determination module for determining the target message based on the identification information;
the target operation execution module is used for executing the target operation according to the target message;
the device further comprises: the domain name request generating module and the domain name request sending module;
the domain name request generating module comprises:
the identification information acquisition unit is used for acquiring the identification information of the target message when a preset trigger condition is detected;
the domain name character conversion unit is used for carrying out domain name character conversion on the identification information to obtain a target character sequence;
a domain name request generating unit, configured to generate a target domain name request corresponding to the target message according to the target character sequence, where the target domain name request at least includes the target character sequence;
the domain name request sending module is used for sending the target domain name request to the operating system.
20. The apparatus of claim 19, wherein the domain name request obtaining module comprises:
the domain name request acquiring unit is used for acquiring a target domain name request which is sent by a webpage through a webpage client and corresponds to the identification information of the target message, and the target domain name request comprises target domain name information generated according to the identification information of the target message.
21. The apparatus of claim 20, wherein the identification information obtaining unit is further configured to:
acquiring the target message;
and determining the identification information of the target message based on the corresponding relation between the target message and the identification information.
22. The apparatus of claim 21, wherein the identification information obtaining unit is further configured to:
sending the target message to a server, wherein the server is used for determining the identification information of the target message based on the corresponding relation between the target message and the identification information;
and receiving the identification information returned by the server.
23. The apparatus of claim 20, wherein the domain name request generating unit is further configured to:
determining target domain name information according to the target character sequence, wherein the target domain name information has preset characteristic information;
and generating the target domain name request according to the target domain name information.
24. The apparatus of claim 19, wherein the identification information obtaining module comprises:
the domain name request identification unit is used for identifying a target domain name request sent by a webpage client through a preset component;
a domain name information determining unit, configured to determine, according to the target domain name request, target domain name information corresponding to the target message;
and the identification information analyzing unit is used for analyzing the identification information of the target message based on the target domain name information.
25. The apparatus of claim 24, wherein the domain name request identification unit is further configured to identify a target domain name request sent by the web client through a preset DNS interface or a firewall component.
26. The apparatus of claim 24, wherein the domain name request identification unit is further configured to:
receiving a domain name request sent by a webpage client through a preset component, wherein the domain name request comprises domain name information;
determining whether the domain name information has preset characteristic information, wherein the preset characteristic information is used for identifying identification information of a target message carried by the current domain name information;
and when the preset characteristic information is determined to be contained in the domain name information, determining the domain name request as a target domain name request.
27. The apparatus of claim 24, wherein the identification information obtaining module further comprises:
a domain name information sending unit, configured to send the target domain name information to a preset message service;
the identification information parsing unit is further configured to perform, through the preset message service, the step of parsing the identification information of the target message based on the target domain name information.
28. The apparatus of claim 24, wherein the identification information parsing unit is further configured to:
determining a target character sequence according to the target domain name information;
and determining the identification information of the target message according to the target character sequence.
29. The apparatus of claim 19, wherein the target message determining module is further configured to query a target message corresponding to the identification information based on a correspondence between the target message and the identification information.
30. The apparatus of claim 29, wherein the target message determination module comprises:
the identification information sending unit is used for sending the identification information to a server, and the server is used for determining a target message corresponding to the identification information based on the corresponding relation between the target message and the identification information;
and the target message receiving unit is used for receiving the identification information returned by the server.
31. The apparatus of claim 19, wherein the target operation execution module is further configured to execute the step of executing the target operation according to the target message when it is determined that the operation of retrieving the target message is completed within a valid retrieval time period.
32. The apparatus of claim 19, wherein the target domain name request conforms to a format requirement of a domain name request, wherein the domain name request is used to perform a first operation, and wherein the target operation is an operation other than the first operation.
33. The apparatus of claim 19, wherein the target operation execution module further comprises:
an application parameter extraction unit, configured to extract a target application parameter from the target message;
and the target application opening unit is used for opening the target application according to the target message, wherein the target message at least comprises the identity of the target application.
34. The apparatus of claim 33, wherein the target application opening unit is further configured to:
determining whether the target application is installed locally or not according to the identity;
if the target application is not installed locally, downloading and installing the target application;
and opening the target application according to the target message through a preset application platform.
35. A communications apparatus, comprising:
the target message receiving module is used for receiving a target message sent by a webpage of the terminal equipment through a webpage client, wherein the target message is a message acquired when the webpage detects a preset trigger condition;
the identification determining and storing module is used for determining identification information corresponding to the target message and storing the corresponding relation between the target message and the identification information;
the identification information sending module is used for sending the identification information to the webpage or the webpage client and generating a target domain name request according to the identification information;
the identification information receiving module is used for receiving the identification information sent by the operating system of the terminal equipment;
the target message query module is used for querying the target message corresponding to the identification information based on the corresponding relation;
a target message sending module, configured to send the target message to the operating system, and instruct the operating system to execute a target operation according to the target message;
when the terminal device detects the preset trigger condition, acquiring identification information of the target message, performing domain name character conversion on the identification information to obtain a target character sequence, generating a target domain name request corresponding to the target message according to the target character sequence, wherein the target domain name request at least comprises the target character sequence, and sending the target domain name request to the operating system.
36. The apparatus of claim 35, wherein the target message sending module is further configured to perform the step of sending the target message to the operating system when it is determined that querying the target message is completed within a valid query duration.
37. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory configured to store processor-executable instructions;
wherein the processor is configured to:
acquiring a target domain name request corresponding to identification information of a target message through an operating system, wherein the target message is used for indicating the operating system to execute target operation;
acquiring identification information of the target message based on the target domain name request;
determining the target message based on the identification information;
executing the target operation according to the target message;
before the obtaining of the target domain name request corresponding to the identification information of the target message by the operating system, the method further includes:
when a preset trigger condition is detected, acquiring identification information of a target message;
performing domain name character conversion on the identification information to obtain a target character sequence;
generating a target domain name request corresponding to the target message according to the target character sequence, wherein the target domain name request at least comprises the target character sequence;
and sending the target domain name request to the operating system.
38. A computer-readable storage medium, on which a computer program is stored, which program, when being processed by a processor, is adapted to carry out:
acquiring a target domain name request corresponding to identification information of a target message through an operating system, wherein the target message is used for indicating the operating system to execute target operation;
acquiring identification information of the target message based on the target domain name request;
determining the target message based on the identification information;
executing the target operation according to the target message;
before the obtaining of the target domain name request corresponding to the identification information of the target message by the operating system, the method further includes:
when a preset trigger condition is detected, acquiring identification information of a target message;
performing domain name character conversion on the identification information to obtain a target character sequence;
generating a target domain name request corresponding to the target message according to the target character sequence, wherein the target domain name request at least comprises the target character sequence;
and sending the target domain name request to the operating system.
CN201711262914.5A 2017-12-04 2017-12-04 Communication method and device and electronic equipment Active CN108156221B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711262914.5A CN108156221B (en) 2017-12-04 2017-12-04 Communication method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711262914.5A CN108156221B (en) 2017-12-04 2017-12-04 Communication method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108156221A CN108156221A (en) 2018-06-12
CN108156221B true CN108156221B (en) 2021-05-04

Family

ID=62466394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711262914.5A Active CN108156221B (en) 2017-12-04 2017-12-04 Communication method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108156221B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965413B (en) * 2018-07-03 2021-08-03 北京小米移动软件有限公司 Information interaction method and device and storage medium
CN108924136B (en) * 2018-07-03 2021-01-15 北京小米移动软件有限公司 Authorization authentication method, device and storage medium
CN108833585B (en) * 2018-07-03 2021-06-29 北京小米移动软件有限公司 Information interaction method and device and storage medium
CN109739662A (en) * 2018-12-29 2019-05-10 北京小米移动软件有限公司 Communication means and device
US11790104B2 (en) 2021-02-18 2023-10-17 Glean Technologies, Inc. Permissions-aware search with document verification
US11995135B2 (en) 2021-02-18 2024-05-28 Glean Technologies, Inc. Permissions-aware search with user suggested results
US11593409B2 (en) 2021-02-19 2023-02-28 Glean Technologies, Inc. Permissions-aware search with intelligent activity tracking and scoring across group hierarchies
US11797612B2 (en) 2021-09-29 2023-10-24 Glean Technologies, Inc. Identification of permissions-aware enterprise-specific term substitutions

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6608615B1 (en) * 2000-09-19 2003-08-19 Intel Corporation Passive gaze-driven browsing
CN103455272A (en) * 2013-01-26 2013-12-18 曾昭兴 Electronic equipment communication method and system
CN105260262B (en) * 2015-09-14 2019-07-26 联想(北京)有限公司 A kind of information display method, electronic equipment and electronic device
CN105183881B (en) * 2015-09-23 2019-09-03 百度在线网络技术(北京)有限公司 Information query method and device
CN105701232B (en) * 2016-02-03 2020-11-27 北京中搜云商网络技术有限公司 Hypertext link list pushing system based on APP information data
CN106528657A (en) * 2016-10-19 2017-03-22 广东欧珀移动通信有限公司 Control method and device for browser skipping to application program
CN106528659B (en) * 2016-10-19 2019-12-31 Oppo广东移动通信有限公司 Control method and device for browser to jump to application program
CN106503134B (en) * 2016-10-19 2019-08-13 Oppo广东移动通信有限公司 Browser jumps to the method for data synchronization and device of application program

Also Published As

Publication number Publication date
CN108156221A (en) 2018-06-12

Similar Documents

Publication Publication Date Title
CN108156221B (en) Communication method and device and electronic equipment
CN108040095B (en) Communication method and device and electronic equipment
CN108156271B (en) Communication method and device and electronic equipment
CN109005096B (en) Application interaction method and device
CN106878445B (en) Resource file updating method and device
CN104808971B (en) Network application program manager, method and device and mobile terminal
US11360834B2 (en) Application interaction method and apparatus
CN108063804B (en) Communication method and device
CN110535865B (en) Information processing method and device, test terminal, test platform and storage medium
EP2978170A2 (en) Method, device, terminal and server for pushing message through web application
CN105183513A (en) Application recommendation method and apparatus
CN109814942B (en) Parameter processing method and device
CN111031002A (en) Broadcast discovery method, broadcast discovery apparatus, and storage medium
CN111198706A (en) Method for updating system function, apparatus for updating system function and storage medium
CN107911482B (en) Target application opening method and device
CN111338971B (en) Application testing method and device, electronic equipment and storage medium
CN108156220B (en) Communication method and device
CN109218375B (en) Application interaction method and device
CN104158851B (en) A kind of dissemination system of Network, method and apparatus
CN109885360B (en) Data processing method, device and storage medium
CN109218275B (en) Application interaction method and device
CN107122174B (en) Application program updating method and device
CN112733092B (en) Information processing method and device
CN109086143B (en) Application interaction method and device
CN109218374B (en) Application interaction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant