Service flow switching method and related device
By introducing user access unit, data processing unit and configuration verification unit into the service traffic switching device, automated background software configuration modification is realized, solving the problems of low efficiency and poor accuracy of manual modification, and significantly improving service traffic switching is achieved efficiency and accuracy.
Patent Information
- Application Number
- CN202411369005.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-27
AI Technical Summary
In the prior art, manual modification of background software configuration is inefficient, which can easily lead to input errors or omissions, resulting in poor accuracy of service traffic switching.
A service traffic switching device is designed, including a user access unit, a data processing unit and a configuration verification unit. The user access unit receives and verifies the service traffic switching request, the data processing unit analyzes and formats to verify the configuration modification data, and configures the The check unit executes a preset configuration modification script to automatically modify the configuration.
It improves the accuracy and efficiency of service traffic switching, reduces the risk of configuration errors caused by misoperation and data format errors, and shortens the configuration modification time.
Smart Images

Figure CN119211370A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a service flow switching method and related devices. Background Art
[0002] With the rapid expansion of business scale, enterprises are facing increasingly fierce market competition and rapidly changing market demands. Enterprises need to dynamically adjust the allocation of user requests between different services or products to adapt to different business scenarios. Therefore, the importance of business traffic switching has become increasingly prominent.
[0003] Currently, the configuration of the background software is usually modified manually.
[0004] However, when the configuration content of the background software is complex or numerous, manual modification one by one will result in low efficiency of business traffic switching, and input errors or omissions are prone to occur, resulting in poor accuracy of business traffic switching. Summary of the invention
[0005] In view of the above problems, the present application provides a service traffic switching method and related devices to improve the efficiency and accuracy of service traffic switching. The specific scheme is as follows:
[0006] The first aspect of the present application provides a service flow switching device, comprising: a user access unit, a data processing unit and a configuration checking and modifying unit,
[0007] The user access unit is used to receive a service traffic switching request from a user, wherein the service traffic switching request carries a parameter for modifying a target modification configuration of the background software and a digital signature certificate for identifying the identity of the user, wherein the target modification configuration is a configuration required to be modified for the service traffic switching;
[0008] The user access unit is further configured to verify the service flow switching request, and if the verification passes, send the parameters for modifying the target modification configuration of the background software to the data processing unit;
[0009] The data processing unit is used to parse the parameters for modifying the target modification configuration of the background software, obtain at least one set of configuration modification data, perform format verification on the obtained configuration modification data, and if the format verification passes, convert the obtained configuration modification data into script modification parameters and send them to the configuration checking unit;
[0010] The configuration checking and modifying unit is used to transfer the script modification parameters into a preset configuration modification script, and then execute the configuration modification script to modify the target modification configuration.
[0011] A second aspect of the present application provides a service traffic switching method, which is applied to any of the above-mentioned service traffic switching devices, and the method includes:
[0012] The user access unit receives a service traffic switching request from a user, wherein the service traffic switching request carries a parameter for modifying a target modification configuration of the background software and a digital signature certificate for identifying the identity of the user, wherein the target modification configuration is a configuration required to be modified for the service traffic switching;
[0013] The user access unit verifies the service traffic switching request, and if the verification passes, sends the parameters for modifying the target modification configuration of the background software to the data processing unit;
[0014] The data processing unit parses the parameters for modifying the target modification configuration of the background software to obtain at least one set of configuration modification data, performs format verification on the obtained configuration modification data, and if the format verification passes, converts the obtained configuration modification data into script modification parameters and sends them to the configuration checking unit;
[0015] The configuration checking and modifying unit transfers the script modification parameters into a preset configuration modification script, and then executes the configuration modification script to modify the target modification configuration.
[0016] A third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the service traffic switching method of the second aspect.
[0017] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0018] The memory is used to store computer programs;
[0019] The processor is used to execute the computer program so that the electronic device can implement the service traffic switching method of the second aspect mentioned above.
[0020] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the service traffic switching method of the second aspect mentioned above.
[0021] By means of the above technical scheme, the present application provides a method for switching business traffic and a related device. The device includes a user access unit, a data processing unit and a configuration check and modification unit. Among them, the user access unit is used to receive the business traffic switching request of the user, and verify the business traffic switching request. If the verification is passed, the parameters for modifying the configuration required for the business traffic switching of the background software are sent to the data processing unit. Only legal requests can be further processed, which reduces the possibility of misoperation. The data processing unit is used to parse the parameters for modifying the target modification configuration of the background software, obtain at least one set of configuration modification data, and perform format verification on the obtained configuration modification data. If the format verification is passed, the obtained configuration modification data is converted into script modification parameters and sent to the configuration check and modification unit, which reduces the risk of configuration errors caused by data format errors. The configuration check and modification unit is used to pass the script modification parameters into the preset configuration modification script, and automatically modify the target modification configuration by executing the configuration modification script, which greatly shortens the configuration modification time and greatly improves the accuracy and efficiency of business traffic switching. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0023] Figure 1 A schematic diagram of the structure of a service flow switching device provided in an embodiment of the present application;
[0024] Figure 2 A flow chart of a service flow switching method provided in an embodiment of the present application;
[0025] Figure 3 A flowchart of another service flow switching method provided in an embodiment of the present application;
[0026] Figure 4 A schematic diagram of the hardware structure of a service flow switching device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0029] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0031] In order to improve the efficiency and accuracy of business traffic switching, the present application provides a business traffic switching device. The business traffic switching device provided by the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0032] Please refer to the attached Figure 1 , Figure 1 The present invention provides a schematic diagram of the structure of a service flow switching device provided in an embodiment of the present invention. The service flow switching device comprises: a user access unit 11, a data processing unit 12 and a configuration checking and modifying unit 13.
[0033] The user access unit 11 is used to receive the user's service traffic switching request, which carries parameters for modifying the target modification configuration of the background software and a digital signature certificate for identifying the user's identity. The target modification configuration is the configuration required to be modified for the service traffic switching.
[0034] It should be noted that users need to understand and master the correspondence between services and configurations in advance, that is, to clarify which service corresponds to which configuration, which helps users to more accurately construct the parameters for modifying the target modification configuration of the background software in the service traffic switching request and avoid unnecessary errors or confusion.
[0035] In the present application, the user access unit 11 acts as a bridge for interaction with users, where the users are usually the service callers or maintenance personnel of the background software, who hope to achieve rapid switching of service traffic by modifying the configuration of the background software. The user access unit 11 is mainly responsible for receiving, processing and forwarding the user's service traffic switching request. The service traffic switching request usually includes parameters for modifying the target modification configuration of the background software, and a digital signature credential Token for identifying the user's identity. Among them, the parameters for modifying the target modification configuration of the background software specifically describe how the user wants to modify the configuration to achieve switching of service traffic.
[0036] The user access unit 11 is also used to verify the service flow switching request, and if the verification is passed, the parameters for modifying the target modification configuration of the background software are sent to the data processing unit.
[0037] In this application, the upstream software will configure the user name and password used to call the Token authentication API (Application Programming Interface) in the device, and the user uses the above user name and password to log in. After receiving the service flow switching request (such as HTTP request) from the user, the user access unit 11 can verify the user's username and password through an interface (such as Token authentication API) based on a protocol (such as HTTP), and after the verification is passed, a Token is generated according to the username and password and the Token is returned to the user.
[0038] At this point, the user has successfully authenticated through the Token authentication API and obtained a Token. When the user calls the configuration modification API, the user needs to put this Token into the header information (such as HTTP Header) of the service traffic switching request. The user access unit 11 extracts the Token from the header information of the service traffic switching request and compares it with the Token pre-stored in the device to verify the legitimacy of the user's identity. This ensures that only authorized users can access and modify the configuration.
[0039] After the Token authentication is passed, the user access unit 11 may also perform a series of checks on the service traffic switching request itself to ensure the legitimacy, validity and security of the service traffic switching request. These checks may include checking the integrity, format compliance, and authority verification of the parameters for modifying the target modification configuration of the background software.
[0040] If the service traffic switching request passes the identity authentication and verification, the user access unit 11 will extract the parameters for modifying the background software target modification configuration from the service traffic switching request and send it to the data processing unit.
[0041] If identity authentication or verification fails, the service traffic switching request will be rejected and an error message will be returned to the user.
[0042] The data processing unit 12 is used to parse the parameters for modifying the target modification configuration of the background software, obtain at least one set of configuration modification data, perform format verification on the obtained configuration modification data, and if the format verification passes, convert the obtained configuration modification data into script modification parameters and send them to the configuration checking unit 13.
[0043] In the present application, the data processing unit 12 first parses the received parameters for modifying the target modification configuration of the background software, and extracts useful data, namely, configuration modification data, from the parameters, which include the configuration items to be modified and their new values, and then performs format verification on the configuration modification data (such as checking the data type, value range, format specification, etc.). If the format verification passes, it means that the configuration modification data meets the format requirements expected by the device, and the data processing unit 12 converts the configuration modification data into script modification parameters. Finally, the script modification parameters are sent to the configuration check and modification unit 13.
[0044] It should be noted that there are many forms of parameters for modifying the target modification configuration of the background software, such as JSON, XML, CSV, etc. There are also many forms of script modification parameters, such as Bash, Python, PowerShell, etc., which are specially designed for preset configuration modification scripts so that the scripts can understand and perform the corresponding modification operations.
[0045] The configuration checking and modifying unit 13 is used to pass the script modification parameters into the preset configuration modification script, and then execute the configuration modification script to modify the target modification configuration.
[0046] In the present application, the configuration checking and modification unit 13 first passes the received script modification parameters into the preset configuration modification script, and then executes the configuration modification script. The configuration modification script determines the target modification configuration according to the script modification parameters, creates a parameter modification file with the current timestamp as the suffix, writes the script modification parameters into the parameter modification file, and sends the parameter modification file to the server running the background software, so that the server modifies the target modification configuration according to the parameter modification file.
[0047] It should be noted that the configuration modification script is pre-written and contains all the logic and instructions required to perform the configuration modification. The configuration modification script will automatically modify the configuration of the background software according to the script modification parameters passed in.
[0048] Specifically, the configuration checking and modifying unit 13 can verify the script modification parameters passed in, so as to determine which configuration item the user has modified, and then create parameter modification files with the current timestamp as the suffix, write the script modification parameters into the parameter modification files, and simultaneously use multi-threading technology to connect multiple servers of the upstream software, transmit the parameter modification files to these servers in parallel, and instruct the servers to perform modification operations such as adding, deleting, and replacing the target modification configuration according to the parameter modification files. Among them, the parameter modification files are used to store the parameter information required for the execution of the configuration modification script.
[0049] In summary, the present application provides a service traffic switching device. The device includes a user access unit, a data processing unit and a configuration checking and modifying unit. Among them, the user access unit is used to receive the service traffic switching request of the user, and verify the service traffic switching request. If the verification is passed, the parameters for modifying the configuration required for the service traffic switching of the background software are sent to the data processing unit. Only legal requests can be further processed, which reduces the possibility of misoperation. The data processing unit is used to parse the parameters for modifying the target modification configuration of the background software, obtain at least one set of configuration modification data, and perform format verification on the obtained configuration modification data. If the format verification is passed, the obtained configuration modification data is converted into script modification parameters and sent to the configuration checking and modifying unit, which reduces the risk of configuration errors caused by data format errors. The configuration checking and modifying unit is used to pass the script modification parameters into the preset configuration modification script, and automatically modify the target modification configuration by executing the configuration modification script, which greatly shortens the configuration modification time and greatly improves the accuracy and efficiency of service traffic switching.
[0050] Furthermore, based on the above device, it may also include:
[0051] The configuration checking and modifying unit 13 is also used to obtain modification result data of the target modified configuration and send the modification result data to the data processing unit 12 .
[0052] In the present application, while creating parameter modification files with the current timestamp as a suffix, a log modification file is also created. The log modification file is used to record the result data generated by the execution of the configuration modification script. Therefore, after executing the configuration modification script to complete the modification of the target modification configuration, the modification result will be written back to the local log modification file. The configuration check and modification unit 13 will parse the log file, compare, remove duplicates, aggregate, and other processes on the recorded operation results to generate the final modification result data, and return it to the data processing unit 12.
[0053] It should be noted that the modification result data will list the modification results of each configuration item in detail, including which modifications were successful, which failed, and the reasons for the failure.
[0054] The data processing unit 12 is further configured to parse the modification result data, filter the modified data obtained after the analysis according to the service traffic switching request, and send the filtered modified data to the user access unit 11 .
[0055] In the present application, after receiving the modification result data, the data processing unit 12 first parses the received data to extract specific modification result information. Then, according to the specific instructions or requirements contained in the service flow switching request, the parsed modification data is screened to extract key information or response data in a specific format that the user may be concerned about. Finally, the screened modification data is sent to the user access unit 11.
[0056] The user access unit 11 is also used to output the screened modified data to the user.
[0057] In the present application, the user access unit 11 first converts the received modified data after filtering into a format suitable for the user to receive (such as JSON, XML, HTML, etc.), and then sends the modified data after filtering back to the user through a corresponding network protocol (such as HTTP). The user can receive and view the modified data after filtering through a browser, a command line tool, an API client, etc.
[0058] To sum up, this application greatly reduces data redundancy and irrelevant information, improves data utilization, enables users to obtain modification results faster, and ensures user experience by configuring the collaborative work of the query and modification unit, the data processing unit, and the user access unit.
[0059] Furthermore, based on the above device, it may also include:
[0060] The user access unit 11 is also used to receive a configuration query request from a user, which carries parameters for querying a target query configuration of the background software and a digital signature certificate for identifying the user's identity. The target query configuration is a configuration required for querying business traffic switching.
[0061] It should be noted that users need to understand and master the correspondence between services and configurations in advance, that is, to clarify which service corresponds to which configuration, which helps users to more accurately construct the parameters for querying the target query configuration of the backend software in the configuration query request and avoid unnecessary errors or confusion.
[0062] In this application, the user access unit 11 acts as a bridge for interaction with the user, where the user is usually the business caller or maintenance personnel of the background software. The user access unit 11 is mainly responsible for receiving, processing and forwarding the user's configuration query request. The configuration query request usually contains parameters for querying the target query configuration of the background software, as well as a digital signature credential Token used to identify the user's identity.
[0063] The user access unit 11 is also used to verify the configuration query request, and if the verification is successful, send the parameters for querying the target query configuration of the background software to the data processing unit 12.
[0064] In this application, the upstream software will configure the user name and password used to call the Token authentication API in the device, and the user uses the above user name and password to log in. After receiving the configuration query request (such as HTTP request) from the user, the user access unit 11 can verify the user's username and password through an interface (such as Token authentication API) based on a protocol (such as HTTP), and after the verification is passed, a Token is generated according to the username and password and the Token is returned to the user.
[0065] At this point, the user has successfully authenticated through the Token authentication API and obtained a Token. When the user calls the configuration query API, the user needs to put this Token into the header information (such as HTTP Header) of the configuration query request. The user access unit 11 will extract the Token from the header information of the configuration query request and compare it with the Token pre-stored in the device to verify the legitimacy of the user's identity. This ensures that only authorized users can access and query the configuration.
[0066] After the Token authentication is passed, the user access unit 11 may also perform a series of checks on the configuration query request itself to ensure the legitimacy, validity and security of the service traffic switching request. These checks may include checking the integrity, format compliance, and authority verification of the parameters for querying the target query configuration of the background software.
[0067] If the configuration query request passes the identity authentication and verification, the user access unit 11 will extract the parameters for querying the background software target query configuration from the configuration query request and send them to the data processing unit 12 .
[0068] If authentication or verification fails, the configuration query request will be rejected and an error message will be returned to the user.
[0069] The data processing unit 12 is also used to parse the parameters for querying the target query configuration of the background software, obtain at least one set of configuration query data, perform format verification on the obtained configuration query data, and if the format verification passes, convert the obtained configuration query data into script query parameters and send them to the configuration query unit 13.
[0070] In the present application, the data processing unit 12 first parses the received parameters for querying the target query configuration of the background software, and extracts useful data, namely, configuration query data, from the parameters. These configuration query data include the configuration items to be queried and their new values. Then, the configuration query data is formatted (such as checking the data type, value range, format specification, etc.). If the format verification passes, it means that the configuration query data meets the format requirements expected by the device, and the data processing unit 12 converts the configuration query data into script query parameters. Finally, the script query parameters are sent to the configuration query unit 13.
[0071] It should be noted that there are many forms of parameters for querying the target query configuration of the background software, such as JSON, XML, CSV, etc. There are also many forms of script query parameters, such as Bash, Python, PowerShell, etc., which are specially designed for the preset configuration query script so that the script can understand and execute the corresponding query operation.
[0072] The configuration query unit 13 is further used to pass the script query parameters into a preset configuration query script, and then execute the configuration query script to query the target query configuration.
[0073] In the present application, the configuration query and modification unit 13 first passes the received script query parameters into the preset configuration query parameter script, and then executes the configuration query script. The configuration query script determines the target query configuration according to the script query parameters, creates a parameter query file with the current timestamp as the suffix, writes the script query parameters into the parameter query file, and sends the parameter query file to the server running the background software, so that the server queries the target query configuration according to the parameter query file.
[0074] It should be noted that the configuration query script is pre-written and contains all the logic and instructions required to perform the configuration query. The configuration query script will automatically query the configuration of the background software according to the incoming script query parameters.
[0075] Specifically, the configuration checking and modifying unit 13 can verify the incoming script query parameters to determine which configuration item the user is querying, and then create parameter query files with the current timestamp as the suffix, write the script query parameters into the parameter query files, and simultaneously use multi-threading technology to connect multiple servers of the upstream software, transmit the parameter query files to these servers in parallel, and instruct the servers to query the target query configuration according to the parameter query files. The parameter query files are used to store the parameter information required for the execution of the configuration query script.
[0076] In summary, the device provided by the present application includes a user access unit, a data processing unit and a configuration query unit. Among them, the user access unit is used to receive the user's configuration query request, verify the configuration query request, and if the verification is passed, the parameters for querying the configuration required for the background software to switch the business traffic are sent to the data processing unit. Only legal requests can be further processed, reducing the possibility of misoperation. The data processing unit is used to parse the parameters for querying the target query configuration of the background software, obtain at least one set of configuration query data, and perform format verification on the obtained configuration query data. If the format verification is passed, the obtained configuration query data is converted into script query parameters and sent to the configuration query unit, reducing the risk of configuration errors caused by data format errors. The configuration query unit is used to pass the script query parameters into the preset configuration query script, and automatically query the target query configuration by executing the configuration query script, which greatly shortens the configuration query time, thereby speeding up the business traffic switching speed.
[0077] Furthermore, based on the above device, it may also include:
[0078] The configuration checking and modifying unit 13 is further used to obtain query result data of the target query configuration and send the query result data to the data processing unit 12 .
[0079] In the present application, while creating parameter query files with the current timestamp as a suffix, a log query file is also created. The log query file is used to record the result data generated by the execution of the configuration query script. Therefore, after executing the configuration query script to complete the query of the target query configuration, the query result will be written back to the local log query file. The configuration check and modification unit 13 will parse the log file, compare, remove duplicates, aggregate, etc. on the recorded operation results to generate the final query result data, and return it to the data processing unit 12.
[0080] It should be noted that the query result data will list the query results of each configuration item in detail, including which queries succeeded, which failed, and the reasons for the failure.
[0081] The data processing unit 12 is further configured to parse the query result data, filter the query data obtained after the parsing according to the configuration query request, and send the filtered query data to the user access unit 11 .
[0082] In the present application, after receiving the query result data, the data processing unit 12 first parses the received data to extract specific query result information. Then, according to the specific instructions or requirements contained in the configuration query request, the parsed query data is filtered to extract key information or response data in a specific format that the user may be concerned about. Finally, the filtered query data is sent to the user access unit 11.
[0083] The user access unit 11 is also used to output the filtered query data to the user.
[0084] In the present application, the user access unit 11 first converts the received filtered query data into a format suitable for the user to receive (such as JSON, XML, HTML, etc.), and then sends the filtered query data back to the user through a corresponding network protocol (such as HTTP). The user can receive and view the filtered query data through a browser, a command line tool, an API client, etc.
[0085] To summarize, this application greatly reduces data redundancy and irrelevant information, improves data utilization, enables users to query results faster, and ensures user experience by configuring the collaborative work of the query and modification unit, the data processing unit, and the user access unit.
[0086] The above-mentioned embodiments disclosed in the present application describe the service flow switching device in detail. There are various forms of methods that can be applied to the service flow switching device of the present application. Therefore, the service flow switching method provided by the present application is further described in detail below in combination with the drawings and specific implementation methods.
[0087] Please refer to the attached Figure 2 , Figure 2 A flow chart of a service flow switching method provided in an embodiment of the present application. The method applied to any of the above service flow switching devices may include the following steps:
[0088] Step S101: The user access unit receives a service traffic switching request from a user. The service traffic switching request carries parameters for modifying a target modification configuration of the background software and a digital signature certificate for identifying the user's identity. The target modification configuration is a configuration required to be modified for service traffic switching.
[0089] Step S102: the user access unit verifies the service traffic switching request, and if the verification passes, sends the parameters for modifying the target modification configuration of the background software to the data processing unit.
[0090] Step S103: The data processing unit parses the parameters for modifying the target modification configuration of the background software, obtains at least one set of configuration modification data, performs format verification on the obtained configuration modification data, and if the format verification passes, converts the obtained configuration modification data into script modification parameters and sends them to the configuration modification unit.
[0091] Step S104: the configuration modification unit transfers the script modification parameters to a preset configuration modification script, and then executes the configuration modification script to modify the target modification configuration.
[0092] On the basis of the above method, the method may further include the following steps:
[0093] Step S105: The configuration checking and modification unit obtains the modification result data of the target modified configuration, and sends the modification result data to the data processing unit.
[0094] Step S106: the data processing unit analyzes the modification result data, and filters the modified data obtained after the analysis according to the service traffic switching request, and sends the filtered modified data to the user access unit.
[0095] Step S107: the user access unit outputs the filtered modified data to the user.
[0096] Based on the above-mentioned embodiment disclosed in the present application, in another embodiment of the present application, a specific implementation method of service traffic switching is described in detail.
[0097] As an example of an implementation method, please see the attached Figure 3 , is a flow chart of another service traffic switching method provided in an embodiment of the present application. The method may include the following steps:
[0098] Step S201: The user access unit receives a configuration query request from the user, which carries parameters for querying the target query configuration of the background software and a digital signature certificate for identifying the user's identity. The target query configuration is the configuration required for querying business traffic switching.
[0099] Step S202: the user access unit verifies the configuration query request, and if the verification passes, sends the parameters for querying the target query configuration of the background software to the data processing unit.
[0100] Step S203: The data processing unit parses the parameters for querying the target query configuration of the background software, obtains at least one set of configuration query data, performs format verification on the obtained configuration query data, and if the format verification passes, converts the obtained configuration query data into script query parameters and sends them to the configuration query unit.
[0101] Step S204: the configuration query unit transfers the script query parameters to a preset configuration query script, and then executes the configuration query script to query the target query configuration.
[0102] On the basis of the above method, the method may further include the following steps:
[0103] Step S205: The configuration query and modification unit obtains query result data of the target query configuration, and sends the query result data to the data processing unit.
[0104] Step S206: the data processing unit parses the query result data, and filters the query data obtained after the parsing according to the configuration query request, and sends the filtered query data to the user access unit.
[0105] Step S207: The user access unit outputs the filtered query data to the user.
[0106] Based on the above-mentioned embodiment disclosed in the present application, in another embodiment of the present application, a specific implementation method of the configuration checking and modifying unit executing the configuration modification script to modify the target modification configuration is described in detail.
[0107] As an implementable method, the method may be specifically configured as follows:
[0108] The configuration checking and modification unit executes the configuration modification script. The configuration modification script determines the target modification configuration according to the script modification parameters, creates a parameter modification file with the current timestamp as the suffix, writes the script modification parameters into the parameter modification file, and sends the parameter modification file to the server running the background software, so that the server modifies the target modification configuration according to the parameter modification file.
[0109] Based on the above-mentioned embodiment disclosed in the present application, in another embodiment of the present application, a specific implementation method of the configuration query script executed by the configuration query unit to query the target query configuration is described in detail.
[0110] As an implementable method, the method may be specifically configured as follows:
[0111] The configuration query and modification unit executes the configuration query script, the configuration query script determines the target query configuration according to the script query parameters, creates a parameter query file with the current timestamp as the suffix, writes the script query parameters into the parameter query file, and sends the parameter query file to the server running the background software, so that the server queries the target query configuration according to the parameter query file.
[0112] The present application also provides an electronic device in an embodiment. Figure 4 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0113] like Figure 4 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 to a random access memory (RAM) 403. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 403. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0114] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a memory card, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0115] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any service traffic switching method provided in the embodiment of the present application.
[0116] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When one or more computer programs are executed by an electronic device, the electronic device can implement any service traffic switching method provided in an embodiment of the present application.
[0117] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0118] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0119] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0120] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A service flow switching device, characterized in that: include: User access unit, data processing unit and configuration check and modification unit, The user access unit is used to receive a service traffic switching request from a user, wherein the service traffic switching request carries a parameter for modifying a target modification configuration of the background software and a digital signature certificate for identifying the identity of the user, wherein the target modification configuration is a configuration required to be modified for the service traffic switching; The user access unit is further configured to verify the service flow switching request, and if the verification passes, send the parameters for modifying the target modification configuration of the background software to the data processing unit; The data processing unit is used to parse the parameters for modifying the target modification configuration of the background software, obtain at least one set of configuration modification data, perform format verification on the obtained configuration modification data, and if the format verification passes, convert the obtained configuration modification data into script modification parameters and send them to the configuration checking unit; The configuration checking and modifying unit is used to transfer the script modification parameters into a preset configuration modification script, and then execute the configuration modification script to modify the target modification configuration.
2. The service flow switching device according to claim 1, characterized in that: The configuration checking and modifying unit is further used to obtain modification result data of the target modified configuration and send the modification result data to the data processing unit; The data processing unit is further used to parse the modification result data, filter the modified data obtained after the analysis according to the service traffic switching request, and send the filtered modified data to the user access unit; The user access unit is also used to output the filtered modified data to the user.
3. The service flow switching device according to claim 1, characterized in that: The user access unit is further used to receive a configuration query request from the user, wherein the configuration query request carries parameters for querying a target query configuration of the background software and a digital signature certificate for identifying the identity of the user, wherein the target query configuration is a configuration required for querying service traffic switching; The user access unit is further configured to verify the configuration query request, and if the verification passes, send the parameters for querying the target query configuration of the background software to the data processing unit; The data processing unit is further used to parse the parameters for querying the target query configuration of the background software, obtain at least one set of configuration query data, perform format verification on the obtained configuration query data, and if the format verification passes, convert the obtained configuration query data into script query parameters and send them to the configuration query unit; The configuration query unit is further used to transfer the script query parameters into a preset configuration query script, and then execute the configuration query script to query the target query configuration.
4. The service flow switching device according to claim 3, characterized in that: The configuration checking and modifying unit is further used to obtain query result data of the target query configuration and send the query result data to the data processing unit; The data processing unit is further used to parse the query result data, filter the query data obtained after the parsing according to the configuration query request, and send the filtered query data to the user access unit; The user access unit is also used to output the filtered query data to the user.
5. The service flow switching device according to claim 1, characterized in that: The configuration checking and modifying unit executes the configuration modification script to modify the target modification configuration, which is specifically configured as follows: The configuration checking and modification unit executes the configuration modification script, the configuration modification script determines the target modification configuration according to the script modification parameters, creates a parameter modification file with the current timestamp as a suffix, writes the script modification parameters into the parameter modification file, and sends the parameter modification file to the server running the background software, so that the server modifies the target modification configuration according to the parameter modification file.
6. The service flow switching device according to claim 3, characterized in that: The configuration query unit executes the configuration query script to query the target query configuration, which is specifically set as follows: The configuration query and modification unit executes the configuration query script, the configuration query script determines the target query configuration according to the script query parameters, creates a parameter query file with the current timestamp as a suffix, writes the script query parameters into the parameter query file, and sends the parameter query file to the server running the background software, so that the server queries the target query configuration according to the parameter query file.
7. A service flow switching method, characterized in that: The service flow switching device according to any one of claims 1 to 6, wherein the method comprises: The user access unit receives a service traffic switching request from a user, wherein the service traffic switching request carries a parameter for modifying a target modification configuration of the background software and a digital signature certificate for identifying the identity of the user, wherein the target modification configuration is a configuration required to be modified for the service traffic switching; The user access unit verifies the service traffic switching request, and if the verification passes, sends the parameters for modifying the target modification configuration of the background software to the data processing unit; The data processing unit parses the parameters for modifying the target modification configuration of the background software to obtain at least one set of configuration modification data, performs format verification on the obtained configuration modification data, and if the format verification passes, converts the obtained configuration modification data into script modification parameters and sends them to the configuration checking unit; The configuration checking and modifying unit transfers the script modification parameters into a preset configuration modification script, and then executes the configuration modification script to modify the target modification configuration.
8. A computer program product, characterized in that It includes computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the service traffic switching method as described in claim 7.
9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the service traffic switching method as described in claim 7.
10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the service traffic switching method as described in claim 7.
Citation Information
Patent Citations
Traffic switching method and device and computer equipment
CN108459792A
System configuration method and related device
CN111538542A
Data modification method and system, computer equipment and computer readable storage medium
CN112685077A
Flow control parameter adjusting method and device, electronic equipment and storage medium
CN115550261A
Method and device for verifying operation and maintenance identity security
CN118612096A