Business data adjustment method and device, equipment and storage medium

By adjusting the service data of the network equipment into a unified format, the complexity problem caused by the different data formats of the SDN network equipment controller during query is solved, and efficient and unified service data query is achieved.

CN119211355AActive Publication Date: 2024-12-27CHINA UNITED NETWORK COMM GRP CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411311832.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-12-27
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

When the existing SDN network device controller query service data, due to the different data formats of the target network device, data conversion is complicated, which increases query complexity and lacks a unified and efficient way.

Method used

Provide a business data adjustment method, by receiving service data from multiple network devices, adjusting the service data structure of each network device according to the preset data format, uniformly establishing the data format supported by each network device, and through key-value pairs Save and query to ensure consistency in data format.

Benefits of technology

It reduces the complexity of network device controller query, realizes unified format query of service data of multiple network device, and improves query efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211355A_ABST
    Figure CN119211355A_ABST
Patent Text Reader

Abstract

The invention provides a service data adjustment method and device, equipment and a storage medium, and relates to the technical field of wireless communication. The method is applied to a network device controller, and comprises the following steps: receiving service data of different structures used by a plurality of network devices when executing a target service function; for the service data of each network device, adjusting the structure of the service data of the network device according to a preset data format to obtain the adjusted service data of the network device; the preset data format is a data format supported by each network device; and respectively sending the adjusted service data to each network device, so that each network device performs data processing by using the adjusted service data when executing the target service function. Therefore, the business data of the plurality of network devices under the network device controller can be uniformly queried according to the preset data format.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device, equipment and storage medium for adjusting business data. Background Art

[0002] The network device controller is connected to multiple network devices. Each network device has different business requirements, resulting in different storage formats in the database.

[0003] When querying services, the network device controller often needs to receive data from the target network device and convert the format to query the target data. The conversion between the target network device data and the service data is often complicated, which makes the query of the network device controller complicated. Summary of the invention

[0004] The present application provides a method, apparatus, device and storage medium for adjusting business data, which can reduce the complexity of network device controller query.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, the present application provides a method for adjusting business data, which is applied to a network device controller, the method comprising: receiving business data of different structures used by multiple network devices when executing target business functions; for the business data of each network device, adjusting the structure of the business data of the network device according to a preset data format to obtain adjusted business data of the network device; the preset data format is a data format supported by each network device; and sending each adjusted business data to each network device respectively, so that each network device uses the adjusted business data for data processing when executing the target business function.

[0007] According to the above technical means, after receiving the service data of multiple network devices, the present application can adjust the structure of the service data of each network device according to the preset data format, obtain the adjusted service data of the network device, and send the adjusted service data to the network device. In this way, the data format of the service data of multiple network devices can be adjusted to the preset data format, which is convenient for users to perform unified queries through the preset data format.

[0008] In a possible implementation, the method further includes: saving the adjusted business data in the form of key-value pairs.

[0009] According to the above technical means, the adjusted business data can be saved in the form of key-value pairs, which is convenient for querying through keywords of the key-value pairs during querying.

[0010] In a possible implementation, the above-mentioned “adjusted business data is saved in the form of a key-value pair” includes: using the data name of the business data as the keyword of the key-value pair; and using the data parameter corresponding to the data name as the data value corresponding to the keyword.

[0011] According to the above technical means, the data name of the business data can be used as the keyword of the key-value pair, and the data parameter corresponding to the data name can be used as the data value corresponding to the keyword. In this way, the data value can be accurately determined according to the keyword query.

[0012] In a possible implementation, the method further includes: determining a keyword corresponding to the parameter value in response to a user inputting a parameter value; and determining a data value corresponding to the keyword based on the keyword.

[0013] According to the above technical means, the data value corresponding to the parameter value can be accurately determined through the operation of the user inputting the parameter value.

[0014] In a second aspect, the present application provides a method for adjusting business data, which is applied to a network device, and the method includes: sending business data of different structures used when executing a target business function to a network device controller; receiving adjusted business data; performing data processing based on the adjusted business data; the structure of the adjusted business data is a preset data format.

[0015] According to the above technical means, the network device can send service data to the network device controller and receive the adjusted service data, thereby the structure of the service data on the network device can be uniformly adjusted to a preset data format.

