CN110808852A - Equipment environment correction method and device, and environment information processing method and device - Google Patents

Equipment environment correction method and device, and environment information processing method and device Download PDF

Info

Publication number
CN110808852A
CN110808852A CN201911017482.0A CN201911017482A CN110808852A CN 110808852 A CN110808852 A CN 110808852A CN 201911017482 A CN201911017482 A CN 201911017482A CN 110808852 A CN110808852 A CN 110808852A
Authority
CN
China
Prior art keywords
environment
current
instruction
request
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.)
Granted
Application number
CN201911017482.0A
Other languages
Chinese (zh)
Other versions
CN110808852B (en
Inventor
韩凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Reach Best Technology Co Ltd
Original Assignee
Reach Best Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Reach Best Technology Co Ltd filed Critical Reach Best Technology Co Ltd
Priority to CN201911017482.0A priority Critical patent/CN110808852B/en
Publication of CN110808852A publication Critical patent/CN110808852A/en
Application granted granted Critical
Publication of CN110808852B publication Critical patent/CN110808852B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration

Abstract

The present disclosure relates to a method and an apparatus for correcting an environment of a device, a method and an apparatus for processing environment information, a device, a server, and a storage medium. The method for correcting the environment of the equipment is applied to the equipment provided with the preset application program and comprises the following steps: sending a first request to a server of a preset application program, wherein the first request is used for acquiring description information of a target environment of current equipment from the server; comparing the description information of the current environment of the current equipment with the obtained description information of the target environment; if the two are not in accordance, determining the difference between the two and the difference environment information corresponding to the difference; sending a second request carrying the difference environment information to the server, wherein the second request is used for acquiring a first instruction from the server based on the difference environment information; the first instruction is executed to enable the current environment of the current device to reach the target environment. The realization process of the method does not need manual operation, achieves the purpose of automatically correcting the environment, and saves the labor cost.

Description

Equipment environment correction method and device, and environment information processing method and device
Technical Field
The present disclosure relates to the field of communications, and in particular, to a method and an apparatus for correcting an environment of a device, a method and an apparatus for processing environment information, a device, a server, and a storage medium.
Background
In recent years, with the rapid development of the internet industry, the number of company servers is rapidly increased, and the management of operation and maintenance resources is greatly challenged. The basic environment management is the core content of the automatic operation and maintenance management. According to the theory of entropy increase, the system always goes from order to disorder spontaneously, and a large amount of manpower must be invested for maintenance in order to keep the equipment environment stable.
In the related art, an operation and maintenance management system performs basic environment management based on a process, and the implementation scheme is as follows: and installing basic environments such as software packages, accounts, authorities, networks and the like in an initialization stage before the delivery of the equipment.
However, after the equipment is delivered, no management means is provided for the environment of the equipment, and only the operation and maintenance personnel can perform manual operation according to the environmental problems fed back by the user, so that the labor consumption is large, and the labor cost is high.
Disclosure of Invention
The present disclosure provides a method and an apparatus for correcting an equipment environment, a method and an apparatus for processing environmental information, an equipment, a server, and a storage medium, so as to solve at least a problem of high labor cost caused by maintaining the equipment environment. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for correcting a device environment, which is applied to a device installed with a preset application program, the method including:
sending a first request to a server of the preset application program, wherein the first request is used for acquiring description information of a target environment of current equipment from the server, and the target environment refers to a target hardware environment and a target software environment which are related to the running of the application program on the current equipment;
comparing the description information of the current environment of the current equipment with the acquired description information of the target environment;
if the current environment is not consistent with the target environment through comparison, determining the difference between the current environment and the target environment and difference environment information corresponding to the difference;
sending a second request carrying the difference environment information to the server, wherein the second request is used for acquiring a first instruction from the server based on the difference environment information, and the first instruction is used for indicating to correct the environment of the current device;
executing the first instruction to enable the current environment of the current device to reach the target environment.
In an embodiment, before the comparing the description information of the current environment of the current device with the acquired description information of the target environment, the environment correction method further includes:
if the initial environment cannot be detected on the current equipment, sending a third request to the server, wherein the third request is used for acquiring a second instruction from the server, and the second instruction is used for indicating that the initial environment is installed on the current equipment;
executing the second instruction to install the initial environment on the current device, wherein the current environment of the current device is generated in the process of running the application program in the initial environment.
In an embodiment, the initial environment installed on the current device is determined by a node location of the current device on a service structure of the server.
In an embodiment, the service structure includes a parent node and a child node, a public environment of all services is set on the parent node, a respective environment of each service is set on the child node, each child node inherits the environment on all respective upstream nodes, and the current device accesses the child node.
In one embodiment, the environmental correction method further comprises:
reporting the description information of the current environment of the server to the server;
receiving a third instruction returned by the server after determining that the current environment of the current device changes, wherein the third instruction is used for instructing the current device to change the current environment of the current device into the current environment of the current access node;
and executing the third instruction to enable the current environment of the current equipment to reach the current environment of the current access node.
According to a second aspect of the embodiments of the present disclosure, there is provided an environment information processing method applied to a server of a preset application program, the environment information processing method including:
receiving a first request sent by equipment provided with the preset application program, wherein the first request is used for acquiring description information of a target environment of the equipment from the server, and the target environment refers to a target hardware environment and a target software environment which are related to the running of the application program on the equipment;
obtaining the description information of the target environment of the equipment according to the first request, and returning the description information of the target environment of the equipment to the equipment;
receiving a second request which is sent by the equipment and carries differential environment information, wherein the second request is used for acquiring a first instruction from the server based on the differential environment information, and the first instruction is used for indicating to correct the environment of the equipment;
and acquiring the first instruction according to the second request, and returning the first instruction to the equipment.
In an embodiment, the obtaining description information of the target environment of the device according to the first request includes:
obtaining the description information of the current environment of the node to which the equipment is currently accessed according to the equipment identifier carried in the first request;
and using the description information of the current environment of the node currently accessed by the equipment as the description information of the target environment of the equipment.
In an embodiment, before the receiving a first request sent by a device installed with the preset application program, the method for processing environment information further includes:
receiving a third request sent by the equipment, wherein the third request is used for acquiring a second instruction from the server, and the second instruction is used for indicating that an initial environment is installed on the equipment;
acquiring the second instruction according to the third request;
returning the second instruction to the device.
In one embodiment, the environment information processing method further includes:
receiving description information of the current environment of the equipment reported by the equipment;
obtaining description information of the current environment of a node to which the equipment is currently accessed;
if the current environment of the equipment is determined to change according to the received description information of the current environment of the equipment and the acquired description information of the current environment of the node to which the equipment is currently accessed, acquiring a node identifier of the node to which the equipment is currently accessed;
using the obtained node identification to inquire a corresponding relation between a prestored node identification and a third instruction to obtain a corresponding third instruction, wherein the third instruction is used for instructing the equipment to change the current environment of the equipment into the current environment of the currently accessed node;
returning the third instruction to the device.
In one embodiment, the environment information processing method further includes:
determining a node selected by an operator from a service structure, wherein the service structure comprises a father node and a son node;
receiving and storing the description information of the environment added by the operator for the selected node;
generating and storing instructions to be executed by a device accessing the selected node based on the description information of the current environment of the selected node, wherein the instructions comprise the first instruction, the second instruction or the third instruction.
In an embodiment, after the receiving and saving the description information of the environment added by the operator for the selected node, the environment information processing method further includes:
determining a node to be modified;
receiving and storing the description information of the environment modified by the operator for the node to be modified;
generating and storing instructions to be executed by the device accessing the node to be modified based on the description information of the modified environment of the node to be modified, wherein the instructions to be executed by the device accessing the node to be modified include the first instruction, the second instruction or the third instruction.
In an embodiment, the determining the node to be modified includes:
determining the nodes to be modified in batches;
the receiving and storing the description information of the environment modified by the operator for the node to be modified includes:
and receiving and storing the description information of the environment modified by the operator for the nodes to be modified in batches.
According to a third aspect of the embodiments of the present disclosure, there is provided a device environment correction apparatus, which is applied to a device installed with a preset application program, the apparatus environment correction apparatus including:
a first sending module, configured to send a first request to a server of the preset application program, where the first request is used to obtain description information of a target environment of current equipment from the server, and the target environment refers to a target hardware environment and a target software environment related to application program operation on the current equipment;
a comparison module configured to compare description information of a current environment of the current device with description information of the target environment acquired based on the first request sent by the first sending module;
a determining module configured to determine a difference between the current environment and the target environment and difference environment information corresponding to the difference if the comparing module compares that the current environment does not conform to the target environment;
a second sending module, configured to send, to the server, a second request carrying the difference environment information determined by the determining module, where the second request is used to obtain a first instruction from the server based on the difference environment information, and the first instruction is used to instruct to correct the environment of the current device;
a first execution module configured to execute the first instruction obtained based on the second request sent by the second sending module, so that the current environment of the current device reaches the target environment.
In one embodiment, the environmental correction apparatus further includes:
a third sending module, configured to send a third request to the server if an initial environment is not detected on the current device before the comparing module compares the description information of the current environment of the current device with the acquired description information of the target environment, where the third request is used to acquire a second instruction from the server, and the second instruction is used to instruct to install the initial environment on the current device;
a second executing module configured to execute the second instruction obtained based on the third request sent by the third sending module to install the initial environment on the current device, wherein the current environment of the current device is generated in a process of running the application program in the initial environment.
In an embodiment, the initial environment installed on the current device is determined by a node location of the current device on a service structure of the server.
In an embodiment, the service structure includes a parent node and a child node, a public environment of all services is set on the parent node, a respective environment of each service is set on the child node, each child node inherits the environment on all respective upstream nodes, and the current device accesses the child node.
In one embodiment, the environmental correction apparatus further includes:
the reporting module is configured to report the description information of the current environment of the reporting module to the server;
a receiving module, configured to receive a third instruction returned by the server after determining that the current environment of the current device changes according to the description information reported by the reporting module, where the third instruction is used to instruct the current device to change its current environment into the current environment of the current access node;
a third executing module configured to execute the third instruction received by the receiving module so that the current environment of the current device reaches the current environment of the current access node.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an environment information processing apparatus, which is applied to a server of a preset application program, the environment information processing apparatus including:
the first receiving module is configured to receive a first request sent by a device installed with the preset application program, wherein the first request is used for acquiring description information of a target environment of the device from the server, and the target environment refers to a target hardware environment and a target software environment related to application program operation on the device;
a first obtaining and returning module configured to obtain the description information of the target environment of the device according to the first request received by the first receiving module, and return the description information of the target environment of the device to the device;
a second receiving module, configured to receive a second request carrying difference environment information and sent by the device, where the second request is used to obtain a first instruction from the server based on the difference environment information, and the first instruction is used to instruct to correct an environment of the device;
a second obtaining and returning module configured to obtain the first instruction according to the second request received by the second receiving module, and return the first instruction to the device.
In one embodiment, the first acquisition return module comprises:
a first obtaining submodule configured to obtain, according to an equipment identifier carried in the first request, description information of a current environment of a node to which the equipment is currently accessed;
a first determining submodule configured to use the description information of the current environment of the node to which the device is currently accessed, acquired by the first acquiring submodule, as the description information of the target environment of the device.
In one embodiment, the environment information processing apparatus further includes:
a third receiving module, configured to receive a third request sent by the device before the first receiving module receives a first request sent by the device installed with the preset application program, where the third request is used to obtain a second instruction from the server, and the second instruction is used to instruct to install an initial environment on the device;
a third obtaining module configured to obtain the second instruction according to the third request received by the third receiving module;
a first returning module configured to return the second instruction acquired by the third acquiring module to the device.
In one embodiment, the environment information processing apparatus further includes:
a fourth receiving module, configured to receive description information of a current environment of the device, which is reported by the device;
a fourth obtaining module, configured to obtain description information of a current environment of a node to which the device is currently accessed;
a determining and obtaining module configured to obtain a node identifier of a node to which the device is currently accessed if it is determined that the current environment of the device changes according to the description information of the current environment of the device received by the fourth receiving module and the description information of the current environment of the node to which the device is currently accessed, which is obtained by the fourth obtaining module;
a query obtaining module configured to query a correspondence between a prestored node identifier and a third instruction by using the node identifier obtained by the determination obtaining module to obtain a corresponding third instruction, where the third instruction is used to instruct the device to change its current environment into the current environment of the currently accessed node;
a second returning module configured to return the third instruction obtained by the query obtaining module to the device.
In one embodiment, the environment information processing apparatus further includes:
a first determination module configured to determine a node selected by an operator from a service structure, the service structure including a parent node and a child node;
a first receiving and saving module configured to receive and save description information of an environment in which the operator determines the addition of the selected node for the first determining module;
a first generation and storage module configured to generate and store instructions to be executed by a device accessing the selected node, based on the description information of the current environment of the selected node stored by the first reception and storage module, where the instructions include the first instruction, the second instruction, or the third instruction.
In one embodiment, the environment information processing apparatus further includes:
a second determining module configured to determine a node to be modified after the first receiving and storing module receives and stores the description information of the environment added by the operator for the selected node;
the second receiving and storing module is configured to receive and store the description information of the environment modified by the node to be modified, which is determined by the operator for the second determining module;
a second generation and storage module, configured to generate and store an instruction that needs to be executed by the device accessing the node to be modified, based on the description information of the modified environment of the node to be modified, which is stored by the second reception and storage module, where the instruction that needs to be executed by the device accessing the node to be modified includes the first instruction, the second instruction, or the third instruction.
In an embodiment, the second determination module is configured to:
determining the nodes to be modified in batches;
the second reception saving module is configured to:
and receiving and storing the description information of the environment modified by the operator for the nodes to be modified in batches.
According to a fifth aspect of embodiments of the present disclosure, there is provided an apparatus comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method for correcting the environment of the device described above.
According to a sixth aspect of embodiments of the present disclosure, there is provided a server including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the above-mentioned environmental information processing method.
According to a seventh aspect of embodiments of the present disclosure, there is provided a storage medium in which instructions, when executed by a processor of a device, enable the device to perform the above-described method of correcting a device environment.
According to an eighth aspect of embodiments of the present disclosure, there is provided a storage medium having instructions that, when executed by a processor of a server, enable the server to perform the above-described environment information processing method.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the method comprises the steps of comparing description information of the current environment of current equipment with obtained description information of a target environment, determining the difference between the current environment and the target environment and difference environment information corresponding to the difference when the current environment is not consistent with the target environment through comparison, sending a second request carrying the difference environment information to a server, obtaining a first instruction from the server, and executing the first instruction, so that the current environment of the current equipment reaches the target environment, manual operation is not needed in the whole implementation process, the purpose of automatically correcting the environment is achieved, and the labor cost is saved.
The description information of the target environment of the equipment is obtained and returned to the equipment according to the first request, then a second request which is sent by the equipment and carries the difference environment information is received, the first instruction is obtained according to the second request, and the first instruction is returned to the equipment, so that the equipment can execute the first instruction, and the purpose of automatically correcting the environment is achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flowchart illustrating a method for correcting an environment of a device according to an exemplary embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating another method for correcting an environment of a device according to an exemplary embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating another method for correcting an environment of a device according to an exemplary embodiment of the present disclosure.
Fig. 4 is a flowchart illustrating an environmental information processing method according to an exemplary embodiment of the present disclosure.
Fig. 5 is a flowchart illustrating another environment information processing method according to an exemplary embodiment of the present disclosure.
Fig. 6 is a flowchart illustrating another environment information processing method according to an exemplary embodiment of the present disclosure.
Fig. 7 is a signaling flow diagram illustrating a method for correcting a device environment according to an exemplary embodiment of the present disclosure.
Fig. 8A is a block diagram of a device environment correction apparatus according to an exemplary embodiment of the present disclosure.
Fig. 8B is a block diagram of another apparatus environment correction apparatus according to an exemplary embodiment of the present disclosure.
Fig. 8C is a block diagram of another apparatus environment correction apparatus according to an exemplary embodiment of the present disclosure.
Fig. 9A is a block diagram of an environment information processing module shown in an exemplary embodiment of the present disclosure.
Fig. 9B is a block diagram illustrating another environment information processing module according to an exemplary embodiment of the present disclosure.
Fig. 9C is a block diagram illustrating another environment information processing module according to an exemplary embodiment of the present disclosure.
Fig. 9D is a block diagram illustrating another environment information processing module according to an exemplary embodiment of the present disclosure.
Fig. 9E is a block diagram illustrating another environment information processing module according to an exemplary embodiment of the present disclosure.
Fig. 9F is a block diagram illustrating another environment information processing module according to an exemplary embodiment of the present disclosure.
Fig. 10 is a block diagram of an apparatus shown in an exemplary embodiment of the present disclosure.
Fig. 11 is a block diagram of a server shown in an exemplary embodiment of the present disclosure.
Fig. 12 is a block diagram illustrating a method of correcting an environment of a device or a method of processing environment information according to an exemplary embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a method for correcting a device environment according to an exemplary embodiment of the present disclosure, where the environment in the present disclosure refers to a hardware environment and a software environment related to an application program running on a device, and the method for correcting the device environment is used in the device installed with a preset application program, as illustrated in fig. 1, the method for correcting the device environment includes the following steps:
in step S101, a first request is sent to a server of a preset application, where the first request is used to obtain description information of a target environment of a current device from the server, and the target environment refers to a target hardware environment and a target software environment related to application running on the current device.
In this embodiment, in order to automatically correct the device, a preset application is installed on the device. The default application is a service, such as an agent service, that needs to open a resident process to perform a certain function. Wherein the application running on the device comprises the preset application.
In this embodiment, a preset application located in the current device, for example, an agent service, may send a first request to a server of the preset application every preset duration, where the first request is used to obtain description information of a target environment of the current device from the server. After receiving the first request, the server acquires the current environment description information of the node accessed by the current device according to the current device identifier carried in the first request, takes the acquired current environment description information of the node accessed by the current device as the description information of the target environment of the current device, and then returns the description information of the target environment of the current device to the current device.
The preset time length can be flexibly set according to needs, such as 1 minute and the like.
In this embodiment, the operator may represent the devices as a service structure, such as a service tree, based on organization, product line, cluster, service, and the like relationships. The service end can store the service structure, the service structure comprises a father node and a child node, a public environment of all services is arranged on the father node, an environment of each service is arranged on the child node, each child node inherits the environment of each upstream node, and the device accesses the child node. It should be noted that the child node accessed by the device is the last layer child node of the service structure, such as a service tree.
The public environment may include the following three types: the first is basic configuration, including but not limited to account number, authority, Yellow dog Updater (yum) package, timing task, etc., the second is a general tool, the general tool is a tool that does not need to start a resident process, the third is user-defined service, and the user-defined service is a service that needs to start a resident process and complete a certain function.
In this embodiment, the current environment of the node to which each device has access is the target environment of the device, and the current environment of each node includes the environment on each node and the environment on the respective upstream node to which each node inherits. Since the child nodes can inherit the environment of the respective upstream nodes, that is, can inherit the public environment of the upstream nodes, that is, the public environment is not required to be set repeatedly, it is possible to realize flexible management of the public environment.
In this embodiment, the environment description information on each node may include, but is not limited to, the following: node identification, target environment, atomic operations performed, whether corrections need to be made, etc.
The operator can package some common operations into atomic operations, and the atomic operations are used as general operation templates so as to be convenient for direct use when adding the description information of the environment or modifying the description information of the environment. For example, package yum, check yum, check key information, etc. are packaged into an atomic operation.
In addition to the generic operation template, the operator may also customize the operation template. In this embodiment, the server may display a template addition entry, and an operator may add a custom operation template through the template addition entry, and the server receives and stores the custom operation template added by the operator.
In this embodiment, the operator may select a node from a pre-stored service structure and add context description information for the selected node. The server side stores the description information of the environment added by the operator for the selected node, and generates and stores an instruction to be executed by the equipment accessing the selected node according to the description information of the current environment of the node, wherein the instruction comprises the operation information to be executed by the equipment accessing the node, such as an operation name to be executed.
The process of adding the description information of the environment to the selected node by the operator may include: and displaying operation templates which can be selected by an operator, wherein the operation templates comprise a general operation template and a custom operation template, and receiving the operation template which is currently selected by the operator for the selected node.
In the embodiment, the operation template which can be selected by the operator is displayed, and the operation template which is currently selected by the operator for the selected node is received and stored, so that the description information of the environment can be simply and quickly added or modified for the node.
In step S102, the description information of the current environment of the current device is compared with the acquired description information of the target environment.
In step S103, if the current environment and the target environment are not matched, the difference between the current environment and the target environment and the difference environment information corresponding to the difference are determined.
In step S104, a second request carrying the difference environment information is sent to the server, where the second request is used to obtain a first instruction from the server based on the difference environment information, and the first instruction is used to instruct to correct the environment of the current device.
After the description information of the target environment of the current device is acquired, the description information of the current environment of the current device is compared with the acquired description information of the target environment, and if the current environment is the same as the target environment through comparison, correction is not needed. If the current environment is not consistent with the target environment through comparison, namely, the current environment and the target environment are different, and an environment needing to be corrected exists in the different environment, the difference between the current environment and the target environment and the difference environment information corresponding to the difference are determined, a second request carrying the difference environment information is sent to the server, and after the second request, the server can obtain a first instruction based on the difference environment information, wherein the first instruction is used for indicating to correct the environment of the current device and returning the first instruction to the current device.
For example, if the current state of the current device is less than the target state and the plugin 1 is installed, a second request carrying the identifier of the plugin 1 is sent to the server, the server acquires that the operations to be executed for installing the plugin 1 are the operation 11 and the operation 12 according to the identifier of the plugin 1, and the execution sequence is the operation 11 executed first and then the operation 12 is executed, the server returns a first instruction, and the first instruction comprises the operation 11, the operation 12 and the execution sequence thereof.
In step S105, a first instruction is executed to bring the current environment of the current device to the target environment.
After the first instruction is obtained, the first instruction is executed, so that the current environment of the current equipment reaches the target environment, and the purpose of automatically correcting the environment is achieved.
For example, if the received first instruction includes operations 11 and 12 and the execution order thereof, operations 11 and 12 may be executed in the execution order included in the first instruction.
In the embodiment, the description information of the current environment of the current device is compared with the obtained description information of the target environment, when the current environment is not consistent with the target environment, the difference between the current environment and the target environment and the difference environment information corresponding to the difference are determined, then a second request carrying the difference environment information is sent to the server, so that the first instruction is obtained from the server, and the first instruction is executed, so that the current environment of the current device reaches the target environment, the whole implementation process does not need manual operation, the purpose of automatically correcting the environment is achieved, and the labor cost is saved.
Fig. 2 is a flowchart illustrating another method for correcting an environment of a device according to an exemplary embodiment of the disclosure, and as shown in fig. 2, before the step S101, the method for correcting an environment of a device may further include:
in step S201, if the initial environment is not detected on the current device, a third request is sent to the server, where the third request is used to obtain a second instruction from the server, and the second instruction is used to instruct to install the initial environment on the current device.
Each device needs to install an initial environment, and if a preset application program such as an agent service cannot detect the initial environment on the current device, a third request can be sent to the server, the third request is used for obtaining a second instruction from the server, and the second instruction is used for indicating that the initial environment is installed on the current device. After receiving the third request, the server obtains the node identifier of the node to which the current device is accessed according to the current device identifier carried in the third request, obtains a second instruction according to the node identifier, and then returns the second instruction to the current device.
The initial environment refers to an initial hardware environment and an initial software environment related to the running of the application program on the current device. The initial environment installed on the current device is determined by the current device at the location of the node on the service structure, e.g., service tree, of the service side.
In this embodiment, when saving the initial environment added by the operator for the selected node, the server may further generate a second instruction based on the initial environment of the node.
In step S202, a second instruction is executed to install an initial environment on the current device, wherein the current environment of the current device is generated during the application program running in the initial environment.
And after the second instruction is acquired, executing the second instruction, thereby realizing automatic installation of the initial environment.
According to the embodiment, the third request is sent to the server side, the second instruction is obtained from the server side, and the second instruction is executed, so that the initial environment is installed, the whole process is automatically achieved, manual operation is not needed, and labor cost is greatly saved.
Fig. 3 is a flowchart illustrating another method for correcting an environment of a device according to an exemplary embodiment of the present disclosure, where as shown in fig. 3, the method for correcting an environment of a device may further include:
in step S301, the description information of the current environment of the server is reported to the server.
The current device can report the description information of the current environment of the current device to the server at regular time.
In step S302, a third instruction returned by the server after determining that the current environment of the current device changes is received, where the third instruction is used to instruct the current device to change the current environment of the current device to the current environment of the current access node.
In this embodiment, the device may be changed or migrated. The device change refers to a device reinstallation, a device reboot, an update operation, or the like, and the device migration refers to a change of an access node of the device, for example, from a node a to a node B.
After the device is changed or migrated, the server determines that the current environment of the device changes by receiving the current environment reported by the device, acquires a node identifier of a node to which the device is currently accessed, and queries a corresponding relationship between a prestored node identifier and a third instruction by using the acquired node identifier to obtain a corresponding third instruction, wherein the third instruction is used for instructing the device to change the current environment of the device into the current environment of the node to which the device is currently accessed.
For example, when the current device is reinstalled, the current environment of the current device is empty, the current device reports the current environment of the current device to the server at regular time, and when the server finds that the current environment of the current device changes, a third instruction is returned to the current device according to the target environment of the current device, where the third instruction is used to instruct the current device to change the current environment of the current device to the current environment of the current access node, and the third instruction includes an operation to be executed to install the target environment and an execution sequence thereof.
In step S303, a third instruction is executed to make the current environment of the current device reach the current environment of the current accessed node.
And after the third operation is obtained, executing the third operation to enable the current environment of the current equipment to reach the current environment of the current access node, thereby achieving the purpose of automatically correcting the environment.
In the embodiment, the third instruction returned by the server after determining that the current environment of the current device changes is received, and the third instruction is executed, so that the current environment of the current device reaches the current environment of the currently accessed node, and the purpose of automatically correcting the environment is achieved.
Fig. 4 is a flowchart illustrating an environment information processing method according to an exemplary embodiment of the present disclosure, where the embodiment is described from a server side of a preset application, and as shown in fig. 4, the environment information processing method includes:
in step S401, a first request sent by a device installed with a preset application is received, where the first request is used to obtain description information of a target environment of the device from a server, and the target environment refers to a target hardware environment and a target software environment related to application running on the device.
In step S402, the description information of the target environment of the device is acquired according to the first request, and the description information of the target environment of the device is returned to the device.
In this embodiment, after receiving a first request sent by a device, a server may obtain, according to a device identifier carried in the first request, description information of a current environment of a node to which the device is accessed, use the description information of the current environment as description information of a target environment of the device, and then return the description information of the target environment to the device.
In step S403, a second request carrying the difference environment information and sent by the device is received, where the second request is used to obtain a first instruction from the server based on the difference environment information, and the first instruction is used to instruct to correct the environment of the device.
In step S404, the first instruction is obtained according to the second request, and the first instruction is returned to the device.
The method comprises the steps that after the device receives description information of a target environment, the description information of the current environment of the device is compared with the description information of the target environment, when the current environment is not consistent with the target environment, the difference between the current environment and the target environment and difference environment information corresponding to the difference are determined, a second request carrying the difference environment information is sent to a server, after the server receives the second request, a first instruction can be obtained based on the difference environment information carried in the second request, and the first instruction is used for indicating to correct the environment of the device and returning the first instruction to the device. After receiving the first instruction, the equipment executes the first instruction, so that the current environment of the equipment reaches the target environment, and the purpose of automatically correcting the environment is achieved.
In the embodiment, the description information of the target environment of the device is obtained and returned to the device according to the first request, then the second request carrying the difference environment information sent by the device is received, the first instruction is obtained according to the second request, and the first instruction is returned to the device, so that the device can execute the first instruction, and the purpose of automatically correcting the environment is achieved.
Fig. 5 is a flowchart illustrating another environment information processing method according to an exemplary embodiment of the disclosure, and as shown in fig. 5, before step S401, the environment information processing method may further include:
in step S501, a third request sent by the device is received, where the third request is used to obtain a second instruction from the server, and the second instruction is used to instruct to install the initial environment on the device.
In step S502, a second instruction is acquired according to the third request.
In this embodiment, when the device needs to install the initial environment, a third request may be sent to the server. The third request carries the device identifier. After receiving the third request, the server may obtain a node identifier of a node to which the device is accessed according to the device identifier, and obtain the second instruction according to the node identifier.
In step S503, a second instruction is returned to the apparatus.
In the above embodiment, the second instruction is obtained according to the third request, and the second instruction is returned to the device, so that the device can execute the second instruction, thereby implementing automatic installation of the initial environment.
Fig. 6 is a flowchart illustrating another environment information processing method according to an exemplary embodiment of the disclosure, where as shown in fig. 6, the environment information processing method may further include:
in step S601, description information of the current environment of the device reported by the device is received.
The device can report the description information of the current environment of the device to the server at regular time.
In step S602, description information of the current environment of the node to which the device is currently accessed is acquired.
After receiving the description information of the current environment reported by the device, the server may obtain the description information of the current environment of the node to which the device is currently accessed according to the device identifier.
In step S603, if it is determined that the current environment of the device changes according to the received description information of the current environment of the device and the obtained description information of the current environment of the node to which the device is currently accessed, the node identifier of the node to which the device is currently accessed is obtained.
And if the current environment of the equipment is determined to change according to the received description information of the current environment of the equipment and the acquired description information of the current environment of the node to which the equipment is currently accessed, acquiring the node identification of the node to which the equipment is currently accessed.
In step S604, the obtained node identifier is used to query a correspondence between a pre-stored node identifier and a third instruction, so as to obtain a corresponding third instruction, where the third instruction is used to instruct the device to change its current environment into the current environment of the currently accessed node.
In this embodiment, the device may be changed or migrated. The device change refers to a device reinstallation, a device reboot, an update operation, or the like, and the device migration refers to a change of an access node of the device, for example, from a node a to a node B.
After the device is changed or migrated, the server determines that the current environment of the device changes by receiving the current environment reported by the device, acquires a node identifier of a node to which the device is currently accessed, and queries a corresponding relationship between a prestored node identifier and a third instruction by using the acquired node identifier to obtain a corresponding third instruction, wherein the third instruction is used for instructing the device to change the current environment of the device into the current environment of the node to which the device is currently accessed.
For example, when the current device is reinstalled, the current environment of the current device is empty, the current device reports the current environment of the current device to the server at regular time, and when the server finds that the current environment of the current device changes, according to the target environment of the current device, a third instruction is used for instructing the current device to change the current environment of the current device to the current environment of the current access node, where the third instruction includes an operation to be executed to install the target environment and an execution sequence thereof.
Optionally, the method may further include: and pre-storing the corresponding relation between the node identification and the third instruction according to the current environment of each node.
In step S605, a third instruction is returned to the apparatus.
In the above embodiment, if it is determined that the current environment of the device changes according to the received description information of the current environment of the device and the obtained description information of the current environment of the node to which the device is currently accessed, the node identifier of the node to which the device is currently accessed is obtained, the obtained node identifier is used to query the correspondence between the pre-stored node identifier and the third instruction, so as to obtain the corresponding third instruction, and the third instruction is used to instruct the device to change the current environment of the device into the current environment of the node to which the device is currently accessed, and the third instruction is returned to the device, so that the device can execute the third instruction, thereby enabling the current environment of the device to reach the current environment of the node to which the device is currently accessed.
Fig. 7 is a signaling flowchart illustrating a method for correcting a device environment according to an exemplary embodiment of the present disclosure, where the embodiment is described from the perspective of interaction between a device installed with a preset application and a server of the preset application, and as shown in fig. 7, the method for correcting a device environment includes:
in step S701, the server determines a node selected by the operator from the pre-stored service structure.
In this embodiment, the operator may represent the devices as a service structure, such as a service tree, based on organization, product line, cluster, service, and the like relationships. The service end can store the service structure, the service structure comprises a father node and a child node, a public environment of all services is arranged on the father node, an environment of each service is arranged on the child node, each child node inherits the environment of each upstream node, and the device accesses the child node. It should be noted that the child node accessed by the device is the last layer child node of the service structure, such as a service tree.
The public environment may include the following three types: the first is basic configuration, including but not limited to account number, authority, Yellow dog Updater (yum) package, timing task, etc., the second is a general tool, the general tool is a tool that does not need to start a resident process, the third is user-defined service, and the user-defined service is a service that needs to start a resident process and complete a certain function.
In this embodiment, the operator may select a node from the service structure and add context description information for the selected node.
To facilitate adding an environment, an operator packages some common operations into atomic operations, e.g., package yum, check yum, check key information, etc., and uses these atomic operations as a common operation template.
In addition to the generic operation template, the operator may also customize the operation template. In this embodiment, the server may display a template addition entry, and an operator may add a custom operation template through the template addition entry, and the server receives and stores the custom operation template added by the operator.
In step S702, the server receives and stores the description information of the initial environment added by the operator for the selected node.
The process of adding the description information of the environment to the selected node by the operator may be: and displaying an operation template which can be selected by an operator, wherein the operation template comprises a general operation template and a custom operation template, and receiving the operation template currently selected by the operator for the selected node, wherein the information of the operation template currently selected for the selected node is description information of the environment added for the selected node.
In order to ensure flexibility of environment addition, in this embodiment, a downward environment inheritance mode is adopted, and a downstream node automatically owns an environment of an upstream node and can perform customization, that is, a current environment of each node includes an environment on each node and an environment on the upstream node inherited by each node.
Optionally, after saving the environment added by the operator for the selected node, the method may further include: and determining a node to be modified, and receiving and storing the description information of the environment modified by the operator for the node to be modified.
In this embodiment, when the environment of the device needs to be changed, the operator may modify the description information of the environment of the node to which the device is currently connected. In this way, the device can request the description information of the modified environment from the server side and perform environment correction according to the description information of the modified environment.
Optionally, in this embodiment, the nodes to be modified may be determined in batches, and the description information of the environment modified by the operator for the nodes to be modified may be received and stored in batches. The nodes to be modified are determined in batches to realize environment change by taking the nodes of the service structure as dimensions, so that the change range and the change progress are flexible and controllable.
When environment change is needed to be carried out on a large amount of equipment, batch change environment is adopted, small-flow verification can be carried out in advance, and safety of change of the whole amount of equipment is improved.
In step S703, the server generates an instruction that needs to be executed by the access device of the node based on the current environment of the node, and stores the node identifier and the instruction that needs to be executed by the access device.
Through the above steps S701 to S703, the server may store the description information of the initial environments of the plurality of nodes and the instructions that the access devices of the plurality of nodes need to execute.
In step S704, if the first device does not detect the initial environment on the first device, a second request is sent to the server.
In step S705, the server obtains the node identifier of the node to which the first device is currently accessed according to the second request, and obtains the second instruction according to the node identifier.
In step S706, the server returns the second instruction to the first device.
In step S707, the first device receives and executes the second instruction to install the initial environment on the first device.
Through the above steps S704-S707, the first device may automatically install the initial environment. Other devices may also implement automatic installation of the initial environment using steps S704-S707 described above.
In step S708, the first device sends a first request to the server.
In step S709, the server obtains the current environment of the node to which the first device is currently accessed according to the device identifier carried in the first request, and uses the current environment of the node to which the first device is currently accessed as the target environment of the first device.
In step S710, the server returns the target environment of the first device to the first device.
In step S711, the first device compares the current environment of the first device with the target environment.
In step S712, if the first device compares that the current environment does not conform to the target environment, the difference between the current environment and the target environment and the difference environment information corresponding to the difference are determined, and a second request carrying the difference environment information is sent to the server.
Wherein the difference environment information may include a difference environment identification.
In step S713, the server receives the second request and obtains the first instruction according to the difference environment information.
In step S714, the server returns the first instruction to the first device.
In step S715, the first device executes the first instruction to make the current environment of the first device reach the target environment.
Through the above steps S708-S715, the first device may automatically maintain the environment. Other devices may also implement an automatic maintenance environment through steps S708-S715.
It should be noted that the first request and the second request do not indicate the execution order, but are used to distinguish that they are different requests.
In step S716, the second device reports description information of its current environment to the server.
In step S717, if the server determines that the current environment of the second device changes according to the received description information of the current environment reported by the second device and the obtained description information of the current environment of the node to which the second device currently accesses, the server obtains the node identifier of the node to which the second device currently accesses.
In step S718, the server uses the obtained node identifier to query a correspondence between a pre-stored node identifier and a third instruction, so as to obtain a corresponding third instruction, where the third instruction is used to instruct the second device to change its current environment into the current environment of the currently accessed node.
In step S719, the server returns the third instruction to the second device.
In step S720, the second device receives the third instruction, and executes the third instruction, so that the current environment of the second device reaches the current environment of the currently accessed node.
The device that is changed or migrated may be the second device, or may be another device, for example, the first device.
Through the above steps S716-S720, the second device may implement automatic correction of the environment.
It should be noted that the steps S716-S720 and the steps S708-S715 are not performed in a strict order, and the steps S708-S715 may be performed first and then the steps S716-S720, or the steps S716-S720 may be performed first and then the steps S708-S715.
According to the embodiment, the equipment provided with the preset application program interacts with the server of the preset application program, so that the automatic environment correction of the equipment can be realized, operators only need to add or modify description information of the environment in the whole realization process without manually correcting, the manual operation amount can be greatly saved, and the labor cost is reduced.
Fig. 8A is a block diagram illustrating an apparatus for correcting an equipment environment, which is located in an equipment installed with a preset application, according to an exemplary embodiment of the present disclosure, and as shown in fig. 8A, the apparatus for correcting an equipment environment includes: a first sending module 81, a comparing module 82, a determining module 83, a second sending module 84 and a first executing module 85.
The first sending module 81 is configured to send a first request to a server of the preset application, where the first request is used to obtain description information of a target environment of a current device from the server, and the target environment refers to a target hardware environment and a target software environment related to application running on the current device.
The comparing module 82 is configured to compare the description information of the current environment of the current device with the description information of the target environment obtained based on the first request sent by the first sending module 81.
The determining module 83 is configured to determine a difference between the current environment and the target environment and difference environment information corresponding to the difference if the comparing module 82 compares that the current environment does not conform to the target environment.
The second sending module 84 is configured to send, to the server, a second request carrying the difference environment information determined by the determining module 83, where the second request is used to obtain, from the server, a first instruction used to instruct to correct the environment of the current device based on the difference environment information.
The first executing module 85 is configured to execute the first instruction obtained based on the second request sent by the second sending module 84, so as to make the current environment of the current device reach the target environment.
In the embodiment, the description information of the current environment of the current device is compared with the obtained description information of the target environment, when the current environment is not consistent with the target environment, the difference between the current environment and the target environment and the difference environment information corresponding to the difference are determined, then a second request carrying the difference environment information is sent to the server, so that the first instruction is obtained from the server, and the first instruction is executed, so that the current environment of the current device reaches the target environment, the whole implementation process does not need manual operation, the purpose of automatically correcting the environment is achieved, and the labor cost is saved.
Fig. 8B is a block diagram of a device environment correction apparatus according to an exemplary embodiment of the disclosure, and as shown in fig. 8B, the device environment correction apparatus may further include, based on the embodiment shown in fig. 8A:
the third sending module 86 is configured to send a third request to the server if an initial environment is not detected on the current device before the comparing module 82 compares the description information of the current environment of the current device with the acquired description information of the target environment, where the third request is used to acquire a second instruction from the server, and the second instruction is used to instruct to install the initial environment on the current device.
The second executing module 87 is configured to execute the second instruction obtained based on the third request sent by the third sending module 86 to install the initial environment on the current device, wherein the current environment of the current device is generated during the application program running in the initial environment.
Fig. 8C is a block diagram of a device environment correction apparatus according to an exemplary embodiment of the disclosure, and as shown in fig. 8C, the device environment correction apparatus may further include, based on the embodiment shown in fig. 8A:
the reporting module 88 is configured to report the description information of its current environment to the server.
The receiving module 89 is configured to receive a third instruction returned by the server after determining that the current environment of the current device changes according to the description information reported by the reporting module 88, where the third instruction is used to instruct the current device to change the current environment of the current device into the current environment of the current access node.
The third executing module 90 is configured to execute the third instruction received by the receiving module 89 to make the current environment of the current device reach the current environment of the currently accessed node.
Fig. 9A is a block diagram of an environment information processing module according to an exemplary embodiment of the disclosure, where the environment information processing module is located at a server of a preset application program, and as shown in fig. 9A, the environment information processing module includes: a first receiving module 91, a first acquisition return module 92, a second receiving module 93 and a second acquisition return module 94.
The first receiving module 91 is configured to receive a first request sent by a device installed with the preset application program, where the first request is used to obtain description information of a target environment of the device from the server, and the target environment refers to a target hardware environment and a target software environment related to application program running on the device.
The first obtaining and returning module 92 is configured to obtain the description information of the target environment of the device according to the first request received by the first receiving module 91, and return the description information of the target environment of the device to the device.
The second receiving module 93 is configured to receive a second request carrying difference environment information, where the second request is used to obtain a first instruction from the server based on the difference environment information, and the first instruction is used to instruct to correct the environment of the device.
The second obtaining and returning module 94 is configured to obtain the first instruction according to the second request received by the second receiving module 93, and return the first instruction to the device.
In the embodiment, the description information of the target environment of the device is obtained and returned to the device according to the first request, then the second request carrying the difference environment information sent by the device is received, the first instruction is obtained according to the second request, and the first instruction is returned to the device, so that the device can execute the first instruction, and the purpose of automatically correcting the environment is achieved.
Fig. 9B is a block diagram of another environment information processing module according to an exemplary embodiment of the disclosure, and as shown in fig. 9B, on the basis of the embodiment shown in fig. 9A, the first obtaining and returning module 92 may include:
the first obtaining sub-module 921 is configured to obtain, according to the device identifier carried in the first request, description information of a current environment of a node to which the device is currently accessed.
The first determining sub-module 922 is configured to use the description information of the current environment of the node to which the device is currently accessed, acquired by the first acquiring sub-module 921, as the description information of the target environment of the device.
Fig. 9C is a block diagram of another environment information processing module shown in an exemplary embodiment of the disclosure, and as shown in fig. 9C, on the basis of the embodiment shown in fig. 9A, the environment information processing apparatus may further include:
the third receiving module 95 is configured to receive a third request sent by the device before the first receiving module 91 receives the first request sent by the device installed with the preset application program, where the third request is used to obtain a second instruction from the server, and the second instruction is used to instruct to install an initial environment on the device.
The third obtaining module 96 is configured to obtain the second instruction according to the third request received by the third receiving module 95.
The first return module 97 is configured to return the second instruction acquired by the third acquisition module 96 to the device.
Fig. 9D is a block diagram of another environment information processing module shown in an exemplary embodiment of the disclosure, and as shown in fig. 9D, on the basis of the embodiment shown in fig. 9A, the environment information processing apparatus may further include:
the fourth receiving module 98 is configured to receive the description information of the current environment of the device reported by the device.
The fourth obtaining module 99 is configured to obtain description information of a current environment of a node to which the device is currently accessed.
The determining and acquiring module 100 is configured to acquire the node identifier of the node to which the device is currently accessed if it is determined that the current environment of the device changes according to the description information of the current environment of the device received by the fourth receiving module 98 and the description information of the current environment of the node to which the device is currently accessed, acquired by the fourth acquiring module 99.
The query obtaining module 101 is configured to query a correspondence between a pre-stored node identifier and a third instruction by using the node identifier obtained by the determination obtaining module 100, so as to obtain a corresponding third instruction, where the third instruction is used to instruct the device to change its current environment into the current environment of the currently accessed node.
The second returning module 102 is configured to return the third instruction obtained by the query obtaining module 101 to the device.
Fig. 9E is a block diagram of another environment information processing module shown in an exemplary embodiment of the disclosure, and as shown in fig. 9E, on the basis of any one of the embodiments shown in fig. 9A to 9D, the environment information processing apparatus may further include:
the first determination module 103 is configured to determine a node selected by the operator from a service structure, the service structure comprising a parent node and a child node.
The first receiving and saving module 104 is configured to receive and save description information of the environment where the operator determines the addition of the selected node for the first determining module 103.
The first generation saving module 105 is configured to generate and save instructions, which need to be executed by a device accessing the selected node, based on the description information of the current environment of the selected node saved by the first reception saving module 104, where the instructions include the first instruction, the second instruction, or the third instruction.
Fig. 9F is a block diagram of another environment information processing module shown in an exemplary embodiment of the disclosure, and as shown in fig. 9F, on the basis of the embodiment shown in fig. 9E, the environment information processing apparatus may further include:
the second determining module 106 is configured to determine the node to be modified after the first receiving and saving module 104 receives and saves the description information of the environment added by the operator for the selected node.
The second receiving and storing module 107 is configured to receive and store the description information of the environment modified by the operator for the node to be modified determined by the second determining module 106.
The second generating and storing module 108 is configured to generate and store an instruction that needs to be executed by the device accessing the node to be modified, based on the description information of the modified environment of the node to be modified, which is stored by the second receiving and storing module 107, where the instruction that needs to be executed by the device accessing the node to be modified includes the first instruction, the second instruction, or the third instruction.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 10 is a block diagram of an apparatus shown in an exemplary embodiment of the present disclosure. As shown in fig. 10, the apparatus includes a processor 1010, a memory 1020 for storing instructions executable by the processor 1010; wherein the processor is configured to execute the above instructions to implement the above method for correcting the device environment. In addition to the processor 1010 and the memory 1020 shown in fig. 10, the device may also include other hardware according to the actual function of the device environment correction, which is not described in detail.
In an exemplary embodiment, a storage medium comprising instructions, such as memory 1020 comprising instructions, executable by processor 1010 to perform the method of device environment calibration described above is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 11 is a block diagram of a server shown in an exemplary embodiment of the present disclosure. As shown in fig. 11, the server includes a processor 1110, a memory 1120 for storing instructions executable by the processor 1110; wherein the processor is configured to execute the instructions to realize the environment information processing method. In addition to the processor 1110 and the memory 1120 shown in fig. 11, the server may also include other hardware, which is not described herein again, according to the actual functions of the environment information processing.
In an exemplary embodiment, a storage medium including instructions, such as the memory 1120 including instructions, that are executable by the processor 1110 to perform the above-described environment information processing method is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided a computer program product which, when run on an electronic device, causes the electronic device to execute the above-described correction method of the device environment or the environment information processing method.
Fig. 12 is a block diagram of an apparatus for a correction method or an environment information processing method applicable to an apparatus environment according to an exemplary embodiment of the present disclosure, and as shown in fig. 12, an apparatus 1200 for a correction method or an environment information processing method applicable to an apparatus environment according to an exemplary embodiment of the present disclosure includes: radio Frequency (RF) circuit 1210, power supply 1220, processor 1230, memory 1240, input unit 1250, display unit 1260, camera 1270, communication interface 1280, and Wireless Fidelity (Wi-Fi) module 1290. Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 12 is not intended to be limiting, and that embodiments of the present application provide apparatus that may include more or less components than those shown, or that certain components may be combined, or that a different arrangement of components may be used.
The various components of the apparatus 1200 are described in detail below with reference to FIG. 12:
the RF circuit 1210 may be used for receiving and transmitting data during a communication or conversation. In particular, RF circuit 1210, after receiving downlink data from the base station, sends the downlink data to processor 1230 for processing; and in addition, sending the uplink data to be sent to the base station. In general, RF circuit 1210 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuit 1210 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
Wi-Fi technology belongs to short-distance wireless transmission technology, and the device 1200 can connect with an Access Point (AP) through a Wi-Fi module 1290, so as to realize Access to a data network. Wi-Fi module 1290 may be used for receiving and transmitting data during communication.
Device 1200 may be physically connected to other devices via communications interface 1280. Optionally, the communication interface 1280 is connected to a communication interface of another device through a cable, so as to implement data transmission between the device 1200 and the other device.
In the embodiment of the present application, the device 1200 is capable of implementing a communication service to send information to other contacts, so that the device 1200 needs to have a data transmission function, that is, the device 1200 needs to include a communication module inside. Although fig. 12 illustrates communication modules, such as RF circuit 1210, Wi-Fi module 1290, and communication interface 1280, it is to be understood that at least one of the above described components or other communication modules (e.g., bluetooth module) for enabling communication may be present in device 1200 for data transmission.
For example, when device 1200 is a cellular telephone, device 1200 may include RF circuitry 1210 and may also include a Wi-Fi module 1290; when device 1200 is a computer, device 1200 may include a communication interface 12120 and may also include a Wi-Fi module 1290; when the device 1200 is a tablet, the device 1200 may include a Wi-Fi module.
Memory 1240 may be used to store software programs and modules. Processor 1230 executes software programs and modules stored in memory 1240 to perform various functional applications and data processing of device 1200, and when processor 1230 executes the program codes in memory 1240, some or all of the processes of fig. 1, 2, 3 and 4 of the embodiments of the disclosure can be implemented.
Alternatively, the memory 1240 may mainly include a program storage area and a data storage area. The storage program area can store an operating system, various application programs (such as communication application), a face recognition module and the like; the storage data area may store data created according to the use of the device (such as various multimedia files like pictures, video files, etc., and face information templates), etc.
Further, memory 1240 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 1250 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the apparatus 1200.
Alternatively, the input unit 1250 may include a touch panel 1251 and other input devices 1252.
Among other things, the touch panel 1251, also referred to as a touch screen, can collect touch operations of a user on or near the touch panel 1251 (for example, operations of the user on or near the touch panel 1251 by using any suitable object or accessory such as a finger or a stylus pen), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 1251 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1230, and can receive and execute commands sent by the processor 1230. In addition, the touch panel 1251 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave.
Alternatively, other input devices 1252 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1260 may be used to display information input by or provided to the user as well as various menus of the device 1200. The display unit 1260 is a display system of the device 1200, and is used for presenting an interface to realize human-computer interaction.
The display unit 1260 may include a display panel 1261. Alternatively, the Display panel 1261 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Further, the touch panel 1251 can overlay the display panel 1261, and when the touch panel 1251 detects a touch operation thereon or nearby, the touch panel 1251 can transmit the touch operation to the processor 1230 to determine the type of the touch event, and then the processor 1230 can provide a corresponding visual output on the display panel 1261 according to the type of the touch event.
Although in FIG. 12, touch panel 1251 and display panel 1261 are implemented as two separate components to implement input and output functions of device 1200, in some embodiments, touch panel 1251 and display panel 1261 may be integrated to implement input and output functions of device 1200.
The processor 1230 is a control center of the apparatus 1200, connects the respective components using various interfaces and lines, performs various functions of the apparatus 1200 and processes data by operating or executing software programs and/or modules stored in the memory 1240 and calling data stored in the memory 1240, thereby implementing various services based on the apparatus.
Processor 1230 may optionally include one or more processing units. Optionally, processor 1230 may integrate an application processor, which handles primarily the operating system, user interfaces, applications, etc., and a modem processor, which handles primarily wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 1230.
The camera 1270 is used for implementing a shooting function of the apparatus 1200 and shooting pictures or videos. The camera 1270 may also be used to implement a scanning function of the apparatus 1200 to scan a scanning object (two-dimensional code/barcode).
The device 1200 also includes a power supply 1220 (such as a battery) for powering the various components. Optionally, the power source 1220 may be logically connected to the processor 1230 through a power management system, so that the power management system may manage charging, discharging, and power consumption functions.
In an exemplary embodiment, the apparatus 1200 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described correction method of the apparatus environment or the environment information processing method.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for correcting an equipment environment is applied to equipment provided with a preset application program, and comprises the following steps:
sending a first request to a server of the preset application program, wherein the first request is used for acquiring description information of a target environment of current equipment from the server, and the target environment refers to a target hardware environment and a target software environment which are related to the running of the application program on the current equipment;
comparing the description information of the current environment of the current equipment with the acquired description information of the target environment;
if the current environment is not consistent with the target environment through comparison, determining the difference between the current environment and the target environment and difference environment information corresponding to the difference;
sending a second request carrying the difference environment information to the server, wherein the second request is used for acquiring a first instruction from the server based on the difference environment information, and the first instruction is used for indicating to correct the environment of the current device;
executing the first instruction to enable the current environment of the current device to reach the target environment.
2. The environment correction method according to claim 1, wherein before the comparing the description information of the current environment of the current device with the acquired description information of the target environment, the environment correction method further comprises:
if the initial environment cannot be detected on the current equipment, sending a third request to the server, wherein the third request is used for acquiring a second instruction from the server, and the second instruction is used for indicating that the initial environment is installed on the current equipment;
executing the second instruction to install the initial environment on the current device, wherein the current environment of the current device is generated in the process of running the application program in the initial environment.
3. An environmental information processing method is applied to a server of a preset application program, and the environmental information processing method comprises the following steps:
receiving a first request sent by equipment provided with the preset application program, wherein the first request is used for acquiring description information of a target environment of the equipment from the server, and the target environment refers to a target hardware environment and a target software environment which are related to the running of the application program on the equipment;
obtaining the description information of the target environment of the equipment according to the first request, and returning the description information of the target environment of the equipment to the equipment;
receiving a second request which is sent by the equipment and carries differential environment information, wherein the second request is used for acquiring a first instruction from the server based on the differential environment information, and the first instruction is used for indicating to correct the environment of the equipment;
and acquiring the first instruction according to the second request, and returning the first instruction to the equipment.
4. The environmental information processing method according to claim 3, wherein before the receiving of the first request sent by the device in which the preset application is installed, the environmental information processing method further comprises:
receiving a third request sent by the equipment, wherein the third request is used for acquiring a second instruction from the server, and the second instruction is used for indicating that an initial environment is installed on the equipment;
acquiring the second instruction according to the third request;
returning the second instruction to the device.
5. The device for correcting the environment of the equipment is applied to the equipment provided with the preset application program, and comprises the following components:
a first sending module, configured to send a first request to a server of the preset application program, where the first request is used to obtain description information of a target environment of current equipment from the server, and the target environment refers to a target hardware environment and a target software environment related to application program operation on the current equipment;
a comparison module configured to compare description information of a current environment of the current device with description information of the target environment acquired based on the first request sent by the first sending module;
a determining module configured to determine a difference between the current environment and the target environment and difference environment information corresponding to the difference if the comparing module compares that the current environment does not conform to the target environment;
a second sending module, configured to send, to the server, a second request carrying the difference environment information determined by the determining module, where the second request is used to obtain a first instruction from the server based on the difference environment information, and the first instruction is used to instruct to correct the environment of the current device;
a first execution module configured to execute the first instruction obtained based on the second request sent by the second sending module, so that the current environment of the current device reaches the target environment.
6. An environment information processing apparatus, which is applied to a server side of a preset application program, the environment information processing apparatus comprising:
the first receiving module is configured to receive a first request sent by a device installed with the preset application program, wherein the first request is used for acquiring description information of a target environment of the device from the server, and the target environment refers to a target hardware environment and a target software environment related to application program operation on the device;
a first obtaining and returning module configured to obtain the description information of the target environment of the device according to the first request received by the first receiving module, and return the description information of the target environment of the device to the device;
a second receiving module, configured to receive a second request carrying difference environment information and sent by the device, where the second request is used to obtain a first instruction from the server based on the difference environment information, and the first instruction is used to instruct to correct an environment of the device;
a second obtaining and returning module configured to obtain the first instruction according to the second request received by the second receiving module, and return the first instruction to the device.
7. An apparatus, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of correction of a device environment of any of claims 1 to 2.
8. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the environmental information processing method of any one of claims 3 to 4.
9. A storage medium in which instructions, when executed by a processor of a device, enable the device to perform a method of correction of a device environment as claimed in any one of claims 1 to 2.
10. A storage medium in which instructions are executed by a processor of a server, so that the server can perform the environmental information processing method according to any one of claims 3 to 4.
CN201911017482.0A 2019-10-24 2019-10-24 Equipment environment correction method and device, and environment information processing method and device Active CN110808852B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911017482.0A CN110808852B (en) 2019-10-24 2019-10-24 Equipment environment correction method and device, and environment information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911017482.0A CN110808852B (en) 2019-10-24 2019-10-24 Equipment environment correction method and device, and environment information processing method and device

Publications (2)

Publication Number Publication Date
CN110808852A true CN110808852A (en) 2020-02-18
CN110808852B CN110808852B (en) 2022-09-02

Family

ID=69489128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911017482.0A Active CN110808852B (en) 2019-10-24 2019-10-24 Equipment environment correction method and device, and environment information processing method and device

Country Status (1)

Country Link
CN (1) CN110808852B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650670A (en) * 2008-08-14 2010-02-17 鸿富锦精密工业(深圳)有限公司 Electronic system capable of sharing application program configuration parameters and method thereof
CN103761273A (en) * 2014-01-08 2014-04-30 兴天通讯技术(天津)有限公司 Tree structure node attribute configuration method and system
US20150100775A1 (en) * 2013-10-09 2015-04-09 Pegatron Corporation Electronic device and method of adjusting execution state of electronic device
CN107844318A (en) * 2017-12-11 2018-03-27 维沃移动通信有限公司 The upgrade method and mobile terminal and server of a kind of operating system
CN108037961A (en) * 2017-12-07 2018-05-15 北京锐安科技有限公司 A kind of application program collocation method, device, server and storage medium
CN108549826A (en) * 2018-03-30 2018-09-18 努比亚技术有限公司 Method of calibration, terminal, server and the readable storage medium storing program for executing of application program
CN108710497A (en) * 2018-05-18 2018-10-26 深圳市云智易联科技有限公司 A kind of method for updating system of vehicle-mounted middle control and vehicle-mounted middle control
CN109828779A (en) * 2018-12-26 2019-05-31 中国平安人寿保险股份有限公司 Environment changing method, apparatus, terminal installation and storage medium
CN110308924A (en) * 2019-05-24 2019-10-08 平安银行股份有限公司 Application program update method, apparatus, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650670A (en) * 2008-08-14 2010-02-17 鸿富锦精密工业(深圳)有限公司 Electronic system capable of sharing application program configuration parameters and method thereof
US20150100775A1 (en) * 2013-10-09 2015-04-09 Pegatron Corporation Electronic device and method of adjusting execution state of electronic device
CN103761273A (en) * 2014-01-08 2014-04-30 兴天通讯技术(天津)有限公司 Tree structure node attribute configuration method and system
CN108037961A (en) * 2017-12-07 2018-05-15 北京锐安科技有限公司 A kind of application program collocation method, device, server and storage medium
CN107844318A (en) * 2017-12-11 2018-03-27 维沃移动通信有限公司 The upgrade method and mobile terminal and server of a kind of operating system
CN108549826A (en) * 2018-03-30 2018-09-18 努比亚技术有限公司 Method of calibration, terminal, server and the readable storage medium storing program for executing of application program
CN108710497A (en) * 2018-05-18 2018-10-26 深圳市云智易联科技有限公司 A kind of method for updating system of vehicle-mounted middle control and vehicle-mounted middle control
CN109828779A (en) * 2018-12-26 2019-05-31 中国平安人寿保险股份有限公司 Environment changing method, apparatus, terminal installation and storage medium
CN110308924A (en) * 2019-05-24 2019-10-08 平安银行股份有限公司 Application program update method, apparatus, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110808852B (en) 2022-09-02

Similar Documents

Publication Publication Date Title
US11809704B2 (en) Control method applied to screen projection scenario and related device
CN102255887B (en) Method and system for providing online services corresponding to multiple mobile devices
US11579946B2 (en) Method for managing multiple operating systems in a terminal
US8897804B2 (en) System and method for providing customer support using a location-aware portable device
CN105930020A (en) Method and apparatus for function icons of management terminal application program
US10587741B2 (en) Communication event processing method and apparatus
CN104298526A (en) Software updating method and device
CN108616897B (en) Configuration method, terminal and network equipment for Discontinuous Reception (DRX) parameters
JP2019502190A (en) Information push method, device and system, and computer storage medium
CN106293738B (en) Expression image updating method and device
CN106953898B (en) Method and device for acquiring software package
CN110990741A (en) Page display method and device, electronic equipment, server and storage medium
CN112118538A (en) Method and device for device information interaction between terminals
CN104243429A (en) Method, device and system for achieving browser bookmark synchronization
CN112579264B (en) Application program jumping method, terminal and computer storage medium
CN105610878A (en) Directory uploading method, data releasing method, terminal and server
CN105656894A (en) Main control intelligent terminal, controlled intelligent terminal and monitoring method
CN110808852B (en) Equipment environment correction method and device, and environment information processing method and device
CN107615826B (en) Method for determining network type in wireless communication network, access point equipment, terminal equipment and wireless network controller
CN107608722B (en) Application program downloading method and device
CN111381845A (en) Software gray scale upgrading method and device, storage medium, terminal and server
CN103458121A (en) System and method capable of realizing Android version compatibility and third-party function compatibility
CN108811162B (en) System information transmission method, terminal and base station
CN105119814A (en) Information-processing method and terminal
CN106162591A (en) Method, device, equipment and the system of flow package information are set

Legal Events

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