CN114884724B - Cloud server interaction method and device, readable storage medium and terminal equipment - Google Patents

Cloud server interaction method and device, readable storage medium and terminal equipment Download PDF

Info

Publication number
CN114884724B
CN114884724B CN202210484124.6A CN202210484124A CN114884724B CN 114884724 B CN114884724 B CN 114884724B CN 202210484124 A CN202210484124 A CN 202210484124A CN 114884724 B CN114884724 B CN 114884724B
Authority
CN
China
Prior art keywords
cloud server
service cloud
token
domain name
target function
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
CN202210484124.6A
Other languages
Chinese (zh)
Other versions
CN114884724A (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.)
Hangzhou Lianji Technology Co ltd
Original Assignee
Hangzhou Lianji Technology 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 Hangzhou Lianji Technology Co ltd filed Critical Hangzhou Lianji Technology Co ltd
Priority to CN202210484124.6A priority Critical patent/CN114884724B/en
Publication of CN114884724A publication Critical patent/CN114884724A/en
Application granted granted Critical
Publication of CN114884724B publication Critical patent/CN114884724B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • H04L63/0236Filtering by address, protocol, port number or service, e.g. IP-address or URL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application belongs to the technical field of cloud servers, and particularly relates to a cloud server interaction method, a cloud server interaction device, a computer readable storage medium and terminal equipment. The method is applied to the terminal equipment and specifically comprises the following steps: when a target service event occurs, searching a domain name and a token of a target function service cloud server in a local storage module; if the domain name and the token of the target function service cloud server are found, judging whether the token of the target function service cloud server meets a preset time limit condition or not; and if the token of the target function service cloud server meets the time limit condition, connecting the target function service cloud server according to the domain name of the target function service cloud server, and performing service interaction with the target function service cloud server by using the token of the target function service cloud server. Through the method and the device, the acquisition process of multiple times of domain names and tokens is omitted, interaction efficiency is improved, and functional services are convenient to process in time.

Description