[0016] In a possible implementation, the method further includes: parsing the adjusted business data to determine the data name of the business data and the data parameters corresponding to the data name; generating a configuration file corresponding to the business data according to the data name and the data parameters corresponding to the data name; and making adjustments according to the configuration file.

[0017] According to the above technical means, after receiving the adjusted service data, the network device can parse the adjusted service data, determine the data name of the service data and the data parameters corresponding to the data name, generate a configuration file corresponding to the service data, and make adjustments according to the configuration file. Thus, the adjusted configuration file can be accurately determined.

[0018] In a possible implementation, the above “adjusting according to the configuration file” includes: adjusting the code file corresponding to the business data according to the configuration file; compiling the code file, and installing the compiled file.

[0019] According to the above technical means, the code file corresponding to the business data can be adjusted according to the configuration file; the code file can be compiled and the compiled file can be installed. Thus, the code file can be accurately adjusted and installed in the network device.

[0020] In a possible implementation, the method further includes: setting function parameters; comparing the results corresponding to the function parameters before adjustment with the results after adjustment, and verifying the correctness of the adjusted business data.

[0021] According to the above technical means, by setting the function parameters, the results corresponding to the function parameters before adjustment can be compared with the results after adjustment to verify the correctness of the adjusted business data. Thus, problems that occur after adjustment can be discovered in a timely manner.

[0022] In a third aspect, the present application provides a business data adjustment device, which is applied to a network device controller, and the device includes: a receiving unit, which is used to receive business data of different structures used by multiple network devices when executing target business functions; an adjustment unit, which is used to adjust the structure of the business data of each network device according to a preset data format to obtain the adjusted business data of the network device; the preset data format is a data format supported by each network device; and a sending unit, which is used to send the respective adjusted business data to each network device, so that each network device uses the adjusted business data for data processing when executing the target business function.

[0023] In a possible implementation, the adjustment unit is specifically configured to save the adjusted business data in the form of key-value pairs.

[0024] In a possible implementation manner, the adjustment unit is specifically configured to use the data name of the business data as the keyword of the key-value pair; and use the data parameter corresponding to the data name as the data value corresponding to the keyword.

[0025] In a possible implementation manner, the adjustment unit is specifically configured to determine a keyword corresponding to the parameter value in response to an operation of a user inputting a parameter value; and determine a data value corresponding to the keyword according to the keyword.

[0026] In a fourth aspect, the present application provides a device for adjusting business data, which is applied to a network device. The device includes: a sending unit, which is used to send business data of different structures used when executing a target business function to a network device controller; a receiving unit, which is used to receive the adjusted business data; and a processing unit, which is used to perform data processing according to the adjusted business data; the structure of the adjusted business data is a preset data format.

[0027] In a possible implementation, the processing unit is further used to parse the adjusted business data, determine the data name of the business data and the data parameters corresponding to the data name; generate a configuration file corresponding to the business data according to the data name and the data parameters corresponding to the data name; and make adjustments according to the configuration file.

[0028] In a possible implementation manner, the processing unit is further specifically configured to adjust the code file corresponding to the business data according to the configuration file; compile the code file, and install the compiled file.

[0029] In a possible implementation, the processing unit is further configured to set function parameters; compare the results corresponding to the function parameters before adjustment with the results corresponding to the function parameters after adjustment, and verify the correctness of the adjusted business data.

[0030] In a fifth aspect, the present application provides an electronic device comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the method of the above-mentioned first aspect and any possible implementation manner thereof.

[0031] In a sixth aspect, the present application provides a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the method in the above-mentioned first aspect and any possible implementation method thereof.

[0032] In a seventh aspect, the present application provides a computer program product comprising instructions, which, when executed on a communication device, enables the communication device to execute the method in the above-mentioned first aspect and any possible implementation manner thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A system framework diagram of a method for adjusting business data provided in an embodiment of the present application;

[0034] Figure 2 A flowchart of a method for adjusting business data provided in an embodiment of the present application;

[0035] Figure 3 A flowchart of another method for adjusting business data provided in an embodiment of the present application;

[0036] Figure 4 A flowchart of another method for adjusting business data provided in an embodiment of the present application;

[0037] Figure 5 A schematic diagram of the structure of a device for adjusting business data provided in an embodiment of the present application;

[0038] Figure 6A schematic diagram of the structure of another device for adjusting business data provided in an embodiment of the present application;

