CN111615819B - Method and device for transmitting data - Google Patents

Method and device for transmitting data Download PDF

Info

Publication number
CN111615819B
CN111615819B CN201880086974.2A CN201880086974A CN111615819B CN 111615819 B CN111615819 B CN 111615819B CN 201880086974 A CN201880086974 A CN 201880086974A CN 111615819 B CN111615819 B CN 111615819B
Authority
CN
China
Prior art keywords
configuration
configuration items
network device
executed
http
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201880086974.2A
Other languages
Chinese (zh)
Other versions
CN111615819A (en
Inventor
朱康毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN111615819A publication Critical patent/CN111615819A/en
Application granted granted Critical
Publication of CN111615819B publication Critical patent/CN111615819B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Abstract

The application discloses a method and a device for transmitting data, comprising the following steps: in the protocol layer extension field of the HTTP message, an extension parameter of an error handling policy that is required to be adopted by the second network device when the configuration items are configured to have execution failures is added, so that the second network device determines the error handling policy corresponding to the HTTP message according to the extension parameter carried in the HTTP message to cope with the situation of the execution failures of the configuration items, which not only avoids an increase in the number of interactions between the first network device and the second network device caused when the global error handling policy is modified in the prior art, but also avoids the second network device adopting an error handling policy for other HTTP messages caused by modifying the global error handling policy for other HTTP messages received by the second network device.

Description

Method and device for transmitting data
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for transmitting data.
Background
In the world wide Web (Web), a Hypertext Transfer Protocol (HTTP) message is usually used for information interaction between an application program and a network device. In some cases, a message carried by an HTTP message may be used to trigger a network device that receives the HTTP message to execute a plurality of configuration items in batch, that is, one HTTP message may issue a plurality of configuration items at the same time. For example, for a WebAPI such as an Application Programming Interface (restful API) that represents a layer transition formula, where REST represents a Representational State Transfer and API represents an Application Programming Interface, multiple configuration items of the WebAPI may be simultaneously issued in one HTTP message, thereby implementing batch configuration of the WebAPI.
When one HTTP message issues a plurality of configuration items at the same time, sometimes there is a failure in execution of individual configuration items on a network device that receives the HTTP message. For such an execution failure situation, there are various error handling policies available, for example, after the execution failure of one configuration item, other configuration items that have not been executed in the HTTP message continue to be executed, or after the execution failure of one configuration item, all configuration items that have not been executed in the HTTP message stop being executed, and so on. Generally, the network devices are configured with the same error handling policy, so for different HTTP messages, the same error handling policy is adopted when multiple configuration items sent down in the HTTP message have configuration items with execution failures. However, different HTTP messages may need to adopt different error handling policies, and therefore, the error handling policy configured on the network device needs to be modified for the current HTTP message through another interface, which not only increases additional interaction times between the application program and the network device, but also makes it very easy for errors to occur when the error handling policy on the network device is continuously modified for different HTTP messages.
Disclosure of Invention
The technical problem to be solved by the present application is to provide a method and an apparatus for transmitting data, so as to be able to specify an error handling policy corresponding to an HTTP message used for issuing a configuration item, thereby avoiding extra interaction times between network devices and avoiding an error of configuring an error handling policy on a network device while implementing different error handling policies for different HTTP messages.
In a first aspect of the embodiments of the present application, a method for transmitting data is provided, including:
the first network equipment generates a hypertext transfer protocol (HTTP) message;
the message body field of the HTTP message carries configuration information, and the configuration information is used to trigger the second network device to execute a plurality of configuration items;
the protocol layer extension field of the HTTP packet carries an extension parameter, where the extension parameter is used to indicate an error handling policy adopted by the second network device when a configuration item that fails to be executed occurs in the plurality of configuration items;
and the first network equipment sends the HTTP message to the second network equipment.
Because the extension parameters are added in the protocol layer extension field of the HTTP message, not only the increase of the number of interactions between the first network device and the second network device caused by modifying the global error handling policy in the prior art can be avoided, but also, for other HTTP messages received by the second network device, the second network device can be prevented from adopting an error handling policy for other HTTP messages caused by modifying the global error handling policy.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the protocol layer extension field is specifically located in a start-line portion of the HTTP packet. In this implementation, the extension parameter may be specifically added in the start-line portion of the HTTP packet, rather than adding the extension parameter by modifying the data model, so that the problem that the modified data model is incompatible with the standard data model due to modification of the data model can be avoided, and for various services provided by the second network device, the first network device may use the extension parameter in a unified form to specify the error handling policy, without adjusting the form of the extension parameter according to the data model corresponding to the service provided by the second network device, so that it can be ensured that the first network device can specify the corresponding error handling policy in the HTTP.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the protocol layer extension field is specifically a uniform resource identifier in the start-line part. In this implementation manner, an extension parameter may be specifically added to the query field in the URI in the start-line part, so that the problem that the modified data model is incompatible with the standard data model due to modification of the data model can be avoided.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the protocol layer field is specifically located in a header-field of the HTTP packet. In this implementation, the extension parameter may be specifically added to the header-field of the HTTP message, instead of adding the extension parameter by modifying the data model, so that the problem that the modified data model is incompatible with the standard data model due to modification of the data model can be avoided, and for various services provided by the second network device, the first network device may use the extension parameter in a unified form to specify the error handling policy, without adjusting the form of the extension parameter according to the data model corresponding to the service provided by the second network device, so that the first network device can specify the corresponding error handling policy in the HTTP.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the protocol layer extension field is specifically an error handling field in the header-field. In the implementation mode, the error processing field in the header-field can be added with the extension parameter, so that the problem that the modified data model is incompatible with the standard data model due to modification of the data model can be avoided.
With reference to the first aspect, in a fifth possible implementation manner of the first aspect, the error handling policy is specifically any one of the following policies:
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items which are executed by the plurality of configuration items and continuously executing other configuration items except the target configuration item in the plurality of configuration items;
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items executed by the plurality of configuration items and stopping executing the configuration items not executed in the plurality of configuration items;
and if the target configuration item in the plurality of configuration items fails to be executed, backing the executed configuration items in the plurality of configuration items and stopping executing all the configuration items in the plurality of configuration items.
With reference to any one of the first to fifth possible implementation manners of the first aspect, in a sixth possible implementation manner of the first aspect, the configuration message is specifically configuration information of a Web application programming interface API; the configuration item is a configuration item of the WebAPI.
With reference to the sixth possible implementation manner of the first aspect, in a seventh possible implementation manner of the first aspect, the WebAPI is specifically an application programming interface restful api that represents a layer transformation formula.
In a second aspect of the embodiments of the present application, a method for transmitting data is provided, including:
the second network equipment receives a hypertext transfer protocol (HTTP) message sent by the first network equipment;
the message body field of the HTTP message carries configuration information, and the configuration information is used to trigger the second network device to execute a plurality of configuration items;
the protocol layer extension field of the HTTP packet carries an extension parameter, where the extension parameter is used to indicate an error handling policy adopted by the second network device when a configuration item that fails to be executed occurs in the plurality of configuration items;
and the second network equipment executes actions according to the information carried in the HTTP message.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the protocol layer extension field is specifically located in a start-line portion of the HTTP packet.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the protocol layer extension field is specifically a query field in a uniform resource identifier URI in the start-line part.
With reference to the second aspect, in a third possible implementation manner of the second aspect, the protocol layer field is specifically located in a header-field of the HTTP packet.
With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the protocol layer extension field is specifically an error handling field in the header-field.
With reference to the second aspect, in a fifth possible implementation manner of the second aspect, the error handling policy is specifically any one of the following policies:
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items which are executed by the plurality of configuration items and continuously executing other configuration items except the target configuration item in the plurality of configuration items;
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items executed by the plurality of configuration items and stopping executing the configuration items not executed in the plurality of configuration items;
and if the target configuration item in the plurality of configuration items fails to be executed, backing the executed configuration items in the plurality of configuration items and stopping executing all the configuration items in the plurality of configuration items.
With reference to any one of the first to fifth possible implementation manners of the second aspect, in a sixth possible implementation manner of the second aspect, the configuration message is specifically configuration information of a Web application programming interface API; the configuration item is a configuration item of the WebAPI.
With reference to the sixth possible implementation manner of the second aspect, in a seventh possible implementation manner of the second aspect, the WebAPI is specifically an application programming interface restful api that represents a layer transition formula.
The method for transmitting data provided by the second aspect corresponds to the method for transmitting data provided by the first aspect, so that various possible implementations of the method for transmitting data provided by the second aspect can be referred to the various possible implementations of the method for transmitting data provided by the first aspect.
In a third aspect of the embodiments of the present application, an apparatus for transmitting data is provided, including:
the generating module is used for generating a hypertext transfer protocol (HTTP) message;
the message body field of the HTTP message carries configuration information, and the configuration information is used to trigger the second network device to execute a plurality of configuration items;
the protocol layer extension field of the HTTP packet carries an extension parameter, where the extension parameter is used to indicate an error handling policy adopted by the second network device when a configuration item that fails to be executed occurs in the plurality of configuration items;
and the sending module is used for sending the HTTP message to the second network equipment.
With reference to the third aspect, in a first possible implementation manner of the third aspect, the protocol layer extension field is specifically located in a start-line portion of the HTTP packet.
With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the protocol layer extension field is specifically a uniform resource identifier in the start-line part.
With reference to the third aspect, in a third possible implementation manner of the third aspect, the protocol layer field is specifically located in a header-field of the HTTP packet.
With reference to the third possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the protocol layer extension field is specifically an error handling field in the header-field.
With reference to the third aspect, in a fifth possible implementation manner of the third aspect, the error handling policy is specifically any one of the following policies:
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items which are executed by the plurality of configuration items and continuously executing other configuration items except the target configuration item in the plurality of configuration items;
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items executed by the plurality of configuration items and stopping executing the configuration items not executed in the plurality of configuration items;
and if the target configuration item in the plurality of configuration items fails to be executed, backing the executed configuration items in the plurality of configuration items and stopping executing all the configuration items in the plurality of configuration items.
With reference to any one of the first to fifth possible implementation manners of the third aspect, in a sixth possible implementation manner of the third aspect, the configuration message is specifically configuration information of a Web application programming interface API; the configuration item is a configuration item of the WebAPI.
With reference to the sixth possible implementation manner of the third aspect, in a seventh possible implementation manner of the third aspect, the WebAPI is specifically an application programming interface restful api that represents a layer transition formula.
The apparatus for transmitting data provided in the third aspect corresponds to the method for transmitting data provided in the first aspect, so that reference may be made to various possible implementations of the apparatus for transmitting data provided in the third aspect.
In a fourth aspect of the embodiments of the present application, an apparatus for transmitting data is provided, including:
the receiving module is used for receiving a hypertext transfer protocol (HTTP) message sent by first network equipment;
the message body field of the HTTP message carries configuration information, and the configuration information is used to trigger the second network device to execute a plurality of configuration items;
the protocol layer extension field of the HTTP packet carries an extension parameter, where the extension parameter is used to indicate an error handling policy adopted by the second network device when a configuration item that fails to be executed occurs in the plurality of configuration items;
and the execution module is used for executing actions according to the information carried in the HTTP message.
With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the protocol layer extension field is specifically located in a start-line portion of the HTTP packet.
With reference to the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the protocol layer extension field is specifically a query field in a uniform resource identifier URI in the start-line part.
With reference to the fourth aspect, in a third possible implementation manner of the fourth aspect, the protocol layer field is specifically located in a header-field of the HTTP packet.
With reference to the third possible implementation manner of the fourth aspect, in a fourth possible implementation manner of the fourth aspect, the protocol layer extension field is specifically an error handling field in the header-field.
With reference to the fourth aspect, in a fifth possible implementation manner of the fourth aspect, the error handling policy is specifically any one of the following policies:
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items which are executed by the plurality of configuration items and continuously executing other configuration items except the target configuration item in the plurality of configuration items;
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items executed by the plurality of configuration items and stopping executing the configuration items not executed in the plurality of configuration items;
and if the target configuration item in the plurality of configuration items fails to be executed, backing the executed configuration items in the plurality of configuration items and stopping executing all the configuration items in the plurality of configuration items.
With reference to any one of the first to fifth possible implementation manners of the fourth aspect, in a sixth possible implementation manner of the fourth aspect, the configuration message is specifically configuration information of a Web application programming interface API; the configuration item is a configuration item of the WebAPI.
With reference to the sixth possible implementation manner of the fourth aspect, in a seventh possible implementation manner of the fourth aspect, the WebAPI is specifically an application programming interface restful api that represents a layer transition formula.
The apparatus for transmitting data provided by the fourth aspect corresponds to the method for transmitting data provided by the second aspect, so that various possible embodiments of the apparatus for transmitting data provided by the fourth aspect can refer to various possible embodiments of the method for transmitting data provided by the second aspect.
In the embodiment of the application, in the protocol layer extension field of the HTTP message, an extension parameter of an error handling policy that is required to be adopted by the second network device when the configuration items are configured to have execution failures is added, so that the second network device can determine the error handling policy corresponding to the HTTP message according to the extension parameter carried in the HTTP message to cope with the situation of the execution failures of the configuration items, which not only can avoid an increase in the number of interactions between the first network device and the second network device caused when the global error handling policy is modified in the prior art, but also can avoid that the second network device adopts an error handling policy for other HTTP messages due to the modification of the global error handling policy for other HTTP messages received by the second network device.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a schematic diagram of an exemplary application scenario in an embodiment of the present application;
FIG. 2 is a flow chart illustrating a method for transmitting data according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart illustrating a method according to a scenario embodiment of the present application;
FIG. 4 is a diagram of an exemplary configuration message;
FIG. 5 is a diagram of another exemplary configuration message;
FIG. 6 is a schematic diagram of an apparatus for transmitting data according to an embodiment of the present application;
FIG. 7 is a schematic diagram of another apparatus for transmitting data according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an apparatus for transmitting data in an embodiment of the present application.
Detailed Description
When the network device executes a plurality of configuration items in batch based on the HTTP message sent by the application program, if there is a failure in executing a certain configuration item on the network device, the network device needs to execute a corresponding error handling policy to cope with the occurrence of the failure in executing the configuration item. In the existing solution for dealing with the failure of executing the configuration item, for each HTTP message received by the network device, when the configuration item that fails to be executed occurs in the multiple configuration items of the HTTP message, the same error handling policy is adopted, and if different error handling policies need to be adopted for different HTTP messages, the application program must transmit a message for modifying the error handling policy to the network device through another interface in advance, so as to modify the error handling policy currently set on the network device, which increases the number of interactions between the application program and the network device.
Moreover, different HTTP messages may need to adopt different error handling policies, and if the network device needs to configure configuration items in multiple HTTP messages at the same time in a short time, the error handling policies configured on the network device are modified multiple times, which easily causes the network device to adopt unexpected (i.e., erroneous) error handling policies to deal with the occurrence of failure in executing the configuration items when configuring configuration items issued by another part of HTTP messages. For example, suppose that the network device processes the message a and the message B simultaneously in a short time, and the error handling policy corresponding to the message a is policy a, and the error handling policy corresponding to the message B is policy B, if the application program modifies the error handling policy on the network device for the message a into policy a, and then the application program rapidly modifies the error handling policy on the network device for the message B from policy a into policy B, in the process of configuring the configuration item in the message a by the network device, if a configuration item with configuration failure occurs, the network device will use policy a to perform corresponding processing on the message a, but does not use policy B to perform processing on the message a.
To this end, an embodiment of the present application provides a method for transmitting data, so as to implement that an error handling policy corresponding to an HTTP message used for issuing a configuration item is specified in the HTTP message, and specifically, an extension parameter used for indicating an error handling policy that a network device receiving the HTTP message needs to adopt when configuring multiple configuration items that execution fails is added in a protocol layer extension field of the HTTP message, so that the network device may determine the error handling policy corresponding to the HTTP message according to the extension parameter carried in the received HTTP message. Because the HTTP message received by the network equipment contains the extension parameter for indicating the error processing strategy, the application program does not need to send additional messages to modify the error processing strategy on the network equipment, thereby avoiding increasing the interaction times between the application program and the network equipment; and for each HTTP message, the network equipment can determine the error processing strategy corresponding to the HTTP message according to the extension parameters in the HTTP message, and the global error processing strategy on the network equipment does not need to be modified, so that the network equipment is prevented from selecting the wrong error processing strategy for the HTTP message due to the fact that the global error processing strategy is modified for many times.
For example, the embodiments of the present application may be applied to the exemplary scenario shown in fig. 1. In this scenario, the application program on the terminal 101 may generate an HTTP message, where a message body field of the HTTP message carries configuration information for triggering the network device 102 to execute the multiple configuration items, and an extension parameter, which is carried in a protocol layer extension field of the HTTP message and used for indicating that the network device 102 adopts an error handling policy when the configuration item that is failed to be executed occurs in the multiple configuration items, and then the terminal 101 sends the HTTP message to the network device 102. Then, the network device 102 responds to the received HTTP message, and performs batch configuration on the WebAPI interface according to the plurality of configuration items in the HTTP message. If the network device 102 has a configuration item with failed configuration in the process of performing batch configuration, the configuration process of the WebAPI interface is processed by using a corresponding error processing policy according to the extension parameter carried in the protocol layer extension field of the HTTP message. For example, the configuration may be continued with respect to the WebAPI, or the WebAPI interface may be rolled back to the executed configuration, and restored to the state before the configuration, or the configuration of the WebAPI interface may be stopped, and the configuration that has been executed before the configuration may be retained.
It is to be understood that the above scenario is only one example of a scenario provided in the embodiment of the present application, and the embodiment of the present application is not limited to this scenario.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, various non-limiting embodiments accompanying the present application examples are described below with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a method for transmitting data according to an embodiment of the present application, where the method specifically includes:
s201: the method comprises the steps that a first network device generates an HTTP message, wherein a message body field of the HTTP message carries configuration information used for triggering a second network device to execute a plurality of configuration items, and a protocol layer extension field of the HTTP message carries extension parameters used for indicating an error processing strategy adopted by the second network device when the configuration items with execution failure appear in the plurality of configuration items.
S202: and the first network equipment sends the generated HTTP message to the second network equipment.
S203: and the second network equipment receives the HTTP message sent by the first network equipment.
S204: and the second network equipment executes corresponding actions according to the information carried in the HTTP message.
It should be noted that the HTTP message may be specifically generated by an application program such as WebAPP, and then the application program sends the generated HTTP message to the network device, so that the network device performs corresponding configuration on the configuration item indicated by the HTTP message. Then, the network device where the application program is located may be the first network device described in this embodiment, and the network device that receives the HTTP message sent by the application program may be the second network device described in this embodiment.
The message body field of the HTTP message carries configuration information for triggering the second network device to execute the plurality of configuration items, so that the second network device can execute the plurality of configuration items in batch based on the configuration information. For example, the HTTP message may carry configuration information for triggering the second network device to execute the configuration items of the plurality of WebAPI interfaces in batch, so that the second network device may perform batch configuration on the WebAPI interfaces based on the configuration information. The configuration information carried in the HTTP message is configuration information of the WebAPI interface, and the configuration item executed by the second network device is a configuration item of the WebAPI interface.
It should be noted that, if a certain configuration item fails to be executed during the process of configuring the configuration item by the second network device, the second device needs to adopt an error handling policy adapted to the HTTP message to cope with the occurrence of the certain configuration item. Therefore, in this embodiment, in order to enable the second network device to know the error handling policy corresponding to the HTTP message, the error handling policy may be specified in the HTTP message, and specifically, an extension parameter for indicating the error handling policy may be added in a protocol layer extension field of the HTTP message. In this way, when a configuration item with execution failure occurs in the plurality of configuration items, the second network device can adopt an error handling policy adapted to the HTTP according to the extension parameter carried in the protocol layer extension field of the HTTP message.
In some practical scenarios, a message body in the HTTP message needs to be defined according to a service standard data model, and therefore, the first network device may need to add an extension parameter that specifies an error handling policy to the HTTP message without changing the service standard data model corresponding to the message body in the HTTP message. For example, when a restful api interface (an application programming interface representing a layer conversion type) of the second network device is configured in batch, a message body in an HTTP message needs to be defined according to a service standard data model corresponding to a configuration service of the restful api interface, and when an extension parameter is added, the service standard data model corresponding to the message body is usually not allowed to be changed, so as to avoid a situation that the modified service standard data model is incompatible with the original service standard data model.
In the above practical application scenario, the extended parameter is not added by modifying the data model of the message body in the HTTP message, but the extended parameter is added in the protocol layer extended field of the HTTP message, so that even if the extended parameter is added in the HTTP message, the data model of the message body in the HTTP message is not changed, thereby avoiding the problem that the modified data model is incompatible with the standard data model due to the modification of the data model. Moreover, the form of the extended parameter in the HTTP message is usually defined by the second network device, so that, in the existing scheme of adding the extended parameter in the message body of the HTTP message, when the second network device provides different services, the first network device is required to add the extended parameter in different forms in the HTTP message based on the difference of the data models corresponding to the different services, but part of the data models may not provide the extended parameter in a corresponding form, thereby causing a problem that the first network device cannot specify an error handling policy in the HTTP message; in this embodiment, the extension parameter is added in the protocol layer extension field of the HTTP packet, so that, for various services provided by the second network device, the first network device may use the extension parameter in a unified form to specify the error handling policy, and the form of the extension parameter is not required to be adjusted according to the data model corresponding to the service provided by the second network device, thereby ensuring that the first network device can specify the corresponding error handling policy in the HTTP.
As an example, the present embodiment provides the following two implementation manners for adding an extension parameter in a protocol layer extension field of an HTTP packet:
in an exemplary embodiment of adding the extension parameter, the protocol layer extension field of the HTTP packet may be located in a start-line portion of the HTTP packet, and further, the protocol layer extension field may specifically be a query field in a Uniform Resource Identifier (URI) in the URI (Uniform Resource Identifier) in the start-line portion. For example, if the response context protocol (a network configuration management protocol defined in RFC 8040) specifies that the URI of the HTTP request includes an optional query parameter, a parameter may be extended from the query parameter of the URI as an extended parameter for indicating an error handling policy.
In another exemplary embodiment of adding the extension parameter, the protocol layer extension field of the HTTP message may also be located in a header-field of the HTTP message, and further, the protocol layer extension field may specifically be an error handling field in the header-field.
It should be noted that the error handling policy may be different for different HTTP messages. As one example, the error handling policies may include error rollback policies, error stop policies, and error continue policies.
In a possible implementation manner, if the extended parameter carried in the HTTP message is a continue-on-error, the second network device adopts an error continuation policy; if the extended parameter carried in the HTTP message is rollback-on-error, the second network device adopts an error rollback strategy; and if the extended parameter carried in the HTTP message is stop-on-error, the second network equipment adopts an error stopping strategy. It should be noted that the error handling policy mentioned here is only an exemplary description, and is not used to limit the error handling policy to the above three kinds, and in practical application, the error handling policy may also include other policies, which may be specifically determined according to requirements of an actual situation, and is not described herein again.
The error rollback policy refers to that, if there is a failure in executing the target configuration item in the plurality of configuration items, the second network device backs up the configuration made on the configuration item that has already been executed, and stops executing all the configuration items indicated by the configuration information, that is, the second network device backs up the configuration item to the state before executing the configuration item, where the configuration item was configured before the revocation of the configuration information. For example, the second network device needs to sequentially configure the configuration item a, the configuration item B, and the configuration item C, and when the second network device executes the configuration item B, an execution failure occurs, at this time, the second network device may rollback the configuration made for the configuration item a that has already been executed, that is, rollback to a state before executing the configuration item a, the configuration item B, and the configuration item C, and no longer execute the configuration item a, the configuration item B, and the configuration item C.
The error continuation policy is to keep configuring the executed configuration items and continue to execute the other configuration items except the target configuration item in the plurality of configuration items if the target configuration item fails to execute in the plurality of configuration items. Still taking an example that the second network device needs to sequentially configure the configuration item a, the configuration item B, and the configuration item C, when the second network device executes the configuration item B, an execution failure occurs, and then the second network device keeps configuring the configuration item a that has already been executed, and continues to execute the configuration item C, without executing the configuration item B any more. That is, the second network device skips the configuration of configuration item B and executes only configuration item a and configuration item C.
The error stopping policy is to, if there is a failure in executing the target configuration item in the plurality of configuration items, the second network device keeps configuring the configuration item that has already been executed, and stops executing the configuration item that has not been executed in the plurality of configuration items. Still take the example that the second network device needs to sequentially configure the configuration item a, the configuration item B, and the configuration item C, and when the second network device executes the configuration item B, an execution failure occurs, then the second network device keeps configuring the configuration item a that has already been executed, but stops executing other configuration items except the configuration item a. That is, upon failure to execute configuration item B, the second network device executes only configuration item a, and does not execute configuration item B and configuration item C any more.
The first network device can send the HTTP message to the second network device after generating the HTTP message, so that the second network device can respond to the configuration information carried in the HTTP message to execute a plurality of configuration items after receiving the HTTP message, and when a certain configuration item fails to be executed, an error processing strategy adapted to the HTTP message can be adopted according to the extension parameters carried in the HTTP message to deal with the situation that the configuration item fails to be executed.
In order to enable the second network device to determine the error handling policy corresponding to the HTTP message sent by the first network device, in this embodiment, adding an extension parameter of an error processing strategy required by the second network equipment when the configuration items are failed to be executed in a protocol layer extension field of the HTTP message, so that the second network device can determine the error processing strategy corresponding to the HTTP message according to the extension parameters carried in the HTTP message, so as to deal with the situation that the execution of the configuration items fails, which not only can avoid the increase of the number of interactions between the first network device and the second network device caused by modifying the global error handling strategy in the prior art, moreover, for other HTTP messages received by the second network device, it may also be avoided that the second network device adopts an erroneous error handling policy for other HTTP messages due to modifying the global error handling policy.
In order to facilitate understanding of specific technical solutions of the embodiments of the present application, specific solutions of the embodiments of the present application are described in detail below with specific exemplary scenarios. Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a method for transmitting data according to an embodiment of the present disclosure. In the scene, the network device and the WebAPP communicate based on the RESTCONF protocol, and the network device performs batch configuration on the WebAPI interface after receiving the HTTP message sent by the WebAPP. Specifically, the method may include:
s301: WebAPP sends an HTTP message to network equipment, wherein a message body field of the HTTP message carries configuration information used for triggering the network equipment to perform multiple configuration items, an error processing field in a message header-field of the HTTP message carries an extension parameter, and the extension parameter is used for indicating an error processing strategy adopted by the network equipment when a configuration item with configuration failure occurs in the multiple configuration items.
In this embodiment, the WebAPP and the network device may communicate based on the rest session initiation protocol (rest session initiation protocol), and if the network device needs to perform batch configuration for the WebAPI interface, the WebAPP may first generate an HTTP message including configuration information for the Web APP interface to trigger the network device to perform batch configuration for the WebAPP interface.
In a further possible implementation manner, when the WebAPI interface is configured in batch based on the RESTCONF protocol, specifically, the restful api interface may be configured in batch.
Meanwhile, when the WebAPP generates the HTTP message, an extended parameter is carried in an error handling field in a header-field of the HTTP message, and is used to instruct the network device to adopt which error handling policy to handle a configuration failure when the configuration failure occurs due to the configuration of the WebAPI interface based on a certain configuration item.
For example, the generated HTTP message may be a configuration message as shown in fig. 4, where the configuration message indicates that two users "wang" and "zhang" are requested to be added to a "users" list of "example", and when the configuration message is generated, WebAPP may carry an extended parameter continue-on-Error in an Error handling field Error-Option in a header field header-field, where the extended parameter continue-on-Error is used to indicate that the network device adopts an Error continuation policy when a configuration item with a configuration failure occurs in the multiple configuration items, that is, if a target configuration item fails to be executed in the multiple configuration items, the configuration item that has been executed is maintained, and other configuration items in the multiple configuration items except the target configuration item are continuously executed.
In addition, the error handling field error-option may also carry an extended parameter rollback-on-error, where the extended parameter rollback-on-error is used to indicate that the network device adopts an error rollback policy when a configuration item with configuration failure occurs in the multiple configuration items, that is, if there is a target configuration item with execution failure in the multiple configuration items, the second network device backs the configuration made on the configuration item that has been executed, and stops executing all configuration items indicated by the configuration information; or, the error processing field error-option may also carry an extended parameter stop-on-error, where the extended parameter stop-on-error is used to indicate that the network device adopts an error stop policy when a configuration item with a configuration failure occurs in the multiple configuration items, that is, if there is an execution failure of the target configuration item in the multiple configuration items, the second network device keeps configuring the configuration item that has been executed, and stops executing the configuration item that has not been executed in the multiple configuration items.
After the WebAPP generates the HTTP message, the HTTP message may be sent to the network device, so that the network device may start to perform batch configuration on the WebAPI interface based on the received HTTP message.
S302: and the network equipment responds to the configuration information of the received HTTP message and configures the configuration items one by one.
In this embodiment, after receiving the HTTP message, the network device may respond to the configuration information carried in the HTTP message, start the configuration executor, and sequentially configure the WebAPP interface based on each configuration item by using the configuration executor, that is, sequentially execute the configurations of the configuration items 1 to n.
S303: if the network device fails to execute a certain configuration item in the process of executing configuration on each configuration item, the network device determines an error processing strategy based on an extended parameter in an error processing field in a header-field of the HTTP message.
In practical application, when a network device executes configuration of each configuration item one by one, sometimes a configuration failure occurs in a certain configuration item, and if a configuration item with a configuration failure occurs, the network device determines an error handling policy corresponding to an HTTP message based on an extended parameter in an error handling field in a header-field of the HTTP message. Specifically, if the extended parameter acquired by the network device is a continue-on-error, an error continuation strategy is adopted; if the expansion parameter acquired by the network equipment is rollback-on-error, adopting an error rollback strategy; and if the expansion parameter acquired by the network equipment is stop-on-error, adopting an error stopping strategy.
S304: if the error processing strategy is determined to be the error continuing strategy according to the expansion parameters, the network equipment keeps the executed configuration items and continues to execute the unexecuted configuration items.
S305: and if the error processing strategy is determined to be the error rollback strategy according to the extended parameters, the network equipment backs to the state before all the configuration items are executed, and stops executing all the configuration items.
S306: if the error processing strategy is determined to be the error stopping strategy according to the extended parameters, the network equipment keeps the executed configuration items and stops executing the configuration items which are not executed.
In this embodiment, after determining the error handling policy adapted to the HTTP message according to the extended parameter, corresponding processing may be performed. For example, assuming that the configuration item 3 is failed to be executed, if the network device determines that the error continuation policy is adopted, the configuration items 1 and 2 may be kept to be executed, and the configuration items 4 to n are continuously executed in sequence; if the network device determines to adopt the error rollback policy, the configuration items 1 and 2 that have been executed before can be cancelled, the configuration items 1 and 2 are rolled back to the state before the configuration items 1 and 2 are executed, the configuration is terminated, and the configuration items 1 to n are not executed any more; if the network device determines to adopt the error stop policy, the configuration items 1 and 2 may be kept and the execution of the configuration items 3 to n may be stopped.
It should be noted that, in this scenario embodiment, an extended parameter is located in an error handling field in a header-field of an HTTP message, but in other scenario embodiments, the extended parameter may also be located in a URI in a start-line portion of the HTTP message. Specifically, the format of a generic URI is [ scheme: ] [// authority ] path [? query ] [ # fragment ], where the URI includes an optional query parameter, a parameter may be extended from the query parameter of the URI as an extended parameter for indicating an error handling policy. For example, a parameter error-option may be extended in the query field in the start-line portion of the start line shown in fig. 5, and the error handling policy corresponding to the HTTP message is specified to be a continue-on-error. In practical application, whether the extension parameter is defined in the error handling field in the header-field of the message or defined in the query field in the URI in the start-line part can be determined according to the requirements of practical situations, which is not limited herein.
It should be noted that by adding the extension parameter in the protocol layer extension field of the HTTP packet instead of adding the extension parameter in the message body shown in fig. 4, the problem that the modified data model is not compatible with the standard data model due to modifying the data model corresponding to the message body can be avoided.
In this embodiment, an extended parameter for indicating an error handling policy that needs to be adopted when a network device receiving an HTTP message executes multiple configuration items and an execution failure occurs is added to an error handling field in a header-field of an HTTP message issued by a WebAPP, so that the network device can determine the error handling policy corresponding to the HTTP message according to the extended parameter carried in the received HTTP message, which can not only avoid increasing the number of interactions between the WebAPP and the network device, but also avoid adopting the error handling policy on the network device.
In addition, the embodiment of the application also provides a device for transmitting data. Referring to fig. 6, fig. 6 is a schematic structural diagram illustrating an apparatus for transmitting data according to an embodiment of the present application, where the apparatus 600 may specifically include:
a generating module 601, configured to generate a hypertext transfer protocol HTTP message;
the message body field of the HTTP message carries configuration information, and the configuration information is used to trigger the second network device to execute a plurality of configuration items;
the protocol layer extension field of the HTTP packet carries an extension parameter, where the extension parameter is used to indicate an error handling policy adopted by the second network device when a configuration item that fails to be executed occurs in the plurality of configuration items;
a sending module 602, configured to send the HTTP message to the second network device.
In some possible embodiments, the protocol layer extension field is specifically located in a start-line portion of the HTTP packet.
In some possible embodiments, the protocol layer extension field is specifically a uniform resource identifier within the start-line section.
In some possible embodiments, the protocol layer field is specifically located in a header-field of the HTTP packet.
In some possible embodiments, the protocol layer extension field is specifically an error handling field within the header-field.
In some possible embodiments, the error handling policy is specifically any one of the following policies:
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items which are executed by the plurality of configuration items and continuously executing other configuration items except the target configuration item in the plurality of configuration items;
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items executed by the plurality of configuration items and stopping executing the configuration items not executed in the plurality of configuration items;
and if the target configuration item in the plurality of configuration items fails to be executed, backing the executed configuration items in the plurality of configuration items and stopping executing all the configuration items in the plurality of configuration items.
In some possible embodiments, the configuration message is specifically configuration information of a Web application programming interface API; the configuration item is a configuration item of the WebAPI.
In some possible embodiments, the WebAPI is embodied as an application programming interface restful api that exhibits a layered translation style.
In order to enable the second network device to determine the error handling policy corresponding to the HTTP message sent by the first network device, in this embodiment, adding an extension parameter of an error processing strategy required by the second network equipment when the configuration items are failed to be executed in a protocol layer extension field of the HTTP message, so that the second network device can determine the error processing strategy corresponding to the HTTP message according to the extension parameters carried in the HTTP message, so as to deal with the situation that the execution of the configuration items fails, which not only can avoid the increase of the number of interactions between the first network device and the second network device caused by modifying the global error handling strategy in the prior art, moreover, for other HTTP messages received by the second network device, it may also be avoided that the second network device adopts an erroneous error handling policy for other HTTP messages due to modifying the global error handling policy.
In addition, the embodiment of the application also provides a device for transmitting data. Referring to fig. 7, fig. 7 is a schematic structural diagram illustrating an apparatus for transmitting data according to an embodiment of the present application, where the apparatus 700 may specifically include:
an accepting module 701, configured to receive a hypertext transfer protocol HTTP message sent by a first network device;
the message body field of the HTTP message carries configuration information, and the configuration information is used to trigger the second network device to execute a plurality of configuration items;
the protocol layer extension field of the HTTP packet carries an extension parameter, where the extension parameter is used to indicate an error handling policy adopted by the second network device when a configuration item that fails to be executed occurs in the plurality of configuration items;
and the execution module 702 is configured to execute an action according to the information carried in the HTTP message.
In some possible embodiments, the protocol layer extension field is specifically located in a start-line portion of the HTTP packet.
In some possible embodiments, the protocol layer extension field is specifically a query field in a uniform resource identifier URI in the start-line part.
In some possible embodiments, the protocol layer field is specifically located in a header-field of the HTTP packet.
In some possible embodiments, the protocol layer extension field is specifically an error handling field within the header-field.
In some possible embodiments, the error handling policy is specifically any one of the following policies:
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items which are executed by the plurality of configuration items and continuously executing other configuration items except the target configuration item in the plurality of configuration items;
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items executed by the plurality of configuration items and stopping executing the configuration items not executed in the plurality of configuration items;
and if the target configuration item in the plurality of configuration items fails to be executed, backing the executed configuration items in the plurality of configuration items and stopping executing all the configuration items in the plurality of configuration items.
In some possible embodiments, the configuration message is specifically configuration information of a Web application programming interface API; the configuration item is a configuration item of the WebAPI.
In some possible embodiments, the WebAPI is embodied as an application programming interface restful api that exhibits a layered translation style.
In this embodiment, in the protocol layer extension field of the HTTP message, an extension parameter of an error handling policy that is required to be adopted by the second network device when the configuration items are configured to have execution failures is added, so that the second network device can determine, according to the extension parameter carried in the HTTP message, an error handling policy corresponding to the HTTP message to cope with the situation of the execution failures of the configuration items, which not only can avoid an increase in the number of interactions between the first network device and the second network device caused when the global error handling policy is modified in the prior art, but also can avoid, for other HTTP messages received by the second network device, that the second network device adopts an error handling policy for other HTTP messages due to the modification of the global error handling policy.
The former embodiment describes the apparatus for transmitting data in the present embodiment from the perspective of functional entities, and the following describes the apparatus for transmitting data in the present embodiment in detail from the perspective of hardware processing.
Next, an apparatus for transmitting data provided in an embodiment of the present application is described, where the apparatus includes: a processor, a memory, a communication interface and a bus; the processor, the communication interface and the memory are communicated with each other through the bus; the communication interface is used for receiving and sending data; the memory is to store instructions; the processor is configured to execute the instructions in the memory to perform the following operations:
generating a hypertext transfer protocol (HTTP) message;
sending the HTTP message to the second network equipment;
the message body field of the HTTP message carries configuration information, and the configuration information is used to trigger the second network device to execute a plurality of configuration items;
and the protocol layer extension field of the HTTP message carries extension parameters, and the extension parameters are used for indicating an error handling strategy adopted by the second network equipment when the configuration item with execution failure occurs in the plurality of configuration items.
In some possible embodiments, the protocol layer extension field is specifically located in a start-line portion of the HTTP packet.
In some possible embodiments, the protocol layer extension field is specifically a uniform resource identifier within the start-line section.
In some possible embodiments, the protocol layer field is specifically located in a header-field of the HTTP packet.
In some possible embodiments, the protocol layer extension field is specifically an error handling field within the header-field.
In some possible embodiments, the error handling policy is specifically any one of the following policies:
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items which are executed by the plurality of configuration items and continuously executing other configuration items except the target configuration item in the plurality of configuration items;
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items executed by the plurality of configuration items and stopping executing the configuration items not executed in the plurality of configuration items;
and if the target configuration item in the plurality of configuration items fails to be executed, backing the executed configuration items in the plurality of configuration items and stopping executing all the configuration items in the plurality of configuration items.
In some possible embodiments, the configuration message is specifically configuration information of a Web application programming interface API; the configuration item is a configuration item of the WebAPI.
In some possible embodiments, the WebAPI is embodied as an application programming interface restful api that exhibits a layered translation style.
Referring now to fig. 8, the apparatus 800, which is described in detail, includes: a receiver 801, a transmitter 802, a processor 803, and a memory 804 (wherein the number of processors 803 in the device 800 may be one or more, one processor being exemplified in fig. 8). The communication interface may include a receiver 801 and a transmitter 802. In some embodiments of the present application, the receiver 801, the transmitter 802, the processor 803 and the memory 804 may be connected by a bus or other means, wherein fig. 8 illustrates the connection by a bus.
The memory 804 may include a read-only memory and a random access memory, and provides instructions and data to the processor 803. A portion of the Memory 804 may also include Non-Volatile Random Access Memory (NVRAM). The memory 804 stores an operating system and operating instructions, executable modules or data structures, or a subset or an expanded set thereof, wherein the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic services and for handling hardware-based tasks.
The processor 803 controls the operation of the device 800, and the processor 803 may also be referred to as a Central Processing Unit (CPU). In a particular application, the various components are coupled together by a bus system that may include a power bus, a control bus, a status signal bus, etc., in addition to a data bus. For clarity of illustration, the various buses are referred to in the figures as a bus system.
The method disclosed in the embodiments of the present application can be applied to the processor 803 or implemented by the processor 803. The processor 803 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 803. The processor 803 may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic device, discrete gate or transistor logic device, discrete hardware component. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 804, and the processor 803 reads the information in the memory 804 to complete the steps of the method in combination with the hardware thereof.
Receiver 801 may be configured to receive input numeric or character information and generate signal inputs related to associated settings and function controls of device 800, transmitter 802 may include a display device such as a display screen, and transmitter 802 may be configured to output numeric or character information via an external interface.
In this embodiment of the application, the processor 803 is configured to perform the following operations:
generating a hypertext transfer protocol (HTTP) message;
the message body field of the HTTP message carries configuration information, and the configuration information is used to trigger the second network device to execute a plurality of configuration items;
the protocol layer extension field of the HTTP packet carries an extension parameter, where the extension parameter is used to indicate an error handling policy adopted by the second network device when a configuration item that fails to be executed occurs in the plurality of configuration items;
and sending the HTTP message to the second network equipment.
In the names of "first network device" and the like mentioned in the embodiments of the present application, the "first" is used merely as a name identification and does not represent the first in sequence. The same applies to "second" etc.
As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by software plus a general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a storage medium, such as a read-only memory (ROM)/RAM, a magnetic disk, an optical disk, or the like, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only an exemplary embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (18)

1. A method of transmitting data, comprising:
the first network equipment generates a hypertext transfer protocol (HTTP) message; the message body field of the HTTP message carries configuration information, and the configuration information is used for triggering second network equipment to execute a plurality of configuration items; the protocol layer extension field of the HTTP packet carries an extension parameter, where the extension parameter is used to indicate an error handling policy adopted by the second network device when a configuration item that fails to be executed occurs in the plurality of configuration items;
and the first network equipment sends the HTTP message to the second network equipment.
2. The method according to claim 1, wherein the error handling policy is specifically any one of the following policies:
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items which are executed by the plurality of configuration items and continuously executing other configuration items except the target configuration item in the plurality of configuration items;
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items executed by the plurality of configuration items and stopping executing the configuration items not executed in the plurality of configuration items;
and if the target configuration item in the plurality of configuration items fails to be executed, backing the executed configuration items in the plurality of configuration items and stopping executing all the configuration items in the plurality of configuration items.
3. The method according to claim 1, wherein the protocol layer extension field is specifically located in a start-line portion of the HTTP packet.
4. The method according to claim 3, wherein the protocol layer extension field is specifically a query field in a uniform resource identifier, URI, within the start-line part.
5. The method of claim 1, wherein the protocol layer extension field is specifically located in a header-field of the HTTP packet.
6. The method of claim 5, wherein the protocol layer extension field is specifically an error handling field within the header-field.
7. The method according to any one of claims 1 to 6, wherein the configuration information is specifically configuration information of a world Wide Web Application Programming Interface (API); the configuration item is a configuration item of the WebAPI.
8. The method of claim 7, wherein the WebAPI is embodied as a layered translation-style rendering application programming interface (RESTful API).
9. A method of transmitting data, comprising:
the second network equipment receives a hypertext transfer protocol (HTTP) message sent by the first network equipment;
the message body field of the HTTP message carries configuration information, and the configuration information is used to trigger the second network device to execute a plurality of configuration items;
the protocol layer extension field of the HTTP packet carries an extension parameter, where the extension parameter is used to indicate an error handling policy adopted by the second network device when a configuration item that fails to be executed occurs in the plurality of configuration items;
and the second network equipment executes actions according to the information carried in the HTTP message.
10. The method according to claim 9, wherein the error handling policy is specifically any one of the following policies:
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items which are executed by the plurality of configuration items and continuously executing other configuration items except the target configuration item in the plurality of configuration items;
if the target configuration item in the plurality of configuration items fails to be executed, keeping the configuration items executed by the plurality of configuration items and stopping executing the configuration items not executed in the plurality of configuration items;
and if the target configuration item in the plurality of configuration items fails to be executed, backing the executed configuration items in the plurality of configuration items and stopping executing all the configuration items in the plurality of configuration items.
11. The method according to claim 9, wherein the protocol layer extension field is specifically located in a start-line portion of the HTTP packet.
12. The method according to claim 11, wherein the protocol layer extension field is specifically a query field in a uniform resource identifier, URI, within the start-line part.
13. The method of claim 9, wherein the protocol layer extension field is specifically located in a header-field of the HTTP packet.
14. The method of claim 13, wherein the protocol layer extension field is specifically an error handling field within the header-field.
15. The method according to any one of claims 9 to 14, wherein the configuration information is specifically configuration information of a Web application programming interface, API; the configuration item is a configuration item of the WebAPI.
16. The method of claim 15, wherein the WebAPI is embodied as a restful api that exhibits a layered translation style.
17. An apparatus for transmitting data, the apparatus comprising:
the generating module is used for generating a hypertext transfer protocol (HTTP) message;
the message body field of the HTTP message carries configuration information, and the configuration information is used for triggering second network equipment to execute a plurality of configuration items;
the protocol layer extension field of the HTTP packet carries an extension parameter, where the extension parameter is used to indicate an error handling policy adopted by the second network device when a configuration item that fails to be executed occurs in the plurality of configuration items;
and the sending module is used for sending the HTTP message to the second network equipment.
18. An apparatus for transmitting data, the apparatus being applied to a second network device, comprising:
the receiving module is used for receiving a hypertext transfer protocol (HTTP) message sent by first network equipment;
the message body field of the HTTP message carries configuration information, and the configuration information is used to trigger the second network device to execute a plurality of configuration items;
the protocol layer extension field of the HTTP packet carries an extension parameter, where the extension parameter is used to indicate an error handling policy adopted by the second network device when a configuration item that fails to be executed occurs in the plurality of configuration items;
and the execution module is used for executing actions according to the information carried in the HTTP message.
CN201880086974.2A 2018-08-23 2018-08-23 Method and device for transmitting data Active CN111615819B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/101971 WO2020037607A1 (en) 2018-08-23 2018-08-23 Data transmission method and apparatus

Publications (2)

Publication Number Publication Date
CN111615819A CN111615819A (en) 2020-09-01
CN111615819B true CN111615819B (en) 2021-06-08

Family

ID=69592200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880086974.2A Active CN111615819B (en) 2018-08-23 2018-08-23 Method and device for transmitting data

Country Status (2)

Country Link
CN (1) CN111615819B (en)
WO (1) WO2020037607A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114070886A (en) * 2021-11-17 2022-02-18 深圳壹账通智能科技有限公司 Message conversion method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101682526A (en) * 2007-03-12 2010-03-24 思杰系统有限公司 Systems and methods for configuring, applying and managing security policies
CN105591819A (en) * 2015-12-24 2016-05-18 杭州华三通信技术有限公司 Method and device of configuring network equipment
CN107026821A (en) * 2016-02-01 2017-08-08 阿里巴巴集团控股有限公司 The processing method and processing device of message

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9215131B2 (en) * 2012-06-29 2015-12-15 Cisco Technology, Inc. Methods for exchanging network management messages using UDP over HTTP protocol
US10412138B2 (en) * 2015-03-02 2019-09-10 Qualcomm Incorporated Indication for partial segment
US10180833B2 (en) * 2015-12-31 2019-01-15 Samsung Electronics Co., Ltd. Cooperative web-assisted deep link redirection
CN106789486B (en) * 2017-03-17 2020-08-04 杭州迪普科技股份有限公司 Method and device for detecting shared access, electronic equipment and computer readable storage medium
CN107295003B (en) * 2017-07-17 2020-01-07 联动优势科技有限公司 Data transmission method, device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101682526A (en) * 2007-03-12 2010-03-24 思杰系统有限公司 Systems and methods for configuring, applying and managing security policies
CN105591819A (en) * 2015-12-24 2016-05-18 杭州华三通信技术有限公司 Method and device of configuring network equipment
CN107026821A (en) * 2016-02-01 2017-08-08 阿里巴巴集团控股有限公司 The processing method and processing device of message

Also Published As

Publication number Publication date
WO2020037607A1 (en) 2020-02-27
CN111615819A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
JP6549787B2 (en) Method and apparatus for deploying network services
WO2018032770A1 (en) Application component deployment method and deployment node
CN110636128A (en) Data synchronization method, system, electronic equipment and storage medium
CN104184756A (en) Data synchronization method, device and system
US10083023B2 (en) Information processing device and program updating method
US11658870B2 (en) Method and apparatus for restoring network device to factory defaults, and network device
CN110995481A (en) Configuration method, server and computer-readable storage medium
JP2008541549A (en) Device management system and set value setting method in the system
CN111258723A (en) Transaction processing method, device, system, medium and equipment of distributed system
EP2621133A1 (en) Method and system for implementing pw control bit capability negotiation
CN112583630B (en) Device management method, device, system, device and storage medium
CN111615819B (en) Method and device for transmitting data
WO2022062661A1 (en) Operation notification method and apparatus, and storage medium and electronic apparatus
WO2012041239A1 (en) System and method for input tool invocation and proxy device
WO2016154921A1 (en) Data transmission method and device for data service
CN107301053B (en) Picture configuration method and device and electronic terminal
JP6577901B2 (en) Computer system and system state reproduction method
CN110620695B (en) Data processing method and related equipment
CN112559461A (en) File transmission method and device, storage medium and electronic equipment
JP4415391B2 (en) Method and apparatus for transmitting data to a network and method and apparatus for receiving data from a network
CN106230878B (en) Equipment service calling method and device based on AllJoyn framework
WO2018076903A1 (en) Dynamic time allocation method and device
WO2018119826A1 (en) Network service update method, nfvo, and nfv system
CN108234215B (en) Gateway creating method and device, computer equipment and storage medium
JP2022553741A (en) Service quality measurement method and device and user plane function

Legal Events

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