CN114884724A - 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
CN114884724A
CN114884724A CN202210484124.6A CN202210484124A CN114884724A CN 114884724 A CN114884724 A CN 114884724A CN 202210484124 A CN202210484124 A CN 202210484124A CN 114884724 A CN114884724 A CN 114884724A
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.)
Granted
Application number
CN202210484124.6A
Other languages
Chinese (zh)
Other versions
CN114884724B (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

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/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 and 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; 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. By the method and the device, the process of acquiring the domain name and the token for many times is omitted, the interaction efficiency is improved, and the functional service is conveniently processed 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 and device, a computer readable storage medium and terminal equipment.
Background
In the prior art, if a terminal device needs to perform service interaction with a function service cloud server providing a specific function 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 a basic service cloud server, and acquiring the domain name and the token of each functional service cloud server from the basic service cloud server; and finally, the required functional service cloud server can be connected for service interaction. In the process, the terminal device needs to be connected with different cloud servers for multiple times, and obtains the domain name and the token from the multiple cloud servers for multiple times, so that the time consumption is long, the interaction efficiency is low, and the functional service processing is not facilitated.
Disclosure of Invention
In view of this, embodiments of the present application provide a cloud server interaction method, an apparatus, a computer-readable storage medium, and a terminal device, so as to solve the problems that an existing cloud server interaction method is low in interaction efficiency and 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;
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 looking up 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 searched, or the token of the target function service cloud server does not meet the time limit condition, 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 are found, judging whether the token of the basic service cloud server meets the time limit condition;
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 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.
In a specific implementation manner of the first aspect, after looking up 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 using the token of the basic service cloud server to interact with 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, using the target IP address to connect the target function service cloud server.
In a specific implementation manner of the first aspect, after searching for the target IP address in the local storage module, the method may further include:
if the target IP address cannot be found, analyzing 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 connecting the target function service cloud server using the target IP address, the method may further include:
if the connection fails, analyzing the domain name of the target function service cloud server to obtain an analyzed IP address;
connecting the target function service cloud server by using the resolved IP address, and replacing the resolved IP address with the target IP address to store the target IP address into the local storage module;
and connecting the target function service cloud server by using the updated IP address, and replacing the target IP address with the updated IP address and storing the updated IP address into the local storage module.
A second aspect of the embodiments of the present application provides a cloud server interaction apparatus, 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 or not 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 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 second aspect, the cloud server interaction apparatus 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 or not 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 interacting with the basic service cloud server by using the token of 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 apparatus 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 apparatus 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 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 using the token of the basic service cloud server to interact with 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 to obtain the target IP address if the target IP address cannot be found;
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 analyzing the domain name of the target function service cloud server to obtain an analyzed IP address if the connection fails; and connecting the target function service cloud server by using the resolved IP address, and replacing the resolved IP address with the target IP address to store the target IP address into the local storage module.
A third aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program 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 when executing the computer program.
A fifth aspect of the embodiments of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute any of the steps of the cloud server interaction method described above.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, the domain name and the token of the function service cloud server can 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 function service cloud server can be searched from the local storage module, and if the token meets the time limit condition, the function service cloud server can be directly connected for service interaction. Compared with the prior art, the method saves 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 service.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
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 flowchart of interaction between a terminal device and a cloud server when the terminal device is first powered on and started;
fig. 3 is a schematic flow chart of interaction between a terminal device and a target function service cloud server when a target service event occurs;
fig. 4 is a schematic flowchart of interaction between a terminal device and a basic service cloud server;
FIG. 5 is a schematic flow diagram of connecting a target function service cloud server according to a domain name of the target function service cloud server;
fig. 6 is a structural diagram of an embodiment of a cloud server interaction device in 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 apparent and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the embodiments described below are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It will 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 herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application 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 and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In addition, in the description of the present application, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
The cloud server interaction method provided by the embodiment of the application 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 with each other, of the terminal device may include a basic cloud server and a service cloud server, and the service cloud server may include a basic service cloud server and a functional service cloud server, where the basic cloud server is used to provide relevant information of the basic service cloud server, the basic service cloud server is used to provide relevant information of the functional service cloud server, and the functional service cloud servers may be multiple ones and are used to respectively provide various different functional services such as preview, video upload, 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 illustrating data interaction inside the terminal device and data interaction between the terminal device and the cloud server, and as shown in the figure, the wifi chip and the main control chip may communicate with each other through Secure Digital Input and Output (SDIO), Serial Peripheral Interface (SPI), or other hardware interfaces. The wifi chip can carry out data interaction with basic cloud ware, and the main control chip can carry out data interaction with business cloud ware.
The terminal device may include an awake mode, a sleep mode, and a power-off mode. Under the awakening working mode, the wifi chip and the main control chip are both powered on, various functional services can be completed, and after the functional services are completed, the terminal equipment automatically enters the dormant working mode. Under dormancy mode, the wifi chip switch on, the main control chip is not the switch on, and the wifi chip can receive the external trigger and awaken up, and the wifi chip is awaken up the back and is main control chip switch on, and terminal equipment gets into awakening up mode. In the power-off mode, the wifi chip is powered on, the main control chip is not powered on, the wifi chip only receives power-on awakening, namely awakening triggered by the power-on and power-off key, and the terminal equipment enters an awakening working mode after power-on awakening.
In the embodiment of the application, when the terminal device is powered on and started for the first time and wifi network configuration is completed, interaction with the cloud server can be performed through the process shown in fig. 2:
step S201, connecting a default basic cloud server, and acquiring a domain name and a token of the basic service cloud server from the basic cloud server.
The token of the basic service cloud server may carry the generation time and the validity period of the token. The specific Time standard may be set according to an actual situation, and in a specific implementation manner of the embodiment of the present application, it is preferable to perform timing by using Universal Time Coordinated (UTC).
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 token of each functional service cloud server can carry the generation time and the validity period of the token.
Step S203, 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 can be a non-volatile storage medium such as a Flash memory (Flash) or a magnetic disk of the terminal device, and data cannot be lost even if power is off. The domain name and the token of the cloud server are stored in the local storage module, so that the domain name and the token can be directly called when the terminal equipment is used subsequently, and the domain name and the token do not need to be obtained from the cloud server again, so that the time overhead is saved.
After the terminal device is dormant and awakened again, the main control chip is restarted, and when a certain service event (which is denoted as a target service event) occurs, the service event may interact with the cloud server through the process shown in fig. 3:
step S301, searching a domain name and a token of the 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, the step S302 may be continuously executed.
Step S302, judging whether the token of the target function service cloud server meets a preset time limit condition or not.
In a specific implementation manner of the embodiment of the present application, the time limit condition may be that the token is within the validity period.
In the embodiment of the application, whether the token meets the time limit condition or not can be judged according to the generation time and the validity period time limit of the token. For example, if the current time is 2022 year 1 month 7 day 2:15, the validity period of the token is 7 days, if the generation time of the token is 2022 year 1 month 6 day 3:25, and the expiration time is 2022 year 1 month 13 day 3:25, the token is still in the validity period, and the time limit condition is met.
If the token of the target function service cloud server meets the time limit condition, the step S303 may be continuously 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, the cloud server connection process and the domain name and token acquisition process are omitted for many times, so that the required time is greatly shortened, the interaction efficiency is improved, and the functional service can be processed in time.
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 satisfy the time limit condition, the domain name and the token of the target function service cloud server may be obtained again through the process shown in fig. 4:
step S401, a domain name and a token of the basic service cloud server are searched in the local storage module.
If the domain name and the token of the basic service cloud server are found, the step S402 may be continuously executed.
And S402, judging whether the token of the basic service cloud server meets a time limit condition.
If the token of the basic service cloud server satisfies the time limit condition, the 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, the 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 the step S403 is continuously executed. The domain name and the token of the basic service cloud server acquired from the basic cloud server can be stored in the local storage module so as to be directly called when the terminal equipment is used subsequently.
Step S403, connect the basic service cloud server according to the domain name of the basic service cloud server, and interact with the basic service cloud server 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 between the token of the target function service cloud server and the target function service cloud server. And the domain name and the token of the target function service cloud server can be stored in the local storage module so as to be directly called when the terminal equipment is used subsequently.
In a specific implementation manner of the embodiment of the present application, the terminal device may detect the token in the local storage module each time the terminal device is awakened, determine the remaining time of the token from the expiration according to the generation time and the validity period of the token, and determine whether the remaining time is sufficient for 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 scenario, and if the token distance is more than 24 hours, the token should still be within the validity period during the next wakeup and still be normally used. If the token distance is less than 24 hours, the token may not be in the valid period and cannot be used normally when the token is awakened next time, and therefore, after the token is awakened this time, the token of the cloud server needs to be obtained again.
In a specific implementation manner of the embodiment of the application, the generation time and the validity time limit of the token can be transmitted to the wifi chip when the token of the cloud server is obtained every time, the wifi chip monitors the validity time limit, and when the expiration of the token distance is less than the preset duration, the wifi chip can forcibly wake up the main control chip to inform the main control chip of obtaining the token of the cloud server again. The preset duration may be set according to an actual situation, for example, it 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 (DNS) needs to be resolved to obtain a corresponding IP address, and the IP address is used to connect the service cloud Server. In the process, the terminal device repeatedly resolves the domain name of the service cloud server for many times, which is time-consuming, low in interaction efficiency and not beneficial to functional service processing.
In a specific implementation manner of the embodiment of the application, when the domain name and the token of the service cloud server are obtained each time, the domain name of the service cloud server can be resolved to obtain the corresponding IP address, and the IP address is stored in the local storage module, so that the domain name can be directly called when the terminal device is used subsequently, domain name resolution does not need to be performed again, and time overhead is saved. And in the scene of network congestion, 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 shown in fig. 5:
step S501, searching a target IP address in a local storage module.
And 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 continuously executed.
And step S502, connecting a target function service cloud server by using the target IP address.
Through the process shown in fig. 5, the domain name resolution process is omitted, the required time is shortened, the interaction efficiency is improved, and the functional service is conveniently processed in time.
Particularly, if the target IP address cannot be found, the domain name of the target function service cloud server can be resolved to obtain the target IP address, then the target IP address is used for connecting the target function service cloud server, and the target IP address is stored in the local storage module so as to be directly called when the terminal equipment is used subsequently.
In the process of connecting the target function service cloud server by using the target IP address, if the connection fails for 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 a resolved IP address, then the resolved IP address is used for connecting the target function service cloud server, and the resolved IP address is stored in a local storage module in place of the target IP address so as to be directly called when the terminal equipment is used for subsequent use.
If the target IP address is successfully connected with the target function service cloud server, the domain name can be synchronously resolved to obtain a new IP address, and the new IP address replaces the target IP address and is stored in the local storage module 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 function 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 function service cloud server may be searched from the local storage module, and if the token meets the time limit condition, the function service cloud server may be directly connected to perform service interaction. Compared with the prior art, the method saves 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 service.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 6 shows a structure diagram of an embodiment of a cloud server interaction apparatus applied to a terminal device according to an embodiment of the present application, corresponding to the cloud server interaction method described in the foregoing embodiment.
In this embodiment, the cloud server interaction apparatus may include:
the first searching module 601 is configured to search a domain name and a token of a target function service cloud server in the local storage module when a target service event occurs; the target function service cloud server is a function service cloud server corresponding to the target service event;
a first time limit determining module 602, configured to determine whether a 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;
a first interaction module 603, configured to, if the token of the target function service cloud server meets the time limit condition, connect the target function service cloud server according to the domain name of the target function service cloud server, 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 apparatus 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 or not 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 interacting with the basic service cloud server by using the token of 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 apparatus 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 apparatus 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 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 using the token of the basic service cloud server to interact with 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 to obtain the target IP address if the target IP address cannot be found;
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 to obtain a resolved IP address if the connection fails; and connecting the target function service cloud server by using the resolved IP address, and replacing the resolved IP address with the target IP address to store the target IP address into the local storage module.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, modules and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Fig. 7 shows a schematic block diagram of a terminal device provided in an embodiment of the present application, and only shows a part related to the embodiment of the present application for convenience of description.
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 said memory 71 and executable on said processor 70. The processor 70, when executing the computer program 72, implements the steps in the above-described embodiments of the cloud server interaction method, such as the steps S301 to S303 shown in fig. 3. Alternatively, the processor 70, when executing the computer program 72, implements the functions of each module/unit in the above-mentioned device embodiments, for example, the functions of the modules 601 to 603 shown in fig. 6.
Illustratively, 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 accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process 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 understood by those skilled in the art that fig. 7 is only an example of the terminal device 7, and does not constitute a limitation to the terminal device 7, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal device 7 may further include an input-output device, a network access device, a bus, etc.
The Processor 70 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. 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 also 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), and 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 programs and other programs and data required by the terminal device 7. The memory 71 may also be used to temporarily store 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-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of 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 processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
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 implementation. 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 ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an 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, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable storage medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable storage media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A cloud server interaction method is applied to terminal equipment and is characterized by comprising 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; 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;
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, after searching the domain name and the token of the cloud server of the target function service in the local storage module, further comprising:
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, 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 are found, judging whether the token of the basic service cloud server meets the time limit condition;
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 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.
3. The cloud server interaction method according to claim 2, after looking up the domain name and the token of the basic service cloud server in the local storage module, further comprising:
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.
4. The cloud server interaction method according to claim 1, further comprising:
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 using the token of the basic service cloud server to interact with 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.
5. The cloud server interaction method according to any one of claims 1 to 4, wherein the connecting the target function service cloud server according to the domain name of the target function service cloud server includes:
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 IP address with the target function service cloud server.
6. The cloud server interaction method according to claim 5, further comprising, after searching for the target IP address in the local storage module:
if the target IP address cannot be found, analyzing 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.
7. The cloud server interaction method according to claim 5, further comprising, after connecting the target function service cloud server using the target IP address:
if the connection fails, analyzing the domain name of the target function service cloud server to obtain an analyzed IP address;
and connecting the target function service cloud server by using the resolved IP address, and replacing the resolved IP address with the target IP address to store the target IP address into the local storage module.
8. A cloud server interaction apparatus, comprising:
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 or not 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 performing service interaction with the target function service cloud server by using the token of the target function service cloud server.
9. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the cloud server interaction method of any of claims 1 to 7.
10. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of the cloud server interaction method according to any one of claims 1 to 7.
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 true CN114884724A (en) 2022-08-09
CN114884724B 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 (16)