[0039] Figure 7 A block diagram of an electronic device of a business data adjustment device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] The following is a detailed description of a method, device, equipment and storage medium for adjusting business data provided by an embodiment of the present application in conjunction with the accompanying drawings.

[0041] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0042] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0043] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0044] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0045] Before introducing the embodiments of the present application, the relevant technical terms involved in the embodiments of the present application are explained. It should be noted that these explanations are intended to make the embodiments of the present application easier to understand and should not be regarded as limiting the scope of protection required by the embodiments of the present application.

[0046] Software defined network (SDN) is a network management method that supports dynamic programmable network configuration. It manages network devices, orchestrates network services, and schedules service traffic through controllers, improves network performance and management efficiency, and enables network services to provide flexible customization capabilities like cloud computing.

[0047] YANG model (yet another next generation): a data modeling language used to model configuration data, state data, remote procedure calls, and notifications used by network configuration management protocols. It can describe data structures, data integrity constraints, and data operations.

[0048] JSON (JavaScript Object Notation): A lightweight data exchange format that is easy to read and write and can exchange data between multiple languages.

[0049] In the existing SDN network equipment controller development, JSON access data based on YANG model definition is the basis of project development. After the service is issued in the SDN system, the service data storage cannot be unified, and the service data cannot be queried uniformly. However, as a key SDN system for the key underlying network, the system needs to use business-level data as the basis for configuration auditing and verification. However, manual processing of database structure data and service request data conversion is often complicated, and lacks a unified, efficient, and universal method.

[0050] Therefore, it is necessary to design a method and device for adjusting business data, which can be applied to a network device controller to set rules, unify the specifications of business data, and reduce the complexity of network device controller queries.

[0051] In order to solve the above technical problems, the present application provides a method for adjusting business data. Applied to a network device controller, the method includes: receiving business data of different structures used by multiple network devices when executing a target business function; adjusting the structure of the business data of each network device according to a preset data format to obtain the adjusted business data of the network device; the preset data format is a data format supported by each network device; and sending the adjusted business data to each network device respectively, so that each network device uses the adjusted business data for data processing when executing the target business function. Thus, the business data of multiple network devices under the network device controller can be uniformly queried according to the preset data format.

[0052] The execution subject in the embodiment of the present application may be a network device controller, and the embodiment is described in detail below.

[0053] For ease of understanding, the following detailed introduction to the method for adjusting the business data provided by this application is given in conjunction with the accompanying drawings.

[0054] Figure 1 A system framework diagram of a method for adjusting business data provided in an embodiment of the present application, such as Figure 1As shown, the system framework diagram may include a network device controller 101 and a network device 102 .

[0055] The network device controller 101 is used to manage multiple network devices connected to the network device controller, receive service data sent by the network device 102 and standardize the service data according to a unified format.

[0056] The network device 102 is used to implement multiple business functions such as data forwarding, data query, data filtering, and data deduplication.

[0057] In the embodiment of the present application, the network device controller 101 can be connected to multiple network devices 102. The network devices 102 may include switches, hubs, routers, etc., which are not limited in the embodiment of the present application.

[0058] Figure 2 A flowchart of a method for adjusting business data provided in an embodiment of the present application, the method includes the following S201-S203.

[0059] S201. A network device controller receives service data of different structures used by multiple network devices when executing target service functions.

[0060] Among them, the business data can be code data for related businesses such as data deduplication, data forwarding, and data filtering, etc., which is not limited in the embodiments of the present application.

[0061] In one possible implementation, a network device controller sends request information to multiple network devices, and the request information is used to request to obtain business data of different structures used by multiple network devices when executing target business functions. Correspondingly, after receiving the request information sent by the network device controller, the multiple network devices send the business data of the network devices to the network device controller. Furthermore, the network device controller receives business data of different structures used by multiple network devices when executing target business functions.

[0062] S202: The network device controller adjusts the structure of the service data of each network device according to a preset data format to obtain adjusted service data of the network device.

[0063] The preset data format is a data format supported by each network device.

[0064] In an embodiment of the present application, the preset data format may include a data format formulated based on a YANG model, which is not limited here. The embodiment of the present application is described in detail using the data format formulated by the YANG model as an example.

[0065] In a possible implementation, the network device controller may adjust the structure of the service data of each network device according to the data format in the YANG model.

