CN115865650A - Service deployment method and device, storage medium and electronic device - Google Patents

Service deployment method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115865650A
CN115865650A CN202211056180.6A CN202211056180A CN115865650A CN 115865650 A CN115865650 A CN 115865650A CN 202211056180 A CN202211056180 A CN 202211056180A CN 115865650 A CN115865650 A CN 115865650A
Authority
CN
China
Prior art keywords
service
group
services
detection
scripts
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211056180.6A
Other languages
Chinese (zh)
Inventor
高鹏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202211056180.6A priority Critical patent/CN115865650A/en
Publication of CN115865650A publication Critical patent/CN115865650A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The application discloses a service deployment method and device, a storage medium and an electronic device, and relates to the technical field of smart homes, wherein the service deployment method comprises the following steps: under the condition that a first group of services to be detected is deployed on the operation and maintenance platform, a detection instruction triggered by a target object on a display interface of the operation and maintenance platform is obtained; in response to the detection instruction, determining a group of detection scripts corresponding to the first group of services from a plurality of preset scripts, wherein each detection script in the group of detection scripts is used for detecting the running state of a corresponding service in the first group of services; the method comprises the steps of obtaining the running state of each service in a first group of services by running a group of detection scripts, and determining whether the running state of each service meets a corresponding preset running result; and determining that the first group of services are successfully deployed under the condition that the operation state of each service meets the corresponding preset operation result.

Description