Cloud server interaction method and device, readable storage medium and terminal equipment
Technical Field
The application belongs to the technical field of cloud servers, and particularly relates to a cloud server interaction method, a cloud server interaction device, a computer readable storage medium and terminal equipment.
Background
In the prior art, if a terminal device is to perform service interaction with a functional service cloud server providing a specific functional service, a default basic cloud server needs to be connected first, and a domain name and a Token (Token) of the basic service cloud server are acquired from the basic cloud server; then connecting the basic service cloud servers, and acquiring domain names and tokens of all the functional service cloud servers from the basic service cloud servers; and finally, the required functional service cloud server can be connected to perform service interaction. In the process, the terminal equipment needs to be connected with different cloud servers for multiple times, domain names and tokens are acquired from the cloud servers for multiple times, the time consumption is long, the interaction efficiency is low, and the processing of functional business is not facilitated.
Disclosure of Invention
In view of this, embodiments of the present application provide a cloud server interaction method, a device, a computer readable storage medium, and a terminal device, so as to solve the problem that the existing cloud server interaction method is low in interaction efficiency and is not beneficial to functional service processing.
A first aspect of an embodiment of the present application provides a cloud server interaction method, which may include:
when a target service event occurs, searching a domain name and a token of a target function service cloud server in a local storage module; the target function service cloud server is a function service cloud server corresponding to the target service event;
if the domain name and the token of the target function service cloud server are found, judging whether the token of the target function service cloud server meets a preset time limit condition or not;
and if the token of the target function service cloud server meets the time limit condition, connecting the target function service cloud server according to the domain name of the target function service cloud server, and performing service interaction with the target function service cloud server by using the token of the target function service cloud server.
In a specific implementation manner of the first aspect, after searching the domain name and the token of the target function service cloud server in the local storage module, the method may further include:
if the domain name and the token of the target function service cloud server cannot be found or the token of the target function service cloud server does not meet the time limit condition, the domain name and the token of the basic service cloud server are found in the local storage module;
If the domain name and the token of the basic service cloud server are found, judging whether the token of the basic service cloud server meets the time limit condition or not;
and if the token of the basic service cloud server meets the time limit condition, connecting the basic service cloud server according to the domain name of the basic service cloud server, and using the token of the basic service cloud server to interact with the basic service cloud server to acquire the domain name and the token of the target function service cloud server.
In a specific implementation manner of the first aspect, after searching the domain name and the token of the basic service cloud server in the local storage module, the method may further include:
if the domain name and the token of the basic service cloud server cannot be found or the token of the basic service cloud server does not meet the time limit condition, connecting a default basic cloud server, and acquiring the domain name and the token of the basic service cloud server from the basic cloud server.
In a specific implementation manner of the first aspect, the method may further include:
when the terminal equipment is started for the first time, connecting a default basic cloud server, and acquiring a domain name and a token of a basic service cloud server from the basic cloud server;
Connecting the basic service cloud server according to the domain name of the basic service cloud server, and interacting with the basic service cloud server by using the token of the basic service cloud server to obtain the domain name and the token of each functional service cloud server;
and storing the domain name and the token of the basic service cloud server and the domain name and the token of each functional service cloud server into the local storage module.
In a specific implementation manner of the first aspect, the connecting the target function service cloud server according to the domain name of the target function service cloud server may include:
searching a target IP address in the local storage module, wherein the target IP address is an IP address corresponding to the domain name of the target function service cloud server;
and if the target IP address is found, connecting the target function service cloud server by using the target IP address.
In a specific implementation manner of the first aspect, after searching the local storage module for the target IP address, the method may further include:
if the target IP address cannot be found, resolving the domain name of the target function service cloud server to obtain the target IP address;
And storing the target IP address into the local storage module.
In a specific implementation manner of the first aspect, after the target IP address is used to connect to the target functional service cloud server, the method may further include:
if the connection fails, resolving the domain name of the target function service cloud server to obtain a resolved IP address;
connecting the resolved IP address with the target function service cloud server, and storing the resolved IP address to replace the target IP address in the local storage module;
and connecting the target function service cloud server by using the updated IP address, and storing the updated IP address to replace the target IP address into the local storage module.
A second aspect of the embodiments of the present application provides a cloud server interaction device, which may include:
the first searching module is used for searching the domain name and the token of the target function service cloud server in the local storage module when the target service event occurs; the target function service cloud server is a function service cloud server corresponding to the target service event;
the first time limit judging module is used for judging whether the token of the target function service cloud server meets a preset time limit condition if the domain name and the token of the target function service cloud server are found;
And the first interaction module is used for connecting the target function service cloud server according to the domain name of the target function service cloud server if the token of the target function service cloud server meets the time limit condition, and carrying out service interaction with the target function service cloud server by using the token of the target function service cloud server.
In a specific implementation manner of the second aspect, the cloud server interaction device may further include:
the second searching module is used for searching the domain name and the token of the basic service cloud server in the local storage module if the domain name and the token of the target function service cloud server cannot be searched or the token of the target function service cloud server does not meet the time limit condition;
the second time limit judging module is used for judging whether the token of the basic service cloud server meets the time limit condition if the domain name and the token of the basic service cloud server are found;
and the second interaction module is used for connecting the basic service cloud server according to the domain name of the basic service cloud server if the token of the basic service cloud server meets the time limit condition, and using the token of the basic service cloud server to interact with the basic service cloud server to acquire the domain name and the token of the target function service cloud server.
In a specific implementation manner of the second aspect, the cloud server interaction device may further include:
and the third interaction module is used for connecting a default basic cloud server and acquiring the domain name and the token of the basic service cloud server from the basic cloud server if the domain name and the token of the basic service cloud server cannot be found or the token of the basic service cloud server does not meet the time limit condition.
In a specific implementation manner of the second aspect, the cloud server interaction device may further include:
the initial storage module is used for connecting a default basic cloud server when the terminal equipment is started for the first time, and acquiring the domain name and the token of the basic service cloud server from the basic cloud server; connecting the basic service cloud server according to the domain name of the basic service cloud server, and interacting with the basic service cloud server by using the token of the basic service cloud server to obtain the domain name and the token of each functional service cloud server; and storing the domain name and the token of the basic service cloud server and the domain name and the token of each functional service cloud server into the local storage module.
In a specific implementation manner of the second aspect, the first interaction module may include:
the IP searching unit is used for searching a target IP address in the local storage module, wherein the target IP address is an IP address corresponding to the domain name of the target function service cloud server;
and the IP connection unit is used for connecting the target function service cloud server by using the target IP address if the target IP address is found.
In a specific implementation manner of the second aspect, the first interaction module may further include:
the domain name resolution unit is used for resolving the domain name of the target function service cloud server if the target IP address cannot be found, so as to obtain the target IP address;
and the IP storage unit is used for storing the target IP address into the local storage module.
In a specific implementation manner of the second aspect, the first interaction module may further include:
the IP updating unit is used for resolving the domain name of the target function service cloud server if the connection fails to obtain a resolved IP address; and connecting the resolved IP address with the target function service cloud server, and storing the resolved IP address to replace the target IP address in the local storage module.
A third aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any one of the cloud server interaction methods described above.
A fourth aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of any one of the cloud server interaction methods described above when the processor executes the computer program.
A fifth aspect of the embodiments of the present application provides a computer program product, which when run on a terminal device, causes the terminal device to perform the steps of any one of the cloud server interaction methods described above.
Compared with the prior art, the embodiment of the application has the beneficial effects that: in the embodiment of the application, the domain name and the token of the functional service cloud server can be stored in the local storage module of the terminal equipment in advance, when a certain service event occurs, the domain name and the token of the corresponding functional service cloud server can be searched from the local storage module, and if the token meets the time limit condition, the functional service cloud server can be directly connected for service interaction. Compared with the prior art, the method omits a plurality of cloud server connection processes and domain name and token acquisition processes, greatly shortens the required time, improves the interaction efficiency and is convenient for timely processing the functional business.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of data interaction inside a terminal device and data interaction between the terminal device and a cloud server;
FIG. 2 is a schematic flow chart of interaction between a terminal device and a cloud server at first power-on start-up;
FIG. 3 is a schematic flow chart of interaction between a terminal device and a target function business cloud server when a target business event occurs;
FIG. 4 is a schematic flow chart of terminal device interaction with a basic service cloud server;
FIG. 5 is a schematic flow chart of connecting a target function business cloud server according to a domain name of the target function business cloud server;
FIG. 6 is a diagram illustrating an embodiment of a cloud server interaction device according to an embodiment of the present application;
fig. 7 is a schematic block diagram of a terminal device in an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the embodiments described below are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application, the terms "first," "second," "third," etc. are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
The cloud server interaction method provided by the embodiment of the invention can be applied to preset terminal equipment, and the terminal equipment is used as an execution main body of the cloud server interaction method.
The cloud servers which need to be interacted by the terminal equipment can comprise a basic cloud server and a service cloud server, wherein the service cloud server can also comprise a basic service cloud server and a functional service cloud server, the basic cloud server is used for providing relevant information of the basic service cloud server, the basic service cloud server is used for providing relevant information of the functional service cloud server, and the functional service cloud server can be multiple and used for respectively providing various different functional services such as preview, video uploading and the like.
In a specific implementation manner of the embodiment of the application, the terminal device may include a wifi chip with low power consumption and a main control chip. Fig. 1 is a schematic diagram of data interaction inside a terminal device and data interaction between the terminal device and a cloud server, where communication between a wifi chip and a main control chip can be performed through secure digital input/output (Secure Digital Input and Output, SDIO), serial peripheral interface (Serial Peripheral Interface, SPI) or other hardware interfaces. The wifi chip can carry out data interaction with basic cloud server, and the main control chip can carry out data interaction with business cloud server.
The terminal device may include an operation state such as an awake operation mode, a sleep operation mode, and a power-off mode. In the wake-up working mode, the wifi chip and the main control chip are connected with power supply, so that various functional services can be completed, and after the functional services are completed, the terminal equipment automatically enters the sleep working mode. Under the dormancy mode, wifi chip switch-on power, main control chip does not switch on the power, and wifi chip can receive outside trigger awakening, and the wifi chip is after awakening for main control chip switch-on power, and terminal equipment gets into awakening mode. In the shutdown mode, the wifi chip is powered on, the main control chip is not powered on, the wifi chip only receives startup wakeup, namely, the terminal equipment enters a wakeup working mode after startup wakeup through wakeup triggered by a startup and shutdown key.
In the embodiment of the application, when the terminal device is powered on for the first time and completes wifi network configuration, interaction with the cloud server can be performed through a process shown in fig. 2:
step S201, connecting a default basic cloud server, and acquiring a domain name and a token of a basic service cloud server from the basic cloud server.
The token of the basic service cloud server can carry the generation time and the valid period time limit of the token. The specific time standard may be set according to the actual situation, and in a specific implementation manner of the embodiment of the application, the coordinated universal time (Universal Time Coordinated, UTC) is preferably used for timing.
Step S202, connecting the basic service cloud server according to the domain name of the basic service cloud server, and interacting with the basic service cloud server by using the token of the basic service cloud server to obtain the domain name and the token of each functional service cloud server.
The tokens of each functional service cloud server can carry the generation time and the validity time limit of the tokens.
And step 203, storing the domain name and the token of the basic service cloud server, and the domain name and the token of each functional service cloud server into a local storage module.
The local storage module may be a non-volatile storage medium such as a Flash memory (Flash) or a magnetic disk of the terminal device, so that even if power is off, the data will not be lost. The domain name and the token of the cloud server are stored in the local storage module, and can be directly called when the terminal equipment is used later, and the domain name and the token do not need to be acquired from the cloud server again, so that time expenditure is saved.
After the terminal equipment is dormant and waken up again, the main control chip is restarted, and when a certain business event (marked as a target business event) occurs, interaction with the cloud server can be performed through the process shown in fig. 3:
and step 301, searching the domain name and the token of the target function service cloud server in the local storage module.
The target function service cloud server is a function service cloud server corresponding to the target service event. If the domain name and the token of the target function service cloud server are found, step S302 may be continued.
And step S302, judging whether the token of the target function service cloud server meets a preset time limit condition.
The time limit condition may be set according to actual situations, and in a specific implementation manner of the embodiment of the application, the time limit condition may be that the token is in the validity period.
In the embodiment of the application, whether the token meets the time limit condition can be judged according to the generation time and the valid period time limit of the token. For example, if the current time is 2022, 1, 7, 2, 15, and the validity period of the token is 7, if the generation time of the token is 2022, 1, 6, 3, 25, and the expiration time of the token is 2022, 1, 13, 3, 25, the token is still within the validity period, and the time limit condition is satisfied.
If the token of the target function service cloud server satisfies the time limit condition, step S303 may be continued to be executed.
Step S303, connecting the target function service cloud server according to the domain name of the target function service cloud server, and performing service interaction with the target function service cloud server by using the token of the target function service cloud server.
Through the process shown in fig. 3, multiple cloud server connection processes and domain name and token acquisition processes are omitted, so that the required time is greatly shortened, the interaction efficiency is improved, and the functional service can be processed in time conveniently.
Specifically, if the domain name and the token of the target function service cloud server cannot be found, or the token of the target function service cloud server does not meet the time limit condition, the domain name and the token of the target function service cloud server can be reacquired through the process shown in fig. 4:
And step S401, searching the domain name and the token of the basic service cloud server in the local storage module.
If the domain name and token of the basic service cloud server are found, step S402 may be continued.
And step S402, judging whether the token of the basic service cloud server meets the time limit condition.
If the token of the basic service cloud server satisfies the time limit condition, step S403 may be continuously performed.
If the domain name and the token of the basic service cloud server cannot be found, or the token of the basic service cloud server does not meet the time limit condition, a default basic cloud server may be connected, the domain name and the token of the basic service cloud server are obtained from the basic cloud server, and step S403 is continuously executed. The domain name and the token of the basic service cloud server obtained from the basic cloud server can be stored in a local storage module for direct calling when the terminal equipment is used subsequently.
Step S403, connecting the basic service cloud server according to the domain name of the basic service cloud server, and interacting with the basic service cloud server by using the token of the basic service cloud server to obtain the domain name and the token of the target function service cloud server.
After the domain name and the token of the target function service cloud server are obtained, the target function service cloud server can be connected according to the domain name of the target function service cloud server, and service interaction is carried out with the target function service cloud server by using the token of the target function service cloud server. The domain name and the token of the target function service cloud server can be stored in a local storage module for direct calling when the terminal equipment is used subsequently.
In a specific implementation manner of the embodiment of the present application, when the terminal device is awakened each time, the terminal device may detect the token in the local storage module, determine the remaining time of the token distance expiration according to the generation time and the validity time limit of the token, and determine whether the remaining time is sufficiently continuous to the next awakening. Taking a terminal device as a doorbell device as an example, the next wakeup can be performed within 24 hours in a conventional application scene, and if the token distance expires to be more than 24 hours, the token should still be in the valid period when the token is next wakened, and still can be used normally. If the token distance expires for less than 24 hours, the token may not be in the validity period and cannot be used normally at the next wake-up, so that the token of the cloud server needs to be acquired again after the wake-up.
In a specific implementation manner of the embodiment of the application, when the token of the cloud server is obtained each time, the generation time and the validity period time of the token are transmitted to the wifi chip, the validity period time of the token is monitored by the wifi chip, and when the token distance is smaller than the preset time, the wifi chip can wake up the main control chip forcedly to inform the main control chip to acquire the token of the cloud server again. The preset duration may be set according to practical situations, for example, may be set to 12 hours or other values.
In the prior art, each time a service cloud server is connected, a domain name of the service cloud server needs to be resolved, that is, a domain name server (Domain Name Server, DNS) resolves, to obtain a corresponding IP address, and the service cloud server is connected by using the IP address. In the process, the terminal equipment repeatedly analyzes the domain name of the service cloud server for a plurality of times, so that the time consumption is long, the interaction efficiency is low, and the function service processing is not facilitated.
In a specific implementation manner of the embodiment of the application, when the domain name and the token of the service cloud server are acquired each time, the domain name of the service cloud server is analyzed to obtain the corresponding IP address, and the IP address is stored in the local storage module, so that the terminal equipment can be directly called when in subsequent use, domain name analysis is not needed again, and time expenditure is saved. And in the network congestion scene, the probability of domain name resolution failure can be reduced.
In this case, the process of connecting the target function service cloud server according to the domain name of the target function service cloud server in step S303 may specifically include the steps as shown in fig. 5:
step S501, searching a target IP address in a local storage module.
The target IP address is an IP address corresponding to the domain name of the target function service cloud server.
If the target IP address is found, step S502 may be continued.
And step S502, connecting the target function service cloud server by using the target IP address.
Through the process shown in fig. 5, the resolution process of domain names is omitted, the required time is shortened, the interaction efficiency is improved, and the functional service can be processed in time.
Specifically, if the target IP address cannot be found, the domain name of the target function service cloud server may be resolved to obtain the target IP address, then the target IP address is used to connect to the target function service cloud server, and the target IP address is stored in the local storage module, so that the target IP address is directly called when the terminal device is used subsequently.
In the process of connecting the target function service cloud server by using the target IP address, if the connection fails continuously N times (N is more than or equal to 1), the domain name of the target function service cloud server can be resolved to obtain the resolved IP address, then the resolved IP address is used for connecting the target function service cloud server, and the resolved IP address is replaced by the target IP address and stored in a local storage module for direct calling when the terminal equipment is used subsequently.
If the target IP address is successfully connected with the target function service cloud server, the domain name can be resolved synchronously once to obtain a new IP address, and the new IP address is stored in the local storage module instead of the target IP address so as to be directly called when the terminal equipment is used subsequently.
In summary, in the embodiment of the present application, the domain name and the token of the functional service cloud server may be stored in the local storage module of the terminal device in advance, when a certain service event occurs, the domain name and the token of the corresponding functional service cloud server may be searched from the local storage module, and if the token meets the time limit condition, the functional service cloud server may be directly connected to perform service interaction. Compared with the prior art, the method omits a plurality of cloud server connection processes and domain name and token acquisition processes, greatly shortens the required time, improves the interaction efficiency and is convenient for timely processing the functional business.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
Corresponding to the cloud server interaction method described in the above embodiments, fig. 6 shows an embodiment structural diagram of a cloud server interaction device applied to a terminal device provided in the embodiment of the present application.
In this embodiment, the cloud server interaction device may include:
the first searching module 601 is configured to search, when the target service event occurs, a domain name and a token of the target function service cloud server in the local storage module; the target function service cloud server is a function service cloud server corresponding to the target service event;
the first time limit judging module 602 is configured to judge whether the token of the target function service cloud server meets a preset time limit condition if the domain name and the token of the target function service cloud server are found;
and the first interaction module 603 is configured to connect the target function service cloud server according to the domain name of the target function service cloud server if the token of the target function service cloud server meets the time limit condition, and perform service interaction with the target function service cloud server by using the token of the target function service cloud server.
In a specific implementation manner of the embodiment of the present application, the cloud server interaction device may further include:
the second searching module is used for searching the domain name and the token of the basic service cloud server in the local storage module if the domain name and the token of the target function service cloud server cannot be searched or the token of the target function service cloud server does not meet the time limit condition;
the second time limit judging module is used for judging whether the token of the basic service cloud server meets the time limit condition if the domain name and the token of the basic service cloud server are found;
and the second interaction module is used for connecting the basic service cloud server according to the domain name of the basic service cloud server if the token of the basic service cloud server meets the time limit condition, and using the token of the basic service cloud server to interact with the basic service cloud server to acquire the domain name and the token of the target function service cloud server.
In a specific implementation manner of the embodiment of the present application, the cloud server interaction device may further include:
and the third interaction module is used for connecting a default basic cloud server and acquiring the domain name and the token of the basic service cloud server from the basic cloud server if the domain name and the token of the basic service cloud server cannot be found or the token of the basic service cloud server does not meet the time limit condition.
In a specific implementation manner of the embodiment of the present application, the cloud server interaction device may further include:
the initial storage module is used for connecting a default basic cloud server when the terminal equipment is started for the first time, and acquiring the domain name and the token of the basic service cloud server from the basic cloud server; connecting the basic service cloud server according to the domain name of the basic service cloud server, and interacting with the basic service cloud server by using the token of the basic service cloud server to obtain the domain name and the token of each functional service cloud server; and storing the domain name and the token of the basic service cloud server and the domain name and the token of each functional service cloud server into the local storage module.
In a specific implementation manner of the embodiment of the present application, the first interaction module may include:
the IP searching unit is used for searching a target IP address in the local storage module, wherein the target IP address is an IP address corresponding to the domain name of the target function service cloud server;
and the IP connection unit is used for connecting the target function service cloud server by using the target IP address if the target IP address is found.
In a specific implementation manner of the embodiment of the present application, the first interaction module may further include:
the domain name resolution unit is used for resolving the domain name of the target function service cloud server if the target IP address cannot be found, so as to obtain the target IP address;
and the IP storage unit is used for storing the target IP address into the local storage module.
In a specific implementation manner of the embodiment of the present application, the first interaction module may further include:
the IP updating unit is used for resolving the domain name of the target function service cloud server if the connection fails to obtain a resolved IP address; and connecting the resolved IP address with the target function service cloud server, and storing the resolved IP address to replace the target IP address in the local storage module.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described apparatus, modules and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Fig. 7 shows a schematic block diagram of a terminal device provided in an embodiment of the present application, and for convenience of explanation, only a portion relevant to the embodiment of the present application is shown.
As shown in fig. 7, the terminal device 7 of this embodiment includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. The steps of the embodiments of the cloud server interaction method described above, such as steps S301 to S303 shown in fig. 3, are implemented when the processor 70 executes the computer program 72. Alternatively, the processor 70 may perform the functions of the modules/units of the apparatus embodiments described above, such as the functions of the modules 601-603 shown in fig. 6, when executing the computer program 72.
By way of example, the computer program 72 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program 72 in the terminal device 7.
The terminal device 7 may be a mobile phone, a tablet computer, a desktop computer, a notebook computer, a palm computer, or other computing devices. It will be appreciated by those skilled in the art that fig. 7 is merely an example of the terminal device 7 and does not constitute a limitation of the terminal device 7, and may include more or less components than illustrated, or may combine certain components, or different components, e.g. the terminal device 7 may further include input-output devices, network access devices, buses, etc.
The processor 70 may be a central processing unit (Central Processing Unit, CPU) or may be another general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7. The memory 71 may be an external storage device of the terminal device 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the terminal device 7. The memory 71 is used for storing the computer program as well as other programs and data required by the terminal device 7. The memory 71 may also be used for temporarily storing data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each method embodiment described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (9)