[0066] In the embodiment of the present application, the YANG model is a tree structure, which is composed of countless leaves, lists, and containers to describe a tree of the entire device. The following introduces the data formats of the main types of YANG models, including leaf nodes, list nodes, and container nodes.

[0067] The data format of the leaf node is as follows: The data name is leaf of host-name. type indicates that the data type of host-name is string type. value indicates the data parameter. description is the explanation of host-name.

[0068]

[0069] The data format of the list node is as follows: The data name is user's list. The list includes three leaves, namely name, first-name and full-name.

[0070]

[0071] The data format of the container is as follows. The data name is a container named system. System contains a container named login. Login also contains a leaf named message.

[0072]

[0073]

[0074] Exemplarily, the service data acquired by the network device controller is as follows: The data names are stu.num, stu.sex, and stu.score.

[0075]

[0076] The data format of the service data adjusted by the network device controller is as follows. The unified data format is a list with the data name stu. type indicates whether the data type of stu is int, char, or float. The list with the data name stu also includes the data parameters num, sex, and score of the leaf node leaf.

[0077]

[0078] In the YANG model, the data format is determined as leaf node, list node, leaf list node and container node, mainly based on its data name definition and data parameters. The YANG model is a data model language for network configuration management, which defines the data format of network device configuration.

[0079] Among them, leaf nodes are basic data elements in the YANG model, which are used to represent specific configuration data values, such as IP addresses, port numbers, etc. Leaf nodes do not contain any child nodes, they directly contain data values.

[0080] List nodes are used in YANG models to represent data sets that can contain multiple instances. Each instance can have its own leaf node, forming a branch in a tree structure. List nodes allow multiple configuration data of the same type to be defined in a YANG module.

[0081] Container nodes are used to organize related configuration data. They can contain leaf nodes, other containers, and list nodes. Containers play a grouping role in the YANG model, making configuration data more structured and easier to manage. Containers can be seen as a logical grouping that is used to organize related configuration items together.

[0082] In the embodiment of the present application, the adjusted business data is saved in the form of a key-value pair. For example, the data name stu.sex can be stored in the key field, each key corresponds to a unique key value, and the data value corresponding to stu.sex is stored in the value. Thus, the data name of the key field can be uniformly queried.

[0083] Furthermore, the network device controller may determine a keyword corresponding to the parameter value in response to a user input operation of inputting a parameter value, and determine a data value corresponding to the keyword based on the keyword.

[0084] S203: The network device controller sends the adjusted service data to each network device respectively, so that each network device uses the adjusted service data for data processing when executing the target service function.

[0085] In a possible implementation, after adjusting the data format of the service data according to step S202, the network device controller sends the adjusted service data to multiple network devices. Correspondingly, multiple network devices receive the adjusted service data.

[0086] In an embodiment of the present application, when receiving the adjusted business data, multiple network devices can parse the adjusted business data according to the rules of the YANG model to determine the data name of the business data and the data parameters corresponding to the data name. The network device generates a configuration file corresponding to the business data according to the data name and the data parameters corresponding to the data name.

[0087] The network device adjusts the code file corresponding to the service data according to the configuration file, compiles the code file, and installs the compiled file.

[0088] When the network device obtains the adjusted business data, the network device controller may obtain the functional parameters of the business data; and verify the correctness of the adjusted business data according to the result of the function corresponding to the business data before adjustment and the result of the function corresponding to the business data after adjustment.

[0089] based on Figure 2 According to the technical solution shown, in the embodiment of the present application, after receiving the service data of multiple network devices, the network device controller can adjust the structure of the service data of each network device according to the preset data format, obtain the adjusted service data of the network device, and send the adjusted service data to the network device. In this way, the data format of the service data of multiple network devices can be adjusted to the preset data format, which is convenient for users to perform unified inquiries through the preset data format.

[0090] like Figure 3 As shown, Figure 3 A flowchart of another method for adjusting business data provided in an embodiment of the present application, the method includes the following S301-S304.

[0091] S301. The network device controller generates a data structure according to the YANG model.

[0092] In the embodiment of the present application, the YANG model includes fields and data structure definitions under the service data. The network device controller generates a basic JSON structure according to the YANG model, and the JSON structure is used to represent the service data of the network device.

[0093] S302: The network device controller expands the service data structure.