Service deployment method and device, storage medium and electronic device
Technical Field
The application relates to the technical field of smart homes, in particular to a service deployment method and device, a storage medium and an electronic device.
Background
After the service is deployed, whether the service is started or not needs to be manually checked, each service of the IOT has the service close to hundreds of nodes in time, the checking is slow, the service capability checking also needs to be manually checked, and if the checking fails, the service needs to be re-deployed, so that the whole process needs a large amount of manpower input to maintain the service deployment efficiency, and the automatic checking of the service deployment cannot be realized.
Therefore, an effective solution has not been proposed yet to the problem of the related art that service deployment cannot be automatically checked.
Disclosure of Invention
The embodiment of the application provides a service deployment method and device, a storage medium and an electronic device, and aims to at least solve the problems that service deployment cannot be automatically checked in the related art and the like.
According to an embodiment of the present application, there is provided a service deployment method including: under the condition that a first group of services to be detected are deployed on an operation and maintenance platform, a detection instruction triggered by a target object on a display interface of the operation and maintenance platform is obtained; in response to the detection instruction, determining a set of detection scripts corresponding to the first group of services from a plurality of preset scripts, wherein each detection script in the set of detection scripts is used for detecting the running state of a corresponding service in the first group of services; acquiring the running state of each service in the first group of services by running the group of detection scripts, and determining whether the running state of each service meets a corresponding preset running result; and determining that the first group of services are successfully deployed under the condition that the operation state of each service meets the corresponding preset operation result.
In one exemplary embodiment, determining a set of detection scripts corresponding to the first set of services from a plurality of preset scripts comprises: determining the service name of each service in the first group of services to be detected to obtain a plurality of service names; matching the plurality of service names with a project name set corresponding to the plurality of preset scripts, wherein the project name set comprises: the operation and maintenance platform identification corresponding to different preset scripts and the preset service names corresponding to the different preset scripts; and determining a preset script which is identical to the service name and exists in the project name set as a group of detection scripts corresponding to the first group of services.
In an exemplary embodiment, after determining whether the operation state of each service satisfies the corresponding preset operation result, the method further includes: determining that the first group of services fails to be deployed under the condition that the running state of at least one service in the first group of services does not meet the corresponding preset running result; packing the service data of the first group of services to obtain a backspacing data packet; and sending a prompt file carrying the rollback data packet to a development object connected with the operation and maintenance platform.
In an exemplary embodiment, after sending the prompt file carrying the rollback data packet to the development object connected to the operation and maintenance platform, the method further includes: receiving interactive information fed back to the operation and maintenance platform by the development object according to the prompt file; determining the data content to be adjusted corresponding to the backspacing data packet based on the interaction information; and adjusting the data content to be adjusted to obtain a second group of services needing to be retested.
In an exemplary embodiment, the data adjusting the data content to be adjusted to obtain a second group of services to be retested includes: determining an adjustment instruction corresponding to the data adjustment, wherein the adjustment instruction comprises at least one of the following: add, delete, modify, replace; analyzing the backspacing data packet, and adjusting the analyzed data corresponding to the backspacing data packet based on the adjusting instruction to obtain adjusted service data; and packaging the adjusted service data to obtain a second group of retested services.
In an exemplary embodiment, in a case that the operation state of each service satisfies the corresponding preset operation result, after determining that the first group of services is successfully deployed, the method further includes: performing service combination on a plurality of services in the first group of services which are successfully deployed to generate a target service; determining a version number corresponding to the target service, and binding the target service and the version number to obtain a target file; and under the condition that the version number has a historical version number, updating the historical service corresponding to the historical version number by using the target file.
In an exemplary embodiment, the method further includes: acquiring the preset identification times of the operation and maintenance platform on the operation state; when the number of automatic detection times after the operation of the group of detection scripts is greater than the preset identification times, determining that the operation state detected by the group of detection scripts is invalid information, and sending prompt information to a management object of the operation and maintenance platform, wherein the prompt information is used for indicating that the operation and maintenance platform in the operation and maintenance state has detection abnormality when the detection script detection service is used; and under the condition that the automatic detection times after the operation of the group of detection scripts are less than or equal to the preset identification times, determining that the operation state detected by the group of detection scripts is effective information, and allowing the operation and maintenance platform to start a determination process for determining whether the operation state of each service meets the corresponding preset operation result.
According to another embodiment of the present application, there is also provided a service deployment apparatus including: the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a detection instruction triggered by a target object on a display interface of an operation and maintenance platform under the condition that a first group of services to be detected is deployed on the operation and maintenance platform; a response module, configured to determine, in response to the detection instruction, a set of detection scripts corresponding to the first set of services from a plurality of preset scripts, where each detection script in the set of detection scripts is used to detect an operating state of a corresponding service in the first set of services; the second acquisition module is used for acquiring the running state of each service in the first group of services by running the group of detection scripts and determining whether the running state of each service meets the corresponding preset running result; and the first determining module is used for determining that the first group of services are successfully deployed under the condition that the running state of each service meets the corresponding preset running result.
In an exemplary embodiment, the response module is further configured to determine a service name of each service in the first group of services to be detected, and obtain a plurality of service names; matching the plurality of service names with a project name set corresponding to the plurality of preset scripts, wherein the project name set comprises: the operation and maintenance platform identification corresponding to different preset scripts and the preset service names corresponding to the different preset scripts; and determining a preset script which is identical to the service name and exists in the project name set as a group of detection scripts corresponding to the first group of services.
In an exemplary embodiment, the apparatus further comprises: a second determining module, configured to determine that the first group of services fails to be deployed when the running state of at least one service in the first group of services does not meet a corresponding preset running result; packing the service data of the first group of services to obtain a backspacing data packet; and sending a prompt file carrying the rollback data packet to a development object connected with the operation and maintenance platform.
In an exemplary embodiment, the second determining module further includes: the adjusting unit is used for receiving the interactive information fed back to the operation and maintenance platform by the development object according to the prompt file; determining the data content to be adjusted corresponding to the backspacing data packet based on the interaction information; and adjusting the data content to be adjusted to obtain a second group of services needing to be retested.
In an exemplary embodiment, the adjusting unit is further configured to determine an adjusting instruction corresponding to the data adjustment, where the adjusting instruction includes at least one of: addition, deletion, modification and replacement; analyzing the backspacing data packet, and adjusting the analyzed data corresponding to the backspacing data packet based on the adjusting instruction to obtain adjusted service data; and packaging the adjusted service data to obtain a second group of retested services.
In an exemplary embodiment, the apparatus further includes: the service module is used for carrying out service combination on a plurality of services in the first group of services which are successfully deployed to generate target services; determining a version number corresponding to the target service, and binding the target service and the version number to obtain a target file; and under the condition that the version number has a historical version number, updating the historical service corresponding to the historical version number by using the target file.
In an exemplary embodiment, the apparatus further includes: the detection module is used for acquiring the preset identification times of the operation and maintenance platform on the operation state; when the number of automatic detection times after the operation of the group of detection scripts is larger than the preset identification times, determining that the operation state detected by the group of detection scripts is invalid information, and sending prompt information to a management object of the operation and maintenance platform, wherein the prompt information is used for indicating that the operation and maintenance platform in the operation and maintenance state has abnormal detection when using detection script detection service; and under the condition that the automatic detection times after the operation of the group of detection scripts are less than or equal to the preset identification times, determining the operation state detected by the group of detection scripts as effective information, and allowing the operation and maintenance platform to start a determination process for determining whether the operation state of each service meets the corresponding preset operation result.
According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the service deployment method when running.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the service deployment method through the computer program.
In the embodiment of the application, under the condition that a first group of services to be detected is deployed on an operation and maintenance platform, a detection instruction triggered by a target object on a display interface of the operation and maintenance platform is obtained; in response to the detection instruction, determining a group of detection scripts corresponding to the first group of services from a plurality of preset scripts, wherein each detection script in the group of detection scripts is used for detecting the running state of a corresponding service in the first group of services; the method comprises the steps that a group of detection scripts are operated, the operation state of each service in a first group of services is obtained, and whether the operation state of each service meets the corresponding preset operation result or not is determined; determining that the first group of services are successfully deployed under the condition that the operation state of each service meets the corresponding preset operation result; by adopting the technical scheme, the problems that service deployment cannot be automatically checked and the like in the related technology are solved, whether the running state of the group service to be detected meets the corresponding preset running result is determined by using the preset script and the operation and maintenance platform, the correctness of the automatic checking service and the service business capability check are utilized, the labor input is reduced, and the service deployment efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic diagram of a hardware environment of a service deployment method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of service deployment according to an embodiment of the application;
FIG. 3 is a flow of testing a move left service deployment service according to an embodiment of the application;
FIG. 4 is a flow diagram of testing a move left automated business process according to an embodiment of the present application;
fig. 5 is a block diagram of a service deployment apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above 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 application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiments of the present application, a service deployment method is provided. The service deployment method is widely applied to full-house intelligent digital control application scenes such as Smart Home, intelligent Home equipment ecology, intelligent house (intelligence house) ecology and the like. Alternatively, in this embodiment, the service deployment method may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide a service (e.g., an application service) for the terminal or a client installed on the terminal, provide a database on or independent of the server for providing a data storage service for the server 104, and configure a cloud computing and/or edge computing service on or independent of the server for providing a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In this embodiment, a service deployment method is provided, which is applied to the computer terminal, and fig. 2 is a flowchart of the service deployment method according to the embodiment of the present application, where the flowchart includes the following steps:
step S202, under the condition that a first group of services to be detected is deployed on an operation and maintenance platform, a detection instruction triggered by a target object on a display interface of the operation and maintenance platform is obtained;
it can be understood that the first group of services is all or part of services corresponding to the same service.
Step S204, responding to the detection instruction, and determining a group of detection scripts corresponding to the first group of services from a plurality of preset scripts, wherein each detection script in the group of detection scripts is used for detecting the running state of a corresponding service in the first group of services;
namely, the detection script is a preset script for the automatic detection service.
Step S206, acquiring the running state of each service in the first group of services by running the group of detection scripts, and determining whether the running state of each service meets the corresponding preset running result;
step S208, determining that the first group of services are successfully deployed when the operation state of each service satisfies the corresponding preset operation result.
Through the steps, under the condition that a first group of services to be detected is deployed on the operation and maintenance platform, a detection instruction triggered by a target object on a display interface of the operation and maintenance platform is obtained; responding to a detection instruction, and determining a group of detection scripts corresponding to a first group of services from a plurality of preset scripts, wherein each detection script in the group of detection scripts is used for detecting the running state of a corresponding service in the first group of services; the method comprises the steps that a group of detection scripts are operated, the operation state of each service in a first group of services is obtained, and whether the operation state of each service meets the corresponding preset operation result or not is determined; determining that the first group of services are successfully deployed under the condition that the operation state of each service meets the corresponding preset operation result; by adopting the technical scheme, the problems that service deployment cannot be automatically checked and the like in the related technology are solved, whether the running state of the group service to be detected meets the corresponding preset running result is determined by using the preset script and the operation and maintenance platform, the correctness of the automatic checking service and the service business capability are checked, the labor input is reduced, and the service deployment efficiency is improved.
In one exemplary embodiment, determining a set of detection scripts corresponding to the first set of services from a plurality of preset scripts comprises: determining the service name of each service in the first group of services to be detected to obtain a plurality of service names; matching the plurality of service names with a project name set corresponding to the plurality of preset scripts, wherein the project name set comprises: the operation and maintenance platform identification corresponding to different preset scripts and the preset service names corresponding to the different preset scripts; and determining a preset script which is identical to the service name and exists in the project name set as a group of detection scripts corresponding to the first group of services.
It can be understood that, because a plurality of automated test scripts can be flexibly arranged on the operation and maintenance platform according to actual test conditions, in order to use the automated test scripts to quickly correspond to the service to be tested, the corresponding work before the test is completed by constructing an engineering name set containing preset service names to match with the service name of each service, so that the service can smoothly find the corresponding automated test script (namely the preset script).
In an exemplary embodiment, after determining whether the operation state of each service satisfies the corresponding preset operation result, the method further includes: determining that the first group of services fails to be deployed under the condition that the running state of at least one service in the first group of services does not meet the corresponding preset running result; packing the service data of the first group of services to obtain a backspacing data packet; and sending a prompt file carrying the rollback data packet to a development object connected with the operation and maintenance platform.
In an exemplary embodiment, after sending the prompt file carrying the rollback data packet to the development object connected to the operation and maintenance platform, the method further includes: receiving interactive information fed back to the operation and maintenance platform by the development object according to the prompt file; determining the data content to be adjusted corresponding to the backspacing data packet based on the interaction information; and carrying out data adjustment on the data content to be adjusted to obtain a second group of services needing retesting.
For example, corresponding to 4 services in a service, the running state of one service does not meet the corresponding preset running result, the whole service fails to be deployed, at this time, the service failed to be deployed is packaged, a mail is sent to notify a development object of the service, the development object is prompted to check the reason of the service failure deployment, and each service is packaged again to generate a new group service to be tested. At this time, in order to enable the user to use the service normally, the service content to be updated is returned to the current previous version.
In an exemplary embodiment, the data adjustment of the data content to be adjusted to obtain a second group of services to be retested includes: determining an adjustment instruction corresponding to the data adjustment, wherein the adjustment instruction comprises at least one of the following: addition, deletion, modification and replacement; analyzing the backspacing data packet, and adjusting the analyzed data corresponding to the backspacing data packet based on the adjusting instruction to obtain adjusted service data; and packaging the adjusted service data to obtain a second group of retested services.
It can be understood that after determining that the rollback data packet corresponds to the data content to be adjusted based on the interaction information, the development object of the service may adjust the rollback data packet on the basis of the analysis data corresponding to the current rollback data packet by sending an adjustment instruction, so as to eliminate the data that the rollback data packet fails, so that a second group of retested services may be obtained, so that the same group of services may also perform a secondary test after adjustment through the adjustment instruction after failure, thereby improving the application efficiency of the group services.
In an exemplary embodiment, in a case that the operation state of each service satisfies the corresponding preset operation result, after determining that the first group of services is successfully deployed, the method further includes: performing service combination on a plurality of services in the first group of services which are successfully deployed to generate a target service; determining a version number corresponding to the target service, and binding the target service and the version number to obtain a target file; and under the condition that the version number has a historical version number, updating the historical service corresponding to the historical version number by using the target file.
In order to improve the updating efficiency of the service corresponding to the service, the updating condition of the service corresponding to the service is tracked by determining the version number, and the deployment state of the service corresponding to the updating service is determined according to the version number, so that the deployment condition of the service is effectively monitored.
In an exemplary embodiment, the method further includes: acquiring the preset identification times of the operation and maintenance platform on the operation state; when the automatic detection times after the operation of the group of detection scripts are greater than the preset identification times, determining that the operation state detected by the group of detection scripts is invalid information, and sending prompt information to a management object of the operation and maintenance platform, wherein the prompt information is used for indicating that the operation and maintenance platform in the operation and maintenance state has abnormal detection when the detection scripts are used for detecting service; and under the condition that the automatic detection times after the operation of the group of detection scripts are less than or equal to the preset identification times, determining the operation state detected by the group of detection scripts as effective information, and allowing the operation and maintenance platform to start a determination process for determining whether the operation state of each service meets the corresponding preset operation result.
It can be understood that, in order to avoid that the detection script performs multiple identifications on the running states of services included in the same group of services, which results in a reduction in the overall detection efficiency of the group of services in the operation and maintenance platform, a preset identification frequency is set for a group of detection scripts, where the preset identification frequency is the sum of preset detection frequencies corresponding to each detection script in a group of detection scripts, for example, when 3 detection scripts exist in a current group of detection scripts, and the detection frequency corresponding to each detection script is 3, then the preset identification frequency corresponding to the current group of detection scripts is 9, and when the automatic detection frequency corresponding to the current group of detection scripts in actual running is 12, it is indicated that the current group of detection scripts are excessively run, and at this time, the detection scripts may be abnormal, and the detected running states are determined under the condition that the detection scripts may be abnormal, therefore, the accuracy of the detected running states is not high, it is necessary to prompt a management object of the operation and maintenance platform to perform an operation inspection of the operation and maintenance, and when the automatic detection frequencies corresponding to the current group of detection scripts in actual running scripts are 9 or less than 9, it is necessary to perform an effective deployment process of the detected service in the next step.
In order to better understand the process of the service deployment method, the following describes a flow of the implementation method of the service deployment with reference to an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present application.
After the services are deployed, whether the services are started or not needs to be manually checked, each service of the IOT has services close to hundreds of nodes in time, the checking is slow, the service capability checking also needs to be manually checked, if the checking fails, the services need to be re-deployed, the services cannot be deployed, the services are checked through an automatic interface, the services are returned after the failure, and the deployment is completed after the success.
As an optional implementation manner, a technical solution of left shift testing is provided, in order to reduce the manual service state inspection for service deployment, a left shift testing process is introduced, and by using an Opass deployment platform (equivalent to the operation and maintenance platform), a Jenkins scheduling tool, an automatic test script, an automatic service correctness inspection and a service business capability inspection, the manual investment is reduced, and the service deployment efficiency is improved. Specifically, an Opass deployment platform (equivalent to the operation and maintenance platform), a Jenkins scheduling tool and an automatic test script are used, specifically, operation and maintenance personnel (equivalent to the target object) deploy services on the Opass platform, after the service deployment is completed, a service checking button is clicked, the Opass can schedule the Jenkins engineering to run the automatic script, after the automation runs, an execution result is sent to a research and development object, a success rate is returned, if the success rate =100%, the deployment is successful, otherwise, the deployment fails, the Opass automatically backs to an old version, and the old version cannot influence the use of a user.
Optionally, fig. 3 is a flowchart of testing a service deployment service of a left shift according to an embodiment of the present application, including the following steps:
step one, platform deployment of service is carried out on an Opass deployment platform;
step two, after the service deployment is completed, running an automatic script and checking the service;
and step three, determining an inspection execution result.
And step four, sending a mail to inform that the service deployment is finished under the condition of successful execution.
And fifthly, when the execution fails or partially fails, the Opass deployment platform executes the automatic rollback of the service version corresponding to the service, so that the overall effective operation of the service is ensured. For example, if there are 4 services in a service, one service fails to be deployed, and the entire service fails to be deployed, at this time, in order to enable the user to use the service normally, the service content to be updated is returned to the current previous version.
And step six, sending an email notification to the research and development object, checking error reasons, and repackaging the services in the corresponding business. It should be noted that the left shift of the test can be understood as the return of the current version to the old version.
As an alternative implementation manner, fig. 4 is a flowchart for testing a left-shift automated business process according to an embodiment of the present application, including:
firstly, determining an output interface document;
secondly, determining related automation scripts according to the interface documents;
thirdly, placing the script into an automation server;
fourthly, a Jenkins project is built, the project name = the name of the opass service, and the project can be found conveniently when the opass service is checked;
fifthly, finding the project name according to the service name after the opass deploys the service;
and sixthly, executing Jenkins automation engineering and scheduling to an automation script.
And seventhly, returning the execution result of the automatic script to the operation after the execution of the automatic script is finished, and sending the mail.
In addition, if the service is detected by the automatic script to be deployed and does not meet the service requirement, the service automatically backs up and informs the research and development, and the use of a user is not influenced, so that the time for manually checking the service correctness is reduced, and a backspacing mechanism for efficiently processing the service deployment problem is constructed.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
Fig. 5 is a block diagram of a service deployment apparatus according to an embodiment of the present application. As shown in fig. 5, includes:
the first obtaining module 52 is configured to obtain a detection instruction triggered by a target object on a display interface of an operation and maintenance platform when a first group of services to be detected is deployed on the operation and maintenance platform;
a response module 54, configured to determine, in response to the detection instruction, a set of detection scripts corresponding to the first group of services from a plurality of preset scripts, where each detection script in the set of detection scripts is used to detect a running state of a corresponding service in the first group of services;
a second obtaining module 56, configured to obtain an operation state of each service in the first group of services by running the group of detection scripts, and determine whether the operation state of each service satisfies a corresponding preset operation result;
a first determining module 58, configured to determine that the first group of services is successfully deployed when the operation state of each service satisfies the corresponding preset operation result.
By the device, under the condition that the first group of services to be detected is deployed on the operation and maintenance platform, a detection instruction triggered by the target object on a display interface of the operation and maintenance platform is obtained; in response to the detection instruction, determining a group of detection scripts corresponding to the first group of services from a plurality of preset scripts, wherein each detection script in the group of detection scripts is used for detecting the running state of a corresponding service in the first group of services; the method comprises the steps that a group of detection scripts are operated, the operation state of each service in a first group of services is obtained, and whether the operation state of each service meets the corresponding preset operation result or not is determined; determining that the first group of services are successfully deployed under the condition that the operation state of each service meets the corresponding preset operation result; by adopting the technical scheme, the problems that service deployment cannot be automatically checked and the like in the related technology are solved, whether the running state of the group service to be detected meets the corresponding preset running result is determined by using the preset script and the operation and maintenance platform, the correctness of the automatic checking service and the service business capability are checked, the labor input is reduced, and the service deployment efficiency is improved.
In an exemplary embodiment, the response module is further configured to determine a service name of each service in the first group of services to be detected, so as to obtain a plurality of service names; matching the plurality of service names with a project name set corresponding to the plurality of preset scripts, wherein the project name set comprises: the operation and maintenance platform identification corresponding to different preset scripts and the preset service names corresponding to the different preset scripts; and determining a preset script which is identical to the service name and exists in the project name set as a group of detection scripts corresponding to the first group of services.
It can be understood that, because a plurality of automated test scripts can be flexibly arranged on the operation and maintenance platform according to actual test conditions, in order to use the automated test scripts to quickly correspond to the service to be tested, the corresponding work before the test is completed by constructing an engineering name set containing preset service names to match with the service name of each service, so that the service can smoothly find the corresponding automated test script (namely the preset script).
In an exemplary embodiment, the apparatus further includes: a second determining module, configured to determine that the first group of services fails to be deployed when the running state of at least one service in the first group of services does not meet a corresponding preset running result; packing the service data of the first group of services to obtain a backspacing data packet; and sending a prompt file carrying the rollback data packet to a development object connected with the operation and maintenance platform.
In an exemplary embodiment, the second determining module further includes: the adjusting unit is used for receiving the interactive information fed back to the operation and maintenance platform by the development object according to the prompt file; determining the data content to be adjusted corresponding to the backspacing data packet based on the interaction information; and adjusting the data content to be adjusted to obtain a second group of services needing to be retested.
For example, corresponding to 4 services in a service, the running state of one service does not meet the corresponding preset running result, the whole service fails to be deployed, at this time, the service failed to be deployed is packaged, a mail is sent to notify a development object of the service, the development object is prompted to check the reason of the service failure deployment, and each service is packaged again to generate a new group service to be tested. At this time, in order to enable the user to use the service normally, the service content to be updated is returned to the current previous version.
In an exemplary embodiment, the adjusting unit is further configured to determine an adjusting instruction corresponding to the data adjustment, where the adjusting instruction includes at least one of: addition, deletion, modification and replacement; analyzing the backspacing data packet, and adjusting the analyzed data corresponding to the backspacing data packet based on the adjusting instruction to obtain adjusted service data; and packaging the adjusted service data to obtain a second group of retested services.
In an exemplary embodiment, the apparatus further includes: the service module is used for carrying out service combination on a plurality of services in the first group of services which are successfully deployed to generate target services; determining a version number corresponding to the target service, and binding the target service and the version number to obtain a target file; and under the condition that the version number has a historical version number, updating the historical service corresponding to the historical version number by using the target file.
In order to improve the updating efficiency of the service corresponding to the service, the updating condition of the service corresponding to the service is tracked by determining the version number, and the deployment state of the service corresponding to the updating service is determined according to the version number, so that the deployment condition of the service is effectively monitored.
In an exemplary embodiment, the apparatus further comprises: the detection module is used for acquiring the preset identification times of the operation and maintenance platform on the operation state; under the condition that the automatic detection times after the operation of the group of detection scripts are greater than the preset identification times, determining to maintain the current versions of all the group services on the operation and maintenance platform; and under the condition that the automatic detection times after the group of detection scripts run are less than or equal to the preset identification times, determining to change the corresponding version of the group service according to the meeting condition of the running state of each service to the preset running result.
Embodiments of the present application also provide a storage medium including a stored program, where the program performs any one of the methods described above when executed.
Alternatively, in this embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, acquiring a detection instruction triggered by a target object on a display interface of an operation and maintenance platform under the condition that a first group of services to be detected is deployed on the operation and maintenance platform;
s2, responding to the detection instruction, and determining a group of detection scripts corresponding to the first group of services from a plurality of preset scripts, wherein each detection script in the group of detection scripts is used for detecting the running state of a corresponding service in the first group of services;
s3, acquiring the running state of each service in the first group of services by running the group of detection scripts, and determining whether the running state of each service meets the corresponding preset running result;
and S4, determining that the first group of services are successfully deployed under the condition that the running state of each service meets the corresponding preset running result.
Embodiments of the present application further provide an electronic device, comprising a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring a detection instruction triggered by a target object on a display interface of an operation and maintenance platform under the condition that a first group of services to be detected is deployed on the operation and maintenance platform;
s2, responding to the detection instruction, and determining a group of detection scripts corresponding to the first group of services from a plurality of preset scripts, wherein each detection script in the group of detection scripts is used for detecting the running state of a corresponding service in the first group of services;
s3, acquiring the running state of each service in the first group of services by running the group of detection scripts, and determining whether the running state of each service meets a corresponding preset running result;
and S4, determining that the first group of services are successfully deployed under the condition that the running state of each service meets the corresponding preset running result.
Optionally, in this embodiment, the storage medium may include but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a memory device and executed by a computing device, and in some cases, the steps shown or described may be executed out of order, or separately as integrated circuit modules, or multiple modules or steps thereof may be implemented as a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for service deployment, comprising:
under the condition that a first group of services to be detected are deployed on an operation and maintenance platform, a detection instruction triggered by a target object on a display interface of the operation and maintenance platform is obtained;
in response to the detection instruction, determining a set of detection scripts corresponding to the first group of services from a plurality of preset scripts, wherein each detection script in the set of detection scripts is used for detecting the running state of a corresponding service in the first group of services;
acquiring the running state of each service in the first group of services by running the group of detection scripts, and determining whether the running state of each service meets a corresponding preset running result;
and determining that the first group of services are successfully deployed under the condition that the operation state of each service meets the corresponding preset operation result.
2. The service deployment method of claim 1, wherein determining a set of detection scripts corresponding to the first set of services from a plurality of preset scripts comprises:
determining the service name of each service in the first group of services to be detected to obtain a plurality of service names;
matching the plurality of service names with a project name set corresponding to the plurality of preset scripts, wherein the project name set comprises: the operation and maintenance platform identification corresponding to different preset scripts and the preset service names corresponding to the different preset scripts;
and determining a preset script which is identical to the service name and exists in the project name set as a group of detection scripts corresponding to the first group of services.
3. The service deployment method according to claim 1 or 2, wherein after determining whether the operation status of each service satisfies the corresponding preset operation result, the method further comprises:
determining that the first group of services fails to be deployed under the condition that the running state of at least one service in the first group of services does not meet the corresponding preset running result;
packing the service data of the first group of services to obtain a backspacing data packet;
and sending a prompt file carrying the rollback data packet to a development object connected with the operation and maintenance platform.
4. The service deployment method according to claim 3, wherein after sending the prompt file carrying the rollback data packet to the development object connected to the operation and maintenance platform, the method further comprises:
receiving interactive information fed back to the operation and maintenance platform by the development object according to the prompt file;
determining the data content to be adjusted corresponding to the backspacing data packet based on the interaction information;
and adjusting the data content to be adjusted to obtain a second group of services needing to be retested.
5. The service deployment method according to claim 4, wherein performing data adjustment on the data content to be adjusted to obtain a second group of services to be retested comprises:
determining an adjustment instruction corresponding to the data adjustment, wherein the adjustment instruction comprises at least one of the following: addition, deletion, modification and replacement;
analyzing the backspacing data packet, and adjusting the analyzed data corresponding to the backspacing data packet based on the adjusting instruction to obtain adjusted service data;
and packaging the adjusted service data to obtain a second group of retested services.
6. The service deployment method according to any one of claims 1 to 5, wherein after determining that the first group of services are successfully deployed when the operation state of each service satisfies the corresponding preset operation result, the method further comprises:
performing service combination on a plurality of services in the first group of services which are successfully deployed to generate a target service; determining a version number corresponding to the target service, and binding the target service and the version number to obtain a target file;
and under the condition that the version number has a historical version number, updating the historical service corresponding to the historical version number by using the target file.
7. The service deployment method according to any one of claims 1 to 6, characterized in that the method further comprises:
acquiring the preset identification times of the operation and maintenance platform on the operation state;
when the number of automatic detection times after the operation of the group of detection scripts is greater than the preset identification times, determining that the operation state detected by the group of detection scripts is invalid information, and sending prompt information to a management object of the operation and maintenance platform, wherein the prompt information is used for indicating that the operation and maintenance platform in the operation and maintenance state has detection abnormality when the detection script detection service is used;
and under the condition that the automatic detection times after the operation of the group of detection scripts are less than or equal to the preset identification times, determining that the operation state detected by the group of detection scripts is effective information, and allowing the operation and maintenance platform to start a determination process for determining whether the operation state of each service meets the corresponding preset operation result.
8. A service deployment apparatus, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a detection instruction triggered by a target object on a display interface of an operation and maintenance platform under the condition that a first group of services to be detected is deployed on the operation and maintenance platform;
a response module, configured to determine, in response to the detection instruction, a set of detection scripts corresponding to the first group of services from a plurality of preset scripts, where each detection script in the set of detection scripts is used to detect an operating state of a corresponding service in the first group of services;
the second acquisition module is used for acquiring the running state of each service in the first group of services by running the group of detection scripts and determining whether the running state of each service meets the corresponding preset running result;
and the first determining module is used for determining that the first group of services are successfully deployed under the condition that the running state of each service meets the corresponding preset running result.
9. A computer-readable storage medium, comprising a stored program, wherein the program, when executed by a processor, performs the method of any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202211056180.6A 2022-08-31 2022-08-31 Service deployment method and device, storage medium and electronic device Pending CN115865650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211056180.6A CN115865650A (en) 2022-08-31 2022-08-31 Service deployment method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211056180.6A CN115865650A (en) 2022-08-31 2022-08-31 Service deployment method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115865650A true CN115865650A (en) 2023-03-28