* 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
US20150180857A1 (en) * 2013-12-23 2015-06-25 Joseph Schulman Simple user management service utilizing an access token
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
US20180332016A1 (en) * 2017-05-10 2018-11-15 Verizon Patent And Licensing Inc. Token and device location-based automatic client device authentication
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

Patent Citations (16)

* 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
US20150180857A1 (en) * 2013-12-23 2015-06-25 Joseph Schulman Simple user management service utilizing an access token
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
US20180332016A1 (en) * 2017-05-10 2018-11-15 Verizon Patent And Licensing Inc. Token and device location-based automatic client device authentication
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
CN114884724B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
CN112703714B (en) Application processing method and device, computer equipment and computer readable storage medium
CN111198859B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN110097157B (en) Electronic shelf label awakening method and system and related components
CN113163345B (en) Broadcast communication method, system, gateway equipment and electronic price tag
CN114661248B (en) Data processing method and device
CN111459629A (en) Azkaban-based project operation method and device and terminal equipment
CN109766282B (en) Stuck detection method, stuck detection device and terminal equipment
CN111737564A (en) Information query method, device, equipment and medium
CN114185489A (en) Data synchronization method and device, electronic equipment and storage medium
CN108563776B (en) Offline data acquisition method and system, server and storage medium
CN109656592B (en) Card management method, device, terminal and computer readable storage medium
CN111008865A (en) Coupon synchronous display method and device, server and storage medium
US11903041B2 (en) Abnormality processing method, terminal device and storage medium
CN114884724A (en) Cloud server interaction method and device, readable storage medium and terminal equipment
CN110858201A (en) Data processing method and system, processor and storage medium
CN104869617A (en) Terminal control method
CN116721007B (en) Task control method, system and device, electronic equipment and storage medium
CN111274104B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN109799715B (en) Data receiving method, device and terminal equipment
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN111314147B (en) Intelligent device configuration method, cloud platform and storage medium
CN110908737A (en) Application alignment awakening method and device, storage medium and electronic device
CN111694628A (en) Page display method based on application program thread and related equipment
CN113760631A (en) Page loading duration determination method, device, equipment and storage medium
CN112463399A (en) Server BMC information management method, system, terminal and storage medium

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