[0094] In the embodiments of the present application, business data usually includes multiple business configurations, such as LIST type, and the hierarchy is uncertain. Therefore, it is necessary to expand the basic JSON structure according to the actual situation of the business data to meet the loop requirements of subsequent layer-by-layer processing, ensure the correct data scale, and prevent reconstruction data loss.

[0095] S303: The network device controller adjusts the service data.

[0096] In the embodiment of the present application, the network device controller expands the business data structure through step S402, performs layer-by-layer loop processing on the business data structure, obtains actual data from the business database structure data according to the field splicing rules, and realizes the adjustment of the business data.

[0097] S304: The network device controller outputs service data.

[0098] In the embodiment of the present application, the network device controller processes the adjusted data again layer by layer, clears the empty value Key in the service data, and outputs the service data after the Key value is cleared.

[0099] based on Figure 3 According to the technical solution shown in the embodiment of the present application, the business data structure can be uniformly defined using the YANG model to facilitate business data query.

[0100] like Figure 4 As shown, Figure 4 A flowchart of another method for adjusting business data provided in an embodiment of the present application, the method includes the following S401-S414.

[0101] S401. The network device controller generates JSON_BASE_TMP based on the YANG model.

[0102] In the embodiment of the present application, the YANG model defines the data structure of all business data within the business scope, including the business data level and field type, so the basic business delivery data structure JSON_BASE_TMP can be generated according to the YANG model, including all YANG field information and structure. Among them, the original business data structure is JSON_VO.

[0103] S402: The network device controller pre-processes JSON_BASE_TMP.

[0104] In an embodiment of the present application, the network device controller uses the generated JSON_BASE_TMP as a basis, processes it step by step according to the hierarchy, deletes all VALUEs in the JSON, retains only the structure, and compresses all LIST levels to 1 for subsequent processing.

[0105] S403: The network device controller performs hierarchical progressive processing on JSON_BASE_TMP.

[0106] In the embodiment of the present application, the network device controller starts layer-by-layer loop processing based on the top layer of JSON_BASE_TMP: determines whether the current layer is of LIST type, if it is of LIST type, proceeds to step S404, otherwise proceeds to step S406.

[0107] S404: The network device controller determines whether the current level LIST needs to be expanded.

[0108] In an embodiment of the present application, the network device controller determines whether the current level LIST needs to be expanded, including: by parsing the PARENT_KEY string of the current level, splicing the level path of the current level, querying the corresponding level in JSON_VO to see if it is greater than 1, and if it is greater than 1, it needs to be expanded, and the extension parameter is EXT_LAYER_NUM, and entering step S405, otherwise entering step S406.

[0109] S405, network device controller expansion level.

[0110] In an embodiment of the present application, when the network device controller determines that the hierarchy needs to be expanded according to the above step S404, the current hierarchy number is expanded to the corresponding hierarchy in JSON_VO, that is, the current hierarchy structure is copied and added to the current LIST until the LIST hierarchy size reaches EXT_LAYER_NUM, indicating that the expansion is completed.

[0111] S406: The network device controller obtains the PARENT_KEY string array in the current level.

[0112] In an embodiment of the present application, the network device controller obtains the PARENT_KEY string array in the current layer according to the YANG model, which contains the KEY value information of the current layer and all upper layers.

[0113] S407: The network device controller updates the current level LIST_INDEX.

[0114] In the embodiment of the present application, the network device controller updates the current level LIST_INDEX and records the number of the current level in the LIST type. If it is 0, it is a non-LIST type.

[0115] S408. The network device controller cyclically obtains the OBTAIN_KEY to be obtained in the current level as a standby field for subsequent PATH concatenation.

[0116] S409: The network device controller splices the fields corresponding to KEY.

[0117] In an embodiment of the present application, the network device controller splices the corresponding KEY field to be obtained according to the names of the data parameters PARENT_KEY, LIST_INDEX, and OBTAIN_KEY, which is used to search for the corresponding VALUE in JSON_VO. The spliced ​​field of JSON_VO_PATH can be shown as bussiness.group[3].userList[1].name.

[0118] S410 , the network device controller obtains a corresponding value VALUE in JSON_VO according to JSON_VO_PATH.

[0119] S411. The network device controller updates the VALUE in step S410 to JSON_BASE_TMP until all KEY values ​​in the current level are updated, generating BUSS_JSON_TMP.

