CN117201315B - Command issuing method and device in multi-mode network programming environment - Google Patents

Command issuing method and device in multi-mode network programming environment Download PDF

Info

Publication number
CN117201315B
CN117201315B CN202311457489.0A CN202311457489A CN117201315B CN 117201315 B CN117201315 B CN 117201315B CN 202311457489 A CN202311457489 A CN 202311457489A CN 117201315 B CN117201315 B CN 117201315B
Authority
CN
China
Prior art keywords
command
simulation
target communication
communication equipment
flow table
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
CN202311457489.0A
Other languages
Chinese (zh)
Other versions
CN117201315A (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.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
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 Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202311457489.0A priority Critical patent/CN117201315B/en
Publication of CN117201315A publication Critical patent/CN117201315A/en
Application granted granted Critical
Publication of CN117201315B publication Critical patent/CN117201315B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The specification discloses a command issuing method and device in a multi-mode network programming environment. In the command issuing method under the multi-mode network programming environment provided by the specification, configuration information of target communication equipment is obtained; responding to the original flow table issued by the controller of the target communication equipment, receiving the original flow table, and determining the resource information of the target communication equipment; generating a simulation command and a formal command according to the original flow table, the configuration information and the resource information; storing the current operation configuration of the target communication equipment to obtain a backup operation configuration; the simulation command is issued to an exchange chip of the target communication equipment, and a simulation transmission result of the exchange chip when data is transmitted according to the simulation command is obtained; and restoring the target communication equipment by adopting the backup operation configuration, and determining whether to issue the formal command according to the simulation transmission result.

Description

Command issuing method and device in multi-mode network programming environment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for issuing a command in a multi-mode network programming environment.
Background
In each node of the communication system, there is a distinction between a control plane and a data plane. The control plane is used for determining rules and strategies of data transmission, and the data plane is used for forwarding data according to a method formulated by the control plane.
In the existing command issuing method, since the control plane and the data plane are separated, the controller interacting with the user can only issue a command to the control plane and cannot operate the data plane. Therefore, the controller cannot directly check the data plane, and only the user can manually check and verify the forwarding effect of the data plane data by other modes. However, this manual inspection approach increases cost and is inefficient, and increasingly fails to meet the maintenance requirements of the communication device in increasingly complex network programming environments.
Therefore, how to better verify the data plane during the maintenance of the communication device is a problem to be solved.
Disclosure of Invention
The present disclosure provides a method and apparatus for issuing commands in a multi-modal network programming environment, so as to at least partially solve the foregoing problems in the prior art.
The technical scheme adopted in the specification is as follows:
the specification provides a command issuing method in a multi-mode network programming environment, which comprises the following steps:
Acquiring configuration information of target communication equipment;
responding to the original flow table issued by the controller of the target communication equipment, receiving the original flow table, and determining the resource information of the target communication equipment;
generating a simulation command and a formal command according to the original flow table, the configuration information and the resource information;
storing the current operation configuration of the target communication equipment to obtain a backup operation configuration;
the simulation command is issued to an exchange chip of the target communication equipment, and a simulation transmission result of the exchange chip when data is transmitted according to the simulation command is obtained;
and restoring the target communication equipment by adopting the backup operation configuration, and determining whether to issue the formal command according to the simulation transmission result.
Optionally, the original flow table at least includes a flow table ID, a priority, a start offset position, an offset length, a matching feature, a message entry, and a processing policy.
Optionally, the resource information at least includes table entry capacity, port bandwidth occupation condition, and message transceiving statistical information.
Optionally, the configuration information includes a system operation command set, and a switch chip capability table;
generating a simulation command and a formal command according to the original flow table, the configuration information and the resource information, wherein the simulation command and the formal command specifically comprise:
According to the exchange chip capability table, the original flow table is adjusted to obtain an analog flow table;
and generating a formal command according to the resource information, the system operation command set and the original flow table, and generating a simulation command according to the resource information, the system operation command set and the simulation flow table.
Optionally, the system operation command set at least includes a command format, command parameters, and a command issuing sequence; the exchange chip capability table at least comprises service function supporting conditions, table entry capacity, port bandwidth and maximum message buffer size.
Optionally, the analog command is issued to an exchange chip of the target communication device to obtain an analog transmission result of the exchange chip when data is transmitted according to the analog command, which specifically includes:
issuing the simulation command to an exchange chip of the target communication equipment;
generating simulation data matched with the simulation command, and sending the simulation data to the exchange chip through an internal channel, so that the exchange chip transmits the simulation data according to the simulation command, wherein the internal channel is invisible to a user;
And determining an analog transmission result of the exchange chip.
Optionally, determining whether to issue the formal command according to the simulation transmission result specifically includes:
when the simulation transmission result meets a preset condition, the formal command is issued to an exchange chip of the target communication equipment, so that the exchange chip generates a formal forwarding rule table item according to the formal command;
and when the simulation transmission result does not meet the preset condition, sending prompt information to a controller of the target communication equipment.
The present specification provides a command issuing device in a multi-mode network programming environment, where the device includes:
the acquisition module is used for acquiring configuration information of the target communication equipment;
the receiving module is used for responding to the original flow table issued by the controller of the target communication equipment, receiving the original flow table and determining the resource information of the target communication equipment;
the generation module is used for generating a simulation command and a formal command according to the original flow table, the configuration information and the resource information;
the backup module is used for storing the current operation configuration of the target communication equipment to obtain backup operation configuration;
The simulation module is used for issuing the simulation command to the exchange chip of the target communication equipment to obtain a simulation transmission result of the exchange chip when data are transmitted according to the simulation command;
and the issuing module is used for restoring the target communication equipment by adopting the backup operation configuration and determining whether to issue the formal command according to the simulation transmission result.
The present specification provides a computer readable storage medium storing a computer program which when executed by a processor implements the command issuing method in a multimodal network programming environment described above.
The present specification provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the command issuing method in the above-described multi-modal network programming environment when executing the program.
The above-mentioned at least one technical scheme that this specification adopted can reach following beneficial effect:
in the command issuing method under the multi-mode network programming environment provided by the specification, configuration information of target communication equipment is obtained; responding to the original flow table issued by the controller of the target communication equipment, receiving the original flow table, and determining the resource information of the target communication equipment; generating a simulation command and a formal command according to the original flow table, the configuration information and the resource information; storing the current operation configuration of the target communication equipment to obtain a backup operation configuration; the simulation command is issued to an exchange chip of the target communication equipment, and a simulation transmission result of the exchange chip when data is transmitted according to the simulation command is obtained; and restoring the target communication equipment by adopting the backup operation configuration, and determining whether to issue the formal command according to the simulation transmission result.
When the command issuing method under the multi-mode network programming environment provided by the specification is adopted, after an original flow table issued to the target communication equipment under control is received, respectively generating a simulation command and a formal command according to configuration information and resource information of the target communication equipment; firstly, adopting a simulation command to simulate a data transmission process, and determining whether to adopt a formal command according to a simulation transmission result. By adopting the method, objective and accurate predicted transmission results can be obtained before the formal data transmission, so that the target communication equipment can determine whether to adopt the current formal instruction for data transmission according to the predicted simulated transmission results. The problem that the transmission result cannot be perceived due to separation of the control surface and the data surface is effectively avoided, the condition that the transmission result is poor in the data transmission process is effectively reduced, and the data transmission effect of the target communication equipment is greatly improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, illustrate and explain the exemplary embodiments of the present specification and their description, are not intended to limit the specification unduly. In the drawings:
FIG. 1 is a schematic flow chart of a command issuing method in a multi-mode network programming environment in the present specification;
FIG. 2 is a schematic diagram of an original flow table in the present specification;
FIG. 3 is a schematic diagram of an analog flow table of the present disclosure;
fig. 4 is a schematic structural diagram of a target communication device in the present specification;
FIG. 5 is a schematic diagram of a command issuing device in a multi-modal network programming environment provided in the present disclosure;
fig. 6 is a schematic view of the electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present application based on the embodiments herein.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
Fig. 1 is a flow chart of a command issuing method in a multi-mode network programming environment in the present specification, specifically including the following steps:
S100: configuration information of the target communication device is acquired.
All steps in the command issuing method in the multi-mode network programming environment provided in the present specification can be implemented by any electronic device having a computing function, such as a terminal, a server, and the like. Meanwhile, the electronic device for implementing the method may be disposed inside the target communication device or may be disposed outside the target communication device, which is not particularly limited in this specification.
Unscheduled update maintenance is essential to the communication device. In the process of maintaining the communication device, the user updates the rules adopted by the communication device when transmitting data. Typically, this process may be implemented by a controller of the communication device. That is, the user sets and issues a flow table containing data transmission rules to the communication device through the controller.
The method is used for optimizing the command issuing process when the target communication equipment is updated and maintained, so that the target communication equipment obtains a better optimizing effect, and better data transmission is realized. Based on this, in this step, the configuration information of the target communication device may be acquired first for use in a subsequent step.
The target communication device may be any communication device including, but not limited to, a switch, router, gateway, bridge, repeater, etc. The configuration information is used to represent a configuration in the target communication device associated with generating or executing commands, which may include, but is not limited to, a system operation command set, a switch chip capability table.
In general, a common communication device may include a control unit and a switching chip. The control unit is used for realizing interaction between the communication equipment and the controller and controlling the exchange chip, and the exchange chip is used for realizing data transmission. A corresponding controller exists outside the communication equipment, and a user can realize interaction with the communication equipment through the controller to issue a flow table for the communication equipment.
Preferably, in this step, device information of the target communication device, such as the model of the target communication device, the operating system, the type of the exchange chip, etc., may be additionally obtained, so as to optimize the flow of the overall scheme, and achieve a better adaptation to the target communication device.
S102: and responding to the original flow table issued by the controller of the target communication equipment, receiving the original flow table, and determining the resource information of the target communication equipment.
When the target communication equipment needs to transmit data, the controller of the target communication equipment can issue an original flow table to the target communication equipment according to the transmission rule set by the user. Compared with the traditional method that the target communication equipment directly executes corresponding commands according to the flow table to transmit data, the method receives the original flow table issued by the controller by the execution body in the step.
During data transmission, the original stream table is used to guide generation of command-line interface (CLI) commands. An original flow table may include, but is not limited to, flow table ID, priority, start offset location, offset length, matching characteristics, message entry, processing policy, etc. Fig. 2 is a schematic diagram of one possible original flow table provided in this specification. As shown in fig. 2, the flow table ID is an identifier of an original flow table, the priority indicates a sequence of processing the original flow table, the matching feature is a feature of the data to be forwarded, the initial offset position and the offset length indicate positions of the matching feature to be identified in the data, the message entry is an interface of the data flowing into the switching chip, and the processing policy points to an interface of the data flowing out from the switching chip. For example, the original flow table shown in fig. 2 indicates that when the processing priority reaches 12, a packet received by the switch chip from the fp1 interface is matched to the feature 0x0800 after shifting 12 bytes based on L2, and the packet is output from the fp5 interface.
Meanwhile, in this step, resource information of the target communication device may also be determined. The resource information is used for representing the resource usage condition of the exchange chip in the target communication device, and can include, but is not limited to, the table entry capacity of the exchange chip, the port bandwidth occupation condition, the message transceiving statistical information and the like. The resource information can be obtained by, for example, exchanging SAI interface of the chip, SDK interface of the chip, debugging driving interaction interface provided by chip manufacturer, etc. Thus, the current running state of the exchange chip can be known, and the CLI command for transmitting data can be generated better.
S104: and generating a simulation command and a formal command according to the original flow table, the configuration information and the resource information.
Based on the configuration information of the target communication device acquired in step S100, and the original flow table and the resource information acquired in step S102, a simulation command and a formal command may be generated in this step, respectively. In the method, the simulation command and the formal command are CLI commands for indicating the exchange chip to carry out output transmission. The simulation command is used for enabling the target communication equipment to simulate the updated data transmission process, and the formal command is used for formally updating rules adopted by the target communication equipment when the target communication equipment transmits data. For the target communication device, the effect achieved by executing the analog command is the same as that achieved formally.
When generating the simulation command and the formal command, specifically, according to the exchange chip capability table, the original flow table is adjusted to obtain a simulation flow table; and generating a formal command according to the resource information, the system operation command set and the original flow table, and generating a simulation command according to the resource information, the system operation command set and the simulation flow table.
Although the effect of the simulation command after the execution of the formal command is the same, the interfaces adopted by the simulation command and the formal command are different when the simulation command and the formal command are executed, so that the message entry and the strategy of the simulation command and the formal command in the corresponding flow table are different. According to the exchange chip capability table, the adjustment of the original flow table can be completed. The exchange chip capability table may include, but is not limited to, information such as service function support, table entry capacity, port bandwidth, and maximum message buffer size. Fig. 3 is a schematic diagram of a simulated flow table provided in the present specification, and fig. 3 shows a simulated flow table obtained after the original flow table shown in fig. 2 is adjusted. As shown in fig. 3, the message entries and processing policies of the analog flow table are changed compared to the original flow table. That is, the data channels used are different in analog versus formal transmission.
After the original flow table and the simulation flow table are obtained, the formal command can be generated according to the original flow table and the simulation command can be generated according to the simulation flow table. The set of system operation commands of the target communication device may be used to direct the completion of the conversion from the flow table to the commands, and may include, but is not limited to, information such as command format, command parameters, command issuing order, and the like.
Furthermore, in the process of issuing the command, a plurality of original flow tables exist, each different original flow table records the transmission mode of different data, after the flow table is converted into the CLI command and issued to the exchange chip, the exchange chip generates a corresponding forwarding rule table according to the CLI command, the forwarding rule table is stored in the exchange chip, and the table resource of the exchange chip is occupied. However, since the resource usage of the switch chip is different at each time, before generating the command, a processable flow table can be determined and a corresponding command can be generated according to the currently acquired resource information. Specifically, if the entry resources required by a flow table are already occupied at this time, then the command corresponding to the flow table may not be generated.
Of course, before generating the simulation command and the formal command, the environment may be first verified, and after the verification result passes, the command may be generated. In one aspect, the original flow table is not necessarily exact, and therefore, prior to generating the command from the original flow table, the validity of the original flow table may be verified, which may include, but is not limited to, whether the flow table format is satisfactory, whether the flow table parameters are complete, whether there is a conflict with existing configurations, and so on. And after confirming the original stream table method, generating the simulation command and the formal command.
On the other hand, according to the resource information acquired in step S102, a determination may be made first. When the amount of the residual resources in the exchange chip is not smaller than the designated size, generating a simulation command and a formal command according to the method; when the available resource amount in the exchange chip is smaller than the designated size, the issuing of the command can be canceled, the insufficient resource is reported to the controller, and a new instruction can be issued by the controller later. The designated size can be set according to specific requirements. In other words, the method is only performed when the remaining table entries of the exchange chip are sufficient in resources, and the forwarding rule table entries corresponding to the CLI command can be stored.
S106: and storing the current operation configuration of the target communication equipment to obtain the backup operation configuration.
Although it is mentioned in step S104 that the analog command is for simulating the data transmission process, in practice, this simulated process still requires the target communication device itself to complete. That is, the target communication device itself is required to execute the simulation instruction. Thus, prior to starting the simulation, the current operating configuration of the target communication device may be stored for use as a backup to restore the target communication device to a pre-simulation state after the simulation process is completed.
S108: and issuing the simulation command to an exchange chip of the target communication equipment to obtain a simulation transmission result of the exchange chip when transmitting data according to the simulation command.
In this step, the simulation instruction determined in step S104 may be issued to the switching chip in the target communication device, so that the switching chip of the target communication device transmits the simulation data. In particular, the method comprises the steps of,
issuing the simulation command to an exchange chip of the target communication equipment; generating simulation data matched with the simulation command, and sending the simulation data to the exchange chip through an internal channel, so that the exchange chip transmits the simulation data according to the simulation command, wherein the internal channel is invisible to a user; and determining an analog transmission result of the exchange chip.
Fig. 4 is a schematic structural diagram of a target communication device provided in the present specification. As shown in fig. 4, in the target communication device, the switching control unit is connected to the switching chip and the execution body of the method through different control channels, respectively, and the switching chip is connected to the execution body of the method through an internal channel.
In the conventional data transmission process, the exchange control unit directly sends the formal instruction to the exchange chip through the control channel A, and the exchange chip completes data transmission according to the formal instruction. In the method, an execution main body firstly sends a simulation instruction to an exchange chip through a control channel via an exchange control unit, then directly sends generated simulation data to the exchange chip through an internal channel, and the exchange chip completes a simulation transmission process of the received simulation data according to the simulation instruction and obtains a simulation transmission result of the exchange chip. Wherein the internal channel is not visible to the user. That is, the process of simulating transmission is accomplished without perception by the user, without any negative impact on the user's experience of using the target communication device.
Specifically, simulation data can be constructed according to matching features in a simulation flow table by means of simulation generation of a scapy library of Python, simulation generation by using a virtual tester, and the like, and can be used as data transmitted in a simulation transmission process. The constructed simulation message is sent to the exchange chip through the internal channel, and the exchange chip can transmit the simulation data according to the simulation command to complete the simulation transmission process.
Taking the analog flow table shown in fig. 3 as an example, the analog transmission process will be explained in connection with the structure of the target communication device shown in fig. 4. As shown in fig. 3, in the transmission rule expressed in the analog flow table, data to be transmitted needs to have the following characteristics: received by interface mgmt1, and is characterized by 0x0800 at a position shifted by 12 bits based on L2; the strategy for transmitting data is as follows: sent out from interface mgmt2. Assume that in fig. 4, the interface of the switch chip to the internal channel a is mgmt1, and the interface to the internal channel B is mgmt2. Then, at this time, in order to verify the effect that the analog command corresponding to this analog flow table can be obtained in the switching chip, the execution body may generate analog data matching the analog command, that is, data featuring 0x0800 at a position shifted by 12 bits based on the L2 position, and transmit it from the internal channel a to the switching chip. Normally, after receiving the data matching this analog command, the switch chip executes the corresponding policy, that is, sends out mgmt2. When the execution body receives the data returned by the exchange chip again and verifies that the data is correct, the data transmission process is successful.
For the process that the executing body verifies the data returned from the exchange chip, it needs to be explained that each analog data message generated by the executing body contains a random check field besides the field of the matching analog command, that is, the matching feature in the analog flow table, and after the executing body receives the data message returned by the exchange chip again, the executing body checks the field in the data message, and judges whether the check fields contained in the sent and received messages are the same, so that the executing body is ensured to re-receive the data message sent by itself.
The above embodiments only illustrate the application of one analog command in transmitting data. In the actual simulation transmission process, all simulation commands are issued to the exchange chip, and the exchange chip carries out different transmission on different data according to different simulation commands.
S110: and restoring the target communication equipment by adopting the backup operation configuration, and determining whether to issue the formal command according to the simulation transmission result.
After the analog transmission is completed in step S108, the target communication device may first be restored in this step using the backup operation configuration. As set forth in step S106, although the process in step S108 is analog data transmission, the analog command is actually executed using the switch chip in the target communication device, and the state of the target communication device is changed. Accordingly, the backup operation configuration obtained in step S106 can be employed to restore the target communication device to a state when no simulation is performed.
Subsequently, based on the simulation transmission result obtained in step S108, it can be determined whether or not to issue a formal command. Specifically, when the simulation transmission result meets a preset condition, the formal command is issued to an exchange chip of the target communication device, so that the exchange chip generates a formal forwarding rule table item according to the formal command; and when the simulation transmission result does not meet the preset condition, sending prompt information to a controller of the target communication equipment.
In short, the analog transmission process is equivalent to a exercise of formally transmitting data. Since the effect of the analog command is the same as that of the normal command, the analog transmission result is also highly the same as that of the normal transmission result. Based on the effect obtained by the analog transmission, it is possible to determine how the effect is at the time of the actual transmission. There are various ways of verifying the analog transmission result in the way of implementing the analog transmission process set forth in step S108. For example, the success rate of the switching chip in the analog transmission may be determined according to the number of data transmitted to the switching chip by the execution body and the number of error-free data received from the switching chip, and the preset condition may be that the success rate is not less than a specified probability at this time as the analog transmission result.
When the simulation transmission result is good, that is, the preset condition is met, a formal command can be issued to the target communication equipment at the moment, a formal forwarding rule table entry is generated by the exchange chip according to the formal command, and the formal forwarding rule table entry is stored in the exchange chip so as to transmit data according to the formal forwarding rule table entry in the formal data transmission process; and when the simulation result is not ideal, that is, the preset condition is not met, a formal command is not issued at the moment, and prompt information is sent to the controller of the target communication equipment so as to inform the controller that the simulation effect is poor, and the controller of the target equipment changes the transmission strategy. Of course, the controller may also choose to cancel the update to the target communication device, or still issue the current formal command, which is not particularly limited in this specification.
When the command issuing method under the multi-mode network programming environment provided by the specification is adopted, after an original flow table issued to the target communication equipment under control is received, respectively generating a simulation command and a formal command according to configuration information and resource information of the target communication equipment; firstly, adopting a simulation command to simulate a data transmission process, and determining whether to adopt a formal command according to a simulation transmission result. By adopting the method, objective and accurate predicted transmission results can be obtained before the formal data transmission, so that the target communication equipment can determine whether to adopt the current formal instruction for data transmission according to the predicted simulated transmission results. The problem that the transmission result cannot be perceived due to separation of the control surface and the data surface is effectively avoided, the condition that the transmission result is poor in the data transmission process is effectively reduced, and the data transmission effect of the target communication equipment is greatly improved.
The above is a method for issuing a command in a multi-mode network programming environment provided by the present disclosure, and based on the same thought, the present disclosure further provides a corresponding device for issuing a command in a multi-mode network programming environment, as shown in fig. 5.
Fig. 5 is a schematic diagram of a command issuing device in a multi-mode network programming environment provided in the present specification, which specifically includes:
an obtaining module 200, configured to obtain configuration information of a target communication device;
a receiving module 202, configured to respond to the controller of the target communication device to issue an original flow table, receive the original flow table, and determine resource information of the target communication device;
a generating module 204, configured to generate a simulation command and a formal command according to the original flow table, the configuration information and the resource information;
a backup module 206, configured to store a current operation configuration of the target communication device, to obtain a backup operation configuration;
the simulation module 208 is configured to issue the simulation command to the exchange chip of the target communication device, so as to obtain a simulation transmission result of the exchange chip when data is transmitted according to the simulation command;
and the issuing module 210 is configured to restore the target communication device by using the backup operation configuration, and determine whether to issue the formal command according to the simulation transmission result.
Optionally, the original flow table at least includes a flow table ID, a priority, a start offset position, an offset length, a matching feature, a message entry, and a processing policy.
Optionally, the resource information at least includes table entry capacity, port bandwidth occupation condition, and message transceiving statistical information.
Optionally, the configuration information includes a system operation command set, and a switch chip capability table;
the generating module 204 is specifically configured to adjust the original flow table according to the exchange chip capability table to obtain an analog flow table; and generating a formal command according to the resource information, the system operation command set and the original flow table, and generating a simulation command according to the resource information, the system operation command set and the simulation flow table.
Optionally, the system operation command set at least includes a command format, command parameters, and a command issuing sequence; the exchange chip capability table at least comprises service function supporting conditions, table entry capacity, port bandwidth and maximum message buffer size.
Optionally, the simulation module 208 is specifically configured to issue the simulation command to a switching chip of the target communication device; generating simulation data matched with the simulation command, and sending the simulation data to the exchange chip through an internal channel, so that the exchange chip transmits the simulation data according to the simulation command, wherein the internal channel is invisible to a user; and determining an analog transmission result of the exchange chip.
Optionally, the issuing module 210 is specifically configured to issue the formal command to an exchange chip of the target communication device when the simulated transmission result meets a preset condition, so that the exchange chip generates a formal forwarding rule table entry according to the formal command; and when the simulation transmission result does not meet the preset condition, sending prompt information to the controller of the target communication equipment, so that the controller of the target equipment can issue the original flow table again.
The present specification also provides a computer readable storage medium storing a computer program operable to perform the command issuing method in the multimodal network programming environment provided in fig. 1 described above.
The present specification also provides a schematic structural diagram of the electronic device shown in fig. 6. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile storage, as illustrated in fig. 6, although other hardware required by other services may be included. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to realize the command issuing method under the multi-mode network programming environment described in the above figure 1. Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
Improvements to one technology can clearly distinguish between improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) and software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present application.

