CN116954693A - State coordination method, device, computer equipment and storage medium - Google Patents

State coordination method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116954693A
CN116954693A CN202310765029.8A CN202310765029A CN116954693A CN 116954693 A CN116954693 A CN 116954693A CN 202310765029 A CN202310765029 A CN 202310765029A CN 116954693 A CN116954693 A CN 116954693A
Authority
CN
China
Prior art keywords
state
application
information
condition
server
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.)
Pending
Application number
CN202310765029.8A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310765029.8A priority Critical patent/CN116954693A/en
Publication of CN116954693A publication Critical patent/CN116954693A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Abstract

The embodiment of the application discloses a state coordination method, a state coordination device, computer equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: responding to a state change operation for changing the first application into a first state, and calling a state inquiry program of a second application through the first application to acquire state information of the second application; the method comprises the steps that a state change request is sent to a server through a first application, the state change request is used for requesting to change the first application into a first state, the state change request carries state information of a second application, and the server is used for responding to the state change request and returning a verification success message under the condition that the state information of the second application meets a state cooperation condition; and under the condition that a verification success message returned by the server is received, controlling the first application to be changed into a first state. The scheme provided by the application ensures the accuracy of the state information and the reliability of the verification process, and can improve the security of state coordination between applications.

Description

State coordination method, device, computer equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a state coordination method, a state coordination device, computer equipment and a storage medium.
Background
With the rapid development of computer technology, the variety of applications installed in terminals is also becoming more and more abundant. The different applications installed on the terminal can have a dependency relationship, for example, the communication application can depend on the safety protection application, and the safety protection application provides a safety protection function for the communication application.
State coordination is needed among applications with dependency relations, in related technology, different applications inquire states through calling interfaces, and the applications directly perform state coordination according to the inquired states. However, since only the interface call between applications is relied on, and the process of the interface call is very easily interfered and destroyed, the security of the state collaboration is low.
Disclosure of Invention
The embodiment of the application provides a state coordination method, a state coordination device, computer equipment and a storage medium, which can improve the security of state coordination between applications. The technical scheme is as follows:
in one aspect, a state coordination method is provided, which is executed by a terminal, wherein the terminal is provided with a first application and a second application, and the first application and the second application have a dependency relationship; the method comprises the following steps:
Responding to a state change operation for changing the first application into a first state, and calling a state query program of the second application through the first application to acquire state information of the second application;
sending, by the first application, a state change request to a server, where the state change request is used to request to change the first application to the first state, the state change request carries state information of the second application, and the server is used to respond to the state change request, and return a verification success message when the state information of the second application meets a state coordination condition, where the state coordination condition includes a condition that the state information of the second application needs to be met when the first application is changed to the first state;
and under the condition that the verification success message returned by the server is received, controlling the first application to be changed into the first state.
Optionally, the application information of the first application meets the verification condition of the second application, including at least one of the following:
the executable file of the first application is located under the target directory;
the first application has target copyright information;
The first application has a digital signature;
the hash value of the first application hits the hash value in the preset list.
Optionally, the first state refers to a start state, and the server is configured to respond to the state change request, and return the verification success message if the state information indicates that the second application is in the start state;
and under the condition that the verification success message returned by the server is received, controlling the first application to be changed into the first state, wherein the method comprises the following steps:
and starting the first application under the condition that the verification success message is received.
Optionally, the first state refers to a login state, and the server is configured to respond to the state change request, and return the verification success message if the state information indicates that the second application is in the login state;
and under the condition that the verification success message returned by the server is received, controlling the first application to be changed into the first state, wherein the method comprises the following steps:
and under the condition that the verification success message is received, controlling the first application to log in.
Optionally, when the duration after sending the state change request reaches a target duration but the verification success message or the verification failure message returned by the server is not received yet, after controlling the first application to change to the first state, the method further includes:
And under the condition that the verification failure message returned by the server is received, the first application is recovered from the first state to the state before the state change.
Optionally, the server includes a first server and a second server, the first server is associated with the first application, the second server is associated with the second application, and the sending, by the first application, a state change request to the server includes:
the state change request is sent to the first server through the first application, the first server is used for forwarding the state change request to the second server, the second server is used for responding to the state change request, the verification success message is sent to the first server when the state information of the second application meets the state cooperative condition, and the first server is also used for sending the verification success message to the terminal;
and under the condition that the verification success message returned by the server is received, controlling the first application to be changed into the first state, wherein the method comprises the following steps:
and under the condition that the verification success message returned by the first server is received, controlling the first application to be changed into the first state.
In another aspect, a state coordination method is provided, which is executed by a server, and the method includes:
receiving a state change request sent by a terminal through a first application, wherein the state change request is used for requesting to change the first application into the first state, and the state change request carries state information of a second application; the terminal is provided with the first application and the second application, and a dependency relationship exists between the first application and the second application;
acquiring a state coordination condition between the first application and the second application, wherein the state coordination condition comprises a condition which needs to be met by state information of the second application when the first application is changed to the first state;
and returning a verification success message to the terminal under the condition that the state information of the second application meets the state cooperative condition, wherein the terminal is used for controlling the first application to be changed into the first state under the condition that the verification success message is received.
Optionally, the determining, in the case where the changed state information of the second application does not meet the state coordination condition, the second state based on the state coordination condition includes:
Periodically acquiring state information of the second application, and determining the second state based on the state cooperative condition under the condition that the acquired state information does not meet the state cooperative condition; or alternatively, the process may be performed,
and after the second application changes the state, acquiring changed state information of the second application, and determining the second state based on the state cooperation condition when the changed state information does not meet the state cooperation condition.
On the other hand, a state coordination device is provided, and the state coordination device is arranged in a terminal, wherein the terminal is provided with a first application and a second application, and the first application and the second application have a dependency relationship; the device comprises:
the information acquisition module is used for responding to a state change operation for changing the first application into a first state, calling a state query program of the second application through the first application, and acquiring state information of the second application;
a request sending module, configured to send, through the first application, a state change request to a server, where the state change request is used to request that the first application is changed to the first state, where the state change request carries state information of the second application, and the server is configured to respond to the state change request, and return, in a case where the state information of the second application meets a state coordination condition, a verification success message, where the state coordination condition includes a condition that needs to be met by the state information of the second application when the first application is changed to the first state;
And the state changing module is used for controlling the first application to change to the first state under the condition that the verification success message returned by the server is received.
Optionally, the state information includes a plurality of state sub-information, the state query program includes a plurality of state query programs, and each state query program is used for acquiring at least one state sub-information; the information acquisition module is used for:
and respectively calling a plurality of state inquiry programs of the second application through the first application to acquire state sub-information corresponding to each state inquiry program.
Optionally, the information acquisition module is configured to:
calling a state query program of the second application through the first application to acquire information to be processed of the second application;
and processing the information to be processed according to a preset algorithm to obtain the state information.
Optionally, the state information includes login information, the information to be processed includes path information and password information, and the preset algorithm is a preset encryption algorithm;
the information acquisition module is used for:
acquiring encrypted login information in a storage path indicated by the path information;
and decrypting the encrypted login information by adopting the password information according to the preset encryption algorithm to obtain the login information.
Optionally, the state information includes a device identifier, where the device identifier is used to indicate a terminal where the second application is located, the information to be processed includes at least one of hard disk information, motherboard information, and device attribute information of the terminal where the second application is located, and the preset algorithm is a preset conversion algorithm;
the information acquisition module is used for:
and calculating at least one of the hard disk information, the main board information and the equipment attribute information according to the preset conversion algorithm to obtain the equipment identifier.
Optionally, the information acquisition module is configured to:
and calling a state query program of the second application through the first application, so that the state query program returns the state information of the second application under the condition that the application information of the first application meets the verification condition of the second application.
Optionally, the application information of the first application meets the verification condition of the second application, including at least one of the following:
the executable file of the first application is located under the target directory;
the first application has target copyright information;
the first application has a digital signature;
The hash value of the first application hits the hash value in the preset list.
Optionally, the first state refers to a start state, and the server is configured to respond to the state change request, and return the verification success message if the state information indicates that the second application is in the start state;
the state changing module is used for:
and starting the first application under the condition that the verification success message is received.
Optionally, the first state refers to a login state, and the server is configured to respond to the state change request, and return the verification success message if the state information indicates that the second application is in the login state;
the state changing module is used for:
and under the condition that the verification success message is received, controlling the first application to log in.
Optionally, the state change module is further configured to:
and controlling the first application to change to the first state when the time length after the state change request is sent reaches the target time length but the verification success message or the verification failure message is not received yet.
Optionally, the state change module is further configured to:
And under the condition that the verification failure message returned by the server is received, the first application is recovered from the first state to the state before the state change.
Optionally, the server includes a first server and a second server, the first server is associated with the first application, the second server is associated with the second application, and the request sending module is configured to:
the state change request is sent to the first server through the first application, the first server is used for forwarding the state change request to the second server, the second server is used for responding to the state change request, the verification success message is sent to the first server when the state information of the second application meets the state cooperative condition, and the first server is also used for sending the verification success message to the terminal;
the state changing module is used for:
and under the condition that the verification success message returned by the first server is received, controlling the first application to be changed into the first state.
Optionally, the state change module is further configured to:
Receiving a state change instruction sent by the server, wherein the state change instruction is used for indicating to change the first application into a second state; the state change instruction is sent by the server when the state information of the second application after the change of the state of the second application does not meet the state cooperation condition, and the second state is the state required by the first application when the second application is in the state indicated by the state information after the change;
and controlling the first application to change to the second state.
In another aspect, a state coordination device is provided, and the state coordination device is disposed in a server, and includes:
the request receiving module is used for receiving a state change request sent by the terminal through a first application, wherein the state change request is used for requesting to change the first application into the first state, and the state change request carries state information of a second application; the terminal is provided with the first application and the second application, and a dependency relationship exists between the first application and the second application;
the condition acquisition module is used for acquiring a state cooperative condition between the first application and the second application, wherein the state cooperative condition comprises a condition which needs to be met by the state information of the second application when the first application is changed to the first state;
The message sending module is used for returning a verification success message to the terminal when the state information of the second application meets the state cooperative condition, and the terminal is used for controlling the first application to be changed into the first state when the verification success message is received.
Optionally, the device further includes an instruction sending module, configured to:
determining a second state based on the state cooperative condition under the condition that the changed state information of the second application does not meet the state cooperative condition, wherein the second state is a state required to be in by the first application when the second application is in a state indicated by the changed state information;
and sending a state change instruction to the terminal, wherein the state change instruction is used for indicating to change the first application into the second state.
Optionally, the instruction sending module is configured to:
periodically acquiring state information of the second application, and determining the second state based on the state cooperative condition under the condition that the acquired state information does not meet the state cooperative condition; or alternatively, the process may be performed,
and after the second application changes the state, acquiring changed state information of the second application, and determining the second state based on the state cooperation condition when the changed state information does not meet the state cooperation condition.
In another aspect, a computer device is provided, the computer device including a processor and a memory having at least one computer program stored therein, the at least one computer program being loaded and executed by the processor to implement operations performed by the state coordination method as described in the above aspects.
In another aspect, there is provided a computer readable storage medium having stored therein at least one computer program loaded and executed by a processor to implement the operations performed by the state coordination method as described in the above aspects.
In another aspect, a computer program product is provided, comprising a computer program loaded and executed by a processor to implement the operations performed by the state coordination method as described in the above aspects.
According to the scheme provided by the embodiment of the application, under the condition that the first application and the second application have a dependency relationship, if the first application wants to change the state, the current state of the second application needs to be queried. The first application acquires the state information of the second application by calling a state query program provided by the second application, and provides the state information of the second application to the server, the server verifies whether the state cooperation condition is met, and the first application is allowed to change state under the condition that the verification is passed. Firstly, the state information is acquired by calling a state inquiry program, so that the acquisition process of the state information is not easy to interfere and destroy, and the accuracy of the state information is ensured. And the state information is verified through the server, so that the verification process of the state information is not easy to interfere and destroy, and the reliability of the verification process is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments 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 other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of an implementation environment provided by an embodiment of the present application;
FIG. 2 is a flow chart of a state coordination method provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a dependency relationship between applications provided by an embodiment of the present application;
FIG. 4 is a flow chart of another state coordination method provided by an embodiment of the present application;
FIG. 5 is a flow chart of another state coordination method provided by an embodiment of the present application;
FIG. 6 is a flow chart of another state coordination method provided by an embodiment of the present application;
FIG. 7 is a flow chart of another state coordination method provided by an embodiment of the present application;
FIG. 8 is a flow chart of another state coordination method provided by an embodiment of the present application;
FIG. 9 is a flow chart of another state coordination method provided by an embodiment of the present application;
FIG. 10 is a flow chart of another state coordination method provided by an embodiment of the present application;
FIG. 11 is a flow chart of another state coordination method provided by an embodiment of the present application;
FIG. 12 is a schematic illustration of an application interface provided by an embodiment of the present application;
FIG. 13 is a schematic illustration of another application interface provided by an embodiment of the present application;
FIG. 14 is a schematic diagram of another application interface provided by an embodiment of the present application;
FIG. 15 is a flowchart of a method for accessing resources according to an embodiment of the present application;
FIG. 16 is a flowchart of another method for accessing resources according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of a state coordination device according to an embodiment of the present application;
FIG. 18 is a schematic view of another state coordination device according to an embodiment of the present application;
FIG. 19 is a schematic view of another state coordination device according to an embodiment of the present application;
fig. 20 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 21 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings.
It is to be understood that the terms "first," "second," and the like, as used herein, may be used to describe various concepts, but are not limited by these terms unless otherwise specified. These terms are only used to distinguish one concept from another. For example, a first application may be referred to as a second application, and similarly, a second application may be referred to as a first application, without departing from the scope of the application.
Wherein at least one refers to one or more applications, for example, at least one application may be any integer number of applications greater than or equal to one, such as one application, two applications, three applications, and the like. The plurality means two or more, and for example, the plurality of applications may be any integer number of applications equal to or greater than two, such as two applications, three applications, and the like. Each refers to each of at least one, for example, each application refers to each application of a plurality of applications, and if the plurality of applications is 3 applications, each application refers to each application of the 3 applications.
It will be appreciated that in embodiments of the present application, related data such as application information and status information are involved, and when the above embodiments of the present application are applied to specific products or technologies, user permissions or consents need to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
Cloud Technology (Cloud Technology) refers to a hosting Technology for integrating hardware, software, network and other series resources in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. The cloud technology is a generic term of network technology, information technology, integration technology, management platform technology, application technology and the like based on cloud computing business model application, can form a resource pool, and is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals.
Cloud Security (Cloud Security) refers to a generic term for Security software, hardware, users, institutions, secure Cloud platforms based on Cloud computing business model applications. Cloud security fuses emerging technologies and concepts such as parallel processing, grid computing, unknown virus behavior judgment and the like, acquires the latest information of Trojan horse and malicious programs in the Internet through abnormal monitoring of a large number of network clients on software behaviors, sends the latest information to a server for automatic analysis and processing, and distributes solutions of viruses and Trojan horse to each client.
The main research directions of cloud security include: cloud computing security, namely, how to guarantee security of cloud and various applications on the cloud, including cloud computer system security, security storage and isolation of user data, user access authentication, information transmission security, network attack protection, compliance audit and the like; clouding of a safety infrastructure, mainly researching how to build and integrate safety infrastructure resources by adopting cloud computing, and optimizing a safety protection mechanism, wherein the cloud computing technology is used for constructing a super-large-scale safety event and an information acquisition and processing platform, realizing acquisition and association analysis of mass information, and improving the control capability and risk control capability of the whole-network safety event; cloud security services, mainly research on various security services provided for users based on cloud computing platforms, such as anti-virus services and the like.
FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application, referring to FIG. 1, the implementation environment includes: a terminal 101, a first server 102 and a second server 103. Wherein the terminal 101 is installed with a first application and a second application, and the first application and the second application have a dependency relationship therebetween. The first server 102 is associated with a first application and the second server 103 is associated with a second application. The terminal 101 is directly or indirectly connected to the first server 102 and the second server 103 by wired or wireless communication.
When a first application in the terminal 101 needs to perform state change, the first application invokes a state query program provided by a second application to obtain state information of the second application, sends a state change request carrying the state information to the first server 102, and the first server 102 forwards the state change request to the second server 103, and returns a verification success message to the first server 102 when the second server 103 determines that the state information meets a state cooperation condition, and the first server forwards the verification success message to the terminal to enable the terminal to control the first application to perform state change, thereby realizing state cooperation between the first application and the second application.
In one possible implementation, the first server 102 and the second server 103 may be independent physical servers, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content distribution networks), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 101 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, etc.
Fig. 2 is a flowchart of a state coordination method provided by an embodiment of the present application, where the embodiment of the present application is executed by a terminal, and referring to fig. 2, the method includes:
201. and the terminal responds to a state change operation for changing the first application into the first state, and invokes a state query program of the second application through the first application to acquire the state information of the second application.
The terminal is provided with a first application and a second application, and the first application and the second application have a dependency relationship, for example, the first application depends on the second application or the first application and the second application depend on each other. The dependency relationship between applications means that the operation of one application depends on the operation of another application, and state coordination is needed between applications with the dependency relationship. State collaboration between two applications means that one application needs to be in a particular state when the other application is in a certain state.
Optionally, the first application is a service application, such as a mailbox application or an enterprise application, and the second application is a security application with security protection capability, the service application needs the security protection capability provided by the security protection application, and the security protection application is required to perform security protection on the service application in the running process of the service application, so that state coordination between the service application and the security protection application is required to be performed so as to ensure that the security protection application is also running when the service application runs.
In the embodiment of the application, the second application provides the calling interface of the state query program for the first application, and the state query program is used for querying the state information of the second application, and the state information is used for indicating the current state of the second application. Therefore, when the first application needs to change the state, the terminal calls the state inquiry program through the first application, and the state inquiry program returns the state information of the second application to the first application.
Fig. 3 is a schematic diagram of a dependency relationship between applications provided in an embodiment of the present application, as shown in fig. 3, a terminal is installed with a first application and a second application, where a plurality of programs are loaded in the first application, and a plurality of programs are loaded in the second application, where the plurality of programs are used for performing data interaction with a server associated with an application, so as to implement a specific service function, the first application and the second application have a dependency relationship, and state coordination needs to be performed between the first application and the second application, for example, the first application needs to query state information of the second application when starting or logging in. The plurality of programs of the second application comprise a state query program, and the first application can acquire the state information of the second application by calling the state query program.
202. The terminal sends a state change request to the server through the first application, wherein the state change request is used for requesting to change the first application into a first state, and the state change request carries state information of the second application.
After the terminal obtains the state information of the second application through the first application, a state change request is generated, and the state change request is sent to the server. The server responds to the state change request, and returns a verification success message under the condition that the state information of the second application meets the state cooperation condition, wherein the state cooperation condition comprises the condition which needs to be met by the state information of the second application when the first application is changed into the first state. The authentication success message is used to indicate that the first application is allowed to be changed to the first state.
Wherein the state collaboration condition specifies which of the first application and the second application needs to be in when one of the applications is in which state the other application is in. For example, when the state cooperative condition specifies which state the second application needs to be in when the first application is in the first state, it may be determined whether the second application is in the state specified by the state cooperative condition based on the state information of the second application, if the state indicated by the state information of the second application matches the state specified by the state cooperative condition, the state information of the second application satisfies the state cooperative condition, and if the state indicated by the state information of the second application does not match the state specified by the state cooperative condition, the state information of the second application does not satisfy the state cooperative condition.
203. And the terminal controls the first application to be changed into the first state under the condition of receiving the verification success message returned by the server.
Under the condition that the terminal receives the verification success message through the first application, the current state of the second application is the state of the first application which is required to be in when the first application is in the first state, so that the first application can be changed into the first state, and the terminal controls the first application to be changed into the first state, so that state coordination between the first application and the second application is realized.
In the method provided by the embodiment of the application, under the condition that the first application and the second application have a dependency relationship, if the first application wants to change the state, the current state of the second application needs to be queried. The first application acquires the state information of the second application by calling a state query program provided by the second application, and provides the state information of the second application to the server, the server verifies whether the state cooperation condition is met, and the first application is allowed to change state under the condition that the verification is passed. Firstly, the state information is acquired by calling a state inquiry program, so that the acquisition process of the state information is not easy to interfere and destroy, and the accuracy of the state information is ensured. And the state information is verified through the server, so that the verification process of the state information is not easy to interfere and destroy, and the reliability of the verification process is ensured.
Fig. 4 is a flowchart of another state coordination method provided by an embodiment of the present application, where the embodiment of the present application is executed by a server, referring to fig. 4, the method includes:
401. the server receives a state change request sent by the terminal through the first application, wherein the state change request is used for requesting to change the first application into a first state, and the state change request carries state information of the second application.
The terminal is provided with a first application and a second application, the first application and the second application have a dependency relationship, and the sending process of the state change request can be seen from the embodiment shown in fig. 2.
402. The server acquires a state cooperation condition between the first application and the second application, wherein the state cooperation condition comprises a condition which needs to be met by the state information of the second application when the first application is changed into the first state.
The state collaboration condition specifies which state one of the first application and the second application needs to be in when the other application is in.
403. And the server returns a verification success message to the terminal under the condition that the state information of the second application meets the state cooperative condition.
When the state cooperative condition specifies that the first application is in the first state, the second application needs to be in which state, so that the server can judge whether the second application is in the state specified by the state cooperative condition according to the state information of the second application carried in the state change request, if the state indicated by the state information of the second application is consistent with the state specified by the state cooperative condition, the state information of the second application meets the state cooperative condition, and if the state indicated by the state information of the second application is inconsistent with the state specified by the state cooperative condition, the state information of the second application does not meet the state cooperative condition.
And the terminal controls the first application to be changed into the first state under the condition of receiving the verification success message.
In the method provided by the embodiment of the application, under the condition that the first application and the second application have a dependency relationship, if the first application wants to change the state, the current state of the second application needs to be queried. The first application acquires the state information of the second application by calling a state query program provided by the second application, and provides the state information of the second application to the server, the server verifies whether the state cooperation condition is met, and the first application is allowed to change state under the condition that the verification is passed. Firstly, the state information is acquired by calling a state inquiry program, so that the acquisition process of the state information is not easy to interfere and destroy, and the accuracy of the state information is ensured. And the state information is verified through the server, so that the verification process of the state information is not easy to interfere and destroy, and the reliability of the verification process is ensured.
The embodiments shown in fig. 2 and fig. 4 described above illustrate operations performed by the terminal and the server in the state coordination method, respectively. The server comprises a first server and a second server, the first server is associated with a first application, the second server is associated with a second application, and state coordination between the first application and the second application is achieved through interaction among the terminal, the first server and the second server, and the detailed process can be seen from an embodiment shown in the following figure 5. The method provided by the embodiment of the application is applied to a system architecture of a C/S (Client/Server) mode, and when the Server is deployed and maintained, an application associated with the Server is installed at a terminal to connect the Server, wherein a first application in the terminal is connected with the associated first Server, and a second application is connected with the associated second Server.
Fig. 5 is a flowchart of another state coordination method provided by an embodiment of the present application, where the embodiment of the present application is executed by a terminal, a first server, and a second server, and referring to fig. 5, the method includes:
501. and the terminal responds to a state change operation for changing the first application into the first state, and invokes a state query program of the second application through the first application to acquire the state information of the second application.
The first server and the second server are configured with a dependency relationship in the first application and the second application, the dependency relationship may be represented by configuration information having a specific format, and the dependency relationship specifies under what state the first application and the second application need to perform state collaboration. The terminal responds to the state change operation of changing the first application into the first state, judges whether the state information of the second application needs to be queried according to the dependency relationship, and if the state information of the second application needs to be queried, calls a state query program provided by the second application to acquire the state query program of the second application to acquire the state information of the second application.
The second application provides a calling interface of a state query program for the first application, the first application calls the state query program, the state query program receives request parameters in a specific format and returns state information of the second application to the first application, and the state information can be used for indicating whether the second application and the first application are located in the same terminal, whether the second application is in a starting state, whether the second application is in a login state and the like.
The state query program refers to a set composed of a plurality of files and used for realizing the state query function, and the state query program can exist in the form of plugins.
In one possible implementation, the state information includes a plurality of state sub-information, and the state query program includes a plurality of state query programs, each state query program for acquiring at least one state sub-information. The terminal calls a plurality of state inquiry programs of the second application through the first application respectively to acquire state sub-information corresponding to each state inquiry program.
For example, the state information includes a plurality of kinds of state sub-information including state sub-information 1 and state sub-information 2, the state sub-information 1 being used to indicate whether the second application is in the login state, and the state sub-information 2 being login information of the second application. The second application is provided with a state query program a for acquiring the state sub-information 1 and a state query program B for acquiring the state sub-information 2. The terminal calls the state inquiry program A to obtain the state sub-information 1 through the first application, and calls the state inquiry program B to obtain the state sub-information 2, wherein the state sub-information 1 and the state sub-information 2 form the state information of the second application.
In the embodiment of the application, the first application respectively calls different state inquiry programs to acquire different types of state sub-information, namely, the process of acquiring the state information is dispersed to a plurality of different state inquiry programs for processing, so that the reliability and the safety of the acquired state information are ensured.
In one possible implementation manner, the terminal invokes a state query program of the second application through the first application to obtain information to be processed of the second application, and processes the information to be processed according to a preset algorithm to obtain state information.
In the embodiment of the application, the second application does not directly provide the state information to the first application, but provides the information to be processed, and the first application needs to process the information to be processed according to the preset algorithm agreed with the second application to obtain the state information, so that even if the information to be processed is intercepted by an attacker, the attacker cannot acquire the state information of the second application, which is equivalent to providing a safety barrier for the state information, and is beneficial to ensuring the reliability and the safety of the acquired state information.
Optionally, the terminal processes the information to be processed according to a preset algorithm through the first application to obtain the state information, which includes the following two cases.
First case: the state information comprises login information, the information to be processed comprises path information and password information, and the preset algorithm is a preset encryption algorithm. The path information is used to indicate a storage path and the password information is used to decrypt. Then, according to a preset algorithm, the information to be processed is processed to obtain state information, including: and acquiring encrypted login information in a storage path indicated by the path information, and decrypting the encrypted login information by adopting the password information according to a preset encryption algorithm to obtain the login information.
Wherein the path information includes a registry path or a local file path of the encrypted login information. The cryptographic information includes a cryptographic suite or value, etc., required for decryption. The preset encryption algorithm may be an AEAD (Authenticated Encryption with Associated Data, authenticated encryption of associated data) algorithm. For example, the preset encryption algorithm is GCM (Grinding Cycle Monitor ) mode of AES (Advanced Encryption Standard, advanced encryption standard), and the initial value of the counter and the authentication tag value are required for decryption.
Second case: the state information comprises a device identifier, the device identifier is used for indicating a terminal where the second application is located, the information to be processed comprises at least one of hard disk information, main board information and device attribute information of the terminal where the second application is located, and the preset algorithm is a preset conversion algorithm. Then, according to a preset algorithm, the information to be processed is processed to obtain state information, including: and calculating at least one of the hard disk information, the main board information and the equipment attribute information according to a preset conversion algorithm to obtain the equipment identifier.
The hard disk information of the terminal comprises a hard disk serial number of a system disk, a hard disk serial number of other types of magnetic disks, and the like, and the other types of magnetic disks comprise a mobile hard disk, USB (Universal Serial Bus ), an optical drive, and the like. The motherboard information includes a motherboard serial number and a motherboard UUID (Universally Unique Identifier, universally unique identification code). The device attribute information includes a device asset number, device type information, and the like, and the device type information is used to indicate whether the device belongs to a virtual machine or a physical machine and to which type of virtual machine.
After the terminal obtains at least one of the hard disk information, the main board information and the equipment attribute information through the first application, the terminal calculates the at least one of the hard disk information, the main board information and the equipment attribute information according to a preset conversion algorithm agreed with the second application to obtain a calculation result, wherein the calculation result is the equipment identifier.
In one possible implementation manner, the terminal invokes a state query program of the second application through the first application, so that the state query program returns the state information of the second application when the application information of the first application meets the verification condition of the second application.
In the embodiment of the application, when the first application calls the state inquiry program to acquire the state information of the second application, the state inquiry program needs to verify whether the application information of the first application meets the verification condition, and returns the state information of the second application to the first application only when the application information of the first application meets the verification condition, and if the application information of the first application does not meet the verification condition, the state inquiry program returns a call failure message to the first application so as to ensure that the state information is not leaked and improve the safety of the state information.
Optionally, the application information of the first application satisfies the verification condition of the second application, including at least one of the following:
(1) The executable file of the first application is located under the target directory.
(2) The first application has target copyright information.
(3) The first application has a digital signature.
(4) The hash value of the first application hits the hash value in the preset list.
If the authentication is successful only when all the authentication conditions are satisfied, the state inquiry program returns the state information of the second application to the first application. If the authentication is successful when at least one authentication condition is satisfied between the first application and the second application, the state query program returns the state information of the second application to the first application as long as the application information of the first application satisfies at least one of the authentication conditions.
Alternatively, the above-mentioned authentication condition is not pre-embedded in an executable file or a module file of the second application, but stored in an encrypted persistent library, and if the first application depends on the second application, the authentication condition for the first application is issued to the second application by the server of the second application and stored in the persistent library. If the server requests deletion of the authentication condition for the first application, the second application is notified to execute a deletion operation of the authentication condition. In the embodiment of the application, the server issues the verification condition and stores the verification condition in the persistence library, so that the security of calling the state inquiry program can be improved, and the verification condition can be conveniently adjusted.
The persistence refers to the conversion of a data structure or an object model in a memory into a format such as a relational model, XML, JSON, binary stream and the like, and the conversion of a storage model into a data model in a memory, and the persistence library refers to a storage medium which is stored in a disk file or a data file of a device and is converted from the relational model, XML, JSON, binary stream and the like in the memory, and can be realized by using an encryption file, an embedded database and the like. For example, the persistent library includes a white-box encryption persistent library, and the white-box cryptographic technology is a cryptographic technology capable of resisting a white-box attack, and may be classified into a static key white-box and a dynamic key white-box in terms of implementation. Static key whitebox refers to the binding confusion of the algorithm's key and the designated encryption algorithm, thereby generating a static key whitebox.
It should be noted that the above multiple implementations may be combined with each other to form a new implementation, which is not limited by the embodiment of the present application.
In the embodiment of the application, the second application provides the state query program for the first application, so that the mutual structure between the first application and the second application is realized, and the problem that the first application and the second application need to be synchronously updated when the dependency relationship of the first application and the second application changes is avoided.
502. The terminal sends a state change request to the first server through the first application, wherein the state change request is used for requesting to change the first application into a first state, and the state change request carries state information of the second application.
After the terminal obtains the state information of the second application through the first application, a state change request is generated, and the state change request is sent to a first server associated with the first application through the first application, wherein the first server is used for providing service for the first application.
503. The first server forwards the state change request to the second server.
The communication connection is established between the first server and the second server, the first server forwards the state change request to the second server associated with the second application after receiving the state change request sent by the terminal through the first application, and the second server is used for providing service for the second application.
504. The second server responds to the state change request, and sends a verification success message to the first server when the state information of the second application meets the state cooperation condition.
After receiving the state change request sent by the first server, the second server acquires the state information of the second application carried in the state change request, and acquires a state cooperation condition between the first application and the second application, wherein the state cooperation condition comprises a condition which needs to be met by the state information of the second application when the first application is changed into the first state. The second server judges whether the state information of the second application meets the state cooperative condition, and sends a verification success message to the first server when the state information of the second application meets the state cooperative condition, wherein the verification success message is used for indicating that the first application is allowed to be changed into the first state. In another embodiment, in case the state information of the second application does not meet the state collaborative condition, a verification failure message is sent to the first server, the verification failure message being used to indicate that the first application is not allowed to be changed to the first state.
Wherein the state collaboration condition specifies which of the first application and the second application needs to be in when one of the applications is in which state the other application is in. For example, when the state cooperative condition specifies which state the second application needs to be in when the first application is in the first state, it may be determined whether the second application is in the state specified by the state cooperative condition based on the state information of the second application, and if the state indicated by the state information of the second application coincides with the state specified by the state cooperative condition, the state information of the second application satisfies the state cooperative condition, thereby allowing the first application to change to the first state. If the state indicated by the state information of the second application is inconsistent with the state specified by the state cooperative condition, the state information of the second application does not meet the state cooperative condition, and therefore the first application is not allowed to be changed to the first state.
In one possible implementation, the first state refers to a startup state, and the first server returns a verification success message in response to the state change request, where the state information indicates that the second application is in the startup state.
The state collaboration condition specifies that the second application also needs to be in the active state when the first application is in the active state. The first server determines whether the second application is in the start-up state based on the state information, and if the second application is in the start-up state, it may be determined that the state cooperation condition is satisfied, so that a verification success message is returned, allowing the first application to be changed to the start-up state. If the second application is not in the starting state, it may be determined that the state cooperation condition is not satisfied, and thus a verification failure message is returned, and the first application is not allowed to be changed to the starting state.
In another possible implementation, the first state refers to a login state, and the first server returns a verification success message in response to the state change request if the state information indicates that the second application is in the login state.
The state collaboration condition specifies that the second application also needs to be in the login state when the first application is in the login state. The first server determines whether the second application is in the login state based on the state information, and if the second application is in the login state, it may be determined that the state cooperation condition is satisfied, so that a verification success message is returned, allowing the first application to be changed to the login state. If the second application is not in the login state, it may be determined that the state cooperation condition is not satisfied, and thus a verification failure message is returned, and the first application is not allowed to be changed to the login state.
It should be noted that, in the two implementations, the state collaboration condition specifies that the second application needs to be in the startup state when the first application is in the startup state, and the second application needs to be in the login state when the first application is in the login state. However, these are merely two exemplary descriptions of the state collaboration condition, and in addition, the state collaboration condition may be other provisions, for example, the state collaboration condition may further provide that the second application needs to be in a login state when the first application is in a startup state, and the embodiment of the present application is not limited thereto.
505. The first server sends a verification success message to the terminal.
And after receiving the verification success message, the first server forwards the verification success message to the terminal.
506. And the terminal controls the first application to be changed into the first state under the condition of receiving the verification success message returned by the first server.
Under the condition that the terminal receives the verification success message through the first application, the current state of the second application is the state of the first application which is required to be in when the first application is in the first state, so that the first application can be changed into the first state, and the terminal controls the first application to be changed into the first state, so that state coordination between the first application and the second application is realized.
In one possible implementation, the first state refers to a start state, and the terminal starts the first application if receiving the authentication success message.
In another possible implementation manner, the first state refers to a login state, and the terminal controls the first application to login under the condition that the terminal receives the verification success message.
In the embodiment of the present application, the server includes a first server and a second server. In another embodiment, the first server and the second server are the same server, and the terminal sends a state change request to the server through the first application, and the server responds to the state change request and sends a verification success message to the terminal when the state information of the second application meets the state cooperation condition.
In the method provided by the embodiment of the application, under the condition that the first application and the second application have a dependency relationship, if the first application wants to change the state, the current state of the second application needs to be queried. The first application acquires the state information of the second application by calling a state query program provided by the second application, and provides the state information of the second application to the server, the server verifies whether the state cooperation condition is met, and the first application is allowed to change state under the condition that the verification is passed. Firstly, the state information is acquired by calling a state inquiry program, so that the acquisition process of the state information is not easy to interfere and destroy, and the accuracy of the state information is ensured. And the state information is verified through the server, so that the verification process of the state information is not easy to interfere and destroy, and the reliability of the verification process is ensured.
It should be noted that, the above embodiment is described taking the example that the terminal receives the authentication success message. In another embodiment, after the terminal sends the state change request to the server through the first application, the terminal controls the first application to change to the first state when the duration after sending the state change request reaches the target duration but the verification success message or the verification failure message is not received yet. After the first application is controlled to be changed into the first state, the first application is restored from the first state to the state before the state change under the condition that a verification failure message returned by the server is received.
In the embodiment of the application, if a message returned by the server is not received after a certain time length is reached after the state change request is sent, the response delay is indicated, and the first application can be controlled to change the state and continue waiting for the message of the server under the condition. Meanwhile, the server performs asynchronous retry operation until the terminal receives the verification success message or the verification failure message, if the terminal receives the verification success message, the first application is kept in the first state, and if the terminal receives the verification failure message, the first application needs to be restored from the first state to the state before the state change.
The above embodiment describes a process of actively acquiring the state information of the second application to verify when the first application needs to make a state change. In addition, the state of the first application may be changed based on the state information of the second application to ensure state coordination, for a detailed procedure see the embodiment shown in fig. 6 below.
Fig. 6 is a flowchart of another state coordination method provided by an embodiment of the present application, where the embodiment of the present application is executed by a terminal and a server, referring to fig. 6, the method includes:
601. And the server determines a second state based on the state cooperative condition under the condition that the changed state information of the second application does not meet the state cooperative condition, wherein the second state is the state required to be in by the first application when the second application is in the state indicated by the changed state information.
After the server acquires the state information of the second application, judging whether the state information of the second application meets the state cooperative condition, and if the state cooperative condition is not met, determining that the second application is in a state indicated by the changed state information based on the state cooperative condition, wherein the second state is required to be in by the first application.
In one possible implementation, the server periodically obtains the state information of the second application, and determines the second state based on the state collaboration condition if the obtained state information does not satisfy the state collaboration condition. In another possible implementation manner, after the second application performs the state change, the server obtains changed state information of the second application, and determines the second state based on the state cooperative condition when the changed state information does not meet the state cooperative condition. The detailed procedure of the above two implementations can be seen in the embodiments shown in fig. 7 and 8, respectively, below.
602. The server sends a state change instruction to the terminal, wherein the state change instruction is used for indicating to change the first application into the second state.
The server generates a state change instruction for instructing to change the first application to the second state. The server sends the state change instruction to a first application in the terminal.
603. And the terminal receives a state change instruction sent by the server and controls the first application to change to the second state.
And after receiving the state change instruction, the terminal controls the first application to change to the second state according to the instruction of the state change instruction. After the first application is changed to the second state, the state of the first application and the state of the second application meet the state cooperation condition, so that the state cooperation between the first application and the second application is realized.
In the method provided by the embodiment of the application, under the condition that the first application and the second application have a dependency relationship, if the server detects that the state of the first application and the state of the second application do not meet the state cooperation condition, a state change instruction can be sent to instruct the first application to change the state, so that the state of the first application and the state of the second application meet the state cooperation condition, the state cooperation between the first application and the second application is ensured, and the situation that the business processing process of the first application is wrong because the state of the first application is not changed in time according to the state of the second application is avoided.
Fig. 7 is a flowchart of another state coordination method provided in an embodiment of the present application, where the embodiment of the present application is executed by a terminal, a first server, and a second server, referring to fig. 7, the method includes:
701. and the second server acquires the changed state information of the second application after the second application changes the state.
The states of the second application include a startup state, an un-startup state, a login state, an un-login state, an installation state, an uninstall state, and the like. The state change of the second application includes two cases, one case is to perform the state change on the second application through the second server, for example, the administrator performs the logout operation on the second application on the terminal through the second server. Another case is that the second application actively initiates a state change, e.g. the user performs an logout operation of the second application in the terminal, etc.
In the first case, the second server executes the state change of the second application, and thus the second server can sense the state change of the second application. In the second case, after the second application transmits the state change, the state information after the change is synchronized to the second server, so that the second server can also sense the state change of the second application. And each time the server determines that the state of the second application is changed, acquiring the changed state information of the second application.
702. The second server sends the changed state information of the second application to the first server.
703. The first server receives the changed state information of the second application, and determines the second state based on the state cooperation condition when the changed state information does not satisfy the state cooperation condition.
After receiving the state information of the second application, the first server judges whether the state information of the second application meets the state cooperative condition, and if the state cooperative condition is not met, the first server needs to determine the second state required to be in by the first application when the second application is in the state indicated by the changed state information based on the state cooperative condition. That is, when it is detected that the state of the first application and the state of the second application do not satisfy the state cooperation condition, it is necessary to determine what state the first application needs to be in.
The first server can know whether the first application needs to change the state and what kind of state change is performed after the second application changes the state according to the state cooperative condition. For example, in the case where the first application is in the login state, when the state of the second application is changed to the uninstalled state, the first application needs to exit the login state.
704. The first server sends a state change instruction to the terminal, wherein the state change instruction is used for indicating to change the first application into the second state.
The first server generates a state change instruction for instructing to change the first application to the second state. The server sends the state change instruction to a first application in the terminal.
705. And the terminal receives a state change instruction sent by the server and controls the first application to change to the second state.
And after receiving the state change instruction, the terminal controls the first application to change to the second state according to the instruction of the state change instruction. After the first application is changed to the second state, the state of the first application and the state of the second application meet the state cooperation condition, so that the state cooperation between the first application and the second application is realized.
In the method provided by the embodiment of the application, under the condition that the first application and the second application have a dependency relationship, if the server detects that the state of the first application and the state of the second application do not meet the state cooperation condition, a state change instruction can be sent to instruct the first application to change the state, so that the state of the first application and the state of the second application meet the state cooperation condition, the state cooperation between the first application and the second application is ensured, and the situation that the business processing process of the first application is wrong because the state of the first application is not changed in time according to the state of the second application is avoided.
Fig. 8 is a flowchart of another state coordination method provided by an embodiment of the present application, where the embodiment of the present application is executed by a terminal and a server, referring to fig. 8, the method includes:
801. the first server periodically sends a status query request to the second server, the status query request being for requesting to query status information of the second application.
When the second application changes state, the changed state information is synchronized to the second server, but the synchronization fails, so that the second server cannot sense the state change of the second application. Or, when the state of the second application is changed in a non-preset manner (for example, an attacker abnormally performs an operation of unloading the second application), the second server cannot sense the state change of the second application. Based on this, considering that there is a case where the second server cannot perceive the state change of the second application, the first server may periodically send a state query request to the second server to query the state information of the second application, and determine whether the state cooperation condition is satisfied.
802. The second server responds to the state query request and acquires the state information of the second application.
The second server responds to the state query request sent by the first server to acquire the current state information of the second application.
803. The second server sends state information of the second application to the first server.
804. The first server receives the state information of the second application, and determines the second state based on the state cooperative condition when the state information of the second application does not satisfy the state cooperative condition.
After receiving the state information of the second application, the first server judges whether the state information of the second application meets the state cooperative condition, and if the state cooperative condition is not met, the first server needs to determine the second state required to be in by the first application when the second application is in the state indicated by the changed state information based on the state cooperative condition. That is, when it is detected that the state of the first application and the state of the second application do not satisfy the state cooperation condition, it is necessary to determine what state the first application needs to be in.
The first server can know whether the first application needs to change the state and what kind of state change is performed after the second application changes the state according to the state cooperative condition. For example, in the case where the first application is in the login state, when the state of the second application is changed to the uninstalled state, the first application needs to exit the login state.
805. The first server sends a state change instruction to the terminal, wherein the state change instruction is used for indicating to change the first application into the second state.
The first server generates a state change instruction for instructing to change the first application to the second state. The server sends the state change instruction to a first application in the terminal.
806. And the terminal receives a state change instruction sent by the server and controls the first application to change to the second state.
And after receiving the state change instruction, the terminal controls the first application to change to the second state according to the instruction of the state change instruction. After the first application is changed to the second state, the state of the first application and the state of the second application meet the state cooperation condition, so that the state cooperation between the first application and the second application is realized.
In the method provided by the embodiment of the application, under the condition that the first application and the second application have a dependency relationship, if the server detects that the state of the first application and the state of the second application do not meet the state cooperation condition, a state change instruction can be sent to instruct the first application to change the state, so that the state of the first application and the state of the second application meet the state cooperation condition, the state cooperation between the first application and the second application is ensured, and the situation that the business processing process of the first application is wrong because the state of the first application is not changed in time according to the state of the second application is avoided.
In addition, considering that the second server cannot sense the state change of the second application, the first server can periodically send a state query request to the second server to query the state information of the second application and judge whether the state cooperation condition is met, namely, a spam measure is provided, so that the situation that the state cooperation of the first application and the second application is difficult due to the fact that the second server cannot sense the state change of the second application is avoided.
In the related art, under the condition that a dependency relationship exists between a first application and a second application, the first application needs to perform state coordination with the second application in the same terminal when being started, logged in or running, and after the state of the second application is changed, corresponding operations including forced logout, forbidden running or forbidden logging and the like are synchronously executed on the first application. The first application and the second application query the state through calling the interface, and the application directly performs state coordination according to the queried state. If the dependency relationship between the first application and the second application changes, version update is needed to be carried out on the first application and the second application synchronously, otherwise, the dependency relationship of the first application and the second application which change dynamically is difficult to maintain, time and labor are wasted, and the interface calling process is easy to interfere and destroy, so that the security of state coordination is low, and data leakage is easy to cause.
The state collaboration method provided by the embodiment of the application is completed by the closed loop between the application and the server, the interaction completion state between the application and the server is reported, the interaction completion state between the servers is inquired and the state collaboration between the applications is performed, the dependency relationship between the applications is configured by the server, and when the dependency relationship between the applications is changed, the adjustment cost is low. And the state information query operation is realized by calling the state query program and maintaining the verification condition, and the applications with the dependency relationship can be mutually decoupled, so that the need of synchronously updating the two applications when the dependency relationship changes is avoided. On the other hand, the server is used for state synchronization, so that the probability that an attacker bypasses the dependency relationship between the applications can be reduced to a certain extent, and the risk of data leakage is reduced.
Fig. 9 is a flowchart of another state coordination method provided in an embodiment of the present application, where, as shown in fig. 9, a terminal installs a first application and a second application, where the first application is associated with a first server, the second application is associated with a second server, and the first application depends on the second application. The method comprises the following steps:
901. the first application calls a state query program to collect state information of the second application. When the first application needs to execute service logic such as startup or login, the first application firstly inquires the dependency relationship between the first application and the second application, and under the condition that the dependency relationship indicates that the state information of the second application needs to be verified, the first application calls a state inquiry program provided by the second application to acquire the state information of the second application.
902. The first application performs the business logic of the state change. After the first application acquires the state information of the second application, a state change request carrying the state information of the second application is generated, the state change request is used for requesting to change the state (for example, changing to a starting state, a login state and the like), and the first application sends the state change request to the first server.
903. The first server sends a state change request to the second server.
904. The second server sends a verification success message to the first server. After receiving the state change request, the second server verifies whether the state information of the second application meets the state cooperation condition, and if so, returns a verification success message.
905. The first server controls the first application to change the state. And the first server controls the first application to change the state under the condition that the first server receives the verification success message of the second server.
Fig. 10 is a flowchart of another state coordination method provided in an embodiment of the present application, as shown in fig. 10, the method includes the following steps:
1001. and if the second application is changed in state, notifying the second server. After the second application changes the state, the changed state information is synchronized to the second server.
1002. The second server actively transmits the status information. And after receiving the state information of the second application, the second server actively transmits the state information to the first server.
1003. The first server controls the first application to change the state. After receiving the state information of the second application, the first server needs to change the state of the first application if the state information does not meet the state cooperative condition. The first server controls the first application to change the state through the instruction interaction with the first application, so that the state coordination between the first application and the second application is realized.
1004. The first server periodically requests status information. In order to adapt to the situation that the second server cannot sense the state change of the second application, the first server also periodically requests state information to the second server, judges whether a state cooperation condition is met according to the state information provided by the second server, if so, does not need to process the first application, and if not, needs to change the state of the first application so as to realize the state cooperation between the first application and the second application.
It should be noted that, the above embodiment only uses the example that the first application and the second application in the terminal have a dependency relationship. In another embodiment, the terminal may also be installed with multiple applications that have many-to-one dependencies between them, so that many-to-one dependencies (multiple applications depend on the same application) or many-to-many dependencies (multiple applications have two-to-two dependencies between them) may be formed. The state coordination method provided by the above embodiment is executed for each pair of applications having a dependency relationship.
Fig. 11 is a flowchart of another state collaboration method provided in the embodiment of the present application, where, as shown in fig. 11, a terminal is installed with a first application, a second application, a third application, and a fourth application, where the first application and the second application have a dependency relationship, the third application and the second application have a dependency relationship, and the fourth application and the second application have a dependency relationship, where the three dependency relationships may be different from each other, and are configured in a control node of a server.
In addition, in the case where a plurality of pairs of dependencies exist simultaneously, the terminal also needs to deal with the problem of whether each dependency has a conflict. Therefore, different priorities can be divided for different dependency relationships, and under the condition that conflict exists among different dependency relationships, the state cooperation condition corresponding to the dependency relationship with the highest priority is preferentially met.
The state coordination method provided by the embodiment of the application can be applied to a scene of state coordination among any application with a dependency relationship.
For example, the embodiment of the application can be applied to a dependency relationship treatment scene among applications belonging to a C/S mode. The C/S mode is divided into an application end and a server end. The application end can access the server end of the application end. Due to the provision of security compliance, some applications need to rely on the state of another application within the device at startup, login or run-time. For example, the following scenarios are included: (1) When the first application verifies login operation initiated by a user in a self account system, whether a second application is installed in the equipment or not or whether the second application is in a login state needs to be detected besides verifying whether credentials of an account are correct or not. (2) In the case that the first application is in the login state, if the second application in the device is uninstalled, or the service and process of the second application are completely exited, the first application needs to be forced to log off.
In the embodiment of the application, the first application depends on the second application, the first application is a business application, such as a mailbox application or an enterprise application, and the second application is a security application with security protection capability, the business application needs the security protection capability provided by the security protection application, and the security protection application is required to carry out security protection on the business application in the running process of the business application, so that state coordination between the business application and the security protection application is required to be carried out so as to ensure that the security protection application is also running when the business application runs. Wherein the second application may be a security guard application in a zero trust access control system. The security protection application in the zero trust access control system is described below in connection with fig. 12-16.
Fig. 12 is a schematic diagram of an application interface provided by the embodiment of the present application, where, as shown in fig. 12, a security protection application has multiple functions of zero trust office, virus checking and killing, compliance detection, bug fix, computer tool, etc., and in terms of security implementation protection, a real-time protection policy, an antivirus protection policy, and a security reinforcement policy are provided, and the real-time protection policy includes application entry protection and system bottom protection. Fig. 13 is a schematic diagram of another application interface provided in an embodiment of the present application, where, as shown in fig. 13, a security protection application periodically performs detection of an environmental state of a device after a user initiates a detection operation at initiative or in the background, and at a service module level, the detection includes software security baseline detection, detection of a violation process, detection of a violation service, and the like. Fig. 14 is a schematic diagram of another application interface provided by an embodiment of the present application, as shown in fig. 14, if the security protection application does not pass the detection of the device environment state, the security protection application automatically performs treatment measures including forced logout, blocking access of resources in the enterprise intranet, blocking service function call of a service module, switching the device network into an isolated network, and the like.
Fig. 15 is a flowchart of a resource access method provided by an embodiment of the present application, where, as shown in fig. 15, a zero-trust access control system includes a security protection application, an access subject is a user, the access subject requests a unified access portal to the zero-trust access control system, the zero-trust access control system provides flow monitoring and authentication for the unified access portal based on an access control policy, network flow through the flow monitoring and authentication is forwarded by the zero-trust access control system to an access gateway, and an access request for an internal resource of an enterprise is forwarded to a corresponding service server through the access gateway, so as to complete an access process.
FIG. 16 is a flowchart of another method for accessing resources according to an embodiment of the present application, where the zero trust access control system includes a security guard application, a security guard server, an access agent, and an intelligent gateway as shown in FIG. 16. The security application and the access agent are both installed on the terminal, and the access agent is a component of the security application, and the access agent and the security application are split in fig. 16 only for distinguishing in logic flow. The access agent intercepts the network request through the TUN/TAP virtual network card, forwards the network request to the intelligent gateway after authentication is performed by the security protection application, and performs direct connection or interrupt connection if the authentication is not performed. The security application is responsible for verifying the identity of the device, verifying whether the device is trusted and whether the business application is trusted. The security protection server performs security scheduling on the network request through a dynamic access strategy, verifies the user identity, the equipment hardware information and the equipment security state, detects whether an application process is secure, and the like. The security protection server also periodically initiates file inspection to the cloud inspection service, and notifies the security protection application to execute asynchronous blocking operation under the condition that a malicious process is identified. The intelligent gateway is responsible for authentication, authorization, and forwarding of each network request.
Based on the architecture shown in fig. 16, the resource access flow includes: step 1, a service application initiates a network request aiming at an access object, and a security protection application intercepts the network request through an access agent; step 2, the access agent initiates an authentication request to the security protection application, namely the security protection application applies for an access credential of the network request; step 3, the security protection application obtains the process characteristics of the service application, and the request parameters for carrying out the flow authentication comprise the process characteristics of the service application; step 4, the security protection application applies for an access ticket to the security protection server based on the request parameters when the access agent performs flow authentication; step 5, the security protection server returns an access bill; step 6, the security protection application sends the access ticket, the maximum use times of the access ticket and the effective time as response data to the access agent; step 7, the access agent initiates a connection request to the intelligent gateway, wherein the connection request carries an access ticket; step 8, after receiving the connection request, the intelligent gateway analyzes the access ticket and initiates a verification request of the access ticket to the security protection server; step 9, the security protection server checks the access ticket, returns a check success message under the condition of successful check, and after receiving the check success message, the intelligent gateway establishes connection between the access agent and the intelligent gateway, and the access agent forwards the network request to the intelligent gateway; step 10, the intelligent gateway forwards the network request to a service server associated with the service application; step 11, the service server sends response data for the network request to the intelligent network; and step 12, the intelligent gateway forwards the response data to the access agent.
Fig. 17 is a schematic structural diagram of a state coordination device provided in an embodiment of the present application, where the state coordination device is disposed in a terminal, and the terminal is installed with a first application and a second application, and the first application and the second application have a dependency relationship. Referring to fig. 17, the apparatus includes:
an information obtaining module 1701, configured to, in response to a state change operation for changing a first application to a first state, invoke a state query program of a second application by the first application, and obtain state information of the second application;
the request sending module 1702 is configured to send, to the server through the first application, a state change request, where the state change request is used to request to change the first application to a first state, where the state change request carries state information of the second application, and the server is configured to respond to the state change request, and return a verification success message when the state information of the second application meets a state coordination condition, where the state coordination condition includes a condition that needs to be met by the state information of the second application when the first application is changed to the first state;
and the state changing module 1703 is configured to control the first application to change to the first state when receiving a verification success message returned by the server.
In the state coordination device provided by the embodiment of the application, under the condition that the first application and the second application have a dependency relationship, if the first application wants to change the state, the current state of the second application needs to be queried. The first application acquires the state information of the second application by calling a state query program provided by the second application, and provides the state information of the second application to the server, the server verifies whether the state cooperation condition is met, and the first application is allowed to change state under the condition that the verification is passed. Firstly, the state information is acquired by calling a state inquiry program, so that the acquisition process of the state information is not easy to interfere and destroy, and the accuracy of the state information is ensured. And the state information is verified through the server, so that the verification process of the state information is not easy to interfere and destroy, and the reliability of the verification process is ensured.
Optionally, the state information includes a plurality of state sub-information, and the state query program includes a plurality of state query programs, each state query program being configured to obtain at least one state sub-information; an information acquisition module 1701 for:
And respectively calling a plurality of state inquiry programs of the second application through the first application, and acquiring state sub-information corresponding to each state inquiry program.
Optionally, the information obtaining module 1701 is configured to:
calling a state query program of a second application through a first application to acquire information to be processed of the second application;
and processing the information to be processed according to a preset algorithm to obtain state information.
Optionally, the state information includes login information, the information to be processed includes path information and password information, and the preset algorithm is a preset encryption algorithm;
an information acquisition module 1701 for:
acquiring encrypted login information in a storage path indicated by path information;
and decrypting the encrypted login information by adopting the password information according to a preset encryption algorithm to obtain the login information.
Optionally, the state information includes a device identifier, where the device identifier is used to indicate a terminal where the second application is located, and the information to be processed includes at least one of hard disk information, motherboard information, and device attribute information of the terminal where the second application is located, where the preset algorithm is a preset conversion algorithm;
an information acquisition module 1701 for:
and calculating at least one of the hard disk information, the main board information and the equipment attribute information according to a preset conversion algorithm to obtain the equipment identifier.
Optionally, the information obtaining module 1701 is configured to:
and calling a state query program of the second application through the first application, so that the state query program returns the state information of the second application under the condition that the application information of the first application meets the verification condition of the second application.
Optionally, the application information of the first application satisfies the verification condition of the second application, including at least one of the following:
the executable file of the first application is located under the target directory;
the first application is provided with target copyright information;
the first application is provided with a digital signature;
the hash value of the first application hits the hash value in the preset list.
Optionally, the first state refers to a start state, and the server is used for responding to the state change request and returning a verification success message when the state information indicates that the second application is in the start state;
a state change module 1703 for:
the first application is started upon receipt of the authentication success message.
Optionally, the first state refers to a login state, and the server is used for responding to the state change request and returning a verification success message when the state information indicates that the second application is in the login state;
a state change module 1703 for:
And under the condition that the verification success message is received, controlling the first application to log in.
Optionally, the state change module 1703 is further configured to:
and controlling the first application to change to the first state when the time length after the state change request is sent reaches the target time length but the verification success message or the verification failure message is not received yet.
Optionally, the state change module 1703 is further configured to:
and under the condition that the verification failure message returned by the server is received, the first application is restored from the first state to the state before the state change.
Optionally, the server includes a first server and a second server, where the first server is associated with the first application, the second server is associated with the second application, and the request sending module 1702 is configured to:
the method comprises the steps that through a first application, a state change request is sent to a first server, the first server is used for forwarding the state change request to a second server, the second server is used for responding to the state change request, and under the condition that state information of the second application meets a state cooperation condition, a verification success message is sent to the first server, and the first server is also used for sending the verification success message to a terminal;
a state change module 1703 for:
And under the condition that a verification success message returned by the first server is received, controlling the first application to change to the first state.
Optionally, the state change module 1703 is further configured to:
receiving a state change instruction sent by a server, wherein the state change instruction is used for indicating to change a first application into a second state; the state change instruction is sent by the server when the state information of the second application after the change of the state of the second application does not meet the state cooperative condition, and the second state is the state required to be in by the first application when the second application is in the state indicated by the state information after the change;
the first application is controlled to change to the second state.
It should be noted that: the state coordination device provided in the above embodiment is only exemplified by the division of the above functional modules, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the state coordination device and the state coordination method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the state coordination device and the state coordination method are detailed in the method embodiments and are not repeated herein.
Fig. 18 is a schematic structural diagram of a state coordination device according to an embodiment of the present application, where the state coordination device is disposed in a server. Referring to fig. 18, the apparatus includes:
the request receiving module 1801 is configured to receive a state change request sent by the terminal through the first application, where the state change request is used to request to change the first application to the first state, and the state change request carries state information of the second application; the terminal is provided with a first application and a second application, and the first application and the second application have a dependency relationship;
the condition acquisition module 1802 is configured to acquire a state collaboration condition between the first application and the second application, where the state collaboration condition includes a condition that needs to be met by state information of the second application when the first application changes to the first state;
the message sending module 1803 is configured to return a verification success message to the terminal when the state information of the second application meets the state collaboration condition, where the terminal is configured to control the first application to change to the first state when the verification success message is received.
In the state coordination device provided by the embodiment of the application, under the condition that the first application and the second application have a dependency relationship, if the first application wants to change the state, the current state of the second application needs to be queried. The first application acquires the state information of the second application by calling a state query program provided by the second application, and provides the state information of the second application to the server, the server verifies whether the state cooperation condition is met, and the first application is allowed to change state under the condition that the verification is passed. Firstly, the state information is acquired by calling a state inquiry program, so that the acquisition process of the state information is not easy to interfere and destroy, and the accuracy of the state information is ensured. And the state information is verified through the server, so that the verification process of the state information is not easy to interfere and destroy, and the reliability of the verification process is ensured.
Optionally, referring to fig. 19, the apparatus further includes an instruction sending module 1804 for:
determining a second state based on the state cooperative condition under the condition that the changed state information of the second application does not meet the state cooperative condition, wherein the second state is a state required to be in by the first application when the second application is in a state indicated by the changed state information;
and sending a state change instruction to the terminal, wherein the state change instruction is used for indicating to change the first application into the second state.
Optionally, the instruction sending module 1804 is configured to:
periodically acquiring state information of a second application, and determining a second state based on the state cooperative condition under the condition that the acquired state information does not meet the state cooperative condition; or alternatively, the process may be performed,
and after the second application changes the state, acquiring changed state information of the second application, and determining the second state based on the state cooperative condition when the changed state information does not meet the state cooperative condition.
It should be noted that: the state coordination device provided in the above embodiment is only exemplified by the division of the above functional modules, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the server is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the state coordination device and the state coordination method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the state coordination device and the state coordination method are detailed in the method embodiments and are not repeated herein.
The embodiment of the application also provides a computer device, which comprises a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to realize the operations executed in the state coordination method of the embodiment.
Optionally, the computer device is provided as a terminal. Fig. 20 shows a schematic structural diagram of a terminal 2000 according to an exemplary embodiment of the present application. The terminal 2000 includes: a processor 2001 and a memory 2002.
Processor 2001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 2001 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). Processor 2001 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 2001 may integrate a GPU (Graphics Processing Unit, image processing interactor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 2001 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 2002 may include one or more computer-readable storage media, which may be non-transitory. Memory 2002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 2002 is used to store at least one computer program for being possessed by processor 2001 to implement the state coordination methods provided by method embodiments of the present application.
In some embodiments, the terminal 2000 may further optionally include: a peripheral interface 2003 and at least one peripheral. The processor 2001, memory 2002, and peripheral interface 2003 may be connected by a bus or signal line. The respective peripheral devices may be connected to the peripheral device interface 2003 through a bus, signal line, or circuit board. Optionally, the peripheral device comprises: at least one of radio frequency circuitry 2004, a display 2005, a camera assembly 2006, audio circuitry 2007, and a power supply 2008.
Peripheral interface 2003 may be used to connect I/O (Input/Output) related at least one peripheral device to processor 2001 and memory 2002. In some embodiments, processor 2001, memory 2002, and peripheral interface 2003 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 2001, memory 2002, and peripheral interface 2003 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 2004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 2004 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 2004 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 2004 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 2004 may communicate with other devices via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 2004 may also include NFC (Near Field Communication, short range wireless communication) related circuitry, which is not limiting of the application.
The display 2005 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 2005 is a touch display, the display 2005 also has the ability to capture touch signals at or above the surface of the display 2005. The touch signal may be input to the processor 2001 as a control signal for processing. At this point, the display 2005 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 2005 may be one and disposed on the front panel of the terminal 2000; in other embodiments, the display 2005 may be at least two, respectively disposed on different surfaces of the terminal 2000 or in a folded design; in other embodiments, the display 2005 may be a flexible display disposed on a curved surface or a folded surface of the terminal 2000. Even more, the display 2005 may be arranged in an irregular pattern that is not rectangular, i.e., a shaped screen. The display 2005 can be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 2006 is used to capture images or video. Optionally, the camera assembly 2006 includes a front camera and a rear camera. The front camera is disposed on the front panel of the terminal 2000, and the rear camera is disposed on the rear surface of the terminal 2000. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 2006 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
Audio circuitry 2007 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 2001 for processing, or inputting the electric signals to the radio frequency circuit 2004 for voice communication. For purposes of stereo acquisition or noise reduction, a plurality of microphones may be respectively disposed at different portions of the terminal 2000. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is then used to convert electrical signals from the processor 2001 or the radio frequency circuit 2004 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, audio circuit 2007 may also include a headphone jack.
Power supply 2008 is used to power the various components in terminal 2000. The power source 2008 may be alternating current, direct current, disposable battery, or rechargeable battery. When power supply 2008 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
It will be appreciated by those skilled in the art that the structure shown in fig. 20 is not limiting and that more or fewer components than shown may be included or certain components may be combined or a different arrangement of components may be employed.
Optionally, the computer device is provided as a server. Fig. 21 is a schematic structural diagram of a server according to an embodiment of the present application, where the server 2100 may have a relatively large difference due to configuration or performance, and may include one or more processors (Central Processing Units, CPU) 2101 and one or more memories 2102, where the memories 2102 store at least one computer program, and the at least one computer program is loaded and executed by the processors 2101 to implement the methods according to the above-described method embodiments. Of course, the server may also have a wired or wireless network interface, a keyboard, an input/output interface, and other components for implementing the functions of the device, which are not described herein.
The embodiment of the application also provides a computer readable storage medium, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the state coordination method of the above embodiment.
Embodiments of the present application also provide a computer program product comprising a computer program loaded and executed by a processor to implement the operations performed by the state coordination method of the above embodiments. In some embodiments, a computer program according to an embodiment of the present application may be deployed to be executed on one computer device or on multiple computer devices located at one site, or on multiple computer devices distributed across multiple sites and interconnected by a communication network, where the multiple computer devices distributed across multiple sites and interconnected by a communication network may constitute a blockchain system.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the embodiments of the application is merely illustrative of the principles of the embodiments of the present application, and various modifications, equivalents, improvements, etc. may be made without departing from the spirit and principles of the embodiments of the application.

Claims (15)

1. A state coordination method is characterized by being executed by a terminal, wherein the terminal is provided with a first application and a second application, and the first application and the second application have a dependency relationship; the method comprises the following steps:
responding to a state change operation for changing the first application into a first state, and calling a state query program of the second application through the first application to acquire state information of the second application;
sending, by the first application, a state change request to a server, where the state change request is used to request to change the first application to the first state, the state change request carries state information of the second application, and the server is used to respond to the state change request, and return a verification success message when the state information of the second application meets a state coordination condition, where the state coordination condition includes a condition that the state information of the second application needs to be met when the first application is changed to the first state;
And under the condition that the verification success message returned by the server is received, controlling the first application to be changed into the first state.
2. The method of claim 1, wherein the status information comprises a plurality of status sub-information, the status inquiry program comprises a plurality of status inquiry programs, each status inquiry program is configured to obtain at least one status sub-information; the step of calling the state query program of the second application through the first application to acquire the state information of the second application includes:
and respectively calling a plurality of state inquiry programs of the second application through the first application to acquire state sub-information corresponding to each state inquiry program.
3. The method according to claim 1, wherein the calling, by the first application, the state query program of the second application to obtain the state information of the second application includes:
calling a state query program of the second application through the first application to acquire information to be processed of the second application;
and processing the information to be processed according to a preset algorithm to obtain the state information.
4. A method according to claim 3, wherein the status information comprises login information, the information to be processed comprises path information and password information, and the preset algorithm is a preset encryption algorithm;
The processing the information to be processed according to a preset algorithm to obtain the state information comprises the following steps:
acquiring encrypted login information in a storage path indicated by the path information;
and decrypting the encrypted login information by adopting the password information according to the preset encryption algorithm to obtain the login information.
5. The method according to claim 3, wherein the status information includes a device identifier, the device identifier is used for indicating a terminal where the second application is located, the information to be processed includes at least one of hard disk information, motherboard information, and device attribute information of the terminal where the second application is located, and the preset algorithm is a preset conversion algorithm;
the processing the information to be processed according to a preset algorithm to obtain the state information comprises the following steps:
and calculating at least one of the hard disk information, the main board information and the equipment attribute information according to the preset conversion algorithm to obtain the equipment identifier.
6. The method according to claim 1, wherein the calling, by the first application, the state query program of the second application to obtain the state information of the second application includes:
And calling a state query program of the second application through the first application, so that the state query program returns the state information of the second application under the condition that the application information of the first application meets the verification condition of the second application.
7. The method of claim 1, wherein after the sending, by the first application, a state change request to a server, the method further comprises:
and controlling the first application to change to the first state when the time length after the state change request is sent reaches the target time length but the verification success message or the verification failure message is not received yet.
8. The method according to claim 1, wherein upon receiving the authentication success message returned by the server, the method further comprises, after controlling the first application to change to the first state:
receiving a state change instruction sent by the server, wherein the state change instruction is used for indicating to change the first application into a second state; the state change instruction is sent by the server when the state information of the second application after the change of the state of the second application does not meet the state cooperation condition, and the second state is the state required by the first application when the second application is in the state indicated by the state information after the change;
And controlling the first application to change to the second state.
9. A method of state collaboration, performed by a server, the method comprising:
receiving a state change request sent by a terminal through a first application, wherein the state change request is used for requesting to change the first application into the first state, and the state change request carries state information of a second application; the terminal is provided with the first application and the second application, and a dependency relationship exists between the first application and the second application;
acquiring a state coordination condition between the first application and the second application, wherein the state coordination condition comprises a condition which needs to be met by state information of the second application when the first application is changed to the first state;
and returning a verification success message to the terminal under the condition that the state information of the second application meets the state cooperative condition, wherein the terminal is used for controlling the first application to be changed into the first state under the condition that the verification success message is received.
10. The method according to claim 9, wherein, in case the state information of the second application satisfies the state cooperation condition, after returning a verification success message to the terminal, the method further comprises:
Determining a second state based on the state cooperative condition under the condition that the changed state information of the second application does not meet the state cooperative condition, wherein the second state is a state required to be in by the first application when the second application is in a state indicated by the changed state information;
and sending a state change instruction to the terminal, wherein the state change instruction is used for indicating to change the first application into the second state.
11. The state coordination device is characterized by being arranged in a terminal, wherein the terminal is provided with a first application and a second application, and the first application and the second application have a dependency relationship; the device comprises:
the information acquisition module is used for responding to a state change operation for changing the first application into a first state, calling a state query program of the second application through the first application, and acquiring state information of the second application;
a request sending module, configured to send, through the first application, a state change request to a server, where the state change request is used to request that the first application is changed to the first state, where the state change request carries state information of the second application, and the server is configured to respond to the state change request, and return, in a case where the state information of the second application meets a state coordination condition, a verification success message, where the state coordination condition includes a condition that needs to be met by the state information of the second application when the first application is changed to the first state;
And the state changing module is used for controlling the first application to change to the first state under the condition that the verification success message returned by the server is received.
12. A state coordination device, characterized in that it is provided in a server, the device comprising:
the request receiving module is used for receiving a state change request sent by the terminal through a first application, wherein the state change request is used for requesting to change the first application into the first state, and the state change request carries state information of a second application; the terminal is provided with the first application and the second application, and a dependency relationship exists between the first application and the second application;
the condition acquisition module is used for acquiring a state cooperative condition between the first application and the second application, wherein the state cooperative condition comprises a condition which needs to be met by the state information of the second application when the first application is changed to the first state;
the message sending module is used for returning a verification success message to the terminal when the state information of the second application meets the state cooperative condition, and the terminal is used for controlling the first application to be changed into the first state when the verification success message is received.
13. A computer device comprising a processor and a memory, wherein the memory has stored therein at least one computer program that is loaded and executed by the processor to implement the operations performed by the state coordination method of any of claims 1 to 8 or the operations performed by the state coordination method of any of claims 9 to 10.
14. A computer readable storage medium, wherein at least one computer program is stored in the computer readable storage medium, the at least one computer program being loaded and executed by a processor to implement operations performed by the state coordination method of any one of claims 1 to 8 or to implement operations performed by the state coordination method of any one of claims 9 to 10.
15. A computer program product comprising a computer program, wherein the computer program is loaded and executed by a processor to implement the operations performed by the state coordination method of any of claims 1 to 8 or to implement the operations performed by the state coordination method of any of claims 9 to 10.
CN202310765029.8A 2023-06-26 2023-06-26 State coordination method, device, computer equipment and storage medium Pending CN116954693A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310765029.8A CN116954693A (en) 2023-06-26 2023-06-26 State coordination method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310765029.8A CN116954693A (en) 2023-06-26 2023-06-26 State coordination method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116954693A true CN116954693A (en) 2023-10-27

Family

ID=88453929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310765029.8A Pending CN116954693A (en) 2023-06-26 2023-06-26 State coordination method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116954693A (en)

Similar Documents

Publication Publication Date Title
US11075955B2 (en) Methods and systems for use in authorizing access to a networked resource
US10083290B2 (en) Hardware-based device authentication
CN112422532B (en) Service communication method, system and device and electronic equipment
US9386045B2 (en) Device communication based on device trustworthiness
US9270674B2 (en) Validating the identity of a mobile application for mobile application management
CN108632253B (en) Client data security access method and device based on mobile terminal
US10762209B2 (en) Boot security
EP2486509B1 (en) Platform security
CN111737366B (en) Private data processing method, device, equipment and storage medium of block chain
WO2022193513A1 (en) Docker-based data processing method and related device
CN112765684B (en) Block chain node terminal management method, device, equipment and storage medium
US11695650B2 (en) Secure count in cloud computing networks
US10579830B1 (en) Just-in-time and secure activation of software
EP2795522B1 (en) Techniques to store secret information for global data centers
EP3085007B1 (en) Push-based trust model for public cloud applications
CN116954693A (en) State coordination method, device, computer equipment and storage medium
CN104717235B (en) A kind of resources of virtual machine detection method
CN115623013A (en) Strategy information synchronization method, system and related product
CN117278323B (en) Third party information acquisition method, electronic equipment and readable storage medium
Rayapuri A Survey of Security and Privacy in Mobile Cloud Computing
WO2023022838A1 (en) Edge-based enterprise network security appliance and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication