Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.
Fig. 1 is a system block diagram illustrating a service switch state control method and apparatus according to an exemplary embodiment.
As shown in fig. 1, thesystem architecture 10 may includeterminal devices 101, 102, 103, anetwork 104, and aserver 105. Thenetwork 104 serves as a medium for providing communication links between theterminal devices 101, 102, 103 and theserver 105.Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use theterminal devices 101, 102, 103 to interact with theserver 105 via thenetwork 104 to receive or send messages or the like. Theterminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web service configuration application, a data configuration application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
Theterminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
Theserver 105 may be a server providing various services, such as a background server that processes configuration information submitted by users using theterminal devices 101, 102, 103. The background management server can analyze and process the received configuration data, and update the configuration file according to the processing result.
Theterminal device 101, 102, 103 may for example present the states of a plurality of services on said service presentation page above; theterminal devices 101, 102, 103 may determine a target service according to a selection of a user, for example, on the service presentation page; theterminal device 101, 102, 103 may, for example, extract the attribute of the target service to expand a configuration detail page corresponding to the target service; theterminal device 101, 102, 103 may obtain the operation instruction of the user, for example, on the configuration detail page; theterminal device 101, 102, 103 may for example send an identification of said target service and said operation instructions to theserver 105 to control the switching state of said target service.
Theserver 105 may be a single entity server, or may be composed of a plurality of servers, for example, it should be noted that the service switch state control method provided by the embodiment of the present disclosure may be executed by theserver 105 and theterminal devices 101, 102, and 103 together, and accordingly, the service switch state control device may be disposed in theserver 105 and theterminal devices 101, 102, and 103.
Fig. 2 is a flow chart illustrating a service switch state control method according to an exemplary embodiment. The service switchstate control method 20 includes at least steps S202 to S210.
As shown in fig. 2, in S202, the states of a plurality of services are presented on the service presentation page. The method comprises the following steps: acquiring the service starting configuration file; extracting states of the plurality of services based on the service launch profile; and performing classified display in the service display page according to the states of the plurality of services.
The service starting configuration file stores the starting or closing of all services in the system, and the configuration file and the database corresponding to each service. The service identification and the corresponding open or close state thereof can be extracted one by one in the service starting configuration, and a plurality of services and the corresponding open or close states thereof are displayed in the service display page.
In a specific application scenario, the service presentation page may be a service presentation page of the network security device, a button for starting the service presentation page may be provided in the attribute page of the network security device, and the service presentation page is presented when the user clicks the button. More specifically, there may be a "service controller" button in the top right functional area of the network security device page, and clicking the button pops up a pop-up box containing all the service switches on the device. The user can configure all service switches on certain equipment through one page, and can visually see which services are started and which services are closed, so that great convenience is provided for subsequent setting operation of the user.
As shown in fig. 3, the open or closed states of the services may be sequentially displayed on the service display page in a sorting manner based on the service identifier, and as shown in fig. 4, the services may be divided into two categories according to the open and closed states, and the service display page may be divided into two columns for respectively displaying the corresponding services.
More specifically, when a pop-up box of the service controller is opened each time, the page requests service data to the background, the background directly reads the flag value of each service item in the configuration file, and transmits the flag value to the page, so that the page receives the data value returned by the background, and the service is started or closed on the page and is displayed in a mode of checking whether to select a selection box or not.
The service controller pop-up box is also provided with a sorting button, and by clicking the sorting button, the services can be sorted according to the starting and non-starting, the started service is indicated on the left side in a checking way, and the non-started service is indicated on the right side. This allows the administrator to know at a glance which services are active and which services are inactive.
In S204, a target service is determined according to the selection of the user on the service presentation page. Continuing with FIG. 3, the user may determine the target service to be processed by clicking on the service.
In S206, the attribute of the target service is extracted to expand the configuration detail page corresponding to the target service. The method comprises the following steps: extracting a URL address from the attribute; and expanding a configuration detail page corresponding to the target service based on the URL address.
In the system, each service contains a built-in attribute hurl, the value of hurl is the URL address of the detailed page corresponding to each service switch, and the service name is clicked by a mouse, so that the service can jump to the detailed page of the service. E.g., clicking on the virtual system, jumps to the virtual system configuration page, as shown in fig. 5.
In S208, an operation instruction of the user is acquired on the configuration detail page. The method comprises the following steps: generating an operation instruction based on the operation of the user on the configuration detail page; the operation instruction comprises an opening instruction and a closing instruction, the state value of the operation instruction corresponding to the opening instruction is 1, and the state value of the operation instruction corresponding to the closing instruction is 0.
The initiation and shutdown of services on the device may be configured via a configuration details page as shown in figure 5. For example, the virtual system is selected to start, the submit button is clicked, the page issues the data of the virtual system to the background, the virtual system is represented by vsys, the start is represented by 1, the stop is represented by 0, and the data issued to the background can be vsys: 1.
In S210, the identifier of the target service and the operation instruction are sent to a background server to control the on/off state of the target service. Updating the service starting configuration file in the background server based on the operation instruction; and updating the configuration file corresponding to the target service in the background server based on the operation instruction.
The background service data is stored in the database, and some are stored in the configuration file, so that the configuration file of the storage service is represented by a filename, the switchname represents the field name used by the service in the stored configuration file, db _ table represents which database table is stored in, and the value of db _ data represents the specific database.
After receiving data transmitted from a front end, a background searches a data item consistent with a service name in a service starting configuration file, if the data sent by a virtual system is vsys:1, finds a corresponding data item vsys in the configuration file, reads and modifies the value of the data item, the value of a modification flag is 1, the values of a filename and a switch name are read, and the value of the switch is modified to be 1 in a configuration file of "/ect/web/vsys _ switch. Thus, the configuration of the data in the background is completed.
When each service detail page is configured, besides modifying the corresponding value of the service in the database or the configuration file, the service start configuration file is also modified, so that the data on both sides are kept consistent.
According to the service switch state control method, states of a plurality of services are displayed on the service display page; determining a target service according to the selection of the user on the service display page; extracting the attribute of the target service to expand a configuration detail page corresponding to the target service; acquiring an operation instruction of the user on the configuration detail page; the identification of the target service and the operation instruction are sent to a background server to control the on-off state of the target service, so that a user can be assisted to flexibly, conveniently and quickly turn on or off the service configuration, the time consumption of operation is reduced, and the operation efficiency and accuracy are improved.
It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
Fig. 6 is a flowchart illustrating a service switch state control method according to another exemplary embodiment. Theprocess 60 shown in fig. 6 is a detailed description of the step S210 "sending the identification of the target service and the operation instruction to the background server to control the on/off state of the target service" in the process shown in fig. 2.
As shown in fig. 6, in S602, a service start configuration file is established in the background server, and the server configuration file stores states of a plurality of services in the background service. As shown in fig. 7, each service in the backend server is stored in a respective configuration file or database, and a "service start" configuration file may be established in the backend server, in which the start or the stop of each service and the configuration file or database corresponding to each service are recorded in detail.
As shown in fig. 7, vsys may represent a virtual system, flag may represent startup or shutdown, background service data is stored in a database, and background service data is stored in a configuration file, so that a filename may represent a configuration file of a storage service, switchname represents a field name used by the service in the stored configuration file, db _ table represents which database table is stored, and db _ data represents a specific database.
In S604, the service start configuration file in the background server is updated based on the operation instruction. The method comprises the following steps: extracting the state value of the operation instruction; searching a data item corresponding to the target service identification in the service starting configuration file; and updating the state value corresponding to the operation instruction in the data item.
After receiving data transmitted from the front end, the background firstly searches a data item consistent with the service name in a service starting configuration file, if the data issued by the virtual system is vsys:1, searches a corresponding data item vsys in the configuration file, then reads and modifies the value of the data item, and the modified flag value is 1.
In S606, the configuration file corresponding to the target service in the background server is updated based on the operation instruction. The method comprises the following steps: extracting the state value of the operation instruction; searching a configuration file corresponding to the target service identification in the background server; and updating the state value corresponding to the operation instruction in the configuration file.
Searching the configuration file corresponding to the target service identifier in the background server includes: searching a data item corresponding to the target service identification in the service starting configuration file; extracting the configuration file name and the storage position corresponding to the target service identification from the data item; and determining the configuration file corresponding to the target service identification based on the configuration file name and the storage position.
After receiving data transmitted by the front end, the background first searches for a data item consistent with the service name in a "service start" configuration file, for example, the data sent by the virtual system is vsys:1, and searches for the values of the filename and the switch name in the configuration file, and more specifically, the value of "switch" may be modified to be 1 in the configuration file of "/ect/web/vsys _ switch. Thus, the configuration of the data in the background is completed.
According to the service switch state control method disclosed by the invention, a user can configure all services on the network security equipment to be started or closed through one page, the page issues service data to be started or closed to the background, and the background searches the configuration file or the database storing the service data through the service starting configuration file, so that the service data is modified. The user can configure various services on the network security equipment through the service controller without configuring through each page or starting or closing the services in a mode of executing a plurality of commands, so that the complexity in operation is reduced, and the user operation is more convenient, simpler and quicker.
According to the service switch state control method disclosed by the invention, the user can clearly know which services are started and which services are closed through the display information of one page, so that the user can clearly know the information, and the operation convenience is improved.
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 8 is a block diagram illustrating a service switch state control apparatus according to an exemplary embodiment. As shown in fig. 8, the service switchstate control device 80 includes: apresentation module 802, aselection module 804, anextraction module 806, aninstruction module 808, acontrol module 810, and asetup module 812.
Thepresentation module 802 is configured to present states of a plurality of services on the service presentation page; thepresentation module 802 may obtain the service initiation profile; extracting states of the plurality of services based on the service launch profile; and performing classified display in the service display page according to the states of the plurality of services.
Theselection module 804 is used for determining a target service according to the selection of the user on the service display page;
the extractingmodule 806 is configured to extract the attribute of the target service to expand a configuration detail page corresponding to the target service; theextraction module 806 can extract the URL address from the attribute; and expanding a configuration detail page corresponding to the target service based on the URL address.
Theinstruction module 808 is configured to obtain an operation instruction of the user on the configuration detail page; theinstruction module 808 is further configured to generate an operation instruction based on an operation of the user on the configuration detail page; the operation instruction comprises an opening instruction and a closing instruction, the state value of the operation instruction corresponding to the opening instruction is 1, and the state value of the operation instruction corresponding to the closing instruction is 0.
Thecontrol module 810 is configured to send the identifier of the target service and the operation instruction to a background server to control the on/off state of the target service. Thecontrol module 810 is further configured to update the service start configuration file in the background server based on the operation instruction; and updating the configuration file corresponding to the target service in the background server based on the operation instruction.
The establishingmodule 812 is configured to establish a service start configuration file in the background server, where the server configuration file stores states of multiple services in the background service.
According to the service switch state control device disclosed by the invention, states of a plurality of services are displayed on the service display page; determining a target service according to the selection of the user on the service display page; extracting the attribute of the target service to expand a configuration detail page corresponding to the target service; acquiring an operation instruction of the user on the configuration detail page; the identification of the target service and the operation instruction are sent to a background server to control the on-off state of the target service, so that a user can be assisted to flexibly, conveniently and quickly turn on or off the service configuration, the time consumption of operation is reduced, and the operation efficiency and accuracy are improved.
FIG. 9 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Anelectronic device 900 according to this embodiment of the disclosure is described below with reference to fig. 9. Theelectronic device 900 shown in fig. 9 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present disclosure.
As shown in fig. 9, theelectronic device 900 is embodied in the form of a general purpose computing device. Components ofelectronic device 900 may include, but are not limited to: at least oneprocessing unit 910, at least onestorage unit 920, abus 930 connecting different system components (including thestorage unit 920 and the processing unit 910), a display unit 940, and the like.
Wherein the storage unit stores program code that can be executed by theprocessing unit 910 such that theprocessing unit 910 performs the steps according to various exemplary embodiments of the present disclosure described in this specification. For example, theprocessing unit 910 may perform the steps shown in fig. 2 and fig. 6.
Thestorage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM)9201 and/or acache memory unit 9202, and may further include a read only memory unit (ROM) 9203.
Thememory unit 920 may also include a program/utility 9204 having a set (at least one) ofprogram modules 9205,such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 930 can be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
Theelectronic device 900 may also communicate with one or more external devices 900' (e.g., keyboard, pointing device, bluetooth device, etc.), such that a user can communicate with devices with which theelectronic device 900 interacts, and/or any device (e.g., router, modem, etc.) with which theelectronic device 900 can communicate with one or more other computing devices. Such communication may occur via input/output (I/O)interface 950. Also, theelectronic device 900 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via thenetwork adapter 960. Thenetwork adapter 960 may communicate with other modules of theelectronic device 900 via thebus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with theelectronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, as shown in fig. 10, the technical solution according to the embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present disclosure.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: displaying the states of a plurality of services on the service display page; determining a target service according to the selection of the user on the service display page; extracting the attribute of the target service to expand a configuration detail page corresponding to the target service; acquiring an operation instruction of the user on the configuration detail page; and sending the identification of the target service and the operation instruction to a background server to control the on-off state of the target service.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the present disclosure is not limited to the precise arrangements, instrumentalities, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.