Claims (9)

1. A method for issuing commands in a multi-modal network programming environment, comprising:
acquiring configuration information of target communication equipment;
responding to the original flow table issued by the controller of the target communication equipment, receiving the original flow table, and determining the resource information of the target communication equipment;
generating a simulation command and a formal command according to the original flow table, the configuration information and the resource information;
storing the current operation configuration of the target communication equipment to obtain a backup operation configuration;
the simulation command is issued to an exchange chip of the target communication equipment, and a simulation transmission result of the exchange chip when data is transmitted according to the simulation command is obtained;
restoring the target communication equipment by adopting the backup operation configuration, and determining whether to issue the formal command according to the simulation transmission result;
the simulation command is used for enabling the target communication equipment to simulate the updated data transmission process, and the formal command is used for formally updating rules adopted by the target communication equipment when data are transmitted;
the configuration information comprises a system operation command set and a chip capability table;
Generating a simulation command and a formal command according to the original flow table, the configuration information and the resource information, wherein the simulation command and the formal command specifically comprise:
according to the exchange chip capability table, the original flow table is adjusted to obtain an analog flow table;
and generating a formal command according to the resource information, the system operation command set and the original flow table, and generating a simulation command according to the resource information, the system operation command set and the simulation flow table.
2. The method of claim 1, wherein the original flow table comprises at least a flow table ID, a priority, a starting offset location, an offset length, a matching feature, a message entry, a processing policy.
3. The method of claim 1, wherein the resource information comprises at least entry capacity, port bandwidth occupancy, messaging statistics.
4. The method of claim 1, wherein the set of system operation commands includes at least a command format, command parameters, command issuing order; the exchange chip capability table at least comprises service function supporting conditions, table entry capacity, port bandwidth and maximum message buffer size.
5. The method of claim 1, wherein the step of issuing the analog command to the switching chip of the target communication device to obtain an analog transmission result of the switching chip when transmitting data according to the analog command specifically comprises:
issuing the simulation command to an exchange chip of the target communication equipment;
generating simulation data matched with the simulation command, and sending the simulation data to the exchange chip through an internal channel, so that the exchange chip transmits the simulation data according to the simulation command, wherein the internal channel is invisible to a user;
and determining an analog transmission result of the exchange chip.
6. The method of claim 1, wherein determining whether to issue the formal command based on the simulated transmission result comprises:
when the simulation transmission result meets a preset condition, the formal command is issued to an exchange chip of the target communication equipment, so that the exchange chip generates a formal forwarding rule table item according to the formal command;
and when the simulation transmission result does not meet the preset condition, sending prompt information to a controller of the target communication equipment.
7. A command issuing apparatus in a multi-modal network programming environment, comprising:
the acquisition module is used for acquiring configuration information of the target communication equipment;
the receiving module is used for responding to the original flow table issued by the controller of the target communication equipment, receiving the original flow table and determining the resource information of the target communication equipment;
the generation module is used for generating a simulation command and a formal command according to the original flow table, the configuration information and the resource information;
the backup module is used for storing the current operation configuration of the target communication equipment to obtain backup operation configuration;
the simulation module is used for issuing the simulation command to the exchange chip of the target communication equipment to obtain a simulation transmission result of the exchange chip;
the issuing module is used for restoring the target communication equipment by adopting the backup operation configuration and determining whether to issue the formal command according to the simulation transmission result;
the simulation command is used for enabling the target communication equipment to simulate the updated data transmission process, and the formal command is used for formally updating rules adopted by the target communication equipment when data are transmitted;
The configuration information comprises a system operation command set and a chip capability table;
the generating module is specifically configured to adjust the original flow table according to the exchange chip capability table to obtain an analog flow table; and generating a formal command according to the resource information, the system operation command set and the original flow table, and generating a simulation command according to the resource information, the system operation command set and the simulation flow table.
8. A computer readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-6.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-6 when executing the program.
CN202311457489.0A 2023-11-03 2023-11-03 Command issuing method and device in multi-mode network programming environment Active CN117201315B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311457489.0A CN117201315B (en) 2023-11-03 2023-11-03 Command issuing method and device in multi-mode network programming environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311457489.0A CN117201315B (en) 2023-11-03 2023-11-03 Command issuing method and device in multi-mode network programming environment

Publications (2)

Publication Number Publication Date
CN117201315A CN117201315A (en) 2023-12-08
CN117201315B true CN117201315B (en) 2024-01-30

Family

ID=88994556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311457489.0A Active CN117201315B (en) 2023-11-03 2023-11-03 Command issuing method and device in multi-mode network programming environment

Country Status (1)

Country Link
CN (1) CN117201315B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0814404A1 (en) * 1996-06-19 1997-12-29 Matsushita Electric Industrial Co., Ltd. Debugging apparatus for debugging a program
CN106375109A (en) * 2016-08-22 2017-02-01 浪潮(北京)电子信息产业有限公司 Switch configuration simulated issuing method, system and computer
CN109495293A (en) * 2018-10-25 2019-03-19 锐捷网络股份有限公司 A kind of test method, system, equipment and the storage medium in Switch control face
CN112631981A (en) * 2020-12-23 2021-04-09 中国人民解放军63921部队 Reliable fault-tolerant simulation engine for simulation training
CN116048525A (en) * 2023-01-12 2023-05-02 支付宝(杭州)信息技术有限公司 Management method, device and equipment of command line tool
CN116127426A (en) * 2022-12-30 2023-05-16 蚂蚁区块链科技(上海)有限公司 Equipment control method and device, storage medium and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070118656A1 (en) * 2005-11-18 2007-05-24 Anderson David J Inter-server multimodal network communications
US7877249B2 (en) * 2006-01-12 2011-01-25 International Business Machines Corporation Concealment of external array accesses in a hardware simulation accelerator
US7844954B2 (en) * 2007-11-06 2010-11-30 Vmware, Inc. Using branch instruction counts to facilitate replay of virtual machine instruction execution

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0814404A1 (en) * 1996-06-19 1997-12-29 Matsushita Electric Industrial Co., Ltd. Debugging apparatus for debugging a program
CN106375109A (en) * 2016-08-22 2017-02-01 浪潮(北京)电子信息产业有限公司 Switch configuration simulated issuing method, system and computer
CN109495293A (en) * 2018-10-25 2019-03-19 锐捷网络股份有限公司 A kind of test method, system, equipment and the storage medium in Switch control face
CN112631981A (en) * 2020-12-23 2021-04-09 中国人民解放军63921部队 Reliable fault-tolerant simulation engine for simulation training
CN116127426A (en) * 2022-12-30 2023-05-16 蚂蚁区块链科技(上海)有限公司 Equipment control method and device, storage medium and electronic equipment
CN116048525A (en) * 2023-01-12 2023-05-02 支付宝(杭州)信息技术有限公司 Management method, device and equipment of command line tool

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于动态命令树算法的路由器仿真软件设计;姚敦红;石元泉;;计算机仿真(第04期);全文 *
基于路由模拟的网络推演分析系统的设计和实现;王民昆;徐晓;邓志森;张大伟;熊志杰;;电子设计工程(第03期);全文 *

