Business processing method and device
By suspending and recording business information when the hardware card is offline, reconstructing the device object, and reprocessing unfinished business, the business interruption problem is solved. This ensures that when the hardware card is reconnected, the business on the server is unaware of the interruption, thus guaranteeing the stability of the SLA.
Patent Information
- Application Number
- CN202011062882.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-30
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2040-09-30
AI Technical Summary
When a newly added hardware card on the standard server bus fails, is reset, or is upgraded and restarted, it will interrupt the services on the standard server connected to that hardware card, resulting in a decrease in the Service Level Agreement (SLA).
When a hardware card goes offline, the server suspends unfinished services and records the target device object information. When the hardware card comes back online, the suspended services are re-forwarded through the target device object to rebuild the device object and continue processing the services.
This avoids service interruptions caused by hardware card failure, ensures that the services provided by the server are unaware of hardware card failure, and guarantees the stability of the SLA.
Smart Images

Figure CN114327740B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a service processing method and apparatus. Background Technology
[0002] With the continuous development of cloud technology, more and more cloud service providers are beginning to provide services through a hardware-software co-working architecture. This architecture typically refers to adding one or more hardware cards to the standard server's bus (such as the Peripheral Component Interconnect (PCI) bus). In this way, the standard server's management, input / output (I / O) functions can be transferred to these hardware cards, thereby improving the standard server's performance and reducing its processing costs.
[0003] However, when a newly added hardware card on the standard server bus fails, is reset, or is upgraded and restarted, it will interrupt the services on the standard server connected to that hardware card, which in turn will lead to a decrease in the service level agreement (SLA) of the users served by that standard server. Summary of the Invention
[0004] This application provides a business processing method and apparatus that can ensure uninterrupted business operations on the standard server connected to the hardware card when the hardware card fails, is reset, or is upgraded and restarted.
[0005] To achieve the above objectives, this application provides the following technical solution:
[0006] Firstly, this application provides a service processing method applied to a server connected to a hardware card used to process the server's services. The method includes: when it is determined that the hardware card is offline, suspending unprocessed services from the server, and recording information about the target device object. When it is determined that the hardware card is back online, the suspended services are forwarded to the hardware card via the target device object based on the target device object's information. The target device object is a device object currently running on the server.
[0007] The business processing method provided in this application allows the server to suspend unfinished business when a hardware card processing server services goes offline, and record the device object information corresponding to the service (e.g., virtual machine service) to which the unfinished business belongs. When the hardware card comes back online, the server can rebuild these device objects and re-forward the unfinished business suspended by the server when the hardware card went offline, allowing the hardware card to reprocess these business, thus avoiding service interruption caused by hardware card offline. Through this method, the services provided by the server are unaware of whether the hardware card is offline, and services will not be interrupted due to request failures or never returning, thus ensuring that the SLA of the users served by the server does not decrease.
[0008] In one possible design approach, the information of the target device object mentioned above includes at least one of the following: identification information of the target device object, and storage information associated with the target device object.
[0009] With this possible design approach, when the hardware card comes back online, the server can reconstruct the target device object based on the recorded target device object information. In this way, the server can re-forward any unfinished business that was pending when the hardware card went offline, allowing the hardware card to reprocess these transactions, thus avoiding service interruption caused by the hardware card's offline status. Using this method, the services provided by the server are unaware of whether the hardware card is offline, and services will not be interrupted due to failed requests or requests never returning, thereby ensuring that the SLA of the users served by the server does not decrease.
[0010] In another possible design approach, the aforementioned "unfinished business on the suspended server" includes: stopping the forwarding of business to the hardware card via the device object. The unfinished business on the server when the hardware card goes offline is recorded in a preset space.
[0011] With this possible design approach, the server can suspend business processes that have not been completed when the hardware card is taken offline.
[0012] In another possible design approach, the aforementioned "unprocessed business of the suspended server" also includes: business sent by the server to the device object after the hardware card is offline and before the hardware card is brought back online, which is recorded in the preset space.
[0013] With this possible design approach, the server can suspend the business requests sent to the device object after the hardware card is taken offline and before the hardware card is brought back online.
[0014] In another possible design approach, the aforementioned "forwarding the suspended service to the hardware card through the target device object based on the target device object's information" includes: establishing an association between the target device object and the hardware card based on the target device object's information; and forwarding the suspended service to the hardware card through the target device object based on this association.
[0015] With this possible implementation, the server can reconstruct the target device object based on pre-recorded target device information when the hardware card comes back online.
[0016] In another possible design approach, the aforementioned "forwarding suspended services to the hardware card via the target device object" includes: forwarding services recorded in a preset space to the hardware card via the target device object.
[0017] In another possible design approach, the above method also includes determining that the hardware card is offline when the hardware card experiences a hardware failure, a hardware card reset, or a hardware card upgrade and restart.
[0018] Secondly, this application provides a business processing apparatus. This apparatus is applied to a server connected to a hardware card, which is used to process the server's business.
[0019] In one possible design, the service processing device is used to execute any of the methods provided in the first aspect. This application can divide the service processing device into functional modules according to any of the methods provided in the first aspect. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. For instance, this application can divide the service processing device into a suspension unit, a recording unit, and a forwarding unit, etc., according to function. The descriptions of possible technical solutions and beneficial effects of the various functional modules described above can be found in the technical solutions provided in the first aspect or its corresponding possible designs, and will not be repeated here.
[0020] In another possible design, the business processing apparatus includes a memory and one or more processors, the memory and processors being coupled. The memory is used to store computer instructions, and the processor is used to invoke the computer instructions to perform any of the methods provided by the first aspect and any of its possible design embodiments.
[0021] Thirdly, this application provides a computer-readable storage medium, such as a non-transient computer-readable storage medium. A computer program (or instructions) is stored thereon, which, when executed on a business processing device, causes the business processing device to perform any method provided by any possible implementation of the first aspect described above.
[0022] Fourthly, this application provides a computer program product that, when run on a business processing device, causes any method provided by any possible implementation of the first aspect to be executed.
[0023] Fifthly, this application provides a chip system comprising: a processor, the processor being configured to retrieve and execute a computer program stored in a memory, performing any of the methods provided in the implementation of the first aspect.
[0024] It is understood that any of the devices, computer storage media, computer program products or chip systems provided above can be applied to the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0025] In this application, the names of the aforementioned business processing devices do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of each device or functional module are similar to those in this application, they fall within the scope of the claims of this application and their equivalents.
[0026] These or other aspects of this application will become more readily apparent in the following description. Attached Figure Description
[0027] Figure 1 A schematic diagram illustrating how a server processes services via a hardware card, as provided in an embodiment of this application;
[0028] Figure 2 A schematic diagram of a business processing system provided in an embodiment of this application;
[0029] Figure 3 A schematic diagram of the hardware structure of a service processing device provided in an embodiment of this application;
[0030] Figure 4 A flowchart illustrating the business processing method provided in the embodiments of this application;
[0031] Figure 5 This is a schematic diagram of the structure of a service processing device provided in an embodiment of this application;
[0032] Figure 6 This is a schematic diagram of the structure of a chip system provided in an embodiment of this application;
[0033] Figure 7 This is a schematic diagram of the structure of a computer program product provided in an embodiment of this application. Detailed Implementation
[0034] To better understand the embodiments of this application, some terms or technologies involved in the embodiments of this application are explained below:
[0035] 1) Equipment Object
[0036] Typically, hardware cards that provide management and I / O functions for servers are connected to the server via a bus. A hardware card usually includes multiple interfaces. When the server detects that a hardware card is online, it can create a device object for each interface of that hardware card through device enumeration. It can be seen that there is a one-to-one correspondence between the interfaces on the hardware card and the device objects created by the server.
[0037] In simple terms, a device object can be understood as a virtual functional module mapped to each interface of a hardware card on the server. When a hardware card is taken offline, the device object mapped to that hardware card on the server is deleted.
[0038] The configuration parameters of the aforementioned device object may include at least one of the device object's identification information and the storage information associated with the device object.
[0039] Here, the identification information of the device object can be the name given to the device object by the server, or the identity document (ID) assigned to the device object by the server.
[0040] As an example, if a hardware card has an interface including interface 1, when the hardware card comes online, the server detects the hardware card and can create a device object E1 for interface 1. Here, E1 is the identification information of the device object.
[0041] The storage information associated with the aforementioned device objects may include the driver memory allocated by the server for each device object, as well as the PCI base address register (Bar) space allocated for each device object.
[0042] Typically, when a server creates a device object for a hardware card's interface, it can allocate a segment of memory for it. This segment of memory can then serve as the driver memory for that device object. Understandably, the server can pre-load the hardware card's driver, which may include the drivers for each of the hardware card's interfaces.
[0043] The server can also allocate one or more address spaces for each device object corresponding to each interface. These address spaces can be indicated by one or more base address registers. It should be noted that a base address register can be used to indicate the base address of an address space. Here, this one or more address spaces refer to the bar space of the device object.
[0044] It should be understood that the bar space is the address space used for communication between the hardware card and the server. Both the hardware card and the server can access the data in the bar space, and both the hardware card and the server can write data to the bar space.
[0045] Furthermore, the configuration parameters of the aforementioned device objects can be referenced by different services provided by the server, allowing these services to forward services to the hardware card through different device objects, thereby enabling the hardware card to process these services. This reduces server performance overhead.
[0046] As an example, the services provided by the server may be virtual machine services, container services, etc., and the services that the server forwards to the hardware card through the device object may be I / O services, etc. This application embodiment does not limit this.
[0047] 2) Business processes and business requests
[0048] Here, the service can be the service provided by the server. As an example, if the service provided by the server is a virtual machine service, then the service could be: writing data 1 to the virtual hard disk 1 of the virtual machine.
[0049] To improve server performance, the server can process business through a hardware card connected to it. In this case, the server's processor can first generate a business request based on the business to be processed, and then write the business request into the device object corresponding to the service to which the business belongs (such as a virtual machine service). As an example, the server can write the business request generated by the processor into the driver memory of the device object corresponding to the service to which the business belongs.
[0050] This service request may include attribute information and data information. The attribute information indicates the nature of the service to be processed; for example, the service may be reading, writing, sending, or receiving data. The data information includes the address of the data corresponding to the service (e.g., source address, destination address), the size of the data, and so on.
[0051] For example, if the above attribute information is for writing data, then the above data information includes the source address of the data to be written, the size of the data to be written, and the destination address for writing the data to be written.
[0052] For example, if the above attribute information is for reading data, then the above data information includes the source address of the data to be read and the size of the data to be read, etc.
[0053] For another example, if the above attribute information is for sending data, then the above data information includes the source address of the data to be sent, the data size of the data to be sent, and the destination address for receiving the data to be sent, etc.
[0054] For another example, if the above attribute information is received data, then the above data information includes the address used to receive the data, etc.
[0055] Next, the server can forward the service request from the device object to the hardware card through the device object corresponding to the service to be processed. For example, the server can write the service request into the bar space of the device object, thereby enabling the server to forward the service request to the hardware card through the device object.
[0056] Then, the hardware card can execute the received service request, thereby processing the pending service indicated by the service request. Next, the hardware card reports the processing result of the pending service indicated by the service request to the server.
[0057] For example, if the service request currently received by the hardware card is service request 1, the hardware card can send data 1 based on the address of network device 1 indicated by service request 1. When the hardware card receives a receive completion response message from network device 1, it means that the hardware card has obtained the processing result of the pending service indicated by service request 1. In this case, the hardware card will report the processing result to the server. For example, the hardware card can write the processing result into the bar space of the device object that issued service request 1, so that the device object obtains the processing result.
[0058] When the server obtains the processing result of the pending business through the device object, it deletes the processing result and the corresponding business request in the device object. Alternatively, the server invalidates the processing result and the corresponding business request in the device object.
[0059] At this point, the server has completed the processing of the pending business through the hardware card.
[0060] It should be understood that a business transaction can be considered as an incomplete transaction until the server receives the processing result.
[0061] Reference below Figure 1 , Figure 1 This diagram illustrates a server processing services via a hardware card. Figure 1 As shown, the server's processor can generate a service request based on the pending services currently being provided (e.g., virtual machine services) and write the service request into the driver memory of the device object corresponding to that service.
[0062] Next, the server can forward the service request to the hardware card through the device object. When the hardware card receives the service request, it processes the pending service indicated by the service request according to the instructions in the service request. For example, the hardware card sends the data indicated by the service request to the network, or the hardware card reads the data indicated by the service request from the access medium.
[0063] When the hardware card obtains the processing result of the pending service (e.g., a response message received from the network after the hardware card executes the service request indicating the pending service, or the hardware card determines that the data indicated by the service request indicating the pending service has been read completely), it writes the processing result into the bar space of the device object that forwarded the service request for the pending service. In this way, the device object obtains the processing result.
[0064] In this way, the server's processor can, based on the processing result, delete or invalidate the service request in the driver memory of the device object that forwarded the service request corresponding to the processing result. Thus, the server achieves service processing via hardware cards.
[0065] 3) Other terms
[0066] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0067] In the embodiments of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0068] In this application, the term "at least one" means one or more, and the term "multiple" means two or more. For example, multiple second messages refer to two or more second messages. The terms "system" and "network" are often used interchangeably in this document.
[0069] It should be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.
[0070] It should also be understood that the term “comprising” (also referred to as “includes”, “including”, “comprises” and / or “comprising”) as used in this specification specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0071] It should also be understood that the term "if" can be interpreted as meaning "when" or "upon" or "in response to determination" or "in response to detection." Similarly, depending on the context, the phrases "if determination..." or "if detection [the stated condition or event]" can be interpreted as meaning "when determination..." or "in response to determination..." or "when detection [the stated condition or event]" or "in response to detection [the stated condition or event]."
[0072] This application provides a service processing method that, when a hardware card is offline, suspends unfinished services from the server connected to the hardware card, and records information about the target device object that was running when the hardware card was offline. This way, when the hardware card comes back online, the previously unfinished services can be reprocessed, thus avoiding service interruptions on the server caused by the hardware card's offline status.
[0073] This application also provides a business processing system. (See reference...) Figure 2 , Figure 2 A schematic diagram of a business processing system 20 provided in an embodiment of this application is shown. Figure 2 As shown, the service processing system 20 includes a service processing device 21 and a hardware card 22. The service processing device 21 and the hardware card 22 are connected via a bus 23.
[0074] The business processing device 21 can be a server. (See reference) Figure 3 , Figure 3 A schematic diagram of the hardware structure of a service processing device 21 provided in an embodiment of this application is shown. Figure 3 As shown, the service processing device 21 includes a processor 31, a memory 32, an input / output interface 33, and a bus 34. The processor 31, the memory 32, and the input / output interface 33 can be connected via the bus 34.
[0075] The processor 31 is the control center of the business processing device 21. It can be a general-purpose central processing unit (CPU) or other general-purpose processors. The general-purpose processor can be a microprocessor or any conventional processor.
[0076] As an example, processor 31 may include one or more CPUs, for example Figure 3 CPU 0 and CPU 1 are shown in the diagram.
[0077] The memory 32 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0078] In one possible implementation, the memory 32 can exist independently of the processor 31. The memory 32 can be connected to the processor 31 via a bus 34 and is used to store data, instructions, or program code. When the processor 31 calls and executes the instructions or program code stored in the memory 32, it can implement the business processing method provided in the embodiments of this application.
[0079] In another possible implementation, the memory 32 can also be integrated with the processor 31.
[0080] Input / output interface 33 is used for the service processing device 21 to communicate with other devices (such as...) Figure 2 (Hardware cards, etc.) connection.
[0081] Bus 34 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0082] It should be pointed out that, Figure 3 The structure shown does not constitute a limitation on the service processing device, except Figure 3In addition to the components shown, the business processing apparatus 21 may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0083] Hardware card 22 can be a smart card with computing and I / O capabilities; there is no limitation on this. Hardware card 22 is used to process business for server 21.
[0084] Specifically, hardware card 22 may include multiple interfaces for data I / O. When the link between hardware card 22 and server 21 is normal, the multiple interfaces of hardware card 22 can be mapped to multiple device objects on server 21. In this way, server 21 can forward service requests to hardware card 22 through these multiple device objects, so that hardware card 22 can execute the received service requests, thereby realizing the processing of the services indicated by these service requests for server 21.
[0085] The process of server 21 creating device objects for multiple interfaces of hardware card 22 can be referred to the description of device objects above, and will not be repeated here.
[0086] Optional, a hardware structure diagram of hardware card 22 can be referenced. Figure 3 The hardware structure diagram of the business processing device 21 shown is not described in detail here.
[0087] Bus 23 can be a PCI bus or a PCIE bus, etc., and there is no limitation on it.
[0088] The method provided in the embodiments of this application is described below with reference to the accompanying drawings.
[0089] refer to Figure 4 , Figure 4 A flowchart illustrating a business processing method provided in an embodiment of this application is shown. This method can be applied to, for example... Figure 2 In the business processing system 20 shown, the method is executed by the business processing device in the business system. For ease of description, this embodiment uses a server as an example for illustration. The method may include the following steps.
[0090] S101. The server has confirmed that the hardware card is offline.
[0091] The server and the hardware card can be connected via a PCI or PCIe bus. The hardware card is used to process tasks for the server, such as handling I / O operations.
[0092] When a hardware card experiences a hardware failure, reset, or upgrade and restart, it indicates that the hardware card is no longer in service.
[0093] Optionally, when the hardware card is taken offline, it runs on the business processing system (e.g., Figure 2 The basic input / output system (BIOS) of the business processing system 20 shown can detect link anomalies between the server and the hardware card through technologies such as PCI advanced error reporting (AER) or downstream port containment (DPC). In this case, the hardware card can disconnect the link between the server and the hardware card through the BIOS and send a first preset event or a first interrupt signal to the server. Here, the first preset event or the first interrupt signal is used to indicate that the hardware card has gone offline. The first preset event can be a hot-swapping event, etc., which is not limited in this embodiment.
[0094] In response, the server receives the first preset event or the first interrupt signal, thereby determining that the hardware card is offline.
[0095] S102, Server Hanging Service.
[0096] Specifically, when the server determines that the hardware card is offline, it stops forwarding service requests that indicate services to the hardware card via the device object. The descriptions of services and service requests can be found above and will not be repeated here.
[0097] For example, when the server determines that the hardware card is offline, it stops writing service requests to the bar space of the device object. This means that the server stops forwarding service requests to the hardware card through the device object.
[0098] Then, the server can suspend any unfinished business from when the hardware card goes offline. The description of unfinished business is similar to that above and will not be repeated here.
[0099] Specifically, the server can record in a preset space the business requests of services that the server has not completed when the hardware card goes offline, thereby enabling the suspension of these services.
[0100] Optionally, the server can also suspend the services issued by the server to the device object after the hardware card is taken offline and before the hardware card is brought back online.
[0101] Specifically, the server can record in the aforementioned preset space the service requests sent by the server to the device object after the hardware card goes offline and before the hardware card comes back online, thereby achieving the suspension of these services.
[0102] The aforementioned preset space can be the space within the driver memory of the device object. It should be understood that among the multiple device objects mapped to the hardware card on the server, each device object can correspond to a preset space.
[0103] The aforementioned business requests can be business requests generated by the server's processor based on the services currently being provided (such as virtual machine services). For a detailed description of the business requests, please refer to the relevant descriptions of business requests above, which will not be repeated here.
[0104] Specifically, the server records business requests in a preset space, which can be achieved in any of the following ways:
[0105] Method 1: When the server sends a service request to the device object through the processor, it writes the service request into the preset space (e.g., the first preset space) corresponding to the device object.
[0106] For example, the server can create a list of business requests within the preset space. When the server sends a business request to the device object through the processor, the business request is written into the list of business requests.
[0107] It should be understood that the server records the business requests sent to the device object in this way, regardless of whether the hardware card is offline.
[0108] Method 2: After determining that the hardware card is offline, the server writes the service requests sent by the processor to the device object into a preset space (e.g., the second preset space) corresponding to that device object. It can be seen that in this case, the service requests written to the second preset space by the server are the service requests sent by the server to the device object after the hardware card is offline and before the hardware card is brought back online.
[0109] Furthermore, the server also restores (or reconstructs) the service requests corresponding to the request information sent by each device object when forwarding service requests to the hardware card before the hardware card went offline. It can be seen that these service requests are those of unprocessed services. Then, the server writes the restored (or reconstructed) service requests into the second preset space. Therefore, in this case, the service requests written into the second preset space by the server are those of services that the server did not process when the hardware card went offline.
[0110] This includes the request information sent by each device object when issuing a service request to the hardware card, encompassing the attribute information and data information within that service request. The server can then use this attribute and data information to recover (or reconstruct) the corresponding service request. For a description of the attribute and data information in the service request, please refer to the above description; it will not be repeated here.
[0111] S103. The server records information about the target device object. This target device object is a device object that is running on the server.
[0112] Here, a device object running on the server refers to a device object that includes business requests for services that the server has not yet completed. In other words, the target device object contains business requests for services that the server has not yet completed.
[0113] Typically, a server can indicate whether a device object contains unprocessed service requests by marking it. For example, a server can mark a device object with a "1" to indicate that it contains unprocessed service requests, and a server can mark a device object with a "0" to indicate that it does not contain unprocessed service requests. Thus, the device object marked with "1" is the target device object.
[0114] In this way, after the server holds pending business requests for unprocessed services and pending business requests for services, it can record information about the target device object. Here, pending business requests refer to the business requests sent by the server to the device object after the hardware card has been taken offline and before it has been brought back online.
[0115] The information of the target device object includes at least one of the following: the identification information of the target device object, and the storage information associated with the target device object. For a detailed explanation of the identification information of the target device object and the storage information associated with the target device object, please refer to the description of the device object's identification information and the storage information associated with the device object included in the device object's configuration parameters above; these details will not be repeated here.
[0116] Optionally, the target device object's information may also include buffer information, data ring content, etc. There are no limitations on this. The buffer information is used to store the request information of the service request, and the data ring content is used to describe the data exchange information between the device object and the hardware card.
[0117] It should be understood that when the server determines that a hardware card is offline, it will delete the device object mapped to that hardware card. Through S103, the server can record (e.g., take a snapshot) the information of the target device object before deleting the device object mapped to the hardware card, so that the target device object can be reconstructed when the hardware card comes back online.
[0118] Alternatively, recording the target device information can be understood as the server retaining the target device object's information when deleting it, but only clearing the device number of the hardware card interface mapped to that device object. When the hardware card comes back online, the server can reassign a device number to the target device object to indicate the hardware card interface.
[0119] Here, the device number can be the device number assigned to each interface of the hardware card after the server detects the hardware card when it comes online.
[0120] S104. The server confirms that the hardware card is online.
[0121] Optionally, once the hardware card fault is resolved, or the reset or restart is complete, the system running the business processing system (e.g.) Figure 2 The BIOS of the business processing system 20) can detect the restoration of the link between the server and the hardware card through technologies such as PCI AER or DPC. In this case, the hardware card can establish a link between the server and the hardware card through the BIOS and send a second preset event or a second interrupt signal to the server. Here, the second preset event or the second interrupt signal is used to indicate that the hardware card has come online. The second preset event can be a hot-plug event, etc., which is not limited in this embodiment.
[0122] In response, the server receives the second preset event or the second interrupt signal, thereby determining that the hardware card is online.
[0123] S105. The server establishes an association between the target device object and the hardware card based on the pre-recorded information of the target device object.
[0124] Once the hardware card comes online, the server detects it and recreates the target device object based on the hardware card's first interface and pre-recorded target device object information. It can be seen that the target device object corresponds to the first interface. The first interface can be any interface of the hardware card.
[0125] Specifically, when the server detects a hardware card and creates a device object for the first interface of that hardware card, it uses the pre-recorded information of the target device object as the configuration parameters for the device object created for the first interface, thereby achieving the reconstruction of the target device object.
[0126] For example, if the target device object's information includes: the target device object's identification information (e.g., name) is E1, and its associated storage information is: driver memory 1 and bar space 1, then when the hardware card comes online, the server detects the hardware card and, when creating a device object for the hardware card's interface 1, uses the pre-recorded target device object's identification information (e.g., E1) as the identification information for the device object created for interface 1, and configures the pre-recorded storage information associated with the target device object (e.g., driver memory 1 and bar space 1) as the storage information associated with the device object created for interface 1. This achieves the re-creation of the target device object.
[0127] When the server reconstructs the target device object based on the hardware card's first interface, it establishes an association between the target device object and the hardware card. In this way, services that reference the target device object (such as virtual machine services) can continue to forward service requests to the hardware card through the target device object.
[0128] It should be understood that if the server pre-records information about multiple target device objects, then the server reconstructs multiple target device objects based on the multiple interfaces of the hardware card. This means that each target device object corresponds one-to-one with each of these multiple interfaces.
[0129] It should be understood that for interfaces on the hardware card other than those used to rebuild the target device object, the server can create corresponding device objects for these interfaces through normal device enumeration, which will not be elaborated in this embodiment.
[0130] S106. The server reissues the suspended service to the device object and forwards it to the hardware card through the device object.
[0131] Specifically, the server resends the service requests recorded in the aforementioned preset space to the device object, and then forwards them to the hardware card through the device object.
[0132] In this way, for service requests that the server has not completed processing when the hardware card goes offline, the server can re-forward these service requests to the hardware card, allowing the hardware card to reprocess the services indicated by these requests. Thus, even if the hardware card unexpectedly goes offline due to a fault, reset, or restart, the services running on the server will not be interrupted.
[0133] In summary, this application provides a service processing method. When a hardware card used for processing server services goes offline, the server suspends unprocessed services and records information about the device object corresponding to the service (e.g., virtual machine service) to which the unprocessed service belongs. When the hardware card comes back online, the server can rebuild these device objects and re-forward the unprocessed services suspended when the hardware card went offline, allowing the hardware card to process these services again, thus avoiding service interruption caused by the hardware card going offline. Through this method, the services provided by the server are unaware of whether the hardware card is offline, and services will not be interrupted due to request failures or never returning, thereby ensuring that the SLA of the users served by the server does not decrease.
[0134] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0135] This application embodiment can divide the business processing device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0136] like Figure 5 As shown, Figure 5 This illustration shows a schematic diagram of a service processing apparatus 50 provided in an embodiment of this application. The service processing apparatus 50 is applied to a server connected to a hardware card, which is used to process the server's services. The service processing apparatus 50 can be used to execute the aforementioned service processing methods, for example, to execute... Figure 4 The method is shown. The service processing device 50 may include a suspension unit 51, a recording unit 52, and a forwarding unit 53.
[0137] The suspension unit 51 is used to suspend unfinished services from the server when the hardware card is determined to be offline. The recording unit 52 is used to record information about the target device object, which is a device object running on the server. The forwarding unit 53 is used to forward the suspended services to the hardware card via the target device object, based on the information recorded by the recording unit 52, when the hardware card is determined to be back online.
[0138] As an example, combined Figure 4 The suspension unit 51 can be used to execute S102, the recording unit 52 can be used to execute S103, and the forwarding unit 53 can be used to execute S106.
[0139] Optionally, the information of the target device object mentioned above includes at least one of the following: the identification information of the target device object, and the storage information associated with the target device object.
[0140] Optionally, the suspension unit 51 is specifically used to: stop forwarding services to the hardware card through the device object; and to record in a preset space the services that the server did not complete when the hardware card went offline.
[0141] As an example, combined Figure 4 The suspension unit 51 can be used to perform S102.
[0142] Optionally, the suspension unit 51 is also specifically used for: recording in a preset space the services sent by the server to the device object after the hardware card goes offline and before the hardware card comes back online.
[0143] As an example, combined Figure 4 The suspension unit 51 can be used to perform S102.
[0144] Optionally, the forwarding unit 53 is specifically used to: establish an association between the target device object and the hardware card based on the information of the target device object; and to forward the suspended service to the hardware card through the target device object based on the association.
[0145] As an example, combined Figure 4 Forwarding unit 53 can be used to execute S106.
[0146] Optionally, the forwarding unit 53 is specifically used to: forward services recorded in a preset space to the hardware card through the target device object.
[0147] As an example, combined Figure 4 Forwarding unit 53 can be used to execute S106.
[0148] Optionally, the service processing device 50 further includes a determination unit 54, used to determine that the hardware card is offline when the hardware card experiences a hardware failure, a hardware card reset, or a hardware card upgrade and restart.
[0149] As an example, combined Figure 4 Unit 54 can be used to execute S101.
[0150] For a detailed description of the above-mentioned optional methods, please refer to the foregoing method embodiments, which will not be repeated here. Furthermore, the explanation of any of the above-provided service processing apparatus 50 and the description of its beneficial effects can be found in the corresponding method embodiments, which will not be repeated here.
[0151] As an example, combined Figure 3 The suspension unit 51, recording unit 52, and forwarding unit 53 in the service processing device 50 can be connected via... Figure 3 Processor 31 in the middle executes Figure 3 The program code is implemented in memory 32.
[0152] This application embodiment also provides a chip system 60, such as Figure 6 As shown, the chip system 60 includes at least one processor and at least one interface circuit. As an example, when the chip system 60 includes one processor and one interface circuit, the processor can be... Figure 6 The processor 61 shown in the solid box (or the processor 61 shown in the dashed box) can be an interface circuit. Figure 6 The interface circuit 62 is shown in the solid box (or the dashed box). When the chip system 60 includes two processors and two interface circuits, the two processors include... Figure 6 The processor 61 shown in the solid box and the processor 61 shown in the dashed box, these two interface circuits include Figure 6 Interface circuit 62 is shown in both solid and dashed boxes. No limitations are imposed on this.
[0153] The processor 61 and the interface circuit 62 can be interconnected via a line. For example, the interface circuit 62 can be used to receive signals (e.g., to obtain service processing results returned by the hardware card). As another example, the interface circuit 62 can be used to send signals to other devices (e.g., the processor 61). For instance, the interface circuit 62 can read instructions stored in memory and send those instructions to the processor 61. When the instruction is executed by the processor 61, it can cause the service processing device to perform the steps in the above embodiments. Of course, the chip system 60 may also include other discrete components, and this application embodiment does not specifically limit this.
[0154] Another embodiment of this application provides a computer-readable storage medium storing instructions that, when executed on a service processing device, cause the service processing device to perform each step of the method flow shown in the above method embodiment.
[0155] In some embodiments, the disclosed method may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of art.
[0156] Figure 7 A conceptual partial view of a computer program product provided in an embodiment of this application is shown schematically. The computer program product includes a computer program for executing computer processes on a computing device.
[0157] In one embodiment, a computer program product is provided using a signal bearer medium 70. The signal bearer medium 70 may include one or more program instructions that, when executed by one or more processors, can provide the above-mentioned... Figure 4 The described function or part of the function. Therefore, for example, refer to... Figure 4 One or more features of S101 to S106 can be assumed by one or more instructions associated with the signal carrying medium 70. Furthermore, Figure 7 The program instructions in the document also describe example instructions.
[0158] In some examples, the signal carrying medium 70 may include a computer-readable medium 71, such as, but not limited to, a hard disk drive, a compact disc (CD), a digital video optical disc (DVD), a digital magnetic tape, a memory, read-only memory (ROM), or random access memory (RAM), etc.
[0159] In some implementations, the signal carrying medium 70 may include a computer recordable medium 72, such as, but not limited to, a memory, a read / write (R / W) CD, an R / W DVD, and so on.
[0160] In some implementations, the signal carrying medium 70 may include a communication medium 73, such as, but not limited to, digital and / or analog communication media (e.g., fiber optic cables, waveguides, wired communication links, wireless communication links, etc.).
[0161] The signal-bearing medium 70 can be transmitted by a wireless communication medium 73 (e.g., a wireless communication medium conforming to the IEEE 1902.11 standard or other transmission protocols). One or more program instructions can be, for example, computer-executable instructions or logical implementation instructions.
[0162] In some examples, such as targeting Figure 4 The described business processing apparatus can be configured to provide various operations, functions, or actions in response to one or more program instructions in a computer-readable medium 71, a computer-recordable medium 72, and / or a communication medium 73.
[0163] It should be understood that the arrangements described herein are for illustrative purposes only. Therefore, those skilled in the art will understand that other arrangements and other elements (e.g., machines, interfaces, functions, sequences, and functional groups, etc.) can be used instead, and some elements may be omitted depending on the desired outcome. Furthermore, many of the described elements are functional entities that can be implemented as discrete or distributed components, or in any suitable combination and location with other components.
[0164] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When executed on a computer and when the computer execution instructions are executed, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs).
[0165] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A business processing method, characterized in that, The method is applied to a server, the server being connected to a hardware card, the hardware card being used to process the server's business; the method includes: When it is determined that the hardware card is offline, the server suspends the unprocessed services of the server and records the information of the target device object. The target device object is the device object that is running on the server. Specifically, the hardware card is determined to be offline when the hardware card fails, the hardware card is reset, or the hardware card is upgraded and restarted. When it is determined that the hardware card is back online, the server establishes an association between the target device object and the hardware card based on the pre-recorded information of the target device object; the server reissues the suspended services to the device object and forwards them to the hardware card through the device object.
2. The method according to claim 1, characterized in that, The information of the target device object includes at least one of the following: the identification information of the target device object, and the storage information associated with the target device object.
3. The method according to claim 1 or 2, characterized in that, The services that the server has not yet completed specifically include: Stop forwarding services to the hardware card through the device object; Record in the preset space the services that the server did not complete when the hardware card went offline.
4. The method according to claim 3, characterized in that The services that the server has not yet processed also include: The preset space records the services issued by the server to the device object after the hardware card goes offline and before the hardware card comes back online.
5. The method according to claim 3, characterized in that, The server re-issues the suspended service to the device object, and forwards it to the hardware card through the device object, specifically including: Based on the aforementioned association, the suspended service is forwarded to the hardware card through the target device object.
6. The method according to claim 5, characterized in that, The forwarding of the suspended service to the hardware card through the target device object specifically includes: The target device object forwards the services recorded in the preset space to the hardware card.
7. A business processing apparatus, characterized in that, The device is applied to a server, the server being connected to a hardware card, the hardware card being used to process the server's business; the device includes: The suspension unit is used to suspend the unfinished business of the server when it is determined that the hardware card is offline. The hardware card is determined to be offline when the hardware card fails, the hardware card is reset, or the hardware card is upgraded and restarted. A recording unit is used to record information about a target device object, wherein the target device object is a device object that is running on the server. The forwarding unit is used to, when it is determined that the hardware card is back online, establish an association between the target device object and the hardware card based on the information of the target device object that has been pre-recorded; the server re-issues the suspended service to the device object and forwards it to the hardware card through the device object.
8. The apparatus according to claim 7, characterized in that, The information of the target device object includes at least one of the following: the identification information of the target device object, and the storage information associated with the target device object.
9. The apparatus according to claim 7 or 8, characterized in that, The suspension unit is specifically used for: Stop forwarding services to the hardware card through the device object; Record in the preset space the services that the server did not complete when the hardware card went offline.
10. The apparatus according to claim 9, characterized in that, The suspension unit is also specifically used for: The preset space records the services issued by the server to the device object after the hardware card goes offline and before the hardware card comes back online.
11. The apparatus according to claim 9, characterized in that, The forwarding unit is specifically used for: Based on the aforementioned association, the suspended service is forwarded to the hardware card through the target device object.
12. The apparatus according to claim 11, characterized in that, The forwarding unit is specifically used for: The target device object forwards the services recorded in the preset space to the hardware card.
13. A business processing apparatus, characterized in that, The apparatus includes a memory and one or more processors, the memory storing computer instructions and the processors invoking the computer instructions to perform the method as described in any one of claims 1-6.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method of any one of claims 1-6.
Citation Information
Patent Citations
Device accessing method and control server
CN104753746A
Method for upgrading firmware of network card, device, network card and apparatus
CN108616382A