Family

ID=85660697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211056180.6A Pending CN115865650A (en) 2022-08-31 2022-08-31 Service deployment method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115865650A (en)

Similar Documents

Publication Publication Date Title
CN109683899B (en) Software integration method and device
US20140165040A1 (en) Test script generation for application image validation
CN105550113A (en) Web test method and test machine
KR101919668B1 (en) Apparatus and method for test and evaluation of security patch for distribution automation system
CN112994952B (en) Distributed base station upgrading processing method and system
CN110647453A (en) Application performance comparison test method, system, equipment and computer readable storage medium
CN115865650A (en) Service deployment method and device, storage medium and electronic device
CN115499333A (en) Method, system, storage medium and electronic device for determining association relationship
CN115934523A (en) Target test data generation method and device, storage medium and electronic device
CN115826553A (en) Fault removing method and electronic device
CN115687806A (en) Method and device for determining target equipment list, storage medium and electronic device
CN113407451A (en) Test method, device, equipment, storage medium and program product
CN107678905B (en) Monitoring method and device
CN107577546B (en) Information processing method and device and electronic equipment
CN110988545A (en) In-situ protection equipment testing method and system
CN115941834B (en) Automatic operation method, device, equipment and storage medium of smart phone
CN115834435A (en) Interface test method and device, storage medium and electronic device
CN115794116A (en) Dynamic project publishing method and device, storage medium and electronic device
CN115827451A (en) Method and device for detecting test defects, storage medium and electronic device
CN115358296A (en) Log clustering method and device, storage medium and electronic device
CN115545677B (en) Online process specification detection method and system based on automatic case execution condition
CN115033475A (en) Test case execution method and device, storage medium and electronic device
CN113778800B (en) Error information processing method, device, system, equipment and storage medium
CN100518100C (en) Device and method of automatic test for pressure resistance capability of communication system
CN116225456A (en) Program deployment method, device, storage medium and terminal

Legal Events

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