Also Published As

Publication number Publication date
CN117201315A (en) 2023-12-08

Similar Documents

Publication Publication Date Title
CN109617829B (en) Method, device and system for processing service request data
JP6730511B2 (en) Network policy update trigger method, management entity and core network device
CN114143140A (en) Data transmission system, method, storage medium and electronic equipment
CN117201315B (en) Command issuing method and device in multi-mode network programming environment
CN111866169A (en) Service updating method, device and system
CN109274507B (en) Charging control method, device and system
CN114710810B (en) Data transmission method, device and system
CN116737345A (en) Distributed task processing system, distributed task processing method, distributed task processing device, storage medium and storage device
CN112565210A (en) CDN node recommendation method, system, electronic device and storage medium
CN115292061A (en) Method and device for dynamically switching services
CN105204888A (en) Hardware-Capability Update Method For A Portable Device With Multiple Sim Cards
CN111512594A (en) Virtual network function management
CN109639704B (en) A kind of master-slave mode server system application method, system, server and storage medium
CN117714557A (en) Multi-network-mode data forwarding method, device, medium and equipment
CN112565419B (en) Target service node access method, system, electronic equipment and storage medium
CN115174587B (en) Data transmission system, method and device, computer readable storage medium and electronic equipment
CN109656169A (en) Multiple dispatch table switching method, device, computer equipment and storage medium
CN117033005B (en) Deadlock-free routing method and device, storage medium and electronic equipment
CN116743550B (en) Processing method of fault storage nodes of distributed storage cluster
CN114124838B (en) Data transmission method and device for big data platform and big data platform management system
CN117527637B (en) Method and device for detecting link failure, storage medium and electronic equipment
CN109165099B (en) Electronic equipment, memory copying method and device
CN115955432B (en) Method and device for determining physical link and electronic equipment
JP7108879B2 (en) Control method and control system
CN117459415A (en) Service execution method and device, storage medium and electronic equipment

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