1. The cloud server interaction method is applied to terminal equipment and is characterized by comprising the following steps:
when the terminal equipment is started for the first time, connecting a default basic cloud server, and acquiring a domain name and a token of a basic service cloud server from the basic cloud server;
connecting the basic service cloud server according to the domain name of the basic service cloud server, and interacting with the basic service cloud server by using the token of the basic service cloud server to obtain the domain name and the token of each functional service cloud server;
storing the domain name and the token of the basic service cloud server and the domain name and the token of each functional service cloud server into a local storage module;
When the target business event occurs, searching a domain name and a token of the target function business cloud server in the local storage module; the target function service cloud server is a function service cloud server corresponding to the target service event;
if the domain name and the token of the target function service cloud server are found, judging whether the token of the target function service cloud server meets a preset time limit condition or not;
and if the token of the target function service cloud server meets the time limit condition, connecting the target function service cloud server according to the domain name of the target function service cloud server, and performing service interaction with the target function service cloud server by using the token of the target function service cloud server.
2. The cloud server interaction method according to claim 1, further comprising, after searching the domain name and the token of the target function service cloud server in the local storage module:
if the domain name and the token of the target function service cloud server cannot be found or the token of the target function service cloud server does not meet the time limit condition, the domain name and the token of the basic service cloud server are found in the local storage module;
If the domain name and the token of the basic service cloud server are found, judging whether the token of the basic service cloud server meets the time limit condition or not;
and if the token of the basic service cloud server meets the time limit condition, connecting the basic service cloud server according to the domain name of the basic service cloud server, and using the token of the basic service cloud server to interact with the basic service cloud server to acquire the domain name and the token of the target function service cloud server.
3. The cloud server interaction method according to claim 2, further comprising, after searching the domain name and the token of the basic service cloud server in the local storage module:
if the domain name and the token of the basic service cloud server cannot be found or the token of the basic service cloud server does not meet the time limit condition, connecting the basic cloud server, and acquiring the domain name and the token of the basic service cloud server from the basic cloud server.
4. A cloud server interaction method according to any of claims 1 to 3, wherein said connecting the target function service cloud server according to the domain name of the target function service cloud server comprises:
Searching a target IP address in the local storage module, wherein the target IP address is an IP address corresponding to the domain name of the target function service cloud server;
and if the target IP address is found, connecting the target function service cloud server by using the target IP address.
5. The cloud server interaction method according to claim 4, further comprising, after searching the local storage module for the target IP address:
if the target IP address cannot be found, resolving the domain name of the target function service cloud server to obtain the target IP address;
and storing the target IP address into the local storage module.
6. The cloud server interaction method according to claim 4, further comprising, after connecting the target function service cloud server using the target IP address:
if the connection fails, resolving the domain name of the target function service cloud server to obtain a resolved IP address;
and connecting the resolved IP address with the target function service cloud server, and storing the resolved IP address to replace the target IP address in the local storage module.
7. A cloud server interaction device, comprising:
the initial storage module is used for connecting a default basic cloud server when the terminal equipment is started for the first time, and acquiring the domain name and the token of the basic service cloud server from the basic cloud server; connecting the basic service cloud server according to the domain name of the basic service cloud server, and interacting with the basic service cloud server by using the token of the basic service cloud server to obtain the domain name and the token of each functional service cloud server; storing the domain name and the token of the basic service cloud server and the domain name and the token of each functional service cloud server into a local storage module;
the first searching module is used for searching the domain name and the token of the target function service cloud server in the local storage module when the target service event occurs; the target function service cloud server is a function service cloud server corresponding to the target service event;
the first time limit judging module is used for judging whether the token of the target function service cloud server meets a preset time limit condition if the domain name and the token of the target function service cloud server are found;
And the first interaction module is used for connecting the target function service cloud server according to the domain name of the target function service cloud server if the token of the target function service cloud server meets the time limit condition, and carrying out service interaction with the target function service cloud server by using the token of the target function service cloud server.
8. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the cloud server interaction method according to any of claims 1 to 6.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the cloud server interaction method according to any of claims 1 to 6 when the computer program is executed.
CN202210484124.6A 2022-05-06 2022-05-06 Cloud server interaction method and device, readable storage medium and terminal equipment Active CN114884724B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210484124.6A CN114884724B (en) 2022-05-06 2022-05-06 Cloud server interaction method and device, readable storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210484124.6A CN114884724B (en) 2022-05-06 2022-05-06 Cloud server interaction method and device, readable storage medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN114884724A CN114884724A (en) 2022-08-09
CN114884724B true CN114884724B (en) 2024-03-22

