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

Communication method and device and electronic equipment Download PDF

Info

Publication number
CN108156271B
CN108156271B CN201711261949.7A CN201711261949A CN108156271B CN 108156271 B CN108156271 B CN 108156271B CN 201711261949 A CN201711261949 A CN 201711261949A CN 108156271 B CN108156271 B CN 108156271B
Authority
CN
China
Prior art keywords
target
domain name
name request
message information
target 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
CN201711261949.7A
Other languages
Chinese (zh)
Other versions
CN108156271A (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 CN201711261949.7A priority Critical patent/CN108156271B/en
Publication of CN108156271A publication Critical patent/CN108156271A/en
Application granted granted Critical
Publication of CN108156271B publication Critical patent/CN108156271B/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
    • 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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/301Name conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • H04L61/3025Domain name generation or assignment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • 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/14Session management
    • H04L67/148Migration or transfer of sessions
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/30Types of network names
    • H04L2101/32Types of network names containing non-Latin characters, e.g. Chinese domain names

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (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 domain name request through an operating system; decrypting the domain name request by adopting a preset decryption mode; when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, and a target message corresponding to the target message information is used for indicating an operating system to execute target operation; acquiring the target message information based on the decryption processing result; and executing the target operation according to the target message corresponding to the target message information. According to the technical scheme, the functions of the operating system can be enhanced, and the user experience of the terminal equipment is improved. And because the target domain name request is generated according to the encrypted target message information, the target domain name request can be prevented from being intercepted, and the success rate of communication is ensured.

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 domain name request through an operating system;
decrypting the domain name request by adopting a preset decryption mode;
when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, and a target message corresponding to the target message information is used for indicating an operating system to execute target operation;
acquiring the target message information based on the decryption processing result;
and executing the target operation according to the target message corresponding to the target message information.
In an embodiment, the obtaining, by an operating system, a domain name request 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 target message information, wherein the target domain name request comprises the target domain name information generated according to the target message information.
In an embodiment, before the obtaining of the domain name request by the operating system, the method further includes:
when a preset trigger condition is detected, target message information is acquired;
encrypting the target message information by adopting a preset encryption mode, wherein the preset encryption mode is matched with the preset decryption mode;
performing domain name character conversion on the encryption processing result;
generating a target domain name request according to the result of the domain name character conversion;
and sending the generated target domain name request to the operating system.
In an embodiment, the obtaining target message information includes:
acquiring a target message and determining a first length of the target message;
if the first length exceeds a first preset threshold value, splitting the target message to obtain a plurality of sub-messages;
and determining each sub-message as target message information to obtain a plurality of target message information.
In an embodiment, the performing domain name character conversion on the result of the encryption processing includes:
determining a second length of a result of the encryption process;
if the second length exceeds a second preset threshold value, splitting the encryption processing result to obtain a plurality of sub-encryption messages;
and respectively carrying out domain name character conversion on each sub-encrypted message.
In an embodiment, the generating a target domain name request according to the result of the domain name character conversion includes:
determining a third length of a result of the domain name character conversion;
if the third length exceeds a third preset threshold, splitting a result of the domain name character conversion to obtain a plurality of sub-character sequences;
and respectively generating a target domain name request according to each sub-character sequence.
In an embodiment, the obtaining, by an operating system, a domain name request includes:
acquiring a plurality of domain name requests;
the decrypting the domain name request by adopting a preset decrypting mode comprises the following steps:
determining a domain name character sequence according to each domain name request to obtain a plurality of domain name character sequences;
decoding each domain name character sequence by adopting a preset decoding mode to obtain a plurality of sub-encrypted messages, wherein the preset decoding mode corresponds to a domain name character conversion mode;
decrypting each sub-encrypted message by adopting a preset decryption mode, and if decryption is successful, obtaining a plurality of sub-message information, wherein each sub-message information comprises a corresponding sub-message and a sub-message number, and the sub-message number is used for identifying the position of the sub-message in the corresponding target message;
the obtaining the target message information based on the result of the decryption processing includes:
determining each sub-message information as target message information to obtain a plurality of target message information;
the executing the target operation according to the target message corresponding to the target message information includes:
determining a target message corresponding to the target message information according to the sub-message number;
and executing the target operation according to the target message.
In an embodiment, before the decrypting the domain name request in the preset decryption manner, the method further includes:
and identifying a domain name request sent by the webpage client through a preset component.
In an embodiment, the identifying, by a preset component, a domain name request sent by a web client includes:
and identifying the domain name request sent by the webpage client through a preset DNS interface or a preset firewall component.
In an embodiment, the method further comprises:
and if the operation of acquiring the target message information is determined to be completed within the effective acquisition duration, executing the step of executing the target operation according to the target message corresponding to the target message information.
In an embodiment, the method further comprises:
and when decryption fails, determining the domain name request as a non-target domain name request, wherein the non-target domain name request does not carry target message information.
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 an embodiment, the executing the target operation according to the target message corresponding to the target message information 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 apparatus including:
the domain name request acquisition module is used for acquiring a domain name request through an operating system;
the domain name request decryption module is used for decrypting the domain name request in a preset decryption mode;
the target domain name determining module is used for determining the domain name request as a target domain name request when the decryption is successful, wherein the target domain name request carries target message information, and a target message corresponding to the target message information is used for indicating an operating system to execute target operation;
a message information acquisition module for acquiring the target message information based on the decryption processing result;
and the target operation execution module is used for executing the target operation according to the target message corresponding to the target message information.
In an embodiment, the domain name request obtaining module is further configured to obtain a target domain name request corresponding to target message information and sent by a web page through a web page client, where the target domain name request includes target domain name information generated according to the target message information.
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 message information acquisition unit is used for acquiring target message information when a preset trigger condition is detected;
the message information encryption unit is used for encrypting the target message information in a preset encryption mode, and the preset encryption mode is matched with the preset decryption mode;
a domain name character conversion unit, which is used for carrying out domain name character conversion on the result of the encryption processing;
a domain name request generating unit, configured to generate a target domain name request according to the result of the domain name character conversion;
and the domain name request sending module is used for sending the generated target domain name request to the operating system.
In an embodiment, the message information obtaining unit is further configured to:
acquiring a target message and determining a first length of the target message;
if the first length exceeds a first preset threshold value, splitting the target message to obtain a plurality of sub-messages;
and determining each sub-message as target message information to obtain a plurality of target message information.
In an embodiment, the domain name character conversion unit is further configured to:
determining a second length of a result of the encryption process;
if the second length exceeds a second preset threshold value, splitting the encryption processing result to obtain a plurality of sub-encryption messages;
and respectively carrying out domain name character conversion on each sub-encrypted message.
In an embodiment, the domain name request generating unit is further configured to:
determining a third length of a result of the domain name character conversion;
if the third length exceeds a third preset threshold, splitting a result of the domain name character conversion to obtain a plurality of sub-character sequences;
and respectively generating a target domain name request according to each sub-character sequence.
In an embodiment, the domain name request obtaining module is further configured to obtain a plurality of domain name requests;
the domain name request decryption module comprises:
the character sequence determining unit is used for determining a domain name character sequence according to each domain name request to obtain a plurality of domain name character sequences;
the character sequence decoding unit is used for decoding each domain name character sequence in a preset decoding mode to obtain a plurality of sub-encrypted messages, and the preset decoding mode corresponds to a domain name character conversion mode;
the encrypted message decryption unit is used for decrypting each sub-encrypted message in a preset decryption mode, if decryption is successful, a plurality of sub-message information is obtained, each sub-message information comprises a corresponding sub-message and a sub-message number, and the sub-message number is used for identifying the position of the sub-message in the corresponding target message;
the message information acquisition module is further used for determining each sub-message information as target message information to obtain a plurality of target message information;
the target operation execution module comprises:
a target message determining unit, configured to determine a target message corresponding to the target message information according to the sub-message number;
and the target operation execution unit is used for executing the target operation according to the target message.
In one embodiment, the apparatus further comprises:
and the domain name request identification module is used for identifying a domain name request sent by the webpage client through a preset component.
In an embodiment, the domain name request identification module is further configured to identify a target domain name request sent by the web client through a preset DNS interface or a preset firewall component.
In an embodiment, the target operation executing module is further configured to execute the target operation according to the target message corresponding to the target message information when it is determined that the operation of acquiring the target message information is completed within the effective acquisition duration.
In one embodiment, the apparatus further comprises:
and the non-target domain name determining module is used for determining the domain name request as a non-target domain name request when decryption fails, wherein the non-target domain name request does not carry target message information.
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 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 application parameters.
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 of the target application;
when 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 third aspect of the 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 domain name request through an operating system;
decrypting the domain name request by adopting a preset decryption mode;
when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, and a target message corresponding to the target message information is used for indicating an operating system to execute target operation;
acquiring the target message information based on the decryption processing result;
and executing the target operation according to the target message corresponding to the target message information.
According to a fourth 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 domain name request through an operating system;
decrypting the domain name request by adopting a preset decryption mode;
when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, and a target message corresponding to the target message information is used for indicating an operating system to execute target operation;
acquiring the target message information based on the decryption processing result;
and executing the target operation according to the target message corresponding to the target message information.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
as can be seen from the foregoing embodiment, according to the present disclosure, an operating system obtains a domain name request, decrypts the domain name request in a preset decryption manner, and then determines the domain name request as a target domain name request when decryption is successful, and obtains the target message information based on a result of the decryption processing, so as to execute the target operation according to the target message corresponding to the target message information, which may enhance a function of the operating system and improve user experience of a terminal device. And because the target domain name request is generated according to the encrypted target message information, the target domain name request can be prevented from being intercepted, the communication quality is ensured, and the success rate of communication is improved.
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 target message information is obtained in accordance with an illustrative embodiment;
FIG. 5 is a flow diagram illustrating how domain name character conversion is performed on the results of the encryption process in accordance with one illustrative embodiment;
FIG. 6 is a flowchart illustrating how a target domain name request is generated based on the results of the domain name character conversion in accordance with an illustrative embodiment;
fig. 7 is a flow chart illustrating a method of communication according to a fourth exemplary embodiment;
fig. 8 is a flow chart illustrating a method of communication according to a fifth exemplary embodiment;
fig. 9 is a flow chart illustrating a method of communication according to a sixth exemplary embodiment;
fig. 10 is a flow chart illustrating a method of communication according to a seventh exemplary embodiment;
FIG. 11 is a flowchart illustrating how the target operation is performed based on a target message to which the target message information corresponds, according to an example embodiment;
FIG. 12 is a flowchart illustrating how a target application may be opened based on the target application parameters in accordance with an illustrative embodiment;
FIG. 13A is a schematic diagram illustrating an application scenario of a communication method in accordance with an illustrative embodiment;
fig. 13B is a schematic view of an application scenario of a communication method in the related art;
FIG. 14 is a block diagram illustrating a communication device in accordance with an exemplary embodiment;
FIG. 15 is a block diagram illustrating a communication device in accordance with yet another exemplary embodiment;
FIG. 16 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: and (4) terminal equipment. The terminal device obtains a domain name request through an operating system, decrypts the domain name request in a preset decryption mode, and determines the domain name request as a target domain name request when decryption is successful, wherein the target domain name request carries target message information, the target message corresponding to the target message information is used for indicating the operating system to execute target operation, then the target message information is obtained based on a decryption processing result, and the target operation is executed according to the target message corresponding to the target message information, such as operations of shutting down, starting a timer, opening an application program and the like.
Fig. 1 is a flow chart illustrating a method of communication according to a first 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: a domain name request is obtained by an operating system.
In an embodiment, the terminal device obtains a domain name request through an operating system, where the domain name request may include, but is not limited to, a domain name request sent by a webpage displayed in the terminal device to the operating system under a preset trigger condition.
In an embodiment, the domain name request obtained by the operating system includes a non-target domain name request and a target domain name request.
In the related art, after a web page sends a Domain Name request to an operating System, 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 user terminal establishes a network connection, such as a Transmission Control Protocol (TCP) connection, with another network device corresponding to the IP address, such as a network server, and further transmits information with the other network device based on the network connection. That is, the domain name information included in the domain name request in the related art is real and domain name information corresponding to the IP address can be resolved.
In an embodiment, the domain name information included in the non-target domain name request is real and the domain name information corresponding to the IP address can be resolved. The target domain name information included in the target domain name request is not real domain name information, that is, although the target domain name information is information in a domain name format, the target domain name information is not used for instructing the operating system to perform a domain name resolution operation, but instructs the operating system to perform an operation other than the domain name resolution, for example, to open an application, perform shutdown, restart, start a timer for a preset time duration, and the like.
S12: and decrypting the domain name request by adopting a preset decryption mode.
In an embodiment, after the operating system obtains the domain name request, a preset decryption mode may be adopted to decrypt the obtained domain name request.
In an embodiment, the preset decryption manner corresponds to a preset encryption manner adopted in a generation process of the target domain name request, where the generation process of the target domain name request may refer to the embodiment shown in fig. 3 below, and is not described herein again.
S13: and when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, and a target message corresponding to the target message information is used for indicating an operating system to execute target operation.
In an embodiment, since the target domain name request is an encrypted domain name request, if the target domain name request is decrypted, information in a preset format can be obtained, that is, the decryption is successful; the non-target domain name request is a domain name request which is not encrypted, and if the non-target domain name request is decrypted, information in a preset format cannot be obtained, for example, information with messy codes may be obtained, that is, decryption fails. Therefore, when the decryption is successful, the domain name request can be determined as a target domain name request, and it is determined that the target domain name request carries target message information, and it is determined that the target message corresponding to the target message information is used for instructing the operating system to execute the target operation.
S14: and acquiring the target message information based on the decryption processing result.
In an embodiment, after determining the currently obtained domain name request as the target domain name request, the operating system may obtain the target message information based on the result of the decryption process.
In an embodiment, the target message information may be all or part of the target message itself; or, the information may also be information associated with part or all of the target message, such as identification information of part or all of the target message, and the target message may be acquired through the associated information; alternatively, all or part of the target parameters carried in the target message may be used.
S15: and executing the target operation according to the target message corresponding to the target message information.
In an embodiment, after the target message information is determined, the corresponding target message may be determined according to the target message information, and then the target operation may be executed according to the determined target message.
In an embodiment, the target operation may include, but is not limited to, opening an application, performing shutdown, restarting, starting a timer for a preset duration, and so on, and how to perform the target operation may refer to the related art, which belongs to the capabilities of the operating system and/or the application installed thereon.
In an implementation, the determination method of the target message may refer to the following embodiment shown in fig. 7, which is not described herein again.
As can be seen from the foregoing embodiment, according to the present disclosure, an operating system obtains a domain name request, decrypts the domain name request in a preset decryption manner, and then determines the domain name request as a target domain name request when decryption is successful, and obtains the target message information based on a result of the decryption processing, so as to execute the target operation according to the target message corresponding to the target message information, which may enhance a function of the operating system and improve user experience of a terminal device. And because the target domain name request is generated according to the encrypted target message information, the target domain name request can be prevented from being intercepted, the communication quality is ensured, and the success rate of communication is improved.
The present disclosure also provides a communication method, and the related execution main body includes: the terminal device, in which client software capable of displaying a Web page is installed, for example, a Web browser or other network proxy services such as chat, wechat, and the like (collectively referred to as a Web page client in this disclosure). The webpage sends target message information in a domain name format to an operating system of the terminal device through a webpage client, the target message corresponding to the target message information is used for indicating the operating system to execute target operation, after the operating system obtains a domain name request, the operating system can determine the target domain name request through decryption processing, then the target message information is obtained, and then the target operation is executed according to the target message corresponding to the target message information.
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: 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 target message information, wherein the target domain name request comprises the target domain name information generated according to the target message information.
In an embodiment, a web page (the web page itself, a web page client, or a server) generates target domain name information based on acquired target message information, and sends a target domain name request to an operating system based on the target domain name information when a preset trigger condition is detected. The target domain name request is used for requesting an operating system to analyze target domain name information.
In an embodiment, the operating system obtains a target domain name request corresponding to target message information, which is sent by the web page through a web page client.
S22: and decrypting the domain name request by adopting a preset decryption mode.
S23: and when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, and a target message corresponding to the target message information is used for indicating an operating system to execute target operation.
S24: and acquiring the target message information based on the decryption processing result.
S25: and executing the target operation according to the target message corresponding to the target message information.
The steps S22-S25 are the same as the steps S12-S15 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 target message information is obtained, the domain name request is decrypted in the preset decryption mode, the domain name request is determined to be the target domain name request when decryption is successful, the target message information is obtained based on the decryption result, the target operation is executed according to the target message corresponding to the target message information, 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-S40:
s31: and when a preset trigger condition is detected, acquiring target message information.
In an embodiment, when a preset trigger condition is detected by a web page in a terminal device, target message information corresponding to a target message is acquired.
In an embodiment, the target message information may be all or part of the target message itself; alternatively, it may also be information associated with part or all of the target message, such as identification information; the target message can be acquired through the associated information; alternatively, all or part of the target parameters carried in the target message may be used.
In an embodiment, when it is determined that a preset trigger condition is met, target message information corresponding to the target message is determined through the webpage.
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 target message information corresponding to the target message to be sent is determined.
In an embodiment, the determining, by the current webpage, the target message information according to the preset trigger condition may include the following two cases:
in the first case, target message information is preset in the current webpage, and when the preset trigger condition is detected by the webpage, the target message information can be output according to the trigger condition.
In the second case, the current webpage does not have preset target message information, and when the preset trigger condition is detected, the webpage server is requested to generate the target message information in real time.
For example, when the webpage detects a preset trigger condition, a message request is sent to the webpage server, and 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 target message information and sends the target message information to the webpage, so that the webpage can acquire the target message information when updating the webpage 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 target message information may also refer to the embodiment described in fig. 4, which is not described herein again.
S32: and encrypting the target message information by adopting a preset encryption mode, wherein the preset encryption mode is matched with the preset decryption mode.
In an embodiment, after the target message information is obtained, a preset encryption mode may be adopted to encrypt the target message information, so as to obtain an encryption processing result (i.e., the encrypted target message information).
In an embodiment, the preset encryption manner may include, but is not limited to, a relatively mature symmetric encryption algorithm and an asymmetric encryption algorithm in the related art, and a specific algorithm may be selected according to actual needs, which is not limited in this disclosure.
S33: and performing domain name character conversion on the encryption processing result.
In an embodiment, the web page may perform domain name character conversion on the result of the encryption processing.
According to the domain name protocol specification in the related art, the domain name information needs to be composed of characters in a preset character space. Generally, the target message information determined by the web page and the encrypted target message information are not composed of characters in the preset domain name character space, and therefore, each character in the encrypted target message information needs to be converted into a domain name character to obtain a domain name character conversion result (for example, a target character sequence).
In one embodiment, the result of the above encryption process may be subjected to domain name character conversion using a base32 encoding algorithm or the like.
S34: and generating a target domain name request according to the result of the domain name character conversion.
In an embodiment, after obtaining the result of domain name character conversion, the web page may generate a target domain name request according to the result of domain name character conversion.
In an embodiment, the web page may determine target domain name information according to the result of the domain name character conversion, and further generate the target domain name request according to the target domain name information, where the target domain name request at least includes the result of the domain name character conversion.
It is to be noted that the execution subject of at least one of the steps S32-S34 in the present embodiment may be a web page, a web page client, or may also be a server. For example, when a preset trigger condition is detected by a web page in the terminal device, target message information is acquired, and the encrypted target message information is sent to the server to request the server to execute steps S32-S34 according to the encrypted target message information to generate target domain name information or a target domain name request, and then the generated target domain name information or the target domain name request is returned to the request terminal.
For example, if the currently determined target message information is "abc", the target message information "abc" is encrypted by using a preset encryption algorithm to obtain encrypted target message information "xyz", and then domain name character conversion is performed on the encrypted target message information "xyz" to obtain a target character sequence "cd 2". In an embodiment, after a preset feature code is further added to the target character sequence "cd 2", the first character information "cd 2" -is obtained. According to the specification of the relevant DNS protocol, the domain name information may include: ". com, 'net,' cn, 'org' and the like. In one embodiment, preset domain name identification information, such as top-level domain name ″. com', may be added to the first character information "cd 2 —" to generate a target domain name information "cd 2 —. com". 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:// cd2- -. com, or Http:// cd2- -. com, for example.
S35: and sending the generated target domain name request to the operating system.
In an embodiment, after the target domain name request is generated by a web page (the web page itself, a web page client, or a server), if a preset trigger condition is detected, the generated target domain name request is sent to the operating system.
S36: a domain name request is obtained by an operating system.
S37: and decrypting the domain name request by adopting a preset decryption mode.
S38: and when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, and a target message corresponding to the target message information is used for indicating an operating system to execute target operation.
S39: and acquiring the target message information based on the decryption processing result.
S40: and executing the target operation according to the target message corresponding to the target message information.
The steps S36-S40 are the same as the steps S11-S15 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, when a preset trigger condition is detected, target message information is obtained, a preset encryption manner is used for encrypting the target message information, then domain name character conversion is performed on an encryption result, a target domain name request is generated according to a domain name character conversion result, and then the generated target domain name request is sent to the operating system, so that the operating system can receive the target domain name request, obtain the target message information through decryption processing, execute a target operation according to a target message corresponding to the target message information, enhance a function of the operating system, enable a web page running in a terminal device to execute the target operation passing through the operating system without being limited by whether an API interface is added, and improve user experience of the terminal device.
FIG. 4 is a flow diagram illustrating how target message information is obtained in accordance with an illustrative embodiment; on the basis of the above embodiments, the present embodiment takes how to acquire target message information as an example for illustration. As shown in fig. 4, the acquiring of the target message information in the step S31 may include the following steps S41-S43:
s41: and acquiring the target message and determining the first length of 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.
In one embodiment, after the target message is obtained, a first length of the target message may be determined, for example, a character length of the target message may be determined.
S42: and splitting the target message to obtain a plurality of sub-messages if the first length exceeds a first preset threshold value.
In an embodiment, after determining the first length of the target message, the first length may be compared with a first preset threshold, and when determining that the first length exceeds the first preset threshold, the target message is split into a plurality of sub-messages based on a preset splitting rule.
In an embodiment, the preset splitting rule may include: splitting according to a preset character length or splitting according to a content field of the target message.
S43: and determining each sub-message as target message information to obtain a plurality of target message information.
In an embodiment, after obtaining the plurality of sub-messages of the target message, each sub-message may be determined as target message information, that is, a plurality of target message information may be obtained.
As can be seen from the above description, in the embodiment of the present disclosure, by obtaining the target message, determining the first length of the target message, splitting the target message when the first length exceeds the first preset threshold to obtain a plurality of sub-messages, and then determining each sub-message as the target message information to obtain a plurality of target message information, the trouble that the domain name request cannot be generated because the length of the target message is too long and does not meet the requirement for the domain name information in the related art can be avoided, and the quality of communication is ensured.
FIG. 5 is a flow diagram illustrating how domain name character conversion is performed on the results of the encryption process in accordance with one illustrative embodiment; on the basis of the above embodiments, the present embodiment exemplifies how to perform domain name character conversion on the result of the encryption processing. As shown in fig. 5, the performing of domain name character conversion on the result of the encryption processing in the above step S33 includes the following steps S51-S53:
s51: a second length of a result of the encryption process is determined.
In an embodiment, when the result of the encryption processing is obtained, the second length of the result of the encryption processing, that is, the character length of the encrypted target message information, may be determined.
S52: and splitting the encryption processing result to obtain a plurality of sub-encryption messages if the second length exceeds a second preset threshold value.
In an embodiment, after determining the second length of the encrypted target message information, the second length may be compared with a second preset threshold, and then when determining that the second length exceeds the second preset threshold, the result of the encryption processing is split into a plurality of sub-encrypted messages based on a preset splitting rule.
In an embodiment, the preset splitting rule may include: splitting according to a preset character length, or splitting according to a content field of target message information.
S53: and respectively carrying out domain name character conversion on each sub-encrypted message.
In an embodiment, after obtaining a plurality of sub encrypted messages of the result of the above encryption processing, domain name character conversion may be performed on each of the sub encrypted messages, respectively.
As can be seen from the above description, in the embodiment of the present disclosure, by determining the second length of the result of the encryption processing, and when the second length exceeds the second preset threshold, splitting the result of the encryption processing to obtain a plurality of sub-encrypted messages, and further performing domain name character conversion on each sub-encrypted message, the trouble that a domain name request cannot be generated because the length of a target message is too long and does not meet the requirement for domain name information in the related art can be avoided, and the quality of communication is ensured.
FIG. 6 is a flowchart illustrating how a target domain name request is generated based on the results of the domain name character conversion in accordance with an illustrative embodiment; on the basis of the foregoing embodiments, this embodiment exemplifies how to generate a target domain name request according to the result of the domain name character conversion. As shown in fig. 6, the generation of the target domain name request according to the result of the domain name character conversion in the above step S34 includes the following steps S61-S63:
s61: determining a third length of a result of the domain name character conversion.
In an embodiment, after obtaining the result of domain name character conversion, the third length of the result of domain name character conversion may be determined, that is, the character length of the target character sequence obtained after domain name character conversion is determined.
S62: and if the third length exceeds a third preset threshold, splitting the result of the domain name character conversion to obtain a plurality of sub-character sequences.
In an embodiment, after determining the third length of the result of the domain name character conversion, the third length may be compared with a third preset threshold, and when determining that the third length exceeds the third preset threshold, the result of the domain name character conversion is split into a plurality of sub-character sequences based on a preset splitting rule.
In an embodiment, the preset splitting rule may include: splitting according to a preset character length or splitting according to a content field of a target character sequence.
S63: and respectively generating a target domain name request according to each sub-character sequence.
In an embodiment, after obtaining a plurality of sub-character sequences of the result of the domain name character conversion, a target domain name request may be generated according to each sub-character sequence.
As can be seen from the above description, in the embodiment of the present disclosure, by determining the third length of the result of domain name character conversion, and when the third length exceeds a third preset threshold, splitting the result of domain name character conversion to obtain a plurality of sub-character sequences, and then performing domain name character conversion according to each sub-character sequence, a trouble that a domain name request cannot be generated because the length of a target message is too long and does not meet a requirement for domain name information in a related technology can be avoided, and quality of communication is ensured.
Fig. 7 is a flow chart illustrating a method of communication according to a fourth 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. 7, the method includes the following steps S71-S77:
s71: a plurality of domain name requests are obtained.
In an embodiment, an operating system of a terminal device obtains a plurality of domain name requests under a preset detection condition.
In an embodiment, the preset detection condition may include: continuously acquiring a plurality of domain name requests within a first preset time length, and not receiving a new domain name request within a second preset time length after the last domain name request is acquired; alternatively, the preset detection condition may further include: when detecting the number of the sub-messages or the total packet number of the domain name requests in the domain name requests, acquiring the total packet number of the domain name requests. The total packet number of domain name requests can be acquired within preset acquisition time.
In an embodiment, the domain name request obtained by the operating system includes a non-target domain name request and a target domain name request.
In an embodiment, the domain name information included in the non-target domain name request is real and the domain name information corresponding to the IP address can be resolved. The target domain name information included in the target domain name request is not real domain name information, that is, although the target domain name information is information in a domain name format, the target domain name information is not used for instructing the operating system to perform a domain name resolution operation, but instructs the operating system to perform an operation other than the domain name resolution, for example, to open an application, perform shutdown, restart, start a timer for a preset time duration, and the like.
S72: and determining a domain name character sequence according to each domain name request to obtain a plurality of domain name character sequences.
In an embodiment, the operating system may determine a corresponding domain name character sequence according to each obtained domain name request, and thus may obtain a plurality of domain name character sequences according to the obtained plurality of domain name requests.
Still taking the domain name request in the embodiment shown in fig. 3 as an example, if the domain name request currently acquired by the operating system is "http:// cd2- -. com", the domain name character information "cd 2- -. com" may be determined according to the domain name request, and on this basis, the first character information "cd 2- -" may be extracted from the domain name character information, and the domain name character sequence "cd 2" may be obtained by removing the feature code of the first character sequence.
S73: and decoding each domain name character sequence by adopting a preset decoding mode to obtain a plurality of sub-encrypted messages, wherein the preset decoding mode corresponds to a domain name character conversion mode.
In an embodiment, after determining the plurality of domain name character sequences, the operating system may perform decoding processing on each domain name character sequence by using a preset decoding manner corresponding to domain name character conversion to obtain a sub-encrypted message, so that the decoding processing may be performed according to the obtained plurality of domain name character sequences to obtain a plurality of sub-encrypted messages.
Still taking the domain name character sequence in step S73 as an example, if the domain name character sequence currently determined by the operating system is "cd 2", the sub-encrypted information "xyz" can be obtained by decoding the domain name character sequence in a preset decoding manner.
S74: and decrypting each sub-encrypted message by adopting a preset decryption mode, and if the decryption is successful, obtaining a plurality of sub-message information, wherein each sub-message information comprises a corresponding sub-message and a sub-message number, and the sub-message number is used for identifying the position of the sub-message in the corresponding target message.
In an embodiment, after determining the plurality of sub-encrypted messages, the operating system may perform decryption processing on each sub-encrypted message by using a preset decryption method corresponding to the preset encryption method to obtain a sub-message, so that the operating system may perform decryption processing according to the obtained plurality of sub-encrypted messages to obtain a plurality of sub-messages.
Still taking the sub-encrypted message in step S74 as an example, if the sub-encrypted message "xyz" currently determined by the operating system is used, the sub-encrypted message is decrypted by using a preset decryption method to obtain the sub-message "abc", and it can be determined that the current decryption is successful according to the format of the sub-message, so that the subsequent steps are performed.
S75: and determining each sub-message information as target message information to obtain a plurality of target message information.
In one embodiment, after determining the plurality of sub-messages, each sub-message may be determined as a target message information, and thus a plurality of target message information may be determined according to the plurality of sub-message information.
S76: and determining the target message corresponding to the target message information according to the sub-message number.
In an embodiment, the sub-message information may further include, in addition to the sub-message and the sub-message number, a total number identifier of the domain name requests corresponding to the same group of target message information (i.e., the same group of target messages).
In an embodiment, after determining the plurality of target message information, the target message corresponding to the plurality of target message information may be determined according to the continuity of the total number identifier and the sub-message number.
In an embodiment, the operating system may sequentially concatenate the target message information according to the sub-message labels to obtain the target message.
S77: and executing the target operation according to the target message.
In an embodiment, after the operating system determines the target message corresponding to the target message information, the operating system may execute a corresponding target operation according to the target message, and for related explanation, reference may be made to the embodiment shown in fig. 1, which is not described herein again.
As can be seen from the foregoing embodiments, according to the present disclosure, an operating system obtains a plurality of domain name requests, decrypts the plurality of domain name requests in a preset decryption manner, and then determines the plurality of domain name requests as target domain name requests when decryption is successful, and obtains a plurality of target message information based on a result of the decryption processing, and then determines a target message corresponding to the plurality of target message information, so as to execute a target operation according to the target message, which can enhance a function of the operating system, and improve user experience of a terminal device. In addition, because the generation process of the domain name request is split and encrypted, the problem that the target domain name request cannot be directly generated due to overlong target information can be avoided, the target domain name request can be prevented from being intercepted, the communication quality is ensured, and the success rate of communication is improved.
Fig. 8 is a flow chart illustrating a method of communication according to a fifth 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. 8, the method includes the following steps S81-S86:
s81: acquiring a domain name request through an operating system;
s82: identifying a domain name request sent by a 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 embodiment shown in fig. 9, which is not repeated herein.
S83: decrypting the domain name request by adopting a preset decryption mode;
s84: when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, and a target message corresponding to the target message information is used for indicating an operating system to execute target operation;
s85: acquiring the target message information based on the decryption processing result;
s86: and executing the target operation according to the target message corresponding to the target message information.
Steps S81 and S83-S86 are the same as steps S11-S15 in the embodiment shown in fig. 1, and for related explanation, reference may be made to the embodiment described above, which is not repeated herein.
According to the embodiment, the domain name request sent by the webpage client is identified through the preset component, and the target domain name request can be identified from a large number of domain name requests sent by the webpage client through the preset component, so that the function of an operating system is enhanced, and the user experience of the terminal device is improved. In addition, because the generation process of the domain name request is split and encrypted, the problem that the target domain name request cannot be directly generated due to overlong target information can be avoided, the target domain name request can be prevented from being intercepted, the communication quality is ensured, and the success rate of communication is improved.
Fig. 9 is a flow chart illustrating a method of communication according to a sixth 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. 9, the method includes the following steps S91-S96:
s91: acquiring a domain name request through an operating system;
s92: identifying a domain name request sent by a webpage client through a preset DNS interface;
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 preset firewall component in the operating system.
In an embodiment, the preset DNS interface or the preset 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 or a firewall component added with a Hook function, or a newly added service program disposed in the operating system, or may be a service process externally hung in a DNS component or a firewall 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 or the firewall component in the related art, the preset DNS interface or the preset firewall component in the embodiment of the present disclosure adds the capability of recognizing the target domain name request.
Because the DNS interface or the firewall component belongs to the original component of the operating system, the present embodiment may perform parameter configuration on the original DNS or firewall component interface or add a preset function, such as a Hook function, so that the DNS interface or the firewall component 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.
S93: decrypting the domain name request by adopting a preset decryption mode;
s94: when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, and a target message corresponding to the target message information is used for indicating an operating system to execute target operation;
s95: acquiring the target message information based on the decryption processing result;
s96: and executing the target operation according to the target message corresponding to the target message information.
Steps S91 and S93-S96 are the same as steps S11-S15 in the embodiment shown in fig. 1, and for related explanation, reference may be made to the embodiment described above, 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 preset firewall component, and because the DNS interface or the firewall component belongs to the original component of the operating system, in this embodiment, parameter configuration may be performed on the original DNS interface or the firewall component or a preset function may be added, so that the DNS interface or the firewall component has the capability of identifying the target domain name request, and a new component does not need to be added, thereby saving equipment cost.
Fig. 10 is a flow chart illustrating a method of communication according to a seventh exemplary embodiment; this embodiment may be used for a terminal device (e.g., a mobile phone, a tablet, a personal computer, etc.), as shown in fig. 10, the method includes the following steps S101-S105:
s101: acquiring a domain name request through an operating system;
s102: decrypting the domain name request by adopting a preset decryption mode;
s103: when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, and a target message corresponding to the target message information is used for indicating an operating system to execute target operation;
s104: acquiring the target message information based on the decryption processing result;
steps S101 to S104 are the same as steps S11 to S14 in the embodiment shown in fig. 1, and for related explanation, reference may be made to the embodiment described above, which is not repeated herein.
S105: if the operation of acquiring the target message information is determined to be completed within the effective acquisition duration, executing the target operation according to the target message corresponding to the target message information
In an embodiment, in the generation phase of the target domain name request, when the target message information is acquired (or when the target domain name request is generated, or when the target domain name request is sent to the 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 target message information, determining actual acquisition time of the target message information based on the timestamp, and further comparing the actual acquisition time with effective acquisition duration to determine whether the target message information is acquired within the effective acquisition duration, if so, executing the target operation according to the target message corresponding to the target message information; if not, the target message may be ignored.
In an embodiment, in a generation stage of a target domain name request, when target message information 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 to select can be set by a user or a developer according to actual needs), a timer is started, when an effective acquisition duration is reached, whether the operation of acquiring the target message information by the operating system is completed is determined, and if yes, the target operation is executed according to a target message corresponding to the target message information; if not, the target message may be ignored.
As can be seen from the above description, in this embodiment, by determining whether the operation of acquiring the target message information is completed within the effective acquisition time, and when it is determined that the operation of acquiring the target message information is not completed within the effective acquisition time, it is determined that the target message corresponding to the target message information is expired, the target message is ignored, and the target operation is not executed, and when it is determined that the operation of acquiring the target message information is completed within the effective acquisition time, it is determined that the target message corresponding to the target message information is valid, and the target operation is executed, so that the target message with an excessively long processing time can be effectively filtered, the target operation is guaranteed to be executed within a relatively short time, and user experience is effectively improved.
In an embodiment, after the operating system parses the target message information, a target operation may be performed according to a target message corresponding to the target message information, 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. The following description will be given by taking as an example how to open the target application as shown in the embodiment shown in fig. 11.
FIG. 11 is a flowchart illustrating how the target operation is performed based on a target message to which the target message information corresponds, according to an example embodiment; on the basis of the foregoing embodiments, this embodiment takes as an example how to perform the target operation according to the target message corresponding to the target message information. As shown in fig. 11, the performing the target operation according to the target message corresponding to the target message information in step S15 may include the following steps S111-S112:
s111: 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.
S112: 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. 12, 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. 12, the target application parameters at least include an identity of the target application;
on this basis, the step S112 of opening the target application according to the target application parameter may include the following steps S121 to S123:
s121: 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.
S122: 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.
S123: 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.
In the communication method provided by the present disclosure, when a preset trigger condition is detected on a web page, target message information 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 a target message corresponding to the target message information by performing resolution processing on a domain name request, 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, which belongs to capabilities of the operating system and/or an application installed thereon. The following is an exemplary description taking an application scenario of opening an application program as an example.
FIG. 13A is a schematic diagram illustrating an application scenario of a communication method in accordance with an illustrative embodiment; as shown in fig. 13A, 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 smart phone 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 target message information sent by a web page (the target message information includes target application parameters of a target application to be opened). And the JS script carries out encryption processing according to the target message information, and then generates a target domain name request according to the encrypted target message information. The JS script sends a domain name request passing through the operating system through a system interface, and the domain name request is monitored when passing through a preset monitoring component (such as DNS) arranged in the operating system and is determined as a target domain name request through decryption. 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. 13B is a schematic view of an application scenario of a communication method in the related art; as shown in fig. 13B, 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 opening mode according to the additional API interface, and prompts the user to select the opening 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 the user wants to perform a target operation (e.g. jump to local application software, etc.) through the operating system from a certain web page running in the browser, the operating system of the user terminal may detect a target domain name request containing identification information, further extracting the identification information, determining a target message corresponding to the identification information (the target message comprises target application parameters of a target application to be opened), sending the target application parameters to a preset application platform, the preset application platform opens the target application for the user without the limitation of whether the application of the two parties is additionally provided with an API (application program interface), the method can directly jump from the current application to the target application without making requirements on the version and the configuration of application software of both parties, namely, the compatibility of the applications of both parties, and can improve the 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. 14 is a block diagram illustrating a communication device in accordance with an exemplary embodiment; as shown in fig. 14, the apparatus includes: a domain name request obtaining module 110, a domain name request decrypting module 120, a target domain name determining module 130, a message information obtaining module 140 and a target operation executing module 150, wherein:
a domain name request obtaining module 110, configured to obtain a domain name request through an operating system;
a domain name request decryption module 120, configured to decrypt the domain name request in a preset decryption manner;
a target domain name determining module 130, configured to determine, when decryption is successful, the domain name request as a target domain name request, where the target domain name request carries target message information, and a target message corresponding to the target message information is used to instruct an operating system to perform a target operation;
a message information obtaining module 140, configured to obtain the target message information based on a result of the decryption process;
and a target operation executing module 150, configured to execute the target operation according to the target message corresponding to the target message information.
FIG. 15 is a block diagram illustrating a communication device in accordance with yet another exemplary embodiment; the domain name request obtaining module 230, the domain name request decrypting module 240, the target domain name determining module 260, the message information obtaining module 270, and the target operation executing module 280 have the same functions as the domain name request obtaining module 110, the domain name request decrypting module 120, the target domain name determining module 130, the message information obtaining module 140, and the target operation executing module 150 in the embodiment shown in fig. 14, and are not described herein again.
In an embodiment, the domain name request obtaining module 230 may be further configured to obtain a target domain name request corresponding to target message information, 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 target message information.
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:
a message information obtaining unit 211, configured to obtain target message information when a preset trigger condition is detected;
a message information encryption unit 212, configured to encrypt the target message information in a preset encryption manner, where the preset encryption manner is matched with the preset decryption manner;
a domain name character conversion unit 213, configured to perform domain name character conversion on the result of the encryption processing;
a domain name request generating unit 214, configured to generate a target domain name request according to a result of the domain name character conversion;
a domain name request sending module 220, configured to send the generated target domain name request to the operating system.
In an embodiment, the message information obtaining unit 270 is further configured to:
acquiring a target message and determining a first length of the target message;
if the first length exceeds a first preset threshold value, splitting the target message to obtain a plurality of sub-messages;
and determining each sub-message as target message information to obtain a plurality of target message information.
In an embodiment, the domain name character conversion unit 213 is further configured to:
determining a second length of a result of the encryption process;
if the second length exceeds a second preset threshold value, splitting the encryption processing result to obtain a plurality of sub-encryption messages;
and respectively carrying out domain name character conversion on each sub-encrypted message.
In an embodiment, the domain name request generating unit 214 is further configured to:
determining a third length of a result of the domain name character conversion;
if the third length exceeds a third preset threshold, splitting a result of the domain name character conversion to obtain a plurality of sub-character sequences;
and respectively generating a target domain name request according to each sub-character sequence.
In an embodiment, the domain name request obtaining module 230 is further configured to obtain a plurality of domain name requests;
the domain name request decryption module 240 may include:
a character sequence determining unit 241, configured to determine a domain name character sequence according to each domain name request, so as to obtain multiple domain name character sequences;
a character sequence decoding unit 242, configured to perform decoding processing on each domain name character sequence in a preset decoding manner to obtain multiple sub-encrypted messages, where the preset decoding manner corresponds to a domain name character conversion manner;
an encrypted message decryption unit 243, configured to decrypt each sub-encrypted message in a preset decryption manner, and if decryption is successful, obtain multiple pieces of sub-message information, where each piece of sub-message information includes a corresponding sub-message and a sub-message number, and the sub-message number is used to identify a position of the sub-message in a corresponding target message;
the message information obtaining module 270 is further configured to determine each sub-message information as target message information, so as to obtain multiple pieces of target message information;
the target operation execution module 280 may include:
a target message determining unit 281, configured to determine a target message corresponding to the target message information according to the sub-message number;
a target operation executing unit 282, configured to execute the target operation according to the target message.
In an embodiment, the apparatus may further include:
the domain name request identifying module 290 is configured to identify, through a preset component, a domain name request sent by a web client.
In an embodiment, the domain name request identification module 290 is further configured to identify a target domain name request sent by the web client through a preset DNS interface.
In an embodiment, the target operation executing module 280 may be further configured to, when it is determined that the operation of acquiring the target message information is completed within the valid acquisition duration, execute the target operation according to the target message corresponding to the target message information.
In an embodiment, the apparatus may further include:
a non-target domain name determining module 250, configured to determine, when decryption fails, the domain name request as a non-target domain name request, where the non-target domain name request does not carry target message information.
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 280 may include:
an application parameter extracting unit 283, configured to extract target application parameters from the target message;
a target application opening unit 284, configured to open the target application according to the target application parameter.
In an embodiment, the target application opening unit 284 may further be configured to:
determining whether the target application is installed locally or not according to the identity of the target application;
when 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.
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. 16 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. 16, 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 (30)

1. A method of communication, comprising:
acquiring a domain name request through an operating system;
decrypting the domain name request by adopting a preset decryption mode;
when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, a target message corresponding to the target message information is used for indicating an operating system to execute target operation, and the target operation comprises at least one of shutdown, restart and starting a timer with preset duration;
acquiring the target message information based on the decryption processing result;
and executing the target operation according to the target message corresponding to the target message information.
2. The method of claim 1, wherein obtaining, by the operating system, the domain name request comprises:
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 target message information, wherein the target domain name request comprises the target domain name information generated according to the target message information.
3. The method of claim 1, wherein prior to obtaining the domain name request by the operating system, the method further comprises:
when a preset trigger condition is detected, target message information is acquired;
encrypting the target message information by adopting a preset encryption mode, wherein the preset encryption mode is matched with the preset decryption mode;
performing domain name character conversion on the encryption processing result;
generating a target domain name request according to the result of the domain name character conversion;
and sending the generated target domain name request to the operating system.
4. The method of claim 3, wherein the obtaining target message information comprises:
acquiring a target message and determining a first length of the target message;
if the first length exceeds a first preset threshold value, splitting the target message to obtain a plurality of sub-messages;
and determining each sub-message as target message information to obtain a plurality of target message information.
5. The method according to claim 3, wherein the performing domain name character conversion on the result of the encryption processing comprises:
determining a second length of a result of the encryption process;
if the second length exceeds a second preset threshold value, splitting the encryption processing result to obtain a plurality of sub-encryption messages;
and respectively carrying out domain name character conversion on each sub-encrypted message.
6. The method of claim 3, wherein generating a target domain name request according to the result of the domain name character conversion comprises:
determining a third length of a result of the domain name character conversion;
if the third length exceeds a third preset threshold, splitting a result of the domain name character conversion to obtain a plurality of sub-character sequences;
and respectively generating a target domain name request according to each sub-character sequence.
7. The method according to any one of claims 4-6, wherein the obtaining, by the operating system, the domain name request comprises:
acquiring a plurality of domain name requests;
the decrypting the domain name request by adopting a preset decrypting mode comprises the following steps:
determining a domain name character sequence according to each domain name request to obtain a plurality of domain name character sequences;
decoding each domain name character sequence by adopting a preset decoding mode to obtain a plurality of sub-encrypted messages, wherein the preset decoding mode corresponds to a domain name character conversion mode;
decrypting each sub-encrypted message by adopting a preset decryption mode, and if decryption is successful, obtaining a plurality of sub-message information, wherein each sub-message information comprises a corresponding sub-message and a sub-message number, and the sub-message number is used for identifying the position of the sub-message in the corresponding target message;
the obtaining the target message information based on the result of the decryption processing includes:
determining each sub-message information as target message information to obtain a plurality of target message information;
the executing the target operation according to the target message corresponding to the target message information includes:
determining a target message corresponding to the target message information according to the sub-message number;
and executing the target operation according to the target message.
8. The method according to claim 1, wherein before the decrypting the domain name request in the preset decryption manner, the method further comprises:
and identifying a domain name request sent by the webpage client through a preset component.
9. The method according to claim 8, wherein the identifying, by a preset component, the domain name request sent by the web client comprises:
and identifying the domain name request sent by the webpage client through a preset DNS interface or a preset firewall component.
10. The method of claim 1, further comprising:
and if the operation of acquiring the target message information is determined to be completed within the effective acquisition duration, executing the step of executing the target operation according to the target message corresponding to the target message information.
11. The method of claim 1, further comprising:
and when decryption fails, determining the domain name request as a non-target domain name request, wherein the non-target domain name request does not carry target message information.
12. 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.
13. The method according to claim 1, wherein the performing the target operation according to the target message corresponding to the target message information comprises:
extracting target application parameters from the target message;
and opening the target application according to the target application parameters.
14. The method of claim 13, 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.
15. A communications apparatus, comprising:
the domain name request acquisition module is used for acquiring a domain name request through an operating system;
the domain name request decryption module is used for decrypting the domain name request in a preset decryption mode;
the device comprises a target domain name determining module, a domain name decoding module and a domain name decoding module, wherein the target domain name determining module is used for determining the domain name request as a target domain name request when decryption is successful, the target domain name request carries target message information, a target message corresponding to the target message information is used for indicating an operating system to execute target operation, and the target operation comprises at least one of shutdown, restart and starting a timer with preset duration;
a message information acquisition module for acquiring the target message information based on the decryption processing result;
and the target operation execution module is used for executing the target operation according to the target message corresponding to the target message information.
16. The apparatus according to claim 15, wherein the domain name request obtaining module is further configured to obtain a target domain name request corresponding to target message information, 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 target message information.
17. The apparatus of claim 15, further comprising: the domain name request generating module and the domain name request sending module;
the domain name request generating module comprises:
the message information acquisition unit is used for acquiring target message information when a preset trigger condition is detected;
the message information encryption unit is used for encrypting the target message information in a preset encryption mode, and the preset encryption mode is matched with the preset decryption mode;
a domain name character conversion unit, which is used for carrying out domain name character conversion on the result of the encryption processing;
a domain name request generating unit, configured to generate a target domain name request according to the result of the domain name character conversion;
and the domain name request sending module is used for sending the generated target domain name request to the operating system.
18. The apparatus of claim 17, wherein the message information obtaining unit is further configured to:
acquiring a target message and determining a first length of the target message;
if the first length exceeds a first preset threshold value, splitting the target message to obtain a plurality of sub-messages;
and determining each sub-message as target message information to obtain a plurality of target message information.
19. The apparatus of claim 17, wherein the domain name character conversion unit is further configured to:
determining a second length of a result of the encryption process;
if the second length exceeds a second preset threshold value, splitting the encryption processing result to obtain a plurality of sub-encryption messages;
and respectively carrying out domain name character conversion on each sub-encrypted message.
20. The apparatus of claim 17, wherein the domain name request generating unit is further configured to:
determining a third length of a result of the domain name character conversion;
if the third length exceeds a third preset threshold, splitting a result of the domain name character conversion to obtain a plurality of sub-character sequences;
and respectively generating a target domain name request according to each sub-character sequence.
21. The apparatus according to any of claims 18-20, wherein the domain name request obtaining module is further configured to obtain a plurality of domain name requests;
the domain name request decryption module comprises:
the character sequence determining unit is used for determining a domain name character sequence according to each domain name request to obtain a plurality of domain name character sequences;
the character sequence decoding unit is used for decoding each domain name character sequence in a preset decoding mode to obtain a plurality of sub-encrypted messages, and the preset decoding mode corresponds to a domain name character conversion mode;
the encrypted message decryption unit is used for decrypting each sub-encrypted message in a preset decryption mode, if decryption is successful, a plurality of sub-message information is obtained, each sub-message information comprises a corresponding sub-message and a sub-message number, and the sub-message number is used for identifying the position of the sub-message in the corresponding target message;
the message information acquisition module is further used for determining each sub-message information as target message information to obtain a plurality of target message information;
the target operation execution module comprises:
a target message determining unit, configured to determine a target message corresponding to the target message information according to the sub-message number;
and the target operation execution unit is used for executing the target operation according to the target message.
22. The apparatus of claim 15, further comprising:
and the domain name request identification module is used for identifying a domain name request sent by the webpage client through a preset component.
23. The apparatus of claim 22, wherein the domain name request identification module is further configured to identify a target domain name request sent by the web client through a preset DNS interface or a preset firewall component.
24. The apparatus according to claim 15, wherein the target operation executing module is further configured to, when it is determined that the operation of acquiring the target message information is completed within the valid acquisition duration, execute the target operation according to the target message corresponding to the target message information.
25. The apparatus of claim 15, further comprising:
and the non-target domain name determining module is used for determining the domain name request as a non-target domain name request when decryption fails, wherein the non-target domain name request does not carry target message information.
26. The apparatus of claim 15, wherein the target domain name request conforms to a format requirement of a domain name request, wherein the domain name request is used for performing a first operation, and wherein the target operation is an operation other than the first operation.
27. The apparatus of claim 15, wherein the target operation execution module 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 application parameters.
28. The apparatus of claim 27, wherein the target application opening unit is further configured to:
determining whether the target application is installed locally or not according to the identity of the target application;
when 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.
29. 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 domain name request through an operating system;
decrypting the domain name request by adopting a preset decryption mode;
when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, a target message corresponding to the target message information is used for indicating an operating system to execute target operation, and the target operation comprises at least one of shutdown, restart and starting a timer with preset duration;
acquiring the target message information based on the decryption processing result;
and executing the target operation according to the target message corresponding to the target message information.
30. 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 domain name request through an operating system;
decrypting the domain name request by adopting a preset decryption mode;
when the decryption is successful, determining the domain name request as a target domain name request, wherein the target domain name request carries target message information, a target message corresponding to the target message information is used for indicating an operating system to execute target operation, and the target operation comprises at least one of shutdown, restart and starting a timer with preset duration;
acquiring the target message information based on the decryption processing result;
and executing the target operation according to the target message corresponding to the target message information.
CN201711261949.7A 2017-12-04 2017-12-04 Communication method and device and electronic equipment Active CN108156271B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711261949.7A CN108156271B (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
CN201711261949.7A CN108156271B (en) 2017-12-04 2017-12-04 Communication method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108156271A CN108156271A (en) 2018-06-12
CN108156271B true CN108156271B (en) 2021-03-16

Family

ID=62466464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711261949.7A Active CN108156271B (en) 2017-12-04 2017-12-04 Communication method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108156271B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924136B (en) * 2018-07-03 2021-01-15 北京小米移动软件有限公司 Authorization authentication method, device and storage medium
CN108900553B (en) * 2018-08-21 2021-08-06 北京小米移动软件有限公司 Communication method, device and computer readable storage medium
CN109714425A (en) * 2018-12-29 2019-05-03 北京小米移动软件有限公司 Communication means and device
CN109587289A (en) * 2018-12-29 2019-04-05 北京小米移动软件有限公司 Communication means and device
CN110138719B (en) * 2019-03-05 2022-05-27 北京车和家信息技术有限公司 Network security detection method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790807A (en) * 2011-05-16 2012-11-21 奇智软件(北京)有限公司 Domain name resolution agent method and system, and domain name resolution agent server
CN104767669A (en) * 2014-01-07 2015-07-08 腾讯科技(深圳)有限公司 Message sending and message displaying method and device
CN105141575A (en) * 2015-06-25 2015-12-09 北京网康科技有限公司 Encrypted application identification and encrypted webpage content classification methods, and encrypted application identification and/or encrypted webpage content classification devices
CN106294615A (en) * 2016-07-31 2017-01-04 乐视控股(北京)有限公司 The method of locally applied module, device and electronic equipment is jumped to from webpage
CN106503134A (en) * 2016-10-19 2017-03-15 广东欧珀移动通信有限公司 Browser jumps to the method for data synchronization and device of application program
CN107370804A (en) * 2017-07-11 2017-11-21 腾讯科技(深圳)有限公司 Software application treating method and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120089465A1 (en) * 2010-10-06 2012-04-12 Walt Froloff Activity based mobile ad system and internet business model

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790807A (en) * 2011-05-16 2012-11-21 奇智软件(北京)有限公司 Domain name resolution agent method and system, and domain name resolution agent server
CN104767669A (en) * 2014-01-07 2015-07-08 腾讯科技(深圳)有限公司 Message sending and message displaying method and device
CN105141575A (en) * 2015-06-25 2015-12-09 北京网康科技有限公司 Encrypted application identification and encrypted webpage content classification methods, and encrypted application identification and/or encrypted webpage content classification devices
CN106294615A (en) * 2016-07-31 2017-01-04 乐视控股(北京)有限公司 The method of locally applied module, device and electronic equipment is jumped to from webpage
CN106503134A (en) * 2016-10-19 2017-03-15 广东欧珀移动通信有限公司 Browser jumps to the method for data synchronization and device of application program
CN107370804A (en) * 2017-07-11 2017-11-21 腾讯科技(深圳)有限公司 Software application treating method and apparatus

Also Published As

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

Similar Documents

Publication Publication Date Title
CN108156271B (en) Communication method and device and electronic equipment
CN108156221B (en) Communication method and device and electronic equipment
CN108040095B (en) Communication method and device and electronic equipment
CN108063804B (en) Communication method and device
CN109005096B (en) Application interaction method and device
US11360834B2 (en) Application interaction method and apparatus
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
US9723486B2 (en) Method and apparatus for accessing network
CN109814942B (en) Parameter processing method and device
CN111198706A (en) Method for updating system function, apparatus for updating system function and storage medium
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
CN107070707B (en) Method and device for determining initialization mode of router
CN111526129B (en) Information reporting method and device
CN110865823B (en) Pre-installation application control method, pre-installation application control device and storage medium
CN109885360B (en) Data processing method, device and storage medium
CN109218275B (en) Application interaction method and device
CN104158851B (en) A kind of dissemination system of Network, method and apparatus
KR20130110901A (en) Device and method for setting interface in wireless terminal
CN107122174B (en) Application program updating method and device
CN109086143B (en) Application interaction method and device
CN112733092B (en) Information processing 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