[0120] S412: The network device controller determines whether the update is completed.

[0121] In the embodiment of the present application, the network device controller determines whether the current data structure layer is the bottom layer, if not, executes step S414, and if yes, executes step S413.

[0122] S413. The network device controller processes the data level by level through BUSS_JSON_TMP, clears the unassigned KEY, deletes the empty value structure, and outputs BUSS_JSON as the reconstructed data.

[0123] S414. If the level is not processed, the current PARENT_KEY is retained when entering the next level. If the level does not enter the next level, the PARENT_KEY of the current level is deleted, and only the correct PARENT_KEY string array is retained.

[0124] based on Figure 4 The technical solution shown in the embodiment of the present application can generate a basic JSON structure based on the YANG model based on the actual business database structure data on the basis of a given business YANG model definition, and expand the scale of the basic structure based on the scale of business data, parse the fields layer by layer, and extract key-value values ​​based on the field splicing rules. It can reconstruct JSON business data for business data in a splicing manner under fixed rules. Through a one-stop conversion method, it has high versatility for business systems, reduces the impact on business layer development, and at the same time reduces repetitive code development and improves project development efficiency.

[0125] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, the adjustment device or electronic device of the business data includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0126] The embodiment of the present application can divide the functional modules of the adjustment device or electronic device for business data according to the above method. For example, the adjustment device or electronic device for business data can include various functional modules corresponding to the various functional divisions, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0127] Figure 5 A schematic diagram of a structure of a device for adjusting service data provided in an embodiment of the present application, which is applied to a network device controller, includes:

[0128] The receiving unit 501 is used to receive service data of different structures used by multiple network devices when executing target service functions.

[0129] The adjustment unit 502 is used to adjust the structure of the business data of each network device according to a preset data format to obtain the adjusted business data of the network device; the preset data format is a data format supported by each network device.

[0130] The sending unit 503 is used to send the adjusted service data to each network device respectively, so that each network device uses the adjusted service data for data processing when executing the target service function.

[0131] In a possible implementation manner, the adjustment unit 502 is further configured to save the adjusted business data in the form of a key-value pair.

[0132] In a possible implementation manner, the adjustment unit 502 is further configured to use the data name of the business data as the keyword of the key-value pair; and use the data parameter corresponding to the data name as the data value corresponding to the keyword.

[0133] In a possible implementation manner, the adjustment unit 502 is further configured to, in response to a user inputting a parameter value, determine a keyword corresponding to the parameter value; and determine a data value corresponding to the keyword according to the keyword.

[0134] Figure 6 A structural diagram of another device for adjusting service data provided in an embodiment of the present application is applied to a network device, and the device includes:

[0135] The sending unit 601 is used to send service data of different structures used when executing a target service function to the network device controller.

[0136] The receiving unit 602 is configured to receive the adjusted service data.

[0137] The processing unit 603 is used to perform data processing according to the adjusted business data; the structure of the adjusted business data is a preset data format.

[0138] In a possible implementation, the processing unit 603 is also specifically used to parse the adjusted business data, determine the data name of the business data and the data parameters corresponding to the data name; generate a configuration file corresponding to the business data according to the data name and the data parameters corresponding to the data name; and make adjustments according to the configuration file.

[0139] In a possible implementation, the processing unit 603 is further specifically configured to adjust the code file corresponding to the business data according to the configuration file; compile the code file, and install the compiled file.

[0140] In a possible implementation, the processing unit 603 is further configured to set function parameters; compare the results corresponding to the function parameters before adjustment with the results corresponding to the function parameters after adjustment, and verify the correctness of the adjusted business data.

[0141] Figure 7 A block diagram of an electronic device of a device for adjusting service data involved in the above-mentioned embodiment is shown. The device for adjusting service data includes: a processor 701 and a communication interface 702. The processor 701 is used to adjust service data according to preset rules in a preset model in a network device controller, and the communication interface 702 is used for communication between the network device controller and each network device. The network device may also include a memory 703 and a bus 704, and the memory 703 is used to store service data in the network device.

[0142] Among them, the memory 703 can be a memory in a business data adjustment device, etc., and the memory can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory can also include a combination of the above types of memory.