Family

ID=82673794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210484124.6A Active CN114884724B (en) 2022-05-06 2022-05-06 Cloud server interaction method and device, readable storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN114884724B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714993A (en) * 2009-12-02 2010-05-26 中国电信股份有限公司 P2P verification system, P2P verification method and BOSS server
CN103716326A (en) * 2013-12-31 2014-04-09 华为技术有限公司 Resource access method and URG
CN104168294A (en) * 2014-09-05 2014-11-26 陈勇 Instant communication method, system and device across users on open platforms
CN106301966A (en) * 2016-10-25 2017-01-04 北京云端智度科技有限公司 A kind of method of pro-rata flow based on domain name
CN106790272A (en) * 2017-02-16 2017-05-31 济南浪潮高新科技投资发展有限公司 A kind of system and method for single-sign-on, a kind of application server
CN106856476A (en) * 2015-12-08 2017-06-16 佳能株式会社 Authorization server and certification cooperative system
CN106888182A (en) * 2015-12-15 2017-06-23 精硕科技(北京)股份有限公司 The collecting method and system of a kind of energy defending DDoS (Distributed Denial of Service)
CN107147647A (en) * 2017-05-11 2017-09-08 腾讯科技(深圳)有限公司 A kind of webpage authorization method and device
CN107844712A (en) * 2017-11-03 2018-03-27 北京天融信网络安全技术有限公司 A kind of browser shares the method, apparatus and computer-readable medium of voucher
CN108462760A (en) * 2018-03-21 2018-08-28 平安科技(深圳)有限公司 Electronic device, cluster access domain name automatic generation method and storage medium
CN110519240A (en) * 2019-08-09 2019-11-29 浙江大搜车软件技术有限公司 A kind of single-point logging method, apparatus and system
CN110781482A (en) * 2019-10-12 2020-02-11 广州酷旅旅行社有限公司 Login method, login device, computer equipment and storage medium
KR20200091138A (en) * 2019-01-22 2020-07-30 주식회사 케이티 Authentication method and system using private domain name
CN111786948A (en) * 2020-05-21 2020-10-16 中清龙图计算机科技(上海)有限公司 Cloud game control method, device, system, equipment and medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150180857A1 (en) * 2013-12-23 2015-06-25 Joseph Schulman Simple user management service utilizing an access token
US11126670B2 (en) * 2017-05-10 2021-09-21 Verizon Patent And Licensing Inc. Token and device location-based automatic client device authentication

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714993A (en) * 2009-12-02 2010-05-26 中国电信股份有限公司 P2P verification system, P2P verification method and BOSS server
CN103716326A (en) * 2013-12-31 2014-04-09 华为技术有限公司 Resource access method and URG
CN104168294A (en) * 2014-09-05 2014-11-26 陈勇 Instant communication method, system and device across users on open platforms
CN106856476A (en) * 2015-12-08 2017-06-16 佳能株式会社 Authorization server and certification cooperative system
CN106888182A (en) * 2015-12-15 2017-06-23 精硕科技(北京)股份有限公司 The collecting method and system of a kind of energy defending DDoS (Distributed Denial of Service)
CN106301966A (en) * 2016-10-25 2017-01-04 北京云端智度科技有限公司 A kind of method of pro-rata flow based on domain name
CN106790272A (en) * 2017-02-16 2017-05-31 济南浪潮高新科技投资发展有限公司 A kind of system and method for single-sign-on, a kind of application server
CN107147647A (en) * 2017-05-11 2017-09-08 腾讯科技(深圳)有限公司 A kind of webpage authorization method and device
CN107844712A (en) * 2017-11-03 2018-03-27 北京天融信网络安全技术有限公司 A kind of browser shares the method, apparatus and computer-readable medium of voucher
CN108462760A (en) * 2018-03-21 2018-08-28 平安科技(深圳)有限公司 Electronic device, cluster access domain name automatic generation method and storage medium
KR20200091138A (en) * 2019-01-22 2020-07-30 주식회사 케이티 Authentication method and system using private domain name
CN110519240A (en) * 2019-08-09 2019-11-29 浙江大搜车软件技术有限公司 A kind of single-point logging method, apparatus and system
CN110781482A (en) * 2019-10-12 2020-02-11 广州酷旅旅行社有限公司 Login method, login device, computer equipment and storage medium
CN111786948A (en) * 2020-05-21 2020-10-16 中清龙图计算机科技(上海)有限公司 Cloud game control method, device, system, equipment and medium

