A request processing method, device and readable storage medium
By directly handling Redfish URL requests through the BMC's web page, parsing and encapsulating URL parameters into XML objects, the problem of needing to install Postman software in existing technologies is solved, and high applicability of executing Redfish URLs in any environment is achieved.
Patent Information
- Application Number
- CN202211293557.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-10-21
AI Technical Summary
The existing method for executing URL Redfish requires the Postman software to be installed in the operating environment. If the software cannot be installed, the Redfish function cannot be used, which limits its applicability.
The system receives Redfish URL request commands through the BMC's web page, parses the URL parameters and encapsulates them into an XML request object, sends it to the server for processing, receives the processing results, and executes the Redfish URL commands directly within the BMC without installing any additional software.
It improves the applicability of request processing, enabling Redfish URL commands to be executed directly in any operating environment, avoiding dependence on the operating environment and simplifying the operation process.
Smart Images

Figure CN115665254B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of electronic information, and in particular to a request processing method and device and readable storage medium. BACKGROUND
[0002] In recent years, with the rapid development of the Internet, data transmission and processing have become a popular technical field. A Uniform Resource Locator (URL) is a concise representation of the location and access method of a resource available from the Internet, and is the address of a standard resource on the Internet. Each file on the Internet has a unique URL, which contains information indicating the location of the file and how the browser should process it. Redfish is a management standard based on HTTPs service, which uses a networking interface to implement device management.
[0003] The existing method for executing the URL Redfish is implemented by installing Postman software in the corresponding operating environment. If the current operating environment cannot install the software, the Redfish function cannot be used, so the applicability is not high.
[0004] In view of the above technology, it is an urgent problem for those skilled in the art to find a request processing method with high applicability. SUMMARY
[0005] The purpose of the present application is to provide a request processing method, device and readable storage medium, so as to solve the problem that the existing method for executing the URL Redfish is implemented by installing Postman software in the corresponding operating environment. If the current operating environment cannot install the software, the Redfish function cannot be used, so the applicability is not high.
[0006] To solve the above problems, the present application also provides a request processing method applied to a BMC, comprising:
[0007] receiving a Redfish URL request instruction and obtaining a request address of the URL in a WEB page;
[0008] obtaining URL parameters according to the Redfish URL request instruction, and encapsulating the URL parameters into an XML request object;
[0009] sending the XML request object to a server corresponding to the request address;
[0010] receiving a processing result of the XML request object after the server performs parsing processing.
[0011] Preferably, the request address for obtaining the URL in the WEB page comprises:
[0012] The request address for obtaining the URL input by the user in the WEB page or selecting the Redfish function and obtaining the URL according to data matching is obtained.
[0013] Preferably, the encapsulation of the URL parameter into an XML request object comprises:
[0014] The custom request header of the URL and the corresponding request data are encapsulated into a Request based on an HTTP protocol.
[0015] Preferably, before the URL parameter is obtained according to the request instruction, the method further comprises:
[0016] It is judged whether the Redfish URL request instruction has authority or not.
[0017] If yes, the step of obtaining the URL parameter according to the Redfish URL request instruction is entered.
[0018] If no, a result of request error is returned to the BMC.
[0019] Preferably, the receiving of the Redfish URL request instruction comprises:
[0020] The Redfish URL request instruction sent by other BMCs is received.
[0021] After the processing result of the server after the XML request object is parsed and processed, the method further comprises:
[0022] The processing result is sent to other BMCs.
[0023] Preferably, the method further comprises:
[0024] If the Redfish URL request instruction does not have corresponding authority, information of request error is sent to other BMCs.
[0025] Preferably, after the XML request object is sent to the server corresponding to the request address, the method further comprises:
[0026] If the processing result sent by the server is not received within a preset time, an alarm is given.
[0027] To solve the above problems, the application provides a request processing device, comprising:
[0028] The acquisition module is configured to receive a Redfish URL request instruction and acquire a request address of the URL in a WEB page;
[0029] The parsing module is configured to parse an obtained URL parameter according to the Redfish URL request instruction and encapsulate the URL parameter into an XML request object;
[0030] The sending module is configured to send the XML request object to a server corresponding to the request address;
[0031] The receiving module is configured to receive a processing result of the XML request object after the server performs parsing processing.
[0032] Preferably, the device further comprises:
[0033] The judging module is configured to judge whether the Redfish URL request instruction has an authority, if yes, enter the parsing module, and if no, enter an error module;
[0034] The error module is configured to return a result of a request error to the BMC.
[0035] Preferably, the device further comprises:
[0036] The alarm module is configured to perform alarm if a processing result sent by the server is not received within a preset time.
[0037] To solve the above problems, the application further provides a request processing device, comprising a memory for storing a computer program;
[0038] A processor is configured to execute the computer program to realize the steps of the request processing method.
[0039] To solve the above problems, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the steps of the request processing method.
[0040] The request processing method provided in the application is applied to a BMC, a Redfish URL request instruction is acquired, URL parameters are obtained by analyzing the request instruction, the URL parameters are encapsulated into an XML request object, a request address of the URL is obtained according to the URL parameters, the XML request object is sent to a server corresponding to the address of the URL, and a processing result of the server after analyzing and processing the XML request object is received. In the scheme, the WEB page in the BMC is directly used to directly execute the Redfish URL instruction. Compared with the previous scheme, the BMC and the corresponding WEB page are not affected by the operation environment, and the corresponding instruction execution can be directly performed without installing other corresponding software. Compared with the previous scheme of installing the Postman software to implement the corresponding task processing execution, the applicability is higher.
[0041] The request processing device and the computer readable storage medium provided in the application correspond to the request processing detection method, and have the same beneficial effects. BRIEF DESCRIPTION OF DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0043] Figure 1 A request processing method flowchart provided for the embodiments of the application;
[0044] Figure 2 A request processing device schematic diagram provided for the embodiments of the application;
[0045] Figure 3 A structure diagram of a request processing device provided for another embodiment of the application. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the application will be described clearly and completely in combination with the drawings in the embodiments of the application. Obviously, the described embodiments are only some of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the application.
[0047] The core of the present application is to provide a request processing method, device and readable storage medium, so as to solve the problem that the existing method of executing the URL Redfish is realized by installing the Postman software in the corresponding operation environment. If the current operation environment cannot install the software, the Redfish function cannot be used, so the applicability is not high.
[0048] In order for those skilled in the art to better understand the present application, the present application will be further described in detail below in combination with the drawings and specific embodiments.
[0049] Figure 1 A request processing method flowchart provided by the embodiment of the present application is shown in Figure 1 The method comprises the following steps:
[0050] S10: receiving a Redfish URL request instruction, and obtaining a request address of the URL in a WEB page;
[0051] It should be noted that the baseboard management controller (BMC) is a special service processor which monitors the status of a computer, a network server, or other hardware drive devices by using sensors, and communicates with the system administrator through an independent connection line. The BMC is part of the intelligent platform management interface (IPMI) and is usually included in the main circuit board of the template or the monitored device. The World Wide Web (WEB) is referred to as a web page in web page design. It is widely translated as network, Internet, and other technical fields. It is manifested in three forms, namely, hypertext, hypermedia, and hypertext transfer protocol.
[0052] In the embodiment, Redfish is a management standard based on HTTPs service, and device management is realized by using a RESTful interface. Here, the type to which the instruction belongs is referred to, and the sending mode of the related instruction and the corresponding specific information content contained therein are not specifically limited in the embodiment. In the embodiment, the sender of the request instruction is not specifically limited. It can be understood that the corresponding request instruction response can be performed for the URL request of the BMC itself, or it can be a cross-domain request initiated by other BMC, which is not specifically limited in the embodiment.
[0053] A server refers to a computer that manages resources and provides services for users, and is usually divided into file servers, database servers and application servers. The computer or computer system running the above software is also called a server. Compared with ordinary personal computers (PCs), servers have higher requirements in stability, security, performance, etc., so the hardware such as CPU, chipset, memory, disk system, network, etc. is different from that of ordinary PCs.
[0054] S11: Obtain URL parameters according to the Redfish URL request instruction, and encapsulate the URL parameters into an XML request object;
[0055] It should be noted that the extensible markup language (XML) is an international standard for defining the structure and content of electronic files, and is a very complex document structure, mainly used in the defense area of a large amount of highly structured data and other various industrial fields, for easy classification and indexing. The specific format of the request object mentioned in the embodiment is not limited, and it can be understood that for the XML request object, the specific request object format refers to the result of encapsulating the URL parameters.
[0056] S12: Send the XML request object to the server corresponding to the request address;
[0057] It should be noted that object data transmission through a WEB page is generally carried out by Asynchronous JavaScript technology, which is derived from the description of the conversion from a web-based application to a data-based application. In the data-based application, the data required by the user, such as the contact list, can be obtained from the server independent of the actual web page and can be dynamically written into the web page, coloring the slow web application experience like a desktop application. The server mentioned in the embodiment refers to the database location corresponding to the request address, and the architecture of the server is a specific computer or a cloud server, etc., which is not limited in the embodiment.
[0058] S13: Receive the processing result of the server after parsing and processing the XML request object.
[0059] It can be understood that the method provided in the embodiment can directly send the Redfish URL on the WEB. Moreover, the complete and strict URL needs to be filled in when the Redfish URL is executed, and the input error cannot be executed, so a method of directly executing by only selecting the function option is needed, and the preset function option is added on the BMC Web to execute without filling in the complete URL. It should be noted that the principle of the embodiment is that the XML request object itself is a Hyper Text Transfer Protocol (HTTP) related request, wherein the HTTP is the most widely used network protocol on the Internet. All web files must comply with this standard. The initial purpose of designing HTTP is to provide a method of publishing and receiving HTML pages.
[0060] The request processing method provided in the embodiment is applied to the BMC, the Redfish URL request instruction is obtained, the URL parameter is obtained by parsing the request instruction, the URL parameter is encapsulated into the XML request object, the request address of the URL is obtained according to the URL parameter, the XML request object is sent to the server corresponding to the address of the URL, and the processing result of the server after parsing and processing the XML request object is received. In the scheme, the WEB page in the BMC is directly used to directly execute the Redfish URL instruction. Compared with the previous scheme, the BMC and the corresponding WEB page are not affected by the operation environment, and the corresponding instruction execution can be directly performed without installing other corresponding software. Compared with the previous scheme of installing the Postman software to implement the corresponding task processing execution, the applicability is higher.
[0061] In the above embodiment, the specific address obtaining method of the URL is not limited, and the preferred scheme is provided as follows: the request address of the URL is obtained in the WEB page, including:
[0062] The request address of the URL input by the user in the WEB page or the Redfish function is selected, and the request address of the URL is obtained according to the data matching.
[0063] It should be noted that the Redfish specification is an open industry standard specification that provides simple, modern and secure management functions for extensible platform hardware. It is a hypermedia API, so it can represent a variety of implementations through a consistent interface. It has mechanisms for managing data center resources, handling events, long-running tasks, and discovery. After the popularization of the Redfish-based unified management interface specification, the future can effectively reduce the large amount of adaptation and development and testing work caused by different server hardware management interfaces. Redfish is a management standard based on HTTP services, which uses RESTful interfaces to implement device management. Each HTTP operation submits or returns a resource or result in UTF-8 encoded JSON format (JSON is a key-value pair data format), just like a web application returns HTML to a browser. This technology has the advantages of reducing development complexity, easy implementation, easy use, and providing scalability advantages, leaving room for design flexibility.
[0064] It should be noted that in the embodiment, the request address of the specific URL is defined, which is generally obtained by user input or by Redfish function and matched according to data to obtain the URL, and compared with the previous scheme that can only perform corresponding operation by inputting correct address, the corresponding URL request address can be obtained by association matching without inputting complete address, so that the corresponding URL request address can be obtained more simply.
[0065] The encapsulation of the URL parameter in the above embodiment is not defined, and the preferred scheme is provided, which encapsulates the URL parameter into an XML request object, including;
[0066] The custom request header of the URL and the corresponding request data are encapsulated into Request based on the HTTP protocol.
[0067] It should be noted that the request object does not need to be declared in advance, and can be used in the JSP web page. After being compiled into Servlet, it will be converted into an object of the form of javax.servlet.http.Http Servlet Request. The Http Servlet Request object is an object related to the request sent by the client. As long as it is information related to the client request, it can be obtained by it, such as request header, request method, request parameter, client IP, client browser and other information. The Request object can be used to access all information based on HTTP request transmission, including parameters transmitted by HTML form using POST method or GET method, cookies and user authentication. The Request object enables you to access binary data sent by the client to the server.
[0068] Encapsulation, that is, hiding the attributes and implementation details of an object, only exposes the interface to the outside, controls the access level of reading and modifying the attributes in the program; the abstract data and behavior (or function) are combined to form an organic whole, that is, the data and the source code for operating the data are organically combined to form a "class", and the data and the function are members of the class.
[0069] In the present embodiment, the content of the request data and the specific encapsulation thereof are not specifically limited.
[0070] Considering the permission for request processing and security issues, a preferred solution is provided, which further includes, before obtaining the URL parameters according to the request instruction analysis, the following steps:
[0071] determining whether the Redfish URL request instruction has permission;
[0072] if yes, proceeding to the step of obtaining the URL parameters according to the Redfish URL request instruction analysis;
[0073] if no, returning a request error result to the BMC.
[0074] It should be noted that the permission here is defined by the BMC itself and is irrelevant to the specific content of the Redfish URL request instruction, that is, it is only related to the sender and the address of the request, and in the present embodiment, the specific way of judging the permission of the URL parameters is not specifically limited.
[0075] Considering the cross-domain execution of the URL request in the BMC, a preferred solution is provided, which includes the following steps when receiving the Redfish URL request instruction:
[0076] receiving the Redfish URL request instruction sent by other BMCs;
[0077] after the processing result of the parsing processing of the XML request object by the receiving server, further including:
[0078] sending the processing result to other BMCs.
[0079] It should be noted that the cross-domain task instruction executed in the present embodiment refers to the request of the URL of the corresponding BMC sent to other BMCs for corresponding execution.
[0080] Considering the completeness of the solution, a preferred solution is provided, which further includes:
[0081] if the Redfish URL request instruction does not have the corresponding permission, sending a request error information to other BMCs.
[0082] It should be noted that the permission of the request instruction mentioned in the embodiment is used to refer to the corresponding response problem considering the server and the prompt of the user, and a preferred solution is provided, after the XML request object is sent to the server corresponding to the request address, also includes:
[0083] If the processing result sent by the server is not received within the preset time, an alarm is performed.
[0084] It should be noted that the specific duration of the preset time is not limited in the embodiment, and it can be understood that the preset time can be obtained according to the historical request processing result receiving feedback time, that is, the feedback time of the corresponding request processing result is obtained, so that the corresponding range is calculated, according to the timeliness of the processing result, the maximum feedback time is selected as the preset time.
[0085] In the embodiment, the specific selection of the alarm device is not limited, and it can be understood that it can include warning lights, buzzers and the like, or other similar external devices, or the BMC can directly send a warning instruction to the control terminal to prompt the user that the request has failed.
[0086] The application can directly execute the Redfish URL on the BMC Web under the general server, has the characteristics of convenient operation and strong compatibility, and when the customer operating environment cannot install the postman software, the Redfish URL can be executed on the page only through the browser, and the requirement of the customer environment is low.
[0087] The application mainly executes the Redfish URL on the local BMC Web, supports all Redfish request modes. Not only can the Redfish URL of the local BMC be executed, but also the Redfish URL on other BMCs can be executed across domains.
[0088] The user can not input the Redfish URL, directly selects the corresponding function in the drop-down box, and can execute the Redfish function, so as to save the cumbersome step of inputting the complete URL. If the user only remembers part of the URL, the input Redfish URL will automatically match the URL for the user to select according to the input data, and the URL will be automatically completed when the accurate matching is performed.
[0089] URL HTTP encapsulated into an object xml BMC-1 obtains the parameters of the user URL, encapsulates the parameters into XML HTTPREQUEST, and when the user uses a custom X-Auth-Token authentication request, the user does not need to manually paste the X-Auth-Token into the request header, and the X-Auth-Token header is automatically processed when the Redfish URL is executed. Basic Auth authentication mode can also be implemented by inputting a username and password, or an API key authentication mode can be used to execute.
[0090] When the user needs to multitask, one or more request sets can be set, all Redfish URLs in the set are sent at one time, and the returned data combination is displayed. When multitasking is processed, the number of times or the timing can also be set to execute a Redfish URL or a Redfish URL set in a loop. Various request contents can be sent, both files and texts can be sent, and json format data can also be sent.
[0091] The returned content and the returned header are formatted and displayed after the Redfish URL is executed correctly. The request processing method provided in the embodiment is applied to a BMC, a Redfish URL request instruction is obtained, URL parameters are obtained by parsing the request instruction, the URL parameters are encapsulated into an XML request object, a request address of the URL is obtained according to the URL parameters, the XML request object is sent to a server corresponding to the address of the URL, and a processing result obtained after the server parses and processes the XML request object. In the scheme, the Redfish URL instruction is directly executed by directly using the WEB page in the BMC, and compared with the previous scheme, the BMC and the corresponding WEB page are not affected by the operating environment, and the corresponding instruction execution can be directly performed without installing other corresponding software, and compared with the previous scheme in which the Postman software is installed to implement the corresponding task processing execution, the applicability is higher.
[0092] In the above embodiment, the request processing method is described in detail, and the application also provides a corresponding embodiment of the request processing device. It should be noted that the embodiment of the device part is described from two angles, one is based on the function module, and the other is based on the hardware.
[0093] Figure 2 A request processing device provided in an embodiment of the application is shown in a schematic diagram, and the device includes:
[0094] The obtaining module 10 is configured to receive a Redfish URL request instruction and obtain a request address of the URL in the WEB page;
[0095] The parsing module 11 is configured to parse the URL parameter according to the Redfish URL request instruction, and encapsulate the URL parameter into an XML request object;
[0096] The sending module 12 is configured to send the XML request object to a server corresponding to the request address;
[0097] The receiving module 13 is configured to receive a processing result of the server after the XML request object is parsed and processed.
[0098] Preferably, the device further comprises:
[0099] The judging module is configured to judge whether the Redfish URL request instruction has an authority, if yes, enter the parsing module, and if no, enter the error module;
[0100] The error module is configured to return a result of request error to the BMC.
[0101] Preferably, the device further comprises:
[0102] The alarm module is configured to alarm if the processing result sent by the server is not received within a preset time.
[0103] Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part are described in the description of the embodiments of the method part, which will not be described here.
[0104] The request processing device provided in the present application is applied to the BMC, the Redfish URL request instruction is obtained, the URL parameter is obtained according to the request instruction, the URL parameter is encapsulated into the XML request object, the request address of the URL is obtained according to the URL parameter, and the XML request object is sent to the server corresponding to the address of the URL, and the processing result of the server after the XML request object is parsed and processed is received. In the present scheme, the WEB page in the BMC is directly used to directly execute the Redfish URL instruction, compared with the previous scheme, the BMC and the corresponding WEB page are not affected by the operation environment, and the corresponding instruction execution can be directly performed without installing other corresponding software, compared with the previous scheme of installing the Postman software to realize the corresponding task processing execution, the applicability is higher.
[0105] Figure 3 The structure diagram of the request processing device provided in another embodiment of the present application is shown in FIG. 2, the request processing device comprises a memory 20 configured to store a computer program; Figure 3
[0106] A processor 21 is configured to execute the computer program to realize the steps of the request processing method mentioned in the above embodiments.
[0107] The request processing apparatus provided by the embodiment can include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like.
[0108] The processor 21 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 can be implemented in at least one of a hardware form of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), a Programmable Logic Array (PLA). The processor 21 can also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a Central Processing Unit (CPU). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 can be integrated with a Graphics Processing Unit (GPU) that is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 can further include an Artificial Intelligence (AI) processor for processing machine learning-related computing operations.
[0109] The memory 20 can include one or more computer-readable storage media, which can be non-transitory. The memory 20 can also include a high-speed random access memory, and a non-volatile memory such as one or more disk storage devices, flash storage devices. In the embodiment, the memory 20 is at least used to store the following computer program 201, wherein the computer program is loaded and executed by the processor 21, and can implement the related steps of the request processing method disclosed in any of the preceding embodiments. In addition, the resources stored by the memory 20 can also include an operating system 202 and data 203, and the storage mode can be temporary storage or permanent storage. The operating system 202 can include Windows, Unix, Linux, and the like. The data 203 can include, but is not limited to, data involved in the request processing method, and the like.
[0110] In some embodiments, the request processing apparatus can further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0111] Those skilled in the art can understand that, Figure 3The structure shown in the figure does not constitute a limitation on the request processing apparatus, and can include more or fewer components than shown.
[0112] The request processing apparatus provided in the embodiments includes a memory and a processor. The processor, when executing a program stored in the memory, can implement the request processing method described in the above embodiments.
[0113] Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part are described in the description of the embodiments of the method part, and will not be described here.
[0114] The request processing apparatus provided in the embodiments includes a processor and a memory. When the storage data in the memory is executed by the processor, the following steps can be implemented: obtaining a Redfish URL request instruction, obtaining URL parameters according to the request instruction, encapsulating the URL parameters into an XML request object, obtaining a request address of the URL according to the URL parameters, sending the XML request object to a server corresponding to the address of the URL, and receiving a processing result after the server parses and processes the XML request object. In the present scheme, the WEB page in the BMC is directly used to directly execute the Redfish URL instruction. Compared with the previous scheme, the BMC and the corresponding WEB page are not affected by the operating environment, and the corresponding instruction execution can be directly performed without installing other corresponding software. Compared with the previous scheme of installing the Postman software to implement the corresponding task processing execution, the present scheme has higher applicability.
[0115] Finally, the present application also provides an embodiment corresponding to a computer readable storage medium. The computer readable storage medium stores a computer program. The computer program is executed by the processor to implement the steps described in the above method embodiments.
[0116] It can be understood that if the method in the above embodiments is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and executes all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0117] Since the embodiments of the readable storage medium part correspond to the embodiments of the method part, the embodiments of the device part are described in the description of the embodiments of the method part, and are not described here.
[0118] The computer readable storage medium provided in the application can realize, when the stored data is executed, obtaining a Redfish URL request instruction, obtaining a URL parameter according to the request instruction, encapsulating the URL parameter into an XML request object, obtaining a request address of the URL according to the URL parameter, and sending the XML request object to a server corresponding to the address of the URL, and receiving a processing result after the XML request object is processed by the server. In the scheme, the WEB page in the BMC is directly used to directly execute the Redfish URL instruction. Compared with the previous scheme, the BMC and the corresponding WEB page are not affected by the operation environment, and the corresponding instruction execution can be directly performed without installing other corresponding software. Compared with the previous scheme of installing the Postman software to realize the corresponding task processing execution, the applicability is higher.
[0119] The above describes in detail the request processing method, device and computer readable storage medium provided in the application. The embodiments in the specification are described in a progressive manner, and each embodiment mainly describes the difference from other embodiments. The same or similar parts of each embodiment can be referred to. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts are described in the method part. It should be pointed out that, for ordinary skilled in the art, without departing from the principle of the application, the application can be improved and modified, and these improvements and modifications also fall within the protection scope of the claims of the application.
[0120] It should be further noted that, in the specification, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitation, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.
Claims
1. A request processing method characterized by comprising: Applied to BMC, comprising: receiving a Redfish URL request instruction, and obtaining a request address of a URL in a WEB page; obtaining URL parameters according to the Redfish URL request instruction, and encapsulating the URL parameters into an XML request object; sending the XML request object to a server corresponding to the request address; receiving a processing result after the server parses and processes the XML request object; wherein the Redfish URL request instruction is executed in a browser corresponding to the WEB page; wherein if multi-task processing is performed, a request set is set, the Redfish URL corresponding to each task in the multi-task is saved to the request set, and the request set is processed based on a preset time interval or a preset cycle number.
2. The request processing method according to claim 1, characterized by, The request address of the URL obtained in the WEB page comprises: obtaining a request address of the URL input by a user in the WEB page or selecting a Redfish function and obtaining the request address of the URL according to data matching.
3. The request processing method according to claim 2, characterized by, The URL parameters are encapsulated into an XML request object, comprising: encapsulating a custom request header of the URL and corresponding request data into a Request based on an HTTP protocol.
4. The request processing method according to claim 3, characterized by, Before the URL parameters are obtained according to the Redfish URL request instruction, further comprising: determining whether the Redfish URL request instruction has an authority; if yes, entering the step of obtaining the URL parameters according to the Redfish URL request instruction; if no, returning a request error result to the BMC.
5. The request processing method according to any one of claims 1 to 4, characterized by, The Redfish URL request instruction comprises: receiving the Redfish URL request instruction sent by another BMC; after receiving the processing result after the server parses and processes the XML request object, further comprising: sending the processing result to another BMC.
6. The request processing method according to claim 5, characterized by, The XML request object is sent to the server corresponding to the request address, comprising: sending the XML request object to the server corresponding to the request address in an asynchronous mode.
7. The request processing method according to claim 6, characterized by, After the XML request object is sent to the server corresponding to the request address, further comprising: if no processing result sent by the server is received within a preset time, alarming.
8. A request processing apparatus characterized by comprising: comprising: an obtaining module, configured to receive a Redfish URL request instruction, and obtain a request address of a URL in a WEB page; a parsing module, configured to obtain URL parameters according to the Redfish URL request instruction, and encapsulate the URL parameters into an XML request object; a sending module, configured to send the XML request object to a server corresponding to the request address; a receiving module, configured to receive a processing result after the server parses and processes the XML request object; wherein the request processing device is further configured to execute the Redfish URL request instruction in a browser corresponding to the WEB page; If multi-task processing is performed, a request set is set, and a Redfish URL corresponding to each task in the multi-task is saved to the request set, and then the request set is processed in a preset time interval or a preset cycle number.
9. A request processing apparatus characterized by comprising: The computer program is stored in the memory and executed by the processor. The processor is configured to execute the computer program to implement the steps of the request processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium and executed by the processor to implement the steps of the request processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for calling resources based on Redfish in BMC (baseboard management controller)
CN108334411A
Server management device and method, electronic equipment and storage medium
CN111130891A