[0143] The processor 701 may be a processor that implements or executes various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of the present application. The processor may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0144] The bus 704 may be an Extended Industry Standard Architecture (EISA) bus, etc. The bus 704 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0145] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0146] An embodiment of the present application provides a computer program product including instructions. When the computer program product is run on a computer, the computer is enabled to execute the method for adjusting the business data in the above method embodiment.

[0147] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method for adjusting the business data in the method flow shown in the above method embodiment.

[0148] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above, or any other form of computer-readable storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read products from the storage medium and can write products to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (ASIC). In the embodiments of the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0149] An embodiment of the present invention provides a computer program product including instructions. When the instructions are executed on a computer, the computer executes the method for adjusting business data of the embodiment of the present application.

[0150] Since the business data adjustment device, computer-readable storage medium, and computer program product in the embodiments of the present invention can be applied to the above method, the technical effects that can be obtained can also refer to the above method embodiments, and the embodiments of the present invention will not be repeated here.

[0151] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0152] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0153] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0154] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for adjusting business data, characterized in that: Applied to a network device controller, the method comprises: receiving service data of different structures used by a plurality of network devices when performing a target service function; For the service data of each network device, adjusting the structure of the service data of the network device according to a preset data format to obtain the adjusted service data of the network device; the preset data format is a data format supported by each network device; The adjusted service data is sent to each network device respectively, so that each network device uses the adjusted service data for data processing when executing the target service function.

2. The method according to claim 1, characterized in that The method further comprises: The adjusted business data is saved in the form of key-value pairs.

3. The method according to claim 2, characterized in that The adjusted business data is saved in the form of key-value pairs, including: Using the data name of the business data as the keyword of the key-value pair; The data parameter corresponding to the data name is used as the data value corresponding to the keyword.

4. The method according to claim 3, characterized in that The method further comprises: In response to a user inputting a parameter value, determining the keyword corresponding to the parameter value; The data value corresponding to the keyword is determined according to the keyword.

5. A method for adjusting business data, characterized in that: Applied to a network device, the method comprises: Sending service data of different structures used in executing a target service function to a network device controller; receiving the adjusted business data; Data processing is performed according to the adjusted business data; the structure of the adjusted business data is a preset data format.

6. The method according to claim 5, characterized in that The method further comprises: Parsing the adjusted business data to determine a data name of the business data and a data parameter corresponding to the data name; Generate a configuration file corresponding to the business data according to the data name and the data parameter corresponding to the data name; Make adjustments according to the configuration file.

7. The method according to claim 6, characterized in that The adjusting according to the configuration file includes: According to the configuration file, adjusting the code file corresponding to the business data; Compile the code files and install the files generated after compilation.

8. The method according to claim 5, characterized in that The method further comprises: Set function parameters; Compare the results corresponding to the function parameters before adjustment with the results corresponding to the function parameters after adjustment to verify the correctness of the adjusted business data.

9. A device for adjusting business data, characterized in that: Applied to a network device controller, the device comprises: A receiving unit, used to receive service data of different structures used by multiple network devices when executing target service functions; An adjustment unit, configured to adjust the structure of the service data of each network device according to a preset data format to obtain the adjusted service data of the network device; the preset data format is a data format supported by each network device; The sending unit is used to send the adjusted service data to each network device respectively, so that each network device uses the adjusted service data for data processing when executing the target service function.

10. A device for adjusting business data, characterized in that: Applied to network equipment, the device comprises: A sending unit, sending service data of different structures used when executing a target service function to a network device controller; A receiving unit, configured to receive the adjusted service data; A processing unit is used to perform data processing according to the adjusted business data; the structure of the adjusted business data is a preset data format.

11. An electronic device, characterized in that: The electronic device comprises: processor; a memory configured to store instructions executable by the processor; The processor is configured to execute the instruction to implement the method for adjusting business data as described in any one of claims 1-4 or claims 5-8.

12. A computer-readable storage medium, characterized in that: Instructions are stored on the computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by an electronic device, the electronic device is enabled to execute the method for adjusting business data as described in any one of claims 1-4 or claims 5-8.

Citation Information

Patent Citations

  • Device and method for conducting self-matching on data formats

    CN103491135A

  • Data sharing method and device in heterogeneous network

    CN103685411A

  • Data processing method and device

    CN106846065A

  • Business data processing method and device, computer equipment and storage medium

    CN110765102A

  • Data format conversion method, device and equipment and computer readable storage medium

    CN115221113A