Also Published As

Publication number Publication date
CN114884724A (en) 2022-08-09

Similar Documents

Publication Publication Date Title
CN110058889B (en) Application awakening method and device
US10057856B2 (en) Wake-up control method and apparatus, and terminal device
CN107566650B (en) Unlocking control method and related product
CN113163345B (en) Broadcast communication method, system, gateway equipment and electronic price tag
CN102298414A (en) Server time synchronizing system
CN110097157B (en) Electronic shelf label awakening method and system and related components
CN115396860A (en) NFC chip intelligent regulation method, device, equipment and storage medium
CN112948312B (en) Chip control method and device, intelligent terminal and computer readable storage medium
CN105824391A (en) Timer awakening control method and electronic equipment
CN114978883A (en) Network wake-up management method and device, electronic equipment and storage medium
CN111459629A (en) Azkaban-based project operation method and device and terminal equipment
TWI557551B (en) Electronic apparatus and wake-up method thereof
CN114884724B (en) Cloud server interaction method and device, readable storage medium and terminal equipment
CN114722437A (en) Cross-APP unique identifier generation method, device, equipment and storage medium
CN104869617A (en) Terminal control method
CN210072612U (en) Internet of things chip system
CN107995675B (en) Communication method, device, terminal and storage medium of mobile POS machine
CN113848783A (en) User connection unit dormancy awakening method, device and computer readable storage medium
CN109799715B (en) Data receiving method, device and terminal equipment
CN113590204A (en) Edge computing device control method, system, electronic device and storage medium
CN110688165A (en) Application wake-up lock management method and device, terminal, storage medium and electronic device
CN110908737A (en) Application alignment awakening method and device, storage medium and electronic device
CN108605290B (en) Data processing method and terminal
CN111897763A (en) Control method, control device and electronic equipment
CN112099857B (en) Dormancy awakening method of electronic equipment and electronic equipment

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