WO2024078366A1 - Data management method, server, client and system - Google Patents

Data management method, server, client and system Download PDF

Info

Publication number
WO2024078366A1
WO2024078366A1 PCT/CN2023/122848 CN2023122848W WO2024078366A1 WO 2024078366 A1 WO2024078366 A1 WO 2024078366A1 CN 2023122848 W CN2023122848 W CN 2023122848W WO 2024078366 A1 WO2024078366 A1 WO 2024078366A1
Authority
WO
WIPO (PCT)
Prior art keywords
data set
data
server
client
object identifier
Prior art date
Application number
PCT/CN2023/122848
Other languages
French (fr)
Chinese (zh)
Inventor
冯冲
马秋方
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024078366A1 publication Critical patent/WO2024078366A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0266Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/045Network management architectures or arrangements comprising client-server management architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0853Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information

Definitions

  • the present application relates to the field of communication technology, and in particular to a data management method, a server, a client, and a system.
  • the network configuration protocol (NETCONF) is a mechanism for managing the server side. Administrators can use this mechanism to manage the server side through the client. Configuration management includes adding, modifying, and deleting server side configuration data.
  • NETCONF defines that the server side includes a running data set and a candidate data set.
  • each of the multiple tasks will perform configuration management on the server side and update the configuration data to the candidate data set.
  • the configuration data corresponding to a task is submitted to the running data set
  • the configuration data corresponding to other tasks will also be passively submitted to the running data set.
  • the configuration data corresponding to the task is rolled back, that is, when the configuration data corresponding to the task is restored to the state before the modification, the configuration data corresponding to other tasks will also be cleared.
  • the present application provides a data management method, a server, a client, and a system, which can enable the server to manage only the first data set corresponding to the first task, and not the data sets corresponding to other tasks.
  • the technical solution is as follows:
  • a data management method comprising:
  • the server receives a first data request, which carries an object identifier indicating a first data set.
  • the first data set is a custom data set created for the first task.
  • the custom data set is used to store data used by the client to manage the server.
  • the server manages the first data set based on the object identifier.
  • the object identifier indicates the first data set and the first data set is a custom data set created for the first task, so after receiving the first data request, the server can manage the first data set corresponding to the first task based on the object identifier. That is, the client instructs the server to create a custom data set according to the task requirements, one task corresponds to one custom data set, and each custom data set is independent of each other and does not affect each other.
  • the client executes a task, it only needs to send a data request carrying the corresponding object identifier to the server, so that the server can manage the data set corresponding to the task based on the object identifier carried by the data request, and will not manage the data sets corresponding to other tasks.
  • the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
  • the management of the first data set by the server includes any one of the operations of creating the first data set, editing the data in the first data set, submitting the first data set, or deleting the first data set.
  • the server manages the first data set in different ways based on the object identifier, which will be described in the following four cases.
  • the first data request instructs the server to create a first data set
  • the first data request also carries the type of the first data set.
  • the server determines whether the first data set meets the data set creation condition based on the object identifier. If the first data set meets the data set creation condition, the server creates the first data set based on the object identifier and the type of the first data set. If the first data set does not meet the data set creation condition, the server sends a data set creation failure message to the client.
  • the data set creation condition includes: the data set created by the server does not include the first data set.
  • the server After receiving the first data request sent by the client, the server queries whether the first data set exists in the created data sets based on the object identifier carried in the first data request. If the first data set exists in the created data sets, it indicates that the server has currently created The first dataset is created. At this time, the server sends a dataset creation failure message to the client. If the first dataset does not exist in the created datasets, it indicates that the server has not currently created the first dataset. At this time, the server creates a dataset whose identifier is the object identifier and whose type is the type of the first dataset, and sends a dataset creation success message to the client.
  • the dataset creation condition includes: the total number of datasets created by the server is less than the maximum number of datasets.
  • the maximum number of datasets is set in advance, for example, the maximum number of datasets is 15. Moreover, the maximum number of datasets can be adjusted according to different requirements.
  • the server After receiving the first data request sent by the client, the server determines the total number of datasets currently created. When the total number of datasets currently created is less than the maximum number of datasets, it indicates that the total number of datasets created by the server has not reached the maximum number of datasets that the server can support, that is, the server can continue to create datasets. At this time, the server creates a dataset whose identifier is the object identifier and whose type is the type of the first dataset, and sends a dataset creation success message to the client. When the total number of datasets currently created is not less than the maximum number of datasets, it indicates that the total number of datasets created by the server has reached the maximum number of datasets that the server can support, that is, the server cannot continue to create datasets. At this time, the server sends a dataset creation failure message to the client.
  • the dataset creation condition includes: the datasets created by the server do not include the first dataset, and the total number of datasets created by the server is less than the maximum number of datasets.
  • the detailed implementation process is referred to the above related description, which will not be repeated here.
  • the first data request also carries the lifetime of the first data set.
  • the server can also set the lifetime of the first data set to the lifetime carried by the first data request, so that the first data set can be deleted when the lifetime of the first data set is detected to have expired.
  • the server directly sets the lifetime of the first data set to the default lifetime.
  • the default lifetime is set in advance, for example, the default lifetime is 1 day.
  • the default lifetime can also be adjusted according to different requirements.
  • the above content takes the example that the server sets the lifetime of the first data set to a fixed time length, and the time starts from the successful creation of the first data set, and the first data set is deleted when the time length is reached.
  • the server can also set a temporary tag for the first data set, and the temporary tag instructs the server to delete the first data set when submitting the first data set to the corresponding data set.
  • the first data request can also carry the identifier of the client.
  • the server when the server creates the first data set, it can also create a correspondence between the client identifier, the object identifier, and the type of the data set based on the identifier of the client, the object identifier, and the type of the first data set. In this way, the various types of data sets created by each client instructing the server can be recorded through the correspondence.
  • the type of the first data set is used to indicate whether the type of the first data set is a candidate data set type or a dynamic data set type.
  • the type of the first data set can also be other types, which is not limited in the embodiments of the present application.
  • the first data request indicates that the first data set is to be deleted, and the first data request also carries the identifier of the client.
  • the server determines whether the first data set meets the data set deletion condition based on the object identifier and the identifier of the client. If the first data set meets the data set deletion condition, the server deletes the first data set based on the object identifier. If the first data set does not meet the data set deletion condition, the server sends a data set deletion failure message to the client.
  • the data set deletion condition includes: the first data set is created by the client instructing the server.
  • the first data set is not created by the client instructing the server, but the client has management authority.
  • the data set deletion condition may also include other conditions, which are not limited in the embodiments of the present application.
  • clients without management rights only have the right to delete custom datasets that they instruct the server to create, but not the right to delete custom datasets that other clients instruct the server to create, thus avoiding passive deletion of custom datasets that other clients instruct the server to create.
  • Clients with management rights can delete custom datasets that all clients instruct the server to create, thereby reducing resource usage.
  • the client may actively delete the first data set that it instructs the server to create. That is, after the client completes the first task and the first data set corresponding to the first task is no longer used, the client sends a first data request to the server, and the first data request instructs the server to delete the first data set.
  • the first data request indicates to edit the data in the first data set
  • the first data request also carries the first data to be edited
  • the editing operation includes any one of adding, modifying, and deleting.
  • the server performs the editing operation on the first data in the first data set based on the object identifier.
  • the object identifier is the identifier of the first data set, or the object identifier is the identifier of the first task.
  • the server performs the editing operation on the first data set based on the object identifier in different ways, which will be described below respectively.
  • the object identifier is the identifier of the first data set.
  • the server After receiving the first data request sent by the client, the server performs an editing operation on the first data set based on the identifier of the first data set and the first data to be edited.
  • the first data request may also indicate a query for data in the first data set. That is, when the client needs to query the data on the server, the client sends a first data request to the server, and the first data request carries the identifier of the first data set and query information. After receiving the first data request sent by the client, the server determines the first data set from the created data sets based on the identifier of the first data set, and then queries the relevant data in the first data set based on the query information, and sends a data query response to the client.
  • the object identifier is the identifier of the first task. After receiving the first data request sent by the client, the server determines whether the first data set corresponding to the first task exists in the created data set based on the identifier of the first task. If the first data set exists, the server directly performs an editing operation on the first data set based on the identifier of the first task and the first data to be edited.
  • the first data request also carries the type of the first data set, so that when the first data set does not exist and the total number of created data sets is less than the maximum number of data sets, the server first creates the first data set based on the identifier of the first task and the type of the first data set. Then, the server performs the editing operation on the first data set.
  • the server when the server receives a first data request and the first data set does not exist in the created data sets, it creates the corresponding first data set for the first task in real time through implicit creation, so that the server performs editing operations on the first data set based on the first data to be edited.
  • the server can also set a temporary tag for the first data set, which instructs the server to delete the first data set when submitting the first data set to the corresponding data set.
  • the server sends a data editing operation failure message to the client.
  • the first data request may also indicate a query for data in the first data set. That is, when the client needs to query the data on the server, the client sends a first data request to the server, and the first data request carries the identifier of the first task and the query information. After receiving the first data request sent by the client, the server determines whether the first data set corresponding to the first task exists in the created data set based on the identifier of the first task. In the case where the first data set exists, the server directly determines the first data set from the created data set based on the identifier of the first task, and then queries the relevant data in the first data set based on the query information, and sends a data query response to the client.
  • the server queries the relevant data from the corresponding data set based on the type of the first data set, and sends a data query response to the client, and does not create the first data set based on the identifier of the first task and the type of the first data set.
  • the first data request indicates that the server is to be configured.
  • the server determines the type of the first data set based on the object identifier carried in the first data request.
  • the server submits the data stored in the first data set to the running data set based on the object identifier.
  • the server submits the data stored in the first data set to the operating data set based on the object identifier.
  • a data management method comprising:
  • the client sends a first data request, which carries an object identifier.
  • the object identifier indicates a first data set.
  • the first data set is a custom data set created for a first task.
  • the custom data set is used to store data used by the client to manage a server.
  • the first data request instructs the server to manage the first data set based on the object identifier.
  • the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
  • the first data request indicates to perform an editing operation on the data in the first data set, and the first data request also carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting.
  • the first data request indicates configuration of the server side
  • the type of the first data set is a candidate data set type or a dynamic data set type.
  • the first data request indicates deletion of the first data set, and the first data request also carries an identifier of the client.
  • the first data request instructs the server to create a first data set, and the first data request also carries the type of the first data set.
  • the first data request also carries the lifetime of the first data set.
  • a data management device wherein the data management device has the function of implementing the data management method in the first aspect.
  • the data management device includes at least one module, and the at least one module is used to implement the data management method provided in the first aspect.
  • a data management device which is applied to a server side and includes:
  • a receiving module configured to receive a first data request, the first data request carries an object identifier, the object identifier indicates a first data set, the first data set is a custom data set created for a first task, and the custom data set is used to store data used by a client to manage a server;
  • the management module is used to manage the first data set based on the object identifier.
  • the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
  • the first data request indicates to perform an editing operation on the data in the first data set, and the first data request further carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting;
  • the management module is specifically used for:
  • an editing operation on the first data set is performed on the first data set.
  • the first data request indicates to perform an editing operation on the data in the first data set, and the first data request further carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting;
  • the management module is specifically used for:
  • an editing operation on the first data is performed on the first data set based on the object identifier.
  • the first data request further carries the type of the first data set
  • the management module is specifically configured to:
  • An editing operation on the first data is performed on the first data set.
  • the first data request indicates configuration of the server side, and the type of the first data set is a candidate data set type;
  • the management module is specifically used for:
  • the data stored in the first data set is submitted to the running data set.
  • the first data request indicates configuration of the server side, and the type of the first data set is a dynamic data set type;
  • the management module is specifically used for:
  • the data stored in the first data set is submitted to the operation data set.
  • the first data request indicates to delete the first data set, and the first data request also carries an identifier of the client;
  • the management module is specifically used for:
  • the first data set When it is determined that the first data set meets the data set deletion condition based on the object identifier and the identifier of the client, the first data set is deleted based on the object identifier.
  • the data set deletion condition includes: the first data set is created by the server side at the instruction of the client; or the first data set is not created by the server side at the instruction of the client, but the client has management authority.
  • the first data request instructs the server to create a first data set, and the first data request also carries a type of the first data set;
  • the management module is specifically used for:
  • the first data set When the first data set meets the data set creation condition, the first data set is created based on the object identifier and the type of the first data set.
  • the data set creation condition includes: the data set created on the server side does not include the first data set.
  • the data set creation condition further includes: the total number of created data sets is less than the maximum number of data sets.
  • the first data request further carries a lifetime of the first data set; and the apparatus further comprises:
  • the first setting module is used to set the lifetime of the first data set to the lifetime carried in the first data request.
  • the device further comprises:
  • the second setting module is used to set the lifetime of the first data set to a default lifetime.
  • the device further comprises:
  • the deleting module is used to delete the first data set when it is detected that the lifetime of the first data set expires.
  • the client performs configuration management on the server through a network configuration management protocol, where the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
  • the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
  • a data management device wherein the data management device has the function of implementing the data management method in the second aspect.
  • the data management device includes at least one module, and the at least one module is used to implement the data management method provided in the second aspect.
  • a data management device which is applied to a client and includes:
  • a sending module is used to send a first data request, the first data request carries an object identifier, the object identifier indicates a first data set, the first data set is a custom data set created for a first task, the custom data set is used to store data used by the client to manage the server, and the first data request instructs the server to manage the first data set based on the object identifier.
  • the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
  • the first data request indicates to perform an editing operation on the data in the first data set, and the first data request also carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting.
  • the first data request indicates configuration of the server side
  • the type of the first data set is a candidate data set type or a dynamic data set type.
  • the first data request indicates to delete the first data set, and the first data request also carries an identifier of the client.
  • the first data request instructs the server to create a first data set, and the first data request also carries the type of the first data set.
  • the first data request also carries the lifetime of the first data set.
  • the client performs configuration management on the server through a network configuration management protocol, where the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
  • the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
  • a server comprising a memory and a processor, the memory being used to store a computer program for executing the data management method provided in the first aspect.
  • the processor is configured to execute the computer program stored in the memory to implement the data management method described in the first aspect.
  • the server side may further include a communication bus, and the communication bus is used to establish a connection between the processor and the memory.
  • a client comprising a memory and a processor, the memory being used to store a computer program for executing the data management method provided in the second aspect.
  • the processor is configured to execute the computer program stored in the memory to implement the data management method described in the second aspect.
  • the client may further include a communication bus, and the communication bus is used to establish a connection between the processor and the memory.
  • a data management system comprising a server and a client.
  • the server is used to implement the steps of the data management method provided in the first aspect
  • the client is used to implement the steps of the data management method provided in the second aspect.
  • a computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the steps of the data management method described in the first aspect or the second aspect.
  • a computer program product comprising instructions is provided, and when the instructions are executed on a computer, the computer is caused to execute the steps of the data management method described in the first aspect or the second aspect.
  • a computer program is provided, and when the computer program is executed on a computer, the computer is caused to execute the steps of the data management method described in the first aspect or the second aspect.
  • FIG1 is a schematic diagram of a business scenario provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of another business scenario provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of the architecture of a data management system provided in an embodiment of the present application.
  • FIG4 is a flow chart of a data management method provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a data management process provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of the structure of a data management device provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of the structure of another data management device provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application.
  • YANG (yet another next generation): a data modeling language for NETCONF.
  • YANG model A data model built using the YANG data modeling language is called a YANG model.
  • YANG models can be maintained by clients and servers.
  • YANG models express server-side data in the form of data nodes.
  • Data instantiated using the YANG model can be stored in the encoding format of the extensible markup language XML (Extensible Markup Language).
  • Client/server (C/S) architecture network management equipment, management equipment or controller is the client, and network equipment (such as routers, switches, bridges and other network element devices) is the server.
  • the client and the server communicate based on the network configuration management protocol.
  • the network configuration management protocol includes but is not limited to NETCONF, representational state transfer configuration protocol (RESCONF), and constrained application protocol management interface (CORECONF).
  • Candidate data set A configuration data set used by the server to store configuration data that has been configured but not yet effective.
  • Running data set A configuration data set used by the server to store the configured and effective configuration data.
  • Dynamic data set A data set used to store dynamic data on the server side, such as routing information and forwarding tables.
  • Operational data set A data set used to store operational data on the server side, including configuration data, routing information, forwarding tables, status information, various statistical data, and other derived data that are effective on the task.
  • the data management method provided in the embodiment of the present application can be applied to a variety of scenarios, for example, a scenario in which multiple tasks of the client are performed in parallel, that is, a client performs multiple tasks at the same time.
  • client 1 performs tasks 1, 2, and 3 at the same time.
  • Task 1 involves business A and business B
  • task 2 involves business B and business C
  • task 3 involves business C and business D.
  • Client 1 creates custom data set 1 for task 1, custom data set 2 for task 2, and custom data set 3 for task 3 through the method provided in the embodiment of the present application. Then, client 1 sends three data requests to the server respectively to manage the three custom data sets respectively.
  • client 1, client 2, and client 3 all establish a session connection with the server.
  • client 1 and client 2 currently need to manage the data on the server
  • client 3 currently needs to query the data on the server. That is, the task of client 1 is used to manage the data on the server, the task of client 2 is also used to manage the data on the server, and the task of client 3 is used to query the data on the server, so client 1 and client 2 instruct the server to create custom data sets corresponding to their respective tasks through the method provided in the embodiment of the present application, so as to obtain custom data set 1 and custom data set 2.
  • client 3 since the task of client 3 is used to query the data on the server, client 3 does not need to request the server to create a custom data set corresponding to the data query task, that is, each client can create a custom data set corresponding to each task according to demand.
  • FIG 3 is a schematic diagram of the architecture of a data management system provided in an embodiment of the present application, and the system is a C/S architecture. That is, the system includes multiple clients 301 (two clients are schematically illustrated in Figure 3) and a server 302. Each of the multiple clients is connected to the server 302 by wire or wireless means for communication. As shown in Figure 3, each client 301 communicates with the server 302 through an Internet protocol (IP) network.
  • IP Internet protocol
  • the client 301 is used to send a first data request to the server 302, and the first data request carries an object identifier.
  • the object identifier is the first
  • the server 302 is used to receive the first data request sent by the client 301, and manage the first data set based on the object identifier carried by the first data request.
  • the management of the first data set by the server 302 includes any one of the operations of creating the first data set, editing the data in the first data set, submitting the first data set, or deleting the first data set.
  • the client 301 can be installed and deployed on any computer device, such as a server, desktop computer, laptop computer, mobile phone, etc., and can also be installed and deployed on the computing and storage resources of a cloud platform.
  • the server 302 can be a network device such as a router, switch, gateway, firewall, etc.
  • client 301 and server 302 are only examples, and other existing or future clients or servers that are applicable to the embodiments of the present application should also be included in the protection scope of the embodiments of the present application and are included here by reference.
  • Fig. 4 is a flow chart of a data management method provided in an embodiment of the present application. Referring to Fig. 4, the method includes the following steps.
  • Step 401 the client sends a first data request, the first data request carries an object identifier, the object identifier indicates a first data set, the first data set is a custom data set created for a first task, and the custom data set is used to store data used by the client to manage the server.
  • the object identifier is an identifier of the first data set.
  • the object identifier is an identifier of the first task.
  • the client After the client establishes a session connection with the server, when the client needs to manage the data on the server through the first task, the client sends a first data request to the server. Since the first data request carries the identifier of the first task, the server can manage only the custom data set corresponding to the first task of the client based on the identifier of the first task, thereby avoiding the server from managing tasks of other clients or custom data sets corresponding to other tasks of the client at the same time.
  • the object identifier may also be other identifiers, as long as the object identifier can indicate the first data set, and the embodiment of the present application does not limit this.
  • each client instructs the server to create a custom data set according to the task requirements, one task corresponds to one custom data set, and any client instructs the server to manage the custom data set corresponding to any task of the client, thereby solving the problem of data conflicts caused by multiple clients or multiple tasks sharing one data set.
  • each client creates a custom data set according to the task requirements. Only when a certain client needs to manage the data on the server side, the client instructs the server to create one or more custom data sets according to the number of tasks to be executed. It is not that each client instructs the server to create a custom data set after establishing a session connection with the server. In this way, it is possible to solve the problem of resource waste caused by each client that establishes a session connection with the server instructing the server to create a custom data set.
  • Step 402 The server receives the first data request and manages the first data set based on the object identifier.
  • the management of the first data set by the server includes any one of the operations of creating the first data set, editing the data in the first data set, submitting the first data set, or deleting the first data set.
  • the server manages the first data set in different ways based on the object identifier, which will be described in the following four cases.
  • the first data request instructs the server to create a first data set
  • the first data request also carries the type of the first data set.
  • the server determines whether the first data set meets the data set creation condition based on the object identifier. If the first data set meets the data set creation condition, the server creates the first data set based on the object identifier and the type of the first data set. If the first data set does not meet the data set creation condition, the server sends a data set creation failure message to the client.
  • the data set creation condition includes: the data sets created on the server side do not include the first data set.
  • the server After receiving the first data request sent by the client, the server queries whether the first data set exists in the created data sets based on the object identifier carried in the first data request. If the first data set exists in the created data sets, it indicates that the server has currently created The first dataset is created. At this time, the server sends a dataset creation failure message to the client. If the first dataset does not exist in the created datasets, it indicates that the server has not currently created the first dataset. At this time, the server creates a dataset whose identifier is the object identifier and whose type is the type of the first dataset, and sends a dataset creation success message to the client.
  • the object identifier is the identifier of the first data set, or the object identifier is the identifier of the first task.
  • the server end queries whether the first data set exists from the created data set based on the object identifier, including: the server end queries whether there is a data set whose data set identifier is the same as the identifier of the first data set from the created data set based on the identifier of the first data set. If there is a data set whose data set identifier is the same as the identifier of the first data set in the created data set, it indicates that the first data set exists in the created data set.
  • the server end determines whether there is a first data set corresponding to the identifier of the first task in the created data set based on the identifier of the first task carried in the first data request from the corresponding relationship between the stored task identifier and the data set.
  • the data set creation condition includes: the total number of data sets created by the server is less than the maximum number of data sets.
  • the maximum number of data sets is set in advance, for example, the maximum number of data sets is 15. Moreover, the maximum number of data sets can also be adjusted according to different requirements.
  • the server After receiving the first data request sent by the client, the server determines the total number of datasets currently created. When the total number of datasets currently created is less than the maximum number of datasets, it indicates that the total number of datasets created by the server has not reached the maximum number of datasets that the server can support, that is, the server can continue to create datasets. At this time, the server creates a dataset whose identifier is the object identifier and whose type is the type of the first dataset, and sends a dataset creation success message to the client. When the total number of datasets currently created is not less than the maximum number of datasets, it indicates that the total number of datasets created by the server has reached the maximum number of datasets that the server can support, that is, the server cannot continue to create datasets. At this time, the server sends a dataset creation failure message to the client.
  • the data set creation condition includes: the data sets already created on the server side do not include the first data set, and the total number of data sets already created on the server side is less than the maximum number of data sets.
  • the server After receiving the first data request sent by the client, the server queries whether the first data set exists in the created data sets based on the object identifier carried in the first data request. If the first data set exists in the created data sets, it indicates that the server has currently created the first data set. At this time, the server sends a data set creation failure message to the client.
  • the server determines the total number of datasets currently created. When the total number of datasets currently created is less than the maximum number of datasets, it indicates that the total number of datasets created by the server has not reached the maximum number of datasets that the server can support, that is, the server can continue to create datasets. At this time, the server creates a dataset whose identifier is the object identifier and whose type is the type of the first dataset, and sends a dataset creation success message to the client.
  • the server sends a dataset creation failure message to the client.
  • the server end when the dataset creation condition includes: the datasets created by the server end do not include the first dataset, and the total number of datasets created by the server end is less than the maximum number of datasets, the server end first queries whether the created datasets include the first dataset according to the above steps, and then determines whether the total number of currently created datasets is less than the maximum number of datasets.
  • the server end may also first determine whether the total number of currently created datasets is less than the maximum number of datasets, and then query whether the created datasets include the first dataset. This embodiment of the present application does not limit this.
  • the dataset creation condition may also include other conditions, which are not limited in this embodiment of the present application.
  • the server when the server fails to create the first data set, the server will send a data set creation failure message to the client.
  • the creation failure message may also include the reason for the failure to create the data set.
  • the first data request also carries the lifetime of the first data set.
  • the server can also set the lifetime of the first data set to the lifetime carried by the first data request, so that when the lifetime of the first data set is detected to have expired, the first data set can be deleted.
  • the server directly sets the lifetime of the first data set to the default lifetime.
  • the default lifetime is set in advance, for example, the default lifetime is 1 day. Moreover, the default lifetime can be adjusted according to different needs.
  • the above content takes the example of setting the life span of the first data set to a fixed time length on the server side, starting from the successful creation of the first data set, and deleting the first data set when the time length is reached.
  • the server side may also set a temporary tag for the first data set, and the temporary tag instructs the server side to delete the first data set when submitting the first data set to the corresponding data set.
  • the server receives the first data request sent by the client as follows:
  • ⁇ create-datastore> represents the operation of creating a data set.
  • the parameters in ⁇ create-datastore> include ⁇ name>, ⁇ type>, and ⁇ lifetime>.
  • the ⁇ name> parameter carries the identifier of the first data set "my-datastore”
  • the ⁇ type> parameter carries the type of the first data set "candidate data set type”
  • the ⁇ lifetime> parameter carries the lifetime of the first data set "1day”.
  • the lifetime of the first data set is indicated by a time node.
  • the ⁇ lifetime> parameter carries the lifetime of the first data set "11.23.2022", indicating that the lifetime of the first data set expires on November 23, 2022.
  • the dataset creation success message sent by the server to the client is as follows:
  • the dataset creation failure message sent by the server to the client is as follows:
  • the parameters in ⁇ rpc-error> include ⁇ error-type>, ⁇ error-tag>, ⁇ error-severity>, and ⁇ error-message>.
  • the content in the ⁇ error-type> parameter indicates that the type of the failure to create the first data set is "application", that is, the failure to create the first data set is due to an error in the application layer.
  • the content in the ⁇ error-tag> parameter indicates that the tag of the failure to create the first dataset is "data-exists", that is, the server has already created the first dataset.
  • the content in the ⁇ error-severity> parameter indicates that the severity of the failure to create the first dataset is "error”.
  • the content in the ⁇ error-message> parameter indicates that the message of the failure to create the first dataset is "The datastore to be created exists", that is, the first dataset failed to be created because the server has already created the first dataset.
  • the dataset creation failure message sent by the server to the client is as follows:
  • the parameters in ⁇ rpc-error> include ⁇ error-type>, ⁇ error-tag>, ⁇ error-severity>, and ⁇ error-message>.
  • the content in the ⁇ error-type> parameter indicates that the type of failure to create the first dataset is "protocol", that is, the failure to create the first dataset is due to an error in the protocol layer.
  • the content in the ⁇ error-tag> parameter indicates that the tag of the failure to create the first dataset is "resource-denied", that is, the current resources on the server are insufficient.
  • the content in the ⁇ error-severity> parameter indicates that the severity of the failure to create the first dataset is "error”.
  • the content in the ⁇ error-message> parameter indicates that the message of the failure to create the first dataset is "Reach the max number of customized datastore", that is, the failure to create the first dataset is due to the total number of datasets currently created on the server reaching the maximum number of datasets that the server can support.
  • the first data request can also carry the identifier of the client.
  • the server when the server creates the first data set, it can also create a correspondence between the client identifier, the object identifier, and the type of the data set based on the identifier of the client, the object identifier, and the type of the first data set. In this way, the various types of data sets created by each client instructing the server can be recorded through the correspondence.
  • the type of the first data set is used to indicate whether the type of the first data set is a candidate data set type or a dynamic data set type.
  • the type of the first data set can also be other types, which is not limited in the embodiments of the present application.
  • the first data request indicates that the first data set is to be deleted, and the first data request also carries the identifier of the client.
  • the server determines whether the first data set meets the data set deletion condition based on the object identifier and the identifier of the client. If the first data set meets the data set deletion condition, the server deletes the first data set based on the object identifier. If the first data set does not meet the data set deletion condition, the server sends a data set deletion failure message to the client.
  • the data set deletion condition includes: the first data set is created by the client instructing the server.
  • the first data set is not created by the client instructing the server, but the client has management authority.
  • the data set deletion condition may also include other conditions, which are not limited in the embodiments of the present application.
  • the server stores the correspondence between the client identifier, the object identifier and the data set type. Therefore, the data set deletion condition includes: when the first data set is created by the server at the instruction of the client, after the server receives the first data request sent by the client, based on the object identifier and the client identifier carried in the first data request, from the stored correspondence between the client identifier, the object identifier and the data set type, it determines whether the first data set is created by the server at the instruction of the client. In the case that the first data set is created by the server at the instruction of the client, the server directly deletes the first data set. In the case that the first data set is not created by the server at the instruction of the client, the server sends a data set deletion failure message to the client.
  • the server can also determine whether the client has management authority based on the identifier of the client. If the client has management authority, the server deletes the first data set. If the client does not have management authority, the server sends a data set deletion failure message to the client.
  • a client without management privileges can only delete the custom datasets that it instructs the server to create, but cannot delete other datasets.
  • the client instructs the server to create a custom dataset, thereby preventing other clients from instructing the server to create a custom dataset passively deleted.
  • Clients with management permissions can delete all custom datasets created by clients instructing the server to create a custom dataset, thereby reducing resource usage.
  • the server receives the first data request sent by the client as follows:
  • ⁇ delete-datastore> represents the operation of deleting a data set
  • the parameters in ⁇ delete-datastore> include ⁇ name1> and ⁇ name2>.
  • the ⁇ name1> parameter carries the identifier "my-datastore" of the first data set
  • the ⁇ name2> parameter carries the identifier "my-ID" of the client.
  • the client with management authority can forcibly delete the datasets whose lifetime has expired.
  • the first data request sent by the client with management authority received by the server is as follows:
  • ⁇ destroy-datastore> represents the operation of forcibly deleting a dataset by a client with management permissions.
  • the parameters in ⁇ destroy-datastore> include ⁇ name>, and the ⁇ name> parameter carries the identifier "my-datastore" of the forcibly deleted dataset.
  • the client may actively delete the first data set that it instructs the server to create. That is, after the client completes the first task and the first data set corresponding to the first task is no longer used, the client sends a first data request to the server, and the first data request instructs the server to delete the first data set.
  • the first data request indicates to edit the data in the first data set
  • the first data request also carries the first data to be edited
  • the editing operation includes any one of adding, modifying, and deleting.
  • the server performs the editing operation on the first data in the first data set based on the object identifier.
  • the client when the client needs to edit the data in the first data set, the client sends a first data request to the server, where the first data request carries the object identifier and the first data to be edited.
  • the object identifier is the identifier of the first data set, or the object identifier is the identifier of the first task.
  • the server performs the editing operation on the first data set based on the object identifier in different ways, which will be described below respectively.
  • the object identifier is the identifier of the first data set.
  • the server After receiving the first data request sent by the client, the server performs an editing operation on the first data set based on the identifier of the first data set and the first data to be edited.
  • the server receives the first data request sent by the client as follows:
  • ⁇ edit-data> represents the editing operation on the data in the data set
  • the parameters in ⁇ edit-data> include ⁇ target> and ⁇ data>.
  • the ⁇ target> parameter carries the identifier of the first data set "my-datastore”
  • the ⁇ data> parameter carries the first data to be edited.
  • the first data request may also indicate a query for data in the first data set. That is, when the client needs to query the data on the server, the client sends a first data request to the server, and the first data request carries the identifier of the first data set and query information. After receiving the first data request sent by the client, the server determines the first data set from the created data sets based on the identifier of the first data set, and then queries the relevant data in the first data set based on the query information, and sends a data query response to the client.
  • the object identifier is the identifier of the first task. After receiving the first data request sent by the client, the server determines whether the first data set corresponding to the first task exists in the created data set based on the identifier of the first task. If the first data set exists, the server directly performs an editing operation on the first data set based on the identifier of the first task and the first data to be edited.
  • the first data request also carries the type of the first data set, so that when the first data set does not exist and the total number of created data sets is less than the maximum number of data sets, the server first creates the first data set based on the identifier of the first task and the type of the first data set. Then, the server performs the editing operation on the first data set.
  • the server when the server receives a first data request and the first data set does not exist in the created data sets, it creates the corresponding first data set for the first task in real time through implicit creation, so that the server performs editing operations on the first data set based on the first data to be edited.
  • the server can also set a temporary tag for the first data set, which instructs the server to delete the first data set when submitting the first data set to the corresponding data set.
  • the server sends a data editing operation failure message to the client.
  • the server receives the first data request sent by the client as follows:
  • the first data request may also indicate a query for data in the first data set. That is, when the client needs to query the data on the server, the client sends a first data request to the server, and the first data request carries the identifier of the first task and the query information. After receiving the first data request sent by the client, the server determines whether the first data set corresponding to the first task exists in the created data set based on the identifier of the first task. In the case where the first data set exists, the server directly determines the first data set from the created data set based on the identifier of the first task, and then queries the relevant data in the first data set based on the query information, and sends a data query response to the client.
  • the server queries the relevant data from the corresponding data set based on the type of the first data set, and sends a data query response to the client, and does not create the first data set based on the identifier of the first task and the type of the first data set.
  • the server side queries the relevant data from the corresponding data set based on the type of the first data set to implement the process including: when the type of the first data set is a candidate data set type, the server side queries the relevant data from the running data set according to the filter type carried by the first data request.
  • the server side queries the relevant data from the operation data set according to the filter type carried by the first data request.
  • the server receives the first data request sent by the client as follows:
  • ⁇ get-data> represents a query operation on the data in the data set
  • the ⁇ target> parameter carries the type of the first data set as "candidate data set type”
  • the data query response sent by the server to the client is as follows:
  • ⁇ data> represents the data obtained by the query
  • the parameters in ⁇ users> include ⁇ name>, ⁇ type>, ⁇ full-name>, and ⁇ company-info>.
  • the ⁇ name> parameter indicates that the user's name is "root”
  • the ⁇ type> parameter indicates that the user's type is "superuser”
  • the ⁇ full-name> parameter indicates that the user's full name is "Charlie Root”
  • the ⁇ company-info> parameter indicates that the user's company information includes "dept1" and "id1".
  • the first data request indicates that the server is to be configured.
  • the server determines the type of the first data set based on the object identifier carried in the first data request.
  • the server submits the data stored in the first data set to the running data set based on the object identifier.
  • the server submits the data stored in the first data set to the operating data set based on the object identifier.
  • the server stores the correspondence between the client identifier, the object identifier and the data set type. Therefore, after receiving the first data request, the server can obtain the type of the first data set from the stored correspondence between the client identifier, the object identifier and the data set type based on the object identifier.
  • the server Since the first data set is a custom data set that the client instructs the server to create for the first task, when the client executes the first task, the server only needs to submit the first data set corresponding to the first task to the corresponding data set based on the type of the first data set, and will not passively submit custom data sets corresponding to other tasks to the corresponding data set.
  • the server receives the first data request sent by the client as follows:
  • ⁇ commit> represents the operation of submitting a data set, and the parameters in ⁇ commit> include ⁇ datastore>.
  • the ⁇ datastore> parameter carries the identifier of the first data set "my-datastore”.
  • the server receives the first data request sent by the client as follows:
  • the client instructs the server to create a first data set
  • the first data set is a custom data set created for the first task performed by the client.
  • the client edits the data in the first data set.
  • the client instructs the server to submit the data stored in the first data set to the corresponding data set to perform the first task.
  • the client instructs the server to delete the first data set.
  • the above content is based on the example of each client instructing the server to create a custom data set according to the task requirements.
  • the server manages the first data set through the identifier of the first data set carried in the first data request.
  • the server manages the data set corresponding to the first task through the identifier of the first task carried in the first data request.
  • the server also stores a shared data set, which is independent of each custom data set.
  • Each client can also instruct the server to manage the shared data set by sending a first data request to the server.
  • the first data request does not carry an object identifier. That is, if the first data request sent by any client to the server carries an object identifier, it indicates that the client instructs the server to manage a specific custom data set. If the first data request sent by any client to the server does not carry an object identifier, it indicates that the client instructs the server to manage the shared data set.
  • the object identifier indicates the first data set and the first data set is a custom data set that the client instructs the server to create for the first task
  • the server can manage the first data set corresponding to the first task based on the object identifier. That is, the client instructs the server to create a custom data set according to the task requirements, one task corresponds to one custom data set, and each custom data set is independent of each other and does not affect each other.
  • each client instructs the server to create a custom data set according to the task requirements. Only when a client needs to manage the data on the server, the client instructs the server to create one or more custom data sets according to the number of tasks to be executed, and it is not that each client instructs the server to create a custom data set after establishing a session connection with the server.
  • FIG6 is a schematic diagram of the structure of a data management device provided in an embodiment of the present application, and the data management device can be implemented by software, hardware or a combination of both to become part or all of a communication device, and the communication device can be the server end shown in FIG3 , and the device is applied to the server end.
  • the device includes: a receiving module 601 and a management module 602.
  • the receiving module 601 is used to receive a first data request, the first data request carries an object identifier, the object identifier indicates a first data set, the first data set is a custom data set created for the first task, and the custom data set is used to store data used by the client to manage the server.
  • the detailed implementation process refers to the corresponding content in the above embodiments, which will not be repeated here.
  • the management module 602 is used to manage the first data set based on the object identifier.
  • the detailed implementation process refers to the corresponding content in the above embodiments, which will not be repeated here.
  • the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
  • the first data request indicates to perform an editing operation on the data in the first data set, and the first data request further carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting;
  • the management module 602 is specifically used for:
  • an editing operation on the first data set is performed on the first data set.
  • the first data request indicates to perform an editing operation on the data in the first data set, and the first data request further carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting;
  • the management module 602 is specifically used for:
  • an editing operation on the first data is performed on the first data set based on the object identifier.
  • the first data request further carries the type of the first data set
  • the management module 602 is specifically configured to:
  • An editing operation on the first data is performed on the first data set.
  • the first data request indicates configuration of the server side, and the type of the first data set is a candidate data set type;
  • the management module 602 is specifically used for:
  • the data stored in the first data set is submitted to the running data set.
  • the first data request indicates configuration of the server side, and the type of the first data set is a dynamic data set type;
  • the management module 602 is specifically used for:
  • the data stored in the first data set is submitted to the operation data set.
  • the first data request indicates to delete the first data set, and the first data request also carries an identifier of the client;
  • the management module 602 is specifically used for:
  • the first data set When it is determined that the first data set meets the data set deletion condition based on the object identifier and the identifier of the client, the first data set is deleted based on the object identifier.
  • the data set deletion condition includes: the first data set is created by the server side at the instruction of the client; or the first data set is not created by the server side at the instruction of the client, but the client has management authority.
  • the first data request instructs the server to create a first data set, and the first data request also carries a type of the first data set;
  • the management module 602 is specifically used for:
  • the first data set When the first data set meets the data set creation condition, the first data set is created based on the object identifier and the type of the first data set.
  • the data set creation condition includes: the data set created on the server side does not include the first data set.
  • the data set creation condition further includes: the total number of created data sets is less than the maximum number of data sets.
  • the first data request further carries a lifetime of the first data set; and the apparatus further comprises:
  • the first setting module is used to set the lifetime of the first data set to the lifetime carried in the first data request.
  • the device further comprises:
  • the second setting module is used to set the lifetime of the first data set to a default lifetime.
  • the device further comprises:
  • the deleting module is used to delete the first data set when it is detected that the lifetime of the first data set expires.
  • the client performs configuration management on the server through a network configuration management protocol, where the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
  • the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
  • the object identifier indicates the first data set and the first data set is a custom data set that the client instructs the server to create for the first task
  • the server can manage the first data set corresponding to the first task based on the object identifier. That is, the client instructs the server to create a custom data set according to the task requirements, one task corresponds to one custom data set, and each custom data set is independent of each other and does not affect each other.
  • each client instructs the server to create a custom data set according to the task requirements. Only when a client needs to manage the data on the server, the client instructs the server to create one or more custom data sets according to the number of tasks to be executed, and it is not that each client instructs the server to create a custom data set after establishing a session connection with the server.
  • the data management device provided in the above embodiment only uses the division of the above functional modules as an example to illustrate when performing data management.
  • 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 data management device provided in the above embodiment and the data management method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
  • FIG7 is a schematic diagram of the structure of another data management device provided in an embodiment of the present application
  • the data management device can be implemented by software, hardware or a combination of both to become part or all of a communication device
  • the communication device can be any client shown in FIG3
  • the device is applied to the client.
  • the device includes a sending module 701.
  • the sending module 701 is used to send a first data request, the first data request carries an object identifier, the object identifier indicates a first data set, the first data set is a custom data set created for the first task, the custom data set is used to store data used by the client to manage the server, and the first data request instructs the server to manage the first data set based on the object identifier.
  • the detailed implementation process refers to the corresponding content in the above embodiments, which will not be repeated here.
  • the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
  • the first data request indicates to edit the data in the first data set, and the first data request also carries the first Data,editing operations include adding, modifying, and deleting.
  • the first data request indicates configuration of the server side
  • the type of the first data set is a candidate data set type or a dynamic data set type.
  • the first data request indicates to delete the first data set, and the first data request also carries an identifier of the client.
  • the first data request instructs the server to create a first data set, and the first data request also carries the type of the first data set.
  • the first data request also carries the lifetime of the first data set.
  • the client performs configuration management on the server through a network configuration management protocol, where the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
  • the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
  • the object identifier indicates the first data set and the first data set is a custom data set that the client instructs the server to create for the first task
  • the server can manage the first data set corresponding to the first task based on the object identifier. That is, the client instructs the server to create a custom data set according to the task requirements, one task corresponds to one custom data set, and each custom data set is independent of each other and does not affect each other.
  • each client instructs the server to create a custom data set according to the task requirements. Only when a client needs to manage the data on the server, the client instructs the server to create one or more custom data sets according to the number of tasks to be executed, and it is not that each client instructs the server to create a custom data set after establishing a session connection with the server.
  • the data management device provided in the above embodiment only uses the division of the above functional modules as an example to illustrate when performing data management.
  • 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 data management device provided in the above embodiment and the data management method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
  • Figure 8 is a schematic diagram of the structure of a communication device according to an embodiment of the present application.
  • the communication device is any client or server shown in Figure 3, and the communication device includes at least one processor 801, a communication bus 802, a memory 803 and at least one communication interface 804.
  • the processor 801 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or may be one or more integrated circuits for implementing the solution of the present application, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof.
  • the above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
  • the communication bus 802 is used to transmit information between the above components.
  • the communication bus 802 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the memory 803 may be a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc (including a compact disc read-only memory (CD-ROM), a compressed optical disc, a laser disc, a digital versatile disc, a Blu-ray disc, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
  • the memory 803 may exist independently and be connected to the processor 801 via the communication bus 802.
  • the memory 803 may also be integrated with the processor 801.
  • the communication interface 804 uses any transceiver-like device to communicate with other devices or communication networks.
  • the communication interface 804 includes a wired communication interface and may also include a wireless communication interface.
  • the wired communication interface can be, for example, an Ethernet interface.
  • the Ethernet interface can be an optical interface, an electrical interface, or a combination thereof.
  • the wireless communication interface can be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof, etc.
  • WLAN wireless local area network
  • the processor 801 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 8 .
  • the communication device may include multiple processors, such as processor 801 and processor 805 shown in Figure 8. Each of these processors may be a single-core processor or a multi-core processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (such as computer program instructions).
  • the communication device may further include an output device 806 and an input device 807.
  • the output device 806 communicates with the processor 801 and may display information in a variety of ways.
  • the output device 806 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector.
  • the input device 807 communicates with the processor 801 and may receive user input in a variety of ways.
  • the input device 807 may be a mouse, a keyboard, a touch screen device, or a sensor device.
  • the memory 803 is used to store the program code 810 for executing the solution of the present application, and the processor 801 can execute the program code 810 stored in the memory 803.
  • the program code 810 may include one or more software modules, and the communication device can implement the data management method provided in the embodiment of FIG. 4 above through the processor 801 and the program code 810 in the memory 803.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device.
  • the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions can be transmitted from a website site, computer, server or data center by wired (for example: coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example: infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more available media integrated.
  • the available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)).
  • the computer-readable storage medium mentioned in the embodiment of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.
  • the embodiment of the present application further provides a computer-readable storage medium, which stores instructions.
  • the instructions When the instructions are executed on a computer, the computer executes the steps of the above-mentioned data management method.
  • the embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps of the above data management method.
  • a computer program is provided, which, when executed on a computer, enables the computer to execute the steps of the above data management method.
  • the information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.
  • signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
  • the first data request involved in the embodiments of this application is obtained with full authorization.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present application belongs to the technical field of communications. Disclosed are a data management method, a server, a client and a system. The method comprises: a server receiving a first data request, wherein the first data request carries an object identifier; and the server managing a first data set on the basis of the object identifier. A first data request sent by a client to a server carries an object identifier, the object identifier indicates a first data set, and the first data set is a custom data set which is created for a first task; therefore, after the first data request is received, the server can manage, on the basis of the object identifier, the first data set corresponding to the first task. That is, the client instructs, according to a task requirement, the server to create a custom data set, wherein one task corresponds to one custom data set, and custom data sets are independent of each other and do not affect each other.

Description

数据管理方法、服务器端、客户端及系统Data management method, server, client and system
本申请要求于2022年10月11日提交的申请号为202211241732.0、发明名称为“一种数据处理的方法及装置”的中国专利申请的优先权,以及要求于2022年11月29日提交的申请号为202211516827.9、发明名称为“数据管理方法、服务器端、客户端及系统”的中国专利申请的优先权。上述专利申请的全部内容通过引用结合在本申请中。This application claims priority to Chinese patent application No. 202211241732.0 filed on October 11, 2022, entitled “A method and device for data processing”, and claims priority to Chinese patent application No. 202211516827.9 filed on November 29, 2022, entitled “Data management method, server, client and system”. The entire contents of the above patent applications are incorporated into this application by reference.
技术领域Technical Field
本申请涉及通信技术领域,特别涉及一种数据管理方法、服务器端、客户端及系统。The present application relates to the field of communication technology, and in particular to a data management method, a server, a client, and a system.
背景技术Background technique
网络配置协议(network configuration protocol,NETCONF)是一种用于管理服务器端的机制,管理人员可以通过客户端使用这套机制对服务器端进行配置管理。其中,配置管理包括增加、修改、删除服务器端的配置数据等。The network configuration protocol (NETCONF) is a mechanism for managing the server side. Administrators can use this mechanism to manage the server side through the client. Configuration management includes adding, modifying, and deleting server side configuration data.
NETCONF定义服务器端包括一个运行(running)数据集和一个候选(candidate)数据集等。客户端与服务器端建立会话(session)连接之后,在客户端同时执行多个任务的情况下,该多个任务中的每个任务均会对服务器端进行配置管理,并将配置数据更新至候选数据集中。这样,在将某个任务所对应的配置数据提交到运行数据集时,其他任务所对应的配置数据也会被动地提交到运行数据集。同理,在对该任务所对应的配置数据进行配置回滚,即将该任务所对应的配置数据恢复到修改前的状态时,其他任务所对应的配置数据也会被清除掉。NETCONF defines that the server side includes a running data set and a candidate data set. After the client establishes a session connection with the server side, when the client executes multiple tasks at the same time, each of the multiple tasks will perform configuration management on the server side and update the configuration data to the candidate data set. In this way, when the configuration data corresponding to a task is submitted to the running data set, the configuration data corresponding to other tasks will also be passively submitted to the running data set. Similarly, when the configuration data corresponding to the task is rolled back, that is, when the configuration data corresponding to the task is restored to the state before the modification, the configuration data corresponding to other tasks will also be cleared.
发明内容Summary of the invention
本申请提供了一种数据管理方法、服务器端、客户端及系统,可以实现服务器端只对第一任务所对应的第一数据集进行管理,并不会对其他任务所对应的数据集进行管理。所述技术方案如下:The present application provides a data management method, a server, a client, and a system, which can enable the server to manage only the first data set corresponding to the first task, and not the data sets corresponding to other tasks. The technical solution is as follows:
第一方面,提供了一种数据管理方法,所述方法包括:In a first aspect, a data management method is provided, the method comprising:
服务器端接收第一数据请求,第一数据请求携带对象标识,该对象标识指示第一数据集,第一数据集是为第一任务创建的自定义数据集,自定义数据集用于存储客户端用来管理服务器端的数据,服务器端基于该对象标识,对第一数据集进行管理。The server receives a first data request, which carries an object identifier indicating a first data set. The first data set is a custom data set created for the first task. The custom data set is used to store data used by the client to manage the server. The server manages the first data set based on the object identifier.
由于客户端向服务器端发送的第一数据请求携带对象标识,该对象标识指示第一数据集且第一数据集是为第一任务创建的自定义数据集,所以,服务器端接收到第一数据请求之后,能够基于该对象标识,对第一任务所对应的第一数据集进行管理。也即是,客户端按照任务需求指示服务器端创建自定义数据集,一个任务对应一个自定义数据集,各个自定义数据集之间相互独立,彼此互不影响。这样,在客户端执行某个任务的情况下,只需向服务器端发送携带相应对象标识的数据请求,以便于服务器端基于该数据请求所携带的对象标识,对该任务所对应的数据集进行管理,并不会对其他任务所对应的数据集进行管理。Since the first data request sent by the client to the server carries an object identifier, the object identifier indicates the first data set and the first data set is a custom data set created for the first task, so after receiving the first data request, the server can manage the first data set corresponding to the first task based on the object identifier. That is, the client instructs the server to create a custom data set according to the task requirements, one task corresponds to one custom data set, and each custom data set is independent of each other and does not affect each other. In this way, when the client executes a task, it only needs to send a data request carrying the corresponding object identifier to the server, so that the server can manage the data set corresponding to the task based on the object identifier carried by the data request, and will not manage the data sets corresponding to other tasks.
其中,该对象标识为第一数据集的标识,或者,该对象标识为第一任务的标识。The object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
基于上文描述,服务器端对第一数据集的管理包括创建第一数据集、编辑第一数据集中的数据、提交第一数据集或删除第一数据集等操作中的任一种。在第一数据请求指示的信息不同的情况下,服务器端基于该对象标识,对第一数据集进行管理的方式不同,接下来将分为以下四种情况分别进行说明。Based on the above description, the management of the first data set by the server includes any one of the operations of creating the first data set, editing the data in the first data set, submitting the first data set, or deleting the first data set. In the case where the information indicated by the first data request is different, the server manages the first data set in different ways based on the object identifier, which will be described in the following four cases.
第一种情况,第一数据请求指示服务器端创建第一数据集,第一数据请求还携带第一数据集的类型。此时,服务器端基于该对象标识,确定第一数据集是否满足数据集创建条件。在第一数据集满足数据集创建条件的情况下,服务器端基于该对象标识和第一数据集的类型创建第一数据集。在第一数据集不满足数据集创建条件的情况下,服务器端向该客户端发送数据集创建失败消息。In the first case, the first data request instructs the server to create a first data set, and the first data request also carries the type of the first data set. At this time, the server determines whether the first data set meets the data set creation condition based on the object identifier. If the first data set meets the data set creation condition, the server creates the first data set based on the object identifier and the type of the first data set. If the first data set does not meet the data set creation condition, the server sends a data set creation failure message to the client.
示例地,数据集创建条件包括:服务器端已创建的数据集不包括第一数据集。For example, the data set creation condition includes: the data set created by the server does not include the first data set.
服务器端接收到该客户端发送的第一数据请求之后,基于第一数据请求携带的该对象标识,从已创建的数据集中查询是否存在第一数据集。如果已创建的数据集中存在第一数据集,表明服务器端当前已经创 建了第一数据集。此时,服务器端向该客户端发送数据集创建失败消息。如果已创建的数据集中不存在第一数据集,表明服务器端当前并未创建第一数据集。此时,服务器端创建标识为该对象标识,且类型为第一数据集的类型的数据集,并向该客户端发送数据集创建成功消息。After receiving the first data request sent by the client, the server queries whether the first data set exists in the created data sets based on the object identifier carried in the first data request. If the first data set exists in the created data sets, it indicates that the server has currently created The first dataset is created. At this time, the server sends a dataset creation failure message to the client. If the first dataset does not exist in the created datasets, it indicates that the server has not currently created the first dataset. At this time, the server creates a dataset whose identifier is the object identifier and whose type is the type of the first dataset, and sends a dataset creation success message to the client.
示例地,数据集创建条件包括:服务器端已创建的数据集的总数量小于最大数据集数量。其中,最大数据集数量是事先设置的,例如最大数据集数量为15。而且,最大数据集数量还能够按照不同的需求来调整。For example, the dataset creation condition includes: the total number of datasets created by the server is less than the maximum number of datasets. The maximum number of datasets is set in advance, for example, the maximum number of datasets is 15. Moreover, the maximum number of datasets can be adjusted according to different requirements.
服务器端接收到该客户端发送的第一数据请求之后,确定当前已创建的数据集的总数量。在当前已创建的数据集的总数量小于最大数据集数量的情况下,表明服务器端已创建的数据集的总数量并没有达到服务器端所能支持的最大数据集数量,即服务器端还能够继续创建数据集。此时,服务器端创建标识为该对象标识,且类型为第一数据集的类型的数据集,并向该客户端发送数据集创建成功消息。在当前已创建的数据集的总数量不小于最大数据集数量的情况下,表明服务器端已创建的数据集的总数量已经达到服务器端所能支持的最大数据集数量,即服务器端无法继续创建数据集。此时,服务器端向该客户端发送数据集创建失败消息。After receiving the first data request sent by the client, the server determines the total number of datasets currently created. When the total number of datasets currently created is less than the maximum number of datasets, it indicates that the total number of datasets created by the server has not reached the maximum number of datasets that the server can support, that is, the server can continue to create datasets. At this time, the server creates a dataset whose identifier is the object identifier and whose type is the type of the first dataset, and sends a dataset creation success message to the client. When the total number of datasets currently created is not less than the maximum number of datasets, it indicates that the total number of datasets created by the server has reached the maximum number of datasets that the server can support, that is, the server cannot continue to create datasets. At this time, the server sends a dataset creation failure message to the client.
示例地,数据集创建条件包括:服务器端已创建的数据集不包括第一数据集,且服务器端已创建的数据集的总数量小于最大数据集数量。详细实现过程参考上述相关描述,此处不再赘述。For example, the dataset creation condition includes: the datasets created by the server do not include the first dataset, and the total number of datasets created by the server is less than the maximum number of datasets. The detailed implementation process is referred to the above related description, which will not be repeated here.
示例地,第一数据请求还携带第一数据集的生存期。这样,在服务器端基于该对象标识和第一数据集的类型创建第一数据集之后,还能够设置第一数据集的生存期为第一数据请求携带的生存期,以便于后续在检测到第一数据集的生存期到期时,删除第一数据集。当然,在实际应用中,还可能存在第一数据请求没有携带第一数据集的生存期的情况。此时,服务器端直接设置第一数据集的生存期为默认生存期。其中,默认生存期是事先设置的,例如默认生存期为1天。而且,默认生存期还能够按照不同的需求来调整。For example, the first data request also carries the lifetime of the first data set. In this way, after the server creates the first data set based on the object identifier and the type of the first data set, it can also set the lifetime of the first data set to the lifetime carried by the first data request, so that the first data set can be deleted when the lifetime of the first data set is detected to have expired. Of course, in actual applications, there may also be a situation where the first data request does not carry the lifetime of the first data set. At this time, the server directly sets the lifetime of the first data set to the default lifetime. Among them, the default lifetime is set in advance, for example, the default lifetime is 1 day. Moreover, the default lifetime can also be adjusted according to different requirements.
以上内容是以服务器端设置第一数据集的生存期为一个固定的时间长度为例,从第一数据集成功创建开始计时,在该时间长度到达时删除第一数据集。示例地,服务器端也可以为第一数据集设置临时标签,该临时标签指示服务器端在将第一数据集提交至相应数据集时就删除第一数据集。The above content takes the example that the server sets the lifetime of the first data set to a fixed time length, and the time starts from the successful creation of the first data set, and the first data set is deleted when the time length is reached. For example, the server can also set a temporary tag for the first data set, and the temporary tag instructs the server to delete the first data set when submitting the first data set to the corresponding data set.
可选地,在该客户端向服务器端发送第一数据请求,以指示服务器端创建第一数据集的情况下,第一数据请求还能够携带该客户端的标识。这样,在服务器端创建第一数据集之后,还能够基于该客户端的标识、该对象标识和第一数据集的类型,创建客户端标识、对象标识与数据集类型之间的对应关系。这样,通过该对应关系可以记录各个客户端指示服务器端所创建的各种类型的数据集。Optionally, when the client sends a first data request to the server to instruct the server to create a first data set, the first data request can also carry the identifier of the client. In this way, after the server creates the first data set, it can also create a correspondence between the client identifier, the object identifier, and the type of the data set based on the identifier of the client, the object identifier, and the type of the first data set. In this way, the various types of data sets created by each client instructing the server can be recorded through the correspondence.
其中,第一数据集的类型用于指示第一数据集的类型为候选数据集类型还是动态数据集类型。当然,在实际应用中,第一数据集的类型还可以为其他的类型,本申请实施例对此不做限定。The type of the first data set is used to indicate whether the type of the first data set is a candidate data set type or a dynamic data set type. Of course, in practical applications, the type of the first data set can also be other types, which is not limited in the embodiments of the present application.
第二种情况,第一数据请求指示对第一数据集进行删除,第一数据请求还携带该客户端的标识。此时,服务器端基于该对象标识和该客户端的标识,确定第一数据集是否满足数据集删除条件。在第一数据集满足数据集删除条件的情况下,服务器端基于该对象标识,删除第一数据集。在第一数据集不满足数据集删除条件的情况下,服务器端向该客户端发送数据集删除失败消息。In the second case, the first data request indicates that the first data set is to be deleted, and the first data request also carries the identifier of the client. At this time, the server determines whether the first data set meets the data set deletion condition based on the object identifier and the identifier of the client. If the first data set meets the data set deletion condition, the server deletes the first data set based on the object identifier. If the first data set does not meet the data set deletion condition, the server sends a data set deletion failure message to the client.
示例地,数据集删除条件包括:第一数据集是该客户端指示服务器端创建的。或者,第一数据集不是该客户端指示服务器端创建的,但该客户端具有管理权限。当然,在实际应用中,数据集删除条件还可以包括其他的条件,本申请实施例对此不做限定。For example, the data set deletion condition includes: the first data set is created by the client instructing the server. Alternatively, the first data set is not created by the client instructing the server, but the client has management authority. Of course, in actual applications, the data set deletion condition may also include other conditions, which are not limited in the embodiments of the present application.
也即是,不具有管理权限的客户端仅有权删除自己指示服务器端创建的自定义数据集,无权删除其他客户端指示服务器端创建的自定义数据集,从而避免其他客户端指示服务器端创建的自定义数据集被动删除。具有管理权限的客户端可以删除所有客户端指示服务器端创建的自定义数据集,以此来减少资源占用。That is, clients without management rights only have the right to delete custom datasets that they instruct the server to create, but not the right to delete custom datasets that other clients instruct the server to create, thus avoiding passive deletion of custom datasets that other clients instruct the server to create. Clients with management rights can delete custom datasets that all clients instruct the server to create, thereby reducing resource usage.
由于服务器端所能支持的最大数据集数量不是无限的,在服务器端已创建的数据集的总数量达到服务器端所能支持的最大数据集数量的情况下,具有管理权限的客户端可以强制删除生存期到期的数据集。Because the maximum number of datasets that the server can support is not unlimited, when the total number of datasets created on the server reaches the maximum number of datasets that the server can support, a client with management permissions can forcibly delete datasets whose lifetime has expired.
需要说明的是,在实际应用中,还可能存在该客户端主动删除其指示服务器端创建的第一数据集。即,在该客户端执行完第一任务,第一任务对应的第一数据集不再使用的情况下,该客户端向服务器端发送第一数据请求,第一数据请求指示服务器端删除第一数据集。It should be noted that, in actual applications, the client may actively delete the first data set that it instructs the server to create. That is, after the client completes the first task and the first data set corresponding to the first task is no longer used, the client sends a first data request to the server, and the first data request instructs the server to delete the first data set.
第三种情况,第一数据请求指示对第一数据集中的数据进行编辑操作,第一数据请求还携带待编辑的第一数据,编辑操作包括增加、修改、删除中的任一种。此时,服务器端基于该对象标识,对第一数据集执行关于第一数据的编辑操作。 In the third case, the first data request indicates to edit the data in the first data set, and the first data request also carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting. At this time, the server performs the editing operation on the first data in the first data set based on the object identifier.
基于上文描述,该对象标识为第一数据集的标识,或者,该对象标识为第一任务的标识。在不同的情况下,服务器端基于该对象标识,对第一数据集执行关于第一数据的编辑操作的方式不同,接下来将分别进行描述。Based on the above description, the object identifier is the identifier of the first data set, or the object identifier is the identifier of the first task. In different cases, the server performs the editing operation on the first data set based on the object identifier in different ways, which will be described below respectively.
(1)该对象标识为第一数据集的标识。服务器端接收到该客户端发送的第一数据请求之后,基于第一数据集的标识和待编辑的第一数据,对第一数据集执行关于第一数据的编辑操作。(1) The object identifier is the identifier of the first data set. After receiving the first data request sent by the client, the server performs an editing operation on the first data set based on the identifier of the first data set and the first data to be edited.
可选地,第一数据请求还可以指示查询第一数据集中的数据。即,在该客户端需要对服务器端的数据进行查询的情况下,该客户端向服务器端发送第一数据请求,第一数据请求携带第一数据集的标识和查询信息。服务器端接收到该客户端发送的第一数据请求之后,基于第一数据集的标识,从已创建的数据集中确定第一数据集,进而基于查询信息在第一数据集中查询相关数据,并向该客户端发送数据查询响应。Optionally, the first data request may also indicate a query for data in the first data set. That is, when the client needs to query the data on the server, the client sends a first data request to the server, and the first data request carries the identifier of the first data set and query information. After receiving the first data request sent by the client, the server determines the first data set from the created data sets based on the identifier of the first data set, and then queries the relevant data in the first data set based on the query information, and sends a data query response to the client.
(2)该对象标识为第一任务的标识。服务器端接收到该客户端发送的第一数据请求之后,基于第一任务的标识,确定已创建的数据集中是否存在第一任务所对应的第一数据集。在第一数据集存在的情况下,服务器端直接基于第一任务的标识和待编辑的第一数据,对第一数据集执行关于第一数据的编辑操作。(2) The object identifier is the identifier of the first task. After receiving the first data request sent by the client, the server determines whether the first data set corresponding to the first task exists in the created data set based on the identifier of the first task. If the first data set exists, the server directly performs an editing operation on the first data set based on the identifier of the first task and the first data to be edited.
可选地,第一数据请求还携带第一数据集的类型,这样,在第一数据集不存在且已创建的数据集的总数量小于最大数据集数量的情况下,服务器端先基于第一任务的标识和第一数据集的类型创建第一数据集。然后,服务器端再对第一数据集执行关于第一数据的编辑操作。Optionally, the first data request also carries the type of the first data set, so that when the first data set does not exist and the total number of created data sets is less than the maximum number of data sets, the server first creates the first data set based on the identifier of the first task and the type of the first data set. Then, the server performs the editing operation on the first data set.
也即是,服务器端在接收到第一数据请求,且已创建的数据集中不存在第一数据集的情况下,通过隐式创建的方式实时地为第一任务创建其对应的第一数据集,进而使得服务器端基于待编辑的第一数据,对第一数据集执行关于第一数据的编辑操作。That is, when the server receives a first data request and the first data set does not exist in the created data sets, it creates the corresponding first data set for the first task in real time through implicit creation, so that the server performs editing operations on the first data set based on the first data to be edited.
需要说明的是,服务器端按照上述方法实时地为第一任务创建第一数据集之后,还可以为第一数据集设置临时标签,该临时标签指示服务器端在将第一数据集提交至相应数据集时就删除第一数据集。It should be noted that after the server creates the first data set for the first task in real time according to the above method, it can also set a temporary tag for the first data set, which instructs the server to delete the first data set when submitting the first data set to the corresponding data set.
当然,在实际应用中,还可能存在服务器端已创建的数据集中不存在第一数据集,但已创建的数据集的总数量不小于最大数据集数量的情况。此时,服务器端向该客户端发送数据编辑操作失败消息。Of course, in actual applications, there may be a situation where the first data set does not exist in the data sets created by the server, but the total number of created data sets is not less than the maximum number of data sets. In this case, the server sends a data editing operation failure message to the client.
可选地,第一数据请求还可以指示查询第一数据集中的数据。即,在该客户端需要对服务器端的数据进行查询的情况下,该客户端向服务器端发送第一数据请求,第一数据请求携带第一任务的标识和查询信息。服务器端接收到该客户端发送的第一数据请求之后,基于第一任务的标识,确定已创建的数据集中是否存在第一任务所对应的第一数据集。在第一数据集存在的情况下,服务器端直接基于第一任务的标识,从已创建的数据集中确定第一数据集,进而基于查询信息在第一数据集中查询相关数据,并向该客户端发送数据查询响应。在第一数据集不存在的情况下,服务器端基于第一数据集的类型,从相应数据集中查询相关数据,并向该客户端发送数据查询响应,并不会基于第一任务的标识和第一数据集的类型创建第一数据集。Optionally, the first data request may also indicate a query for data in the first data set. That is, when the client needs to query the data on the server, the client sends a first data request to the server, and the first data request carries the identifier of the first task and the query information. After receiving the first data request sent by the client, the server determines whether the first data set corresponding to the first task exists in the created data set based on the identifier of the first task. In the case where the first data set exists, the server directly determines the first data set from the created data set based on the identifier of the first task, and then queries the relevant data in the first data set based on the query information, and sends a data query response to the client. In the case where the first data set does not exist, the server queries the relevant data from the corresponding data set based on the type of the first data set, and sends a data query response to the client, and does not create the first data set based on the identifier of the first task and the type of the first data set.
第四种情况,第一数据请求指示对服务器端进行配置。服务器端接收到该客户端发送的第一数据请求之后,基于第一数据请求携带的该对象标识,确定第一数据集的类型。在第一数据集的类型为候选数据集类型的情况下,服务器端基于该对象标识,将第一数据集存储的数据提交至运行数据集。在第一数据集的类型为动态数据集类型的情况下,服务器端基于该对象标识,将第一数据集存储的数据提交至操作数据集。In the fourth case, the first data request indicates that the server is to be configured. After receiving the first data request sent by the client, the server determines the type of the first data set based on the object identifier carried in the first data request. When the type of the first data set is a candidate data set type, the server submits the data stored in the first data set to the running data set based on the object identifier. When the type of the first data set is a dynamic data set type, the server submits the data stored in the first data set to the operating data set based on the object identifier.
第二方面,提供了一种数据管理方法,所述方法包括:In a second aspect, a data management method is provided, the method comprising:
客户端发送第一数据请求,第一数据请求携带对象标识,该对象标识指示第一数据集,第一数据集是为第一任务创建的自定义数据集,自定义数据集用于存储该客户端用来管理服务器端的数据,第一数据请求指示服务器端基于该对象标识,对第一数据集进行管理。The client sends a first data request, which carries an object identifier. The object identifier indicates a first data set. The first data set is a custom data set created for a first task. The custom data set is used to store data used by the client to manage a server. The first data request instructs the server to manage the first data set based on the object identifier.
其中,该对象标识为第一数据集的标识,或者,该对象标识为第一任务的标识。The object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
可选地,第一数据请求指示对第一数据集中的数据进行编辑操作,第一数据请求还携带待编辑的第一数据,编辑操作包括增加、修改、删除中的任一种。Optionally, the first data request indicates to perform an editing operation on the data in the first data set, and the first data request also carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting.
可选地,第一数据请求指示对服务器端进行配置,第一数据集的类型为候选数据集类型或者动态数据集类型。Optionally, the first data request indicates configuration of the server side, and the type of the first data set is a candidate data set type or a dynamic data set type.
可选地,第一数据请求指示对第一数据集进行删除,第一数据请求还携带该客户端的标识。Optionally, the first data request indicates deletion of the first data set, and the first data request also carries an identifier of the client.
可选地,第一数据请求指示服务器端创建第一数据集,第一数据请求还携带第一数据集的类型。Optionally, the first data request instructs the server to create a first data set, and the first data request also carries the type of the first data set.
可选地,第一数据请求还携带第一数据集的生存期。 Optionally, the first data request also carries the lifetime of the first data set.
第三方面,提供了一种数据管理装置,所述数据管理装置具有实现上述第一方面中数据管理方法行为的功能。所述数据管理装置包括至少一个模块,该至少一个模块用于实现上述第一方面所提供的数据管理方法。In a third aspect, a data management device is provided, wherein the data management device has the function of implementing the data management method in the first aspect. The data management device includes at least one module, and the at least one module is used to implement the data management method provided in the first aspect.
也即是,提供了一种数据管理装置,该装置应用于服务器端,该装置包括:That is, a data management device is provided, which is applied to a server side and includes:
接收模块,用于接收第一数据请求,第一数据请求携带对象标识,该对象标识指示第一数据集,第一数据集是为第一任务创建的自定义数据集,自定义数据集用于存储客户端用来管理服务器端的数据;A receiving module, configured to receive a first data request, the first data request carries an object identifier, the object identifier indicates a first data set, the first data set is a custom data set created for a first task, and the custom data set is used to store data used by a client to manage a server;
管理模块,用于基于该对象标识,对第一数据集进行管理。The management module is used to manage the first data set based on the object identifier.
可选地,该对象标识为第一数据集的标识,或者,该对象标识为第一任务的标识。Optionally, the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
可选地,第一数据请求指示对第一数据集中的数据进行编辑操作,第一数据请求还携带待编辑的第一数据,编辑操作包括增加、修改、删除中的任一种;Optionally, the first data request indicates to perform an editing operation on the data in the first data set, and the first data request further carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting;
管理模块具体用于:The management module is specifically used for:
基于该对象标识,对第一数据集执行关于第一数据的编辑操作。Based on the object identifier, an editing operation on the first data set is performed on the first data set.
可选地,第一数据请求指示对第一数据集中的数据进行编辑操作,第一数据请求还携带待编辑的第一数据,编辑操作包括增加、修改、删除中的任一种;Optionally, the first data request indicates to perform an editing operation on the data in the first data set, and the first data request further carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting;
管理模块具体用于:The management module is specifically used for:
在基于该对象标识确定第一数据集存在的情况下,基于该对象标识,对第一数据集执行关于第一数据的编辑操作。In a case where it is determined based on the object identifier that the first data set exists, an editing operation on the first data is performed on the first data set based on the object identifier.
可选地,第一数据请求还携带第一数据集的类型,管理模块具体用于:Optionally, the first data request further carries the type of the first data set, and the management module is specifically configured to:
在基于该对象标识确定第一数据集不存在,且服务器端已创建的数据集的总数量小于最大数据集数量的情况下,基于该对象标识和第一数据集的类型创建第一数据集;If it is determined based on the object identifier that the first data set does not exist and the total number of data sets created on the server is less than the maximum number of data sets, create the first data set based on the object identifier and the type of the first data set;
对第一数据集执行关于第一数据的编辑操作。An editing operation on the first data is performed on the first data set.
可选地,第一数据请求指示对服务器端进行配置,第一数据集的类型为候选数据集类型;Optionally, the first data request indicates configuration of the server side, and the type of the first data set is a candidate data set type;
管理模块具体用于:The management module is specifically used for:
基于该对象标识,将第一数据集存储的数据提交至运行数据集。Based on the object identifier, the data stored in the first data set is submitted to the running data set.
可选地,第一数据请求指示对服务器端进行配置,第一数据集的类型为动态数据集类型;Optionally, the first data request indicates configuration of the server side, and the type of the first data set is a dynamic data set type;
管理模块具体用于:The management module is specifically used for:
基于该对象标识,将第一数据集存储的数据提交至操作数据集。Based on the object identifier, the data stored in the first data set is submitted to the operation data set.
可选地,第一数据请求指示对第一数据集进行删除,第一数据请求还携带该客户端的标识;Optionally, the first data request indicates to delete the first data set, and the first data request also carries an identifier of the client;
管理模块具体用于:The management module is specifically used for:
在基于该对象标识和该客户端的标识,确定第一数据集满足数据集删除条件的情况下,基于该对象标识,删除第一数据集。When it is determined that the first data set meets the data set deletion condition based on the object identifier and the identifier of the client, the first data set is deleted based on the object identifier.
可选地,数据集删除条件包括:第一数据集是该客户端指示服务器端创建的;或者,第一数据集不是该客户端指示服务器端创建的,但该客户端具有管理权限。Optionally, the data set deletion condition includes: the first data set is created by the server side at the instruction of the client; or the first data set is not created by the server side at the instruction of the client, but the client has management authority.
可选地,第一数据请求指示服务器端创建第一数据集,第一数据请求还携带第一数据集的类型;Optionally, the first data request instructs the server to create a first data set, and the first data request also carries a type of the first data set;
管理模块具体用于:The management module is specifically used for:
在第一数据集满足数据集创建条件的情况下,基于该对象标识和第一数据集的类型创建第一数据集。When the first data set meets the data set creation condition, the first data set is created based on the object identifier and the type of the first data set.
可选地,数据集创建条件包括:服务器端已创建的数据集不包括第一数据集。Optionally, the data set creation condition includes: the data set created on the server side does not include the first data set.
可选地,数据集创建条件还包括:已创建的数据集的总数量小于最大数据集数量。Optionally, the data set creation condition further includes: the total number of created data sets is less than the maximum number of data sets.
可选地,第一数据请求还携带第一数据集的生存期;该装置还包括:Optionally, the first data request further carries a lifetime of the first data set; and the apparatus further comprises:
第一设置模块,用于设置第一数据集的生存期为第一数据请求携带的生存期。The first setting module is used to set the lifetime of the first data set to the lifetime carried in the first data request.
可选地,该装置还包括:Optionally, the device further comprises:
第二设置模块,用于设置第一数据集的生存期为默认生存期。The second setting module is used to set the lifetime of the first data set to a default lifetime.
可选地,该装置还包括:Optionally, the device further comprises:
删除模块,用于在检测到第一数据集的生存期到期时,删除第一数据集。The deleting module is used to delete the first data set when it is detected that the lifetime of the first data set expires.
可选地,该客户端通过网络配置管理协议对服务器端进行配置管理,网络配置管理协议包括但不限于网络配置协议NETCONF、表达性状态转移配置协议RESTCONF、约束应用协议管理接口CORECONF。 Optionally, the client performs configuration management on the server through a network configuration management protocol, where the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
第四方面,提供了一种数据管理装置,所述数据管理装置具有实现上述第二方面中数据管理方法行为的功能。所述数据管理装置包括至少一个模块,该至少一个模块用于实现上述第二方面所提供的数据管理方法。In a fourth aspect, a data management device is provided, wherein the data management device has the function of implementing the data management method in the second aspect. The data management device includes at least one module, and the at least one module is used to implement the data management method provided in the second aspect.
也即是,提供了一种数据管理装置,该装置应用于客户端,该装置包括:That is, a data management device is provided, which is applied to a client and includes:
发送模块,用于发送第一数据请求,第一数据请求携带对象标识,该对象标识指示第一数据集,第一数据集是为第一任务创建的自定义数据集,自定义数据集用于存储该客户端用来管理服务器端的数据,第一数据请求指示服务器端基于该对象标识,对第一数据集进行管理。A sending module is used to send a first data request, the first data request carries an object identifier, the object identifier indicates a first data set, the first data set is a custom data set created for a first task, the custom data set is used to store data used by the client to manage the server, and the first data request instructs the server to manage the first data set based on the object identifier.
可选地,该对象标识为第一数据集的标识,或者,该对象标识为第一任务的标识。Optionally, the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
可选地,第一数据请求指示对第一数据集中的数据进行编辑操作,第一数据请求还携带待编辑的第一数据,编辑操作包括增加、修改、删除中的任一种。Optionally, the first data request indicates to perform an editing operation on the data in the first data set, and the first data request also carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting.
可选地,第一数据请求指示对服务器端进行配置,第一数据集的类型为候选数据集类型或者动态数据集类型。Optionally, the first data request indicates configuration of the server side, and the type of the first data set is a candidate data set type or a dynamic data set type.
可选地,第一数据请求指示对第一数据集进行删除,第一数据请求还携带该客户端的标识。Optionally, the first data request indicates to delete the first data set, and the first data request also carries an identifier of the client.
可选地,第一数据请求指示服务器端创建第一数据集,第一数据请求还携带第一数据集的类型。Optionally, the first data request instructs the server to create a first data set, and the first data request also carries the type of the first data set.
可选地,第一数据请求还携带第一数据集的生存期。Optionally, the first data request also carries the lifetime of the first data set.
可选地,该客户端通过网络配置管理协议对服务器端进行配置管理,网络配置管理协议包括但不限于网络配置协议NETCONF、表达性状态转移配置协议RESTCONF、约束应用协议管理接口CORECONF。Optionally, the client performs configuration management on the server through a network configuration management protocol, where the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
第五方面,提供了一种服务器端,所述服务器端包括存储器和处理器,所述存储器用于存储执行上述第一方面所提供的数据管理方法的计算机程序。所述处理器被配置为用于执行所述存储器中存储的计算机程序,以实现上述第一方面所述的数据管理方法。In a fifth aspect, a server is provided, the server comprising a memory and a processor, the memory being used to store a computer program for executing the data management method provided in the first aspect. The processor is configured to execute the computer program stored in the memory to implement the data management method described in the first aspect.
可选地,所述服务器端还可以包括通信总线,该通信总线用于该处理器与存储器之间建立连接。Optionally, the server side may further include a communication bus, and the communication bus is used to establish a connection between the processor and the memory.
第六方面,提供了一种客户端,所述客户端包括存储器和处理器,所述存储器用于存储执行上述第二方面所提供的数据管理方法的计算机程序。所述处理器被配置为用于执行所述存储器中存储的计算机程序,以实现上述第二方面所述的数据管理方法。In a sixth aspect, a client is provided, the client comprising a memory and a processor, the memory being used to store a computer program for executing the data management method provided in the second aspect. The processor is configured to execute the computer program stored in the memory to implement the data management method described in the second aspect.
可选地,所述客户端还可以包括通信总线,该通信总线用于该处理器与存储器之间建立连接。Optionally, the client may further include a communication bus, and the communication bus is used to establish a connection between the processor and the memory.
第七方面,提供了一种数据管理系统,所述数据管理系统包括服务器端和客户端。服务器端用于实现上述第一方面所提供的数据管理方法的步骤,客户端用于实现上述第二方面所提供的数据管理方法的步骤。In a seventh aspect, a data management system is provided, the data management system comprising a server and a client. The server is used to implement the steps of the data management method provided in the first aspect, and the client is used to implement the steps of the data management method provided in the second aspect.
第八方面,提供了一种计算机可读存储介质,所述存储介质内存储有指令,当所述指令在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的数据管理方法的步骤。In an eighth aspect, a computer-readable storage medium is provided, wherein the storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the steps of the data management method described in the first aspect or the second aspect.
第九方面,提供了一种包含指令的计算机程序产品,当所述指令在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的数据管理方法的步骤。或者说,提供了一种计算机程序,当所述计算机程序在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的数据管理方法的步骤。In a ninth aspect, a computer program product comprising instructions is provided, and when the instructions are executed on a computer, the computer is caused to execute the steps of the data management method described in the first aspect or the second aspect. In other words, a computer program is provided, and when the computer program is executed on a computer, the computer is caused to execute the steps of the data management method described in the first aspect or the second aspect.
上述第二方面至第九方面所获得的技术效果与第一方面中对应的技术手段获得的技术效果近似,在这里不再赘述。The technical effects obtained in the above-mentioned second to ninth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例提供的一种业务场景的示意图;FIG1 is a schematic diagram of a business scenario provided in an embodiment of the present application;
图2是本申请实施例提供的另一种业务场景的示意图;FIG2 is a schematic diagram of another business scenario provided in an embodiment of the present application;
图3是本申请实施例提供的一种数据管理系统的架构示意图;FIG3 is a schematic diagram of the architecture of a data management system provided in an embodiment of the present application;
图4是本申请实施例提供的一种数据管理方法的流程图;FIG4 is a flow chart of a data management method provided in an embodiment of the present application;
图5是本申请实施例提供的一种数据管理流程的示意图; FIG5 is a schematic diagram of a data management process provided in an embodiment of the present application;
图6是本申请实施例提供的一种数据管理装置的结构示意图;FIG6 is a schematic diagram of the structure of a data management device provided in an embodiment of the present application;
图7是本申请实施例提供的另一种数据管理装置的结构示意图;FIG7 is a schematic diagram of the structure of another data management device provided in an embodiment of the present application;
图8是本申请实施例提供的一种通信设备的结构示意图。FIG8 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
为了便于理解,首先对本申请实施例中所涉及的部分名词和术语进行解释。To facilitate understanding, some nouns and terms involved in the embodiments of the present application are first explained.
YANG(yet another next generation):一种适用于NETCONF的数据建模语言。YANG (yet another next generation): a data modeling language for NETCONF.
YANG模型:使用YANG数据建模语言建立的数据模型被称为是YANG模型。YANG模型可以由客户端和服务器端进行维护。YANG模型以数据节点的形式表达服务器端的数据,使用YANG模型实例化后的数据可以以可扩展标记语言XML(extensible markup language)的编码格式存储。YANG model: A data model built using the YANG data modeling language is called a YANG model. YANG models can be maintained by clients and servers. YANG models express server-side data in the form of data nodes. Data instantiated using the YANG model can be stored in the encoding format of the extensible markup language XML (Extensible Markup Language).
客户端/服务器端(client/server,C/S)架构:网管设备、管理设备或控制器为客户端,网络设备(如路由器、交换机、网桥等网元设备)为服务器端。在本申请实施例中,客户端与服务器端之间基于网络配置管理协议进行通信。网络配置管理协议包括但不限于NETCONF、表达性状态转移配置协议(representational state transfer configuration protocol,RESCONF)、约束应用协议管理接口(constrained application protocol management interface,CORECONF)。Client/server (C/S) architecture: network management equipment, management equipment or controller is the client, and network equipment (such as routers, switches, bridges and other network element devices) is the server. In the embodiment of the present application, the client and the server communicate based on the network configuration management protocol. The network configuration management protocol includes but is not limited to NETCONF, representational state transfer configuration protocol (RESCONF), and constrained application protocol management interface (CORECONF).
候选数据集:一种配置数据集,用于服务器端存储已配置但未生效的配置数据。Candidate data set: A configuration data set used by the server to store configuration data that has been configured but not yet effective.
运行数据集:一种配置数据集,用于服务器端存储已配置且正在生效的配置数据。Running data set: A configuration data set used by the server to store the configured and effective configuration data.
动态数据集:一种数据集,用于服务器端存储动态数据,如路由信息和转发表等。Dynamic data set: A data set used to store dynamic data on the server side, such as routing information and forwarding tables.
操作数据集:一种数据集,用于服务器端存储操作数据,包括在任务上生效的配置数据、路由信息、转发表、状态信息,以及各种统计数据和其他衍生数据等。Operational data set: A data set used to store operational data on the server side, including configuration data, routing information, forwarding tables, status information, various statistical data, and other derived data that are effective on the task.
其次对本申请实施例涉及的业务场景进行介绍。Secondly, the business scenarios involved in the embodiments of the present application are introduced.
本申请实施例提供的数据管理方法能够应用于多种场景,例如,客户端的多个任务并行的场景,即一个客户端同时执行多个任务。如图1所示,客户端1同时执行任务1、任务2和任务3。任务1涉及A业务和B业务,任务2涉及B业务和C业务,任务3涉及C业务和D业务。客户端1通过本申请实施例提供的方法分别为任务1创建自定义数据集1、为任务2创建自定义数据集2,以及为任务3创建自定义数据集3。然后,客户端1分别向服务器端发送三个数据请求,以对该三个自定义数据集分别进行管理。The data management method provided in the embodiment of the present application can be applied to a variety of scenarios, for example, a scenario in which multiple tasks of the client are performed in parallel, that is, a client performs multiple tasks at the same time. As shown in Figure 1, client 1 performs tasks 1, 2, and 3 at the same time. Task 1 involves business A and business B, task 2 involves business B and business C, and task 3 involves business C and business D. Client 1 creates custom data set 1 for task 1, custom data set 2 for task 2, and custom data set 3 for task 3 through the method provided in the embodiment of the present application. Then, client 1 sends three data requests to the server respectively to manage the three custom data sets respectively.
又例如,服务器端接入多个客户端的场景,该多个客户端中的每个客户端均执行一个任务。如图2所示,客户端1、客户端2以及客户端3均与服务器端建立会话连接。其中,客户端1和客户端2当前需要管理服务器端的数据,客户端3当前需要查询服务器端的数据。即,客户端1的任务用于对服务器端的数据进行管理,客户端2的任务也用于对服务器端的数据进行管理,客户端3的任务用于对服务器端的数据进行查询,所以,客户端1和客户端2通过本申请实施例提供的方法指示服务器端分别创建各自任务所对应的自定义数据集,以得到自定义数据集1和自定义数据集2。这样,来源于不同客户端的不同数据管理任务对应不同的自定义数据集,以便于服务器端后续基于各个自定义数据集的标识或各个任务的标识,对相应数据管理任务所对应的数据集进行管理。此外,由于客户端3的任务用于查询服务器端的数据,所以客户端3不需要请求服务器端创建数据查询任务所对应的自定义数据集,即各个客户端可以按照需求来创建每个任务对应的自定义数据集。For another example, a scenario where a server accesses multiple clients, each of which performs a task. As shown in FIG2 , client 1, client 2, and client 3 all establish a session connection with the server. Among them, client 1 and client 2 currently need to manage the data on the server, and client 3 currently needs to query the data on the server. That is, the task of client 1 is used to manage the data on the server, the task of client 2 is also used to manage the data on the server, and the task of client 3 is used to query the data on the server, so client 1 and client 2 instruct the server to create custom data sets corresponding to their respective tasks through the method provided in the embodiment of the present application, so as to obtain custom data set 1 and custom data set 2. In this way, different data management tasks from different clients correspond to different custom data sets, so that the server can subsequently manage the data sets corresponding to the corresponding data management tasks based on the identifiers of each custom data set or the identifiers of each task. In addition, since the task of client 3 is used to query the data on the server, client 3 does not need to request the server to create a custom data set corresponding to the data query task, that is, each client can create a custom data set corresponding to each task according to demand.
最后对本申请实施例涉及的系统架构进行介绍。Finally, the system architecture involved in the embodiments of the present application is introduced.
请参考图3,图3是本申请实施例提供的一种数据管理系统的架构示意图,该系统是C/S架构。也即是,该系统包括多个客户端301(图3中以两个客户端示意性说明)和服务器端302。该多个客户端中的各个客户端均与服务器端302通过有线或无线方式连接以进行通信。如图3所示,各个客户端301与服务器端302之间通过网际协议(internet protocol,IP)网络进行通信。Please refer to Figure 3, which is a schematic diagram of the architecture of a data management system provided in an embodiment of the present application, and the system is a C/S architecture. That is, the system includes multiple clients 301 (two clients are schematically illustrated in Figure 3) and a server 302. Each of the multiple clients is connected to the server 302 by wire or wireless means for communication. As shown in Figure 3, each client 301 communicates with the server 302 through an Internet protocol (IP) network.
客户端301用于向服务器端302发送第一数据请求,第一数据请求携带对象标识。该对象标识为第一 数据集的标识,或者,该对象标识为第一任务的标识。服务器端302用于接收客户端301发送的第一数据请求,并基于第一数据请求所携带的对象标识,对第一数据集进行管理。其中,服务器端302对第一数据集的管理包括创建(create)第一数据集、编辑(edit)第一数据集中的数据、提交(commit)第一数据集或删除(delete)第一数据集等操作中的任一种。The client 301 is used to send a first data request to the server 302, and the first data request carries an object identifier. The object identifier is the first The server 302 is used to receive the first data request sent by the client 301, and manage the first data set based on the object identifier carried by the first data request. The management of the first data set by the server 302 includes any one of the operations of creating the first data set, editing the data in the first data set, submitting the first data set, or deleting the first data set.
其中,客户端301可以被安装和部署在任一种计算机设备上,例如服务器、台式电脑、笔记本电脑、手机等,还可以被安装和部署在云平台的计算和存储资源上。服务器端302可以是路由器、交换机、网关、防火墙等网络设备。The client 301 can be installed and deployed on any computer device, such as a server, desktop computer, laptop computer, mobile phone, etc., and can also be installed and deployed on the computing and storage resources of a cloud platform. The server 302 can be a network device such as a router, switch, gateway, firewall, etc.
本领域技术人员应能理解上述客户端301和服务器端302仅为举例,其他现有的或今后可能出现的客户端或服务器端如可适用于本申请实施例,也应包含在本申请实施例保护范围以内,并在此以引用方式包含于此。Those skilled in the art should understand that the above-mentioned client 301 and server 302 are only examples, and other existing or future clients or servers that are applicable to the embodiments of the present application should also be included in the protection scope of the embodiments of the present application and are included here by reference.
需要说明的是,本申请实施例描述的业务场景和系统架构是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着新业务场景的出现和系统架构的演变,本申请实施例提供的技术方案对于类似的技术问题,同样适用。It should be noted that the business scenarios and system architectures described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the emergence of new business scenarios and the evolution of system architectures, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
图4是本申请实施例提供的一种数据管理方法的流程图。请参考图4,该方法包括如下步骤。Fig. 4 is a flow chart of a data management method provided in an embodiment of the present application. Referring to Fig. 4, the method includes the following steps.
步骤401:客户端发送第一数据请求,第一数据请求携带对象标识,该对象标识指示第一数据集,第一数据集是为第一任务创建的自定义数据集,该自定义数据集用于存储该客户端用来管理服务器端的数据。Step 401: the client sends a first data request, the first data request carries an object identifier, the object identifier indicates a first data set, the first data set is a custom data set created for a first task, and the custom data set is used to store data used by the client to manage the server.
在一些实施例中,该对象标识为第一数据集的标识。客户端与服务器端建立会话连接之后,在客户端需要对服务器端的数据进行管理的情况下,该客户端向服务器端发送第一数据请求。由于第一数据请求携带该客户端指示服务器端为第一任务所创建的自定义数据集的标识,所以,服务器端能够基于第一数据集的标识,仅对该客户端的第一任务所对应的自定义数据集进行管理,从而能够避免服务器端同时对其他客户端的任务或该客户端的其他任务对应的自定义数据集进行管理。In some embodiments, the object identifier is an identifier of the first data set. After the client establishes a session connection with the server, when the client needs to manage the data on the server, the client sends a first data request to the server. Since the first data request carries the identifier of the custom data set that the client instructs the server to create for the first task, the server can manage only the custom data set corresponding to the first task of the client based on the identifier of the first data set, thereby avoiding the server from managing tasks of other clients or custom data sets corresponding to other tasks of the client at the same time.
在另一些实施例中,该对象标识为第一任务的标识。客户端与服务器端建立会话连接之后,在客户端需要通过第一任务对服务器端的数据进行管理的情况下,该客户端向服务器端发送第一数据请求。由于第一数据请求携带第一任务的标识,所以,服务器端能够基于第一任务的标识,仅对该客户端的第一任务所对应的自定义数据集进行管理,从而能够避免服务器端同时对其他客户端的任务或该客户端的其他任务对应的自定义数据集进行管理。In some other embodiments, the object identifier is an identifier of the first task. After the client establishes a session connection with the server, when the client needs to manage the data on the server through the first task, the client sends a first data request to the server. Since the first data request carries the identifier of the first task, the server can manage only the custom data set corresponding to the first task of the client based on the identifier of the first task, thereby avoiding the server from managing tasks of other clients or custom data sets corresponding to other tasks of the client at the same time.
当然,在实际应用中,该对象标识还可以为其他的标识,只要该对象标识能够指示第一数据集即可,本申请实施例对此不做限定。Of course, in practical applications, the object identifier may also be other identifiers, as long as the object identifier can indicate the first data set, and the embodiment of the present application does not limit this.
也即是,在本申请实施例中,各个客户端按照任务需求指示服务器端创建自定义数据集,一个任务对应一个自定义数据集,任一客户端指示服务器端对该客户端的任一任务所对应的自定义数据集进行管理,从而解决多个客户端或多个任务共享一个数据集造成数据冲突的问题。此外,各个客户端是按照任务需求创建的自定义数据集,只有在某个客户端需要对服务器端的数据进行管理的情况下,该客户端才按照执行任务的数量指示服务器端创建一个或多个自定义数据集,并不是在各个客户端与服务器端建立会话连接之后,各个客户端就指示服务器端创建自定义数据集。这样,能够解决每个与服务器端建立会话连接的客户端均指示服务器端创建自定义数据集造成的资源浪费问题。That is, in the embodiment of the present application, each client instructs the server to create a custom data set according to the task requirements, one task corresponds to one custom data set, and any client instructs the server to manage the custom data set corresponding to any task of the client, thereby solving the problem of data conflicts caused by multiple clients or multiple tasks sharing one data set. In addition, each client creates a custom data set according to the task requirements. Only when a certain client needs to manage the data on the server side, the client instructs the server to create one or more custom data sets according to the number of tasks to be executed. It is not that each client instructs the server to create a custom data set after establishing a session connection with the server. In this way, it is possible to solve the problem of resource waste caused by each client that establishes a session connection with the server instructing the server to create a custom data set.
步骤402:服务器端接收第一数据请求,基于该对象标识,对第一数据集进行管理。Step 402: The server receives the first data request and manages the first data set based on the object identifier.
基于上文描述,服务器端对第一数据集的管理包括创建第一数据集、编辑第一数据集中的数据、提交第一数据集或删除第一数据集等操作中的任一种。在第一数据请求指示的信息不同的情况下,服务器端基于该对象标识,对第一数据集进行管理的方式不同,接下来将分为以下四种情况分别进行说明。Based on the above description, the management of the first data set by the server includes any one of the operations of creating the first data set, editing the data in the first data set, submitting the first data set, or deleting the first data set. In the case where the information indicated by the first data request is different, the server manages the first data set in different ways based on the object identifier, which will be described in the following four cases.
第一种情况,第一数据请求指示服务器端创建第一数据集,第一数据请求还携带第一数据集的类型。此时,服务器端基于该对象标识,确定第一数据集是否满足数据集创建条件。在第一数据集满足数据集创建条件的情况下,服务器端基于该对象标识和第一数据集的类型创建第一数据集。在第一数据集不满足数据集创建条件的情况下,服务器端向该客户端发送数据集创建失败消息。In the first case, the first data request instructs the server to create a first data set, and the first data request also carries the type of the first data set. At this time, the server determines whether the first data set meets the data set creation condition based on the object identifier. If the first data set meets the data set creation condition, the server creates the first data set based on the object identifier and the type of the first data set. If the first data set does not meet the data set creation condition, the server sends a data set creation failure message to the client.
在一些实施例中,数据集创建条件包括:服务器端已创建的数据集不包括第一数据集。In some embodiments, the data set creation condition includes: the data sets created on the server side do not include the first data set.
服务器端接收到该客户端发送的第一数据请求之后,基于第一数据请求携带的该对象标识,从已创建的数据集中查询是否存在第一数据集。如果已创建的数据集中存在第一数据集,表明服务器端当前已经创 建了第一数据集。此时,服务器端向该客户端发送数据集创建失败消息。如果已创建的数据集中不存在第一数据集,表明服务器端当前并未创建第一数据集。此时,服务器端创建标识为该对象标识,且类型为第一数据集的类型的数据集,并向该客户端发送数据集创建成功消息。After receiving the first data request sent by the client, the server queries whether the first data set exists in the created data sets based on the object identifier carried in the first data request. If the first data set exists in the created data sets, it indicates that the server has currently created The first dataset is created. At this time, the server sends a dataset creation failure message to the client. If the first dataset does not exist in the created datasets, it indicates that the server has not currently created the first dataset. At this time, the server creates a dataset whose identifier is the object identifier and whose type is the type of the first dataset, and sends a dataset creation success message to the client.
基于上文描述,该对象标识为第一数据集的标识,或者,该对象标识为第一任务的标识。在该对象标识为第一数据集的标识的情况下,服务器端基于该对象标识,从已创建的数据集中查询是否存在第一数据集的实现过程包括:服务器端基于第一数据集的标识,从已创建的数据集中查询是否存在数据集标识与第一数据集的标识相同的数据集。如果已创建的数据集中存在数据集标识与第一数据集标识相同的数据集,表明已创建的数据集中存在第一数据集。如果已创建的数据集中不存在数据集标识与第一数据集标识相同的数据集,表明已创建的数据集中并不存在第一数据集。在该对象标识为第一任务的标识的情况下,由于服务器端按照客户端指示为各个任务创建完其对应的自定义数据集之后,还存储有任务标识与数据集之间的对应关系。所以,服务器端接收到该客户端发送的第一数据请求之后,基于第一数据请求携带的第一任务的标识,从存储的任务标识与数据集之间的对应关系中,确定已创建的数据集中是否存在第一任务的标识所对应的第一数据集。Based on the above description, the object identifier is the identifier of the first data set, or the object identifier is the identifier of the first task. In the case where the object identifier is the identifier of the first data set, the server end queries whether the first data set exists from the created data set based on the object identifier, including: the server end queries whether there is a data set whose data set identifier is the same as the identifier of the first data set from the created data set based on the identifier of the first data set. If there is a data set whose data set identifier is the same as the identifier of the first data set in the created data set, it indicates that the first data set exists in the created data set. If there is no data set whose data set identifier is the same as the identifier of the first data set in the created data set, it indicates that the first data set does not exist in the created data set. In the case where the object identifier is the identifier of the first task, since the server end has created the corresponding custom data set for each task according to the instructions of the client, the corresponding relationship between the task identifier and the data set is also stored. Therefore, after receiving the first data request sent by the client, the server end determines whether there is a first data set corresponding to the identifier of the first task in the created data set based on the identifier of the first task carried in the first data request from the corresponding relationship between the stored task identifier and the data set.
在另一些实施例中,数据集创建条件包括:服务器端已创建的数据集的总数量小于最大数据集数量。其中,最大数据集数量是事先设置的,例如最大数据集数量为15。而且,最大数据集数量还能够按照不同的需求来调整。In some other embodiments, the data set creation condition includes: the total number of data sets created by the server is less than the maximum number of data sets. The maximum number of data sets is set in advance, for example, the maximum number of data sets is 15. Moreover, the maximum number of data sets can also be adjusted according to different requirements.
服务器端接收到该客户端发送的第一数据请求之后,确定当前已创建的数据集的总数量。在当前已创建的数据集的总数量小于最大数据集数量的情况下,表明服务器端已创建的数据集的总数量并没有达到服务器端所能支持的最大数据集数量,即服务器端还能够继续创建数据集。此时,服务器端创建标识为该对象标识,且类型为第一数据集的类型的数据集,并向该客户端发送数据集创建成功消息。在当前已创建的数据集的总数量不小于最大数据集数量的情况下,表明服务器端已创建的数据集的总数量已经达到服务器端所能支持的最大数据集数量,即服务器端无法继续创建数据集。此时,服务器端向该客户端发送数据集创建失败消息。After receiving the first data request sent by the client, the server determines the total number of datasets currently created. When the total number of datasets currently created is less than the maximum number of datasets, it indicates that the total number of datasets created by the server has not reached the maximum number of datasets that the server can support, that is, the server can continue to create datasets. At this time, the server creates a dataset whose identifier is the object identifier and whose type is the type of the first dataset, and sends a dataset creation success message to the client. When the total number of datasets currently created is not less than the maximum number of datasets, it indicates that the total number of datasets created by the server has reached the maximum number of datasets that the server can support, that is, the server cannot continue to create datasets. At this time, the server sends a dataset creation failure message to the client.
在另一些实施例中,数据集创建条件包括:服务器端已创建的数据集不包括第一数据集,且服务器端已创建的数据集的总数量小于最大数据集数量。In some other embodiments, the data set creation condition includes: the data sets already created on the server side do not include the first data set, and the total number of data sets already created on the server side is less than the maximum number of data sets.
服务器端接收到该客户端发送的第一数据请求之后,基于第一数据请求携带的该对象标识,从已创建的数据集中查询是否存在第一数据集。如果已创建的数据集中存在第一数据集,表明服务器端当前已经创建了第一数据集。此时,服务器端向该客户端发送数据集创建失败消息。After receiving the first data request sent by the client, the server queries whether the first data set exists in the created data sets based on the object identifier carried in the first data request. If the first data set exists in the created data sets, it indicates that the server has currently created the first data set. At this time, the server sends a data set creation failure message to the client.
如果已创建的数据集中不存在第一数据集,表明服务器端当前并未创建第一数据集。然后,服务器端确定当前已创建的数据集的总数量。在当前已创建的数据集的总数量小于最大数据集数量的情况下,表明服务器端已创建的数据集的总数量并没有达到服务器端所能支持的最大数据集数量,即服务器端还能够继续创建数据集。此时,服务器端创建标识为该对象标识,且类型为第一数据集的类型的数据集,并向该客户端发送数据集创建成功消息。在当前已创建的数据集的总数量不小于最大数据集数量的情况下,表明服务器端已创建的数据集的总数量已经达到服务器端所能支持的最大数据集数量,即服务器端无法继续创建数据集。此时,服务器端向该客户端发送数据集创建失败消息。If the first dataset does not exist in the created datasets, it indicates that the server has not currently created the first dataset. Then, the server determines the total number of datasets currently created. When the total number of datasets currently created is less than the maximum number of datasets, it indicates that the total number of datasets created by the server has not reached the maximum number of datasets that the server can support, that is, the server can continue to create datasets. At this time, the server creates a dataset whose identifier is the object identifier and whose type is the type of the first dataset, and sends a dataset creation success message to the client. When the total number of datasets currently created is not less than the maximum number of datasets, it indicates that the total number of datasets created by the server has reached the maximum number of datasets that the server can support, that is, the server cannot continue to create datasets. At this time, the server sends a dataset creation failure message to the client.
需要说明的是,在数据集创建条件包括:服务器端已创建的数据集不包括第一数据集,且服务器端已创建的数据集的总数量小于最大数据集数量的情况下,服务器端按照上述步骤先查询已创建的数据集是否包括第一数据集,再确定当前已创建的数据集的总数量是否小于最大数据集数量仅为一种示例。在实际应用中,服务器端还可以先确定当前已创建的数据集的总数量是否小于最大数据集数量,再查询已创建的数据集是否包括第一数据集,本申请实施例对此不做限定。当然,在实际应用中,数据集创建条件还可以包括其他的条件,本申请实施例对此不做限定。It should be noted that, when the dataset creation condition includes: the datasets created by the server end do not include the first dataset, and the total number of datasets created by the server end is less than the maximum number of datasets, the server end first queries whether the created datasets include the first dataset according to the above steps, and then determines whether the total number of currently created datasets is less than the maximum number of datasets. This is only an example. In actual applications, the server end may also first determine whether the total number of currently created datasets is less than the maximum number of datasets, and then query whether the created datasets include the first dataset. This embodiment of the present application does not limit this. Of course, in actual applications, the dataset creation condition may also include other conditions, which are not limited in this embodiment of the present application.
基于上文描述,在服务器端创建第一数据集失败的情况下,服务器端会向该客户端发送数据集创建失败消息。可选地,该创建失败消息还可以包括数据集创建失败的原因。Based on the above description, when the server fails to create the first data set, the server will send a data set creation failure message to the client. Optionally, the creation failure message may also include the reason for the failure to create the data set.
在一些实施例中,第一数据请求还携带第一数据集的生存期。这样,在服务器端基于该对象标识和第一数据集的类型创建第一数据集之后,还能够设置第一数据集的生存期为第一数据请求携带的生存期,以便于后续在检测到第一数据集的生存期到期时,删除第一数据集。当然,在实际应用中,还可能存在第一数据请求没有携带第一数据集的生存期的情况。此时,服务器端直接设置第一数据集的生存期为默认生存 期。其中,默认生存期是事先设置的,例如默认生存期为1天。而且,默认生存期还能够按照不同的需求来调整。In some embodiments, the first data request also carries the lifetime of the first data set. In this way, after the server creates the first data set based on the object identifier and the type of the first data set, it can also set the lifetime of the first data set to the lifetime carried by the first data request, so that when the lifetime of the first data set is detected to have expired, the first data set can be deleted. Of course, in actual applications, there may also be a situation where the first data request does not carry the lifetime of the first data set. In this case, the server directly sets the lifetime of the first data set to the default lifetime. The default lifetime is set in advance, for example, the default lifetime is 1 day. Moreover, the default lifetime can be adjusted according to different needs.
以上内容是以服务器端设置第一数据集的生存期为一个固定的时间长度为例,从第一数据集成功创建开始计时,在该时间长度到达时删除第一数据集。在另一些实施例中,服务器端也可以为第一数据集设置临时标签,该临时标签指示服务器端在将第一数据集提交至相应数据集时就删除第一数据集。The above content takes the example of setting the life span of the first data set to a fixed time length on the server side, starting from the successful creation of the first data set, and deleting the first data set when the time length is reached. In other embodiments, the server side may also set a temporary tag for the first data set, and the temporary tag instructs the server side to delete the first data set when submitting the first data set to the corresponding data set.
示例地,服务器端接收到该客户端发送的第一数据请求如下所示:
For example, the server receives the first data request sent by the client as follows:
其中,<rpc message-id=“1”xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">代表XML编码格式定义的报文头,即使用YANG模型实例化后的服务器端的数据以XML的编码格式存储。<create-datastore>代表创建数据集的操作,<create-datastore>中的参数包括<name>、<type>和<lifetime>。<name>参数携带第一数据集的标识“my-datastore”,<type>参数携带第一数据集的类型“候选数据集类型”,<lifetime>参数携带第一数据集的生存期“1day”。Among them, <rpc message-id="1"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> represents the message header defined in the XML encoding format, that is, the server-side data instantiated using the YANG model is stored in the XML encoding format. <create-datastore> represents the operation of creating a data set. The parameters in <create-datastore> include <name>, <type>, and <lifetime>. The <name> parameter carries the identifier of the first data set "my-datastore", the <type> parameter carries the type of the first data set "candidate data set type", and the <lifetime> parameter carries the lifetime of the first data set "1day".
需要说明的是,在上述所提及的第一数据请求中通过时间段“1day”指示第一数据集的生存期仅为一种示例,在另一些实施例中,还能够通过其他的方式指示第一数据集的生存期。示例地,通过时间节点指示第一数据集的生存期。例如,<lifetime>参数携带第一数据集的生存期“11.23.2022”,表明第一数据集的生存期截止到2022年11月23日。It should be noted that the use of the time period "1day" in the first data request mentioned above to indicate the lifetime of the first data set is only an example. In other embodiments, the lifetime of the first data set can also be indicated in other ways. For example, the lifetime of the first data set is indicated by a time node. For example, the <lifetime> parameter carries the lifetime of the first data set "11.23.2022", indicating that the lifetime of the first data set expires on November 23, 2022.
在第一数据集满足数据集创建条件的情况下,服务器端基于该对象标识和第一数据集的类型创建第一数据集之后,服务器端向该客户端发送的数据集创建成功消息如下所示:
When the first dataset meets the dataset creation condition, after the server creates the first dataset based on the object identifier and the type of the first dataset, the dataset creation success message sent by the server to the client is as follows:
在由于服务器端当前已经创建了第一数据集而导致第一数据集创建失败的情况下,服务器端向该客户端发送的数据集创建失败消息如下所示:
In the case where the first dataset fails to be created because the server has already created the first dataset, the dataset creation failure message sent by the server to the client is as follows:
其中,<rpc-error>中的参数包括<error-type>、<error-tag>、<error-severity>和<error-message>。<error-type>参数中的内容指示第一数据集创建失败的类型为“application”,即由于应用层出错导致第一数据集创建失 败。<error-tag>参数中的内容指示第一数据集创建失败的标签为“data-exists”,即服务器端当前已经创建了第一数据集。<error-severity>参数中的内容指示第一数据集创建失败的严重程度为“error”。<error-message>参数中的内容指示第一数据集创建失败的消息为“The datastore to be created exists”,即由于服务器端当前已经创建了第一数据集而导致第一数据集创建失败。The parameters in <rpc-error> include <error-type>, <error-tag>, <error-severity>, and <error-message>. The content in the <error-type> parameter indicates that the type of the failure to create the first data set is "application", that is, the failure to create the first data set is due to an error in the application layer. The content in the <error-tag> parameter indicates that the tag of the failure to create the first dataset is "data-exists", that is, the server has already created the first dataset. The content in the <error-severity> parameter indicates that the severity of the failure to create the first dataset is "error". The content in the <error-message> parameter indicates that the message of the failure to create the first dataset is "The datastore to be created exists", that is, the first dataset failed to be created because the server has already created the first dataset.
在由于服务器端当前已创建的数据集的总数量不小于最大数据集数量而导致第一数据集创建失败的情况下,服务器端向该客户端发送的数据集创建失败消息如下所示:
In the case where the creation of the first dataset fails because the total number of datasets currently created by the server is not less than the maximum number of datasets, the dataset creation failure message sent by the server to the client is as follows:
其中,<rpc-error>中的参数包括<error-type>、<error-tag>、<error-severity>和<error-message>。<error-type>参数中的内容指示第一数据集创建失败的类型为“protocol”,即由于协议层出错导致第一数据集创建失败。<error-tag>参数中的内容指示第一数据集创建失败的标签为“resource-denied”,即服务器端当前资源不足。<error-severity>参数中的内容指示第一数据集创建失败的严重程度为“error”。<error-message>参数中的内容指示第一数据集创建失败的消息为“Reach the max number of customized datastore”,即由于服务器端当前已创建的数据集的总数量达到服务器端所能支持的最大数据集数量而导致第一数据集创建失败。The parameters in <rpc-error> include <error-type>, <error-tag>, <error-severity>, and <error-message>. The content in the <error-type> parameter indicates that the type of failure to create the first dataset is "protocol", that is, the failure to create the first dataset is due to an error in the protocol layer. The content in the <error-tag> parameter indicates that the tag of the failure to create the first dataset is "resource-denied", that is, the current resources on the server are insufficient. The content in the <error-severity> parameter indicates that the severity of the failure to create the first dataset is "error". The content in the <error-message> parameter indicates that the message of the failure to create the first dataset is "Reach the max number of customized datastore", that is, the failure to create the first dataset is due to the total number of datasets currently created on the server reaching the maximum number of datasets that the server can support.
可选地,在该客户端向服务器端发送第一数据请求,以指示服务器端创建第一数据集的情况下,第一数据请求还能够携带该客户端的标识。这样,在服务器端创建第一数据集之后,还能够基于该客户端的标识、该对象标识和第一数据集的类型,创建客户端标识、对象标识与数据集类型之间的对应关系。这样,通过该对应关系可以记录各个客户端指示服务器端所创建的各种类型的数据集。Optionally, when the client sends a first data request to the server to instruct the server to create a first data set, the first data request can also carry the identifier of the client. In this way, after the server creates the first data set, it can also create a correspondence between the client identifier, the object identifier, and the type of the data set based on the identifier of the client, the object identifier, and the type of the first data set. In this way, the various types of data sets created by each client instructing the server can be recorded through the correspondence.
其中,第一数据集的类型用于指示第一数据集的类型为候选数据集类型还是动态数据集类型。当然,在实际应用中,第一数据集的类型还可以为其他的类型,本申请实施例对此不做限定。The type of the first data set is used to indicate whether the type of the first data set is a candidate data set type or a dynamic data set type. Of course, in practical applications, the type of the first data set can also be other types, which is not limited in the embodiments of the present application.
第二种情况,第一数据请求指示对第一数据集进行删除,第一数据请求还携带该客户端的标识。此时,服务器端基于该对象标识和该客户端的标识,确定第一数据集是否满足数据集删除条件。在第一数据集满足数据集删除条件的情况下,服务器端基于该对象标识,删除第一数据集。在第一数据集不满足数据集删除条件的情况下,服务器端向该客户端发送数据集删除失败消息。In the second case, the first data request indicates that the first data set is to be deleted, and the first data request also carries the identifier of the client. At this time, the server determines whether the first data set meets the data set deletion condition based on the object identifier and the identifier of the client. If the first data set meets the data set deletion condition, the server deletes the first data set based on the object identifier. If the first data set does not meet the data set deletion condition, the server sends a data set deletion failure message to the client.
在一些实施例中,数据集删除条件包括:第一数据集是该客户端指示服务器端创建的。或者,第一数据集不是该客户端指示服务器端创建的,但该客户端具有管理权限。当然,在实际应用中,数据集删除条件还可以包括其他的条件,本申请实施例对此不做限定。In some embodiments, the data set deletion condition includes: the first data set is created by the client instructing the server. Alternatively, the first data set is not created by the client instructing the server, but the client has management authority. Of course, in actual applications, the data set deletion condition may also include other conditions, which are not limited in the embodiments of the present application.
基于上文描述,服务器端存储有客户端标识、对象标识与数据集类型之间的对应关系。所以,在数据集删除条件包括:第一数据集是该客户端指示服务器端创建的情况下,服务器端接收到该客户端发送的第一数据请求之后,基于第一数据请求携带的该对象标识和该客户端的标识,从存储的客户端标识、对象标识与数据集类型之间的对应关系中,确定第一数据集是不是该客户端指示服务器端创建的。在第一数据集是该客户端指示服务器端创建的情况下,服务器端直接删除第一数据集。在第一数据集不是该客户端指示服务器端创建的情况下,服务器端向该客户端发送数据集删除失败消息。Based on the above description, the server stores the correspondence between the client identifier, the object identifier and the data set type. Therefore, the data set deletion condition includes: when the first data set is created by the server at the instruction of the client, after the server receives the first data request sent by the client, based on the object identifier and the client identifier carried in the first data request, from the stored correspondence between the client identifier, the object identifier and the data set type, it determines whether the first data set is created by the server at the instruction of the client. In the case that the first data set is created by the server at the instruction of the client, the server directly deletes the first data set. In the case that the first data set is not created by the server at the instruction of the client, the server sends a data set deletion failure message to the client.
可选地,在数据集删除条件包括:第一数据集不是该客户端指示服务器端创建的,但该客户端具有管理权限的情况下,如果第一数据集不是该客户端指示服务器端创建的,服务器端还能够基于该客户端的标识确定该客户端是否具有管理权限。如果该客户端具有管理权限,则服务器端删除第一数据集。如果该客户端不具有管理权限,则服务器端向该客户端发送数据集删除失败消息。Optionally, when the data set deletion condition includes: the first data set is not created by the client instructing the server, but the client has management authority, if the first data set is not created by the client instructing the server, the server can also determine whether the client has management authority based on the identifier of the client. If the client has management authority, the server deletes the first data set. If the client does not have management authority, the server sends a data set deletion failure message to the client.
也即是,不具有管理权限的客户端仅有权删除自己指示服务器端创建的自定义数据集,无权删除其他 客户端指示服务器端创建的自定义数据集,从而避免其他客户端指示服务器端创建的自定义数据集被动删除。具有管理权限的客户端可以删除所有客户端指示服务器端创建的自定义数据集,以此来减少资源占用。That is, a client without management privileges can only delete the custom datasets that it instructs the server to create, but cannot delete other datasets. The client instructs the server to create a custom dataset, thereby preventing other clients from instructing the server to create a custom dataset passively deleted. Clients with management permissions can delete all custom datasets created by clients instructing the server to create a custom dataset, thereby reducing resource usage.
示例地,服务器端接收到该客户端发送的第一数据请求如下所示:
For example, the server receives the first data request sent by the client as follows:
其中,<delete-datastore>代表删除数据集的操作,<delete-datastore>中的参数包括<name1>和<name2>。<name1>参数携带第一数据集的标识“my-datastore”,<name2>参数携带该客户端的标识“my-ID”。Among them, <delete-datastore> represents the operation of deleting a data set, and the parameters in <delete-datastore> include <name1> and <name2>. The <name1> parameter carries the identifier "my-datastore" of the first data set, and the <name2> parameter carries the identifier "my-ID" of the client.
由于服务器端所能支持的最大数据集数量不是无限的,在服务器端已创建的数据集的总数量达到服务器端所能支持的最大数据集数量的情况下,具有管理权限的客户端可以强制删除生存期到期的数据集。此时,服务器端接收到具有管理权限的客户端发送的第一数据请求如下所示:
Since the maximum number of datasets supported by the server is not unlimited, when the total number of datasets created on the server reaches the maximum number of datasets supported by the server, the client with management authority can forcibly delete the datasets whose lifetime has expired. At this time, the first data request sent by the client with management authority received by the server is as follows:
其中,<destroy-datastore>代表具有管理权限的客户端强制删除数据集的操作,<destroy-datastore>中的参数包括<name>,<name>参数携带强制删除数据集的标识“my-datastore”。Among them, <destroy-datastore> represents the operation of forcibly deleting a dataset by a client with management permissions. The parameters in <destroy-datastore> include <name>, and the <name> parameter carries the identifier "my-datastore" of the forcibly deleted dataset.
需要说明的是,在实际应用中,还可能存在该客户端主动删除其指示服务器端创建的第一数据集。即,在该客户端执行完第一任务,第一任务对应的第一数据集不再使用的情况下,该客户端向服务器端发送第一数据请求,第一数据请求指示服务器端删除第一数据集。It should be noted that, in actual applications, the client may actively delete the first data set that it instructs the server to create. That is, after the client completes the first task and the first data set corresponding to the first task is no longer used, the client sends a first data request to the server, and the first data request instructs the server to delete the first data set.
第三种情况,第一数据请求指示对第一数据集中的数据进行编辑操作,第一数据请求还携带待编辑的第一数据,编辑操作包括增加、修改、删除中的任一种。此时,服务器端基于该对象标识,对第一数据集执行关于第一数据的编辑操作。In the third case, the first data request indicates to edit the data in the first data set, and the first data request also carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting. At this time, the server performs the editing operation on the first data in the first data set based on the object identifier.
也即是,在该客户端需要对第一数据集中的数据进行编辑的情况下,该客户端向服务器端发送第一数据请求,第一数据请求携带该对象标识和待编辑的第一数据。That is, when the client needs to edit the data in the first data set, the client sends a first data request to the server, where the first data request carries the object identifier and the first data to be edited.
基于上文描述,该对象标识为第一数据集的标识,或者,该对象标识为第一任务的标识。在不同的情况下,服务器端基于该对象标识,对第一数据集执行关于第一数据的编辑操作的方式不同,接下来将分别进行描述。Based on the above description, the object identifier is the identifier of the first data set, or the object identifier is the identifier of the first task. In different cases, the server performs the editing operation on the first data set based on the object identifier in different ways, which will be described below respectively.
(1)该对象标识为第一数据集的标识。服务器端接收到该客户端发送的第一数据请求之后,基于第一数据集的标识和待编辑的第一数据,对第一数据集执行关于第一数据的编辑操作。(1) The object identifier is the identifier of the first data set. After receiving the first data request sent by the client, the server performs an editing operation on the first data set based on the identifier of the first data set and the first data to be edited.
示例地,服务器端接收到该客户端发送的第一数据请求如下所示:

For example, the server receives the first data request sent by the client as follows:

其中,<edit-data>代表对数据集中的数据进行编辑操作,<edit-data>中的参数包括<target>和<data>。<target>参数携带第一数据集的标识“my-datastore”,<data>参数携带待编辑的第一数据。待编辑的第一数据包括<top xmlns="http://example.com/schema/1.2/config">参数所指示的第一数据集的命名空间,<interface>参数所指示的接口信息,接口名称<name>为“Ethernet0/0”,路由器的最大传输单元数<mtu>为“1500”。Among them, <edit-data> represents the editing operation on the data in the data set, and the parameters in <edit-data> include <target> and <data>. The <target> parameter carries the identifier of the first data set "my-datastore", and the <data> parameter carries the first data to be edited. The first data to be edited includes the namespace of the first data set indicated by the <top xmlns="http://example.com/schema/1.2/config"> parameter, the interface information indicated by the <interface> parameter, the interface name <name> is "Ethernet0/0", and the maximum transmission unit number <mtu> of the router is "1500".
可选地,第一数据请求还可以指示查询第一数据集中的数据。即,在该客户端需要对服务器端的数据进行查询的情况下,该客户端向服务器端发送第一数据请求,第一数据请求携带第一数据集的标识和查询信息。服务器端接收到该客户端发送的第一数据请求之后,基于第一数据集的标识,从已创建的数据集中确定第一数据集,进而基于查询信息在第一数据集中查询相关数据,并向该客户端发送数据查询响应。Optionally, the first data request may also indicate a query for data in the first data set. That is, when the client needs to query the data on the server, the client sends a first data request to the server, and the first data request carries the identifier of the first data set and query information. After receiving the first data request sent by the client, the server determines the first data set from the created data sets based on the identifier of the first data set, and then queries the relevant data in the first data set based on the query information, and sends a data query response to the client.
(2)该对象标识为第一任务的标识。服务器端接收到该客户端发送的第一数据请求之后,基于第一任务的标识,确定已创建的数据集中是否存在第一任务所对应的第一数据集。在第一数据集存在的情况下,服务器端直接基于第一任务的标识和待编辑的第一数据,对第一数据集执行关于第一数据的编辑操作。(2) The object identifier is the identifier of the first task. After receiving the first data request sent by the client, the server determines whether the first data set corresponding to the first task exists in the created data set based on the identifier of the first task. If the first data set exists, the server directly performs an editing operation on the first data set based on the identifier of the first task and the first data to be edited.
可选地,第一数据请求还携带第一数据集的类型,这样,在第一数据集不存在且已创建的数据集的总数量小于最大数据集数量的情况下,服务器端先基于第一任务的标识和第一数据集的类型创建第一数据集。然后,服务器端再对第一数据集执行关于第一数据的编辑操作。Optionally, the first data request also carries the type of the first data set, so that when the first data set does not exist and the total number of created data sets is less than the maximum number of data sets, the server first creates the first data set based on the identifier of the first task and the type of the first data set. Then, the server performs the editing operation on the first data set.
也即是,服务器端在接收到第一数据请求,且已创建的数据集中不存在第一数据集的情况下,通过隐式创建的方式实时地为第一任务创建其对应的第一数据集,进而使得服务器端基于待编辑的第一数据,对第一数据集执行关于第一数据的编辑操作。That is, when the server receives a first data request and the first data set does not exist in the created data sets, it creates the corresponding first data set for the first task in real time through implicit creation, so that the server performs editing operations on the first data set based on the first data to be edited.
需要说明的是,服务器端按照上述方法实时地为第一任务创建第一数据集之后,还可以为第一数据集设置临时标签,该临时标签指示服务器端在将第一数据集提交至相应数据集时就删除第一数据集。It should be noted that after the server creates the first data set for the first task in real time according to the above method, it can also set a temporary tag for the first data set, which instructs the server to delete the first data set when submitting the first data set to the corresponding data set.
当然,在实际应用中,还可能存在服务器端已创建的数据集中不存在第一数据集,但已创建的数据集的总数量不小于最大数据集数量的情况。此时,服务器端向该客户端发送数据编辑操作失败消息。Of course, in actual applications, there may be a situation where the first data set does not exist in the data sets created by the server, but the total number of created data sets is not less than the maximum number of data sets. In this case, the server sends a data editing operation failure message to the client.
示例地,服务器端接收到该客户端发送的第一数据请求如下所示:
For example, the server receives the first data request sent by the client as follows:
其中,XML编码格式定义的报文头<rpc message-id=“101”xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"app-id=“test”>中的app-id=“test”代表第一任务的标识,<edit-data>代表对数据集中的数据进行编辑操作,<edit-data>中的参数包括<target>和<data>。<target> 参数携带第一数据集的类型“候选数据集类型”,<data>参数携带待编辑的第一数据。待编辑的第一数据包括<top xmlns="http://example.com/schema/1.2/config">参数所指示的第一数据集的命名空间,<interface>参数所指示的接口信息,接口名称<name>为“Ethernet0/0”,路由器的最大传输单元数<mtu>为“1500”。In the message header <rpc message-id="101"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"app-id="test"> defined in the XML encoding format, app-id="test" represents the identifier of the first task, <edit-data> represents the editing operation on the data in the data set, and the parameters in <edit-data> include <target> and <data>. <target> The parameter carries the type of the first data set "candidate data set type", and the <data> parameter carries the first data to be edited. The first data to be edited includes the namespace of the first data set indicated by the <top xmlns="http://example.com/schema/1.2/config"> parameter, the interface information indicated by the <interface> parameter, the interface name <name> is "Ethernet0/0", and the maximum transmission unit number <mtu> of the router is "1500".
可选地,第一数据请求还可以指示查询第一数据集中的数据。即,在该客户端需要对服务器端的数据进行查询的情况下,该客户端向服务器端发送第一数据请求,第一数据请求携带第一任务的标识和查询信息。服务器端接收到该客户端发送的第一数据请求之后,基于第一任务的标识,确定已创建的数据集中是否存在第一任务所对应的第一数据集。在第一数据集存在的情况下,服务器端直接基于第一任务的标识,从已创建的数据集中确定第一数据集,进而基于查询信息在第一数据集中查询相关数据,并向该客户端发送数据查询响应。在第一数据集不存在的情况下,服务器端基于第一数据集的类型,从相应数据集中查询相关数据,并向该客户端发送数据查询响应,并不会基于第一任务的标识和第一数据集的类型创建第一数据集。Optionally, the first data request may also indicate a query for data in the first data set. That is, when the client needs to query the data on the server, the client sends a first data request to the server, and the first data request carries the identifier of the first task and the query information. After receiving the first data request sent by the client, the server determines whether the first data set corresponding to the first task exists in the created data set based on the identifier of the first task. In the case where the first data set exists, the server directly determines the first data set from the created data set based on the identifier of the first task, and then queries the relevant data in the first data set based on the query information, and sends a data query response to the client. In the case where the first data set does not exist, the server queries the relevant data from the corresponding data set based on the type of the first data set, and sends a data query response to the client, and does not create the first data set based on the identifier of the first task and the type of the first data set.
其中,在第一数据集不存在的情况下,服务器端基于第一数据集的类型,从相应数据集中查询相关数据的实现过程包括:在第一数据集的类型为候选数据集类型的情况下,服务器端按照第一数据请求携带的过滤类型,从运行数据集中查询相关数据。在第一数据集的类型为动态数据集类型的情况下,服务器端按照第一数据请求携带的过滤类型,从操作数据集中查询相关数据。Wherein, when the first data set does not exist, the server side queries the relevant data from the corresponding data set based on the type of the first data set to implement the process including: when the type of the first data set is a candidate data set type, the server side queries the relevant data from the running data set according to the filter type carried by the first data request. When the type of the first data set is a dynamic data set type, the server side queries the relevant data from the operation data set according to the filter type carried by the first data request.
示例地,服务器端接收到该客户端发送的第一数据请求如下所示:
For example, the server receives the first data request sent by the client as follows:
其中,<get-data>代表对数据集中的数据进行查询操作,<get-data>中的参数包括<target>和<filter type="subtree">。<target>参数携带第一数据集的类型为“候选数据集类型”,<filter type="subtree">参数携带过滤类型为“subtree”。查询信息包括<top xmlns="http://example.com/schema/1.2/config">参数所指示的第一数据集的命名空间,<users>参数所指示的用户列表。Among them, <get-data> represents a query operation on the data in the data set, and the parameters in <get-data> include <target> and <filter type="subtree">. The <target> parameter carries the type of the first data set as "candidate data set type", and the <filter type="subtree"> parameter carries the filter type as "subtree". The query information includes the namespace of the first data set indicated by the <top xmlns="http://example.com/schema/1.2/config"> parameter, and the user list indicated by the <users> parameter.
示例地,服务器端向该客户端发送的数据查询响应如下所示:

For example, the data query response sent by the server to the client is as follows:

其中,<data>代表查询得到的数据,<data>中的参数包括<top xmlns="http://example.com/schema/1.2/config">参数所指示的第一数据集的命名空间和<users>参数所指示的用户列表。<users>中的参数包括<name>、<type>、<full-name>和<company-info>。<name>参数指示用户的名称为“root”,<type>参数指示用户的类型为“superuser”,<full-name>参数指示用户的全名为“Charlie Root”,<company-info>参数指示用户的公司信息包括“dept1”和“id1”。Among them, <data> represents the data obtained by the query, and the parameters in <data> include the namespace of the first data set indicated by the <top xmlns="http://example.com/schema/1.2/config"> parameter and the user list indicated by the <users> parameter. The parameters in <users> include <name>, <type>, <full-name>, and <company-info>. The <name> parameter indicates that the user's name is "root", the <type> parameter indicates that the user's type is "superuser", the <full-name> parameter indicates that the user's full name is "Charlie Root", and the <company-info> parameter indicates that the user's company information includes "dept1" and "id1".
第四种情况,第一数据请求指示对服务器端进行配置。服务器端接收到该客户端发送的第一数据请求之后,基于第一数据请求携带的该对象标识,确定第一数据集的类型。在第一数据集的类型为候选数据集类型的情况下,服务器端基于该对象标识,将第一数据集存储的数据提交至运行数据集。在第一数据集的类型为动态数据集类型的情况下,服务器端基于该对象标识,将第一数据集存储的数据提交至操作数据集。In the fourth case, the first data request indicates that the server is to be configured. After receiving the first data request sent by the client, the server determines the type of the first data set based on the object identifier carried in the first data request. When the type of the first data set is a candidate data set type, the server submits the data stored in the first data set to the running data set based on the object identifier. When the type of the first data set is a dynamic data set type, the server submits the data stored in the first data set to the operating data set based on the object identifier.
基于上文描述,服务器端存储有客户端标识、对象标识与数据集类型之间的对应关系。所以,服务器端接收到第一数据请求之后,能够基于该对象标识,从存储的客户端标识、对象标识与数据集类型之间的对应关系中,获取第一数据集的类型。Based on the above description, the server stores the correspondence between the client identifier, the object identifier and the data set type. Therefore, after receiving the first data request, the server can obtain the type of the first data set from the stored correspondence between the client identifier, the object identifier and the data set type based on the object identifier.
由于第一数据集是该客户端指示服务器端为第一任务创建的自定义数据集,所以,在该客户端执行第一任务的情况下,服务器端只需要基于第一数据集的类型,将第一任务所对应的第一数据集提交至相应的数据集,并不会将其他任务所对应的自定义数据集被动地提交至相应数据集。Since the first data set is a custom data set that the client instructs the server to create for the first task, when the client executes the first task, the server only needs to submit the first data set corresponding to the first task to the corresponding data set based on the type of the first data set, and will not passively submit custom data sets corresponding to other tasks to the corresponding data set.
示例地,在该对象标识为第一数据集的标识的情况下,服务器端接收到该客户端发送的第一数据请求如下所示:
For example, when the object identifier is the identifier of the first data set, the server receives the first data request sent by the client as follows:
其中,<commit>代表提交数据集的操作,<commit>中的参数包括<datastore>。<datastore>参数携带第一数据集的标识“my-datastore”。<commit> represents the operation of submitting a data set, and the parameters in <commit> include <datastore>. The <datastore> parameter carries the identifier of the first data set "my-datastore".
示例地,在该对象标识为第一任务的标识的情况下,服务器端接收到该客户端发送的第一数据请求如下所示:
For example, when the object identifier is the identifier of the first task, the server receives the first data request sent by the client as follows:
其中,XML编码格式定义的报文头<rpc message-id=“101”xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"app-id=“test”>中的app-id=“test”代表第一任务的标识,<commit>代表提交数据集的操作。Among them, app-id="test" in the message header <rpc message-id="101"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"app-id="test"> defined in the XML encoding format represents the identifier of the first task, and <commit> represents the operation of submitting the data set.
接下来以图5为例,对本申请实施例提供的数据管理流程进行完整说明。在图5中,客户端指示服务器端创建第一数据集,第一数据集是为该客户端执行的第一任务创建的自定义数据集。在服务器端创建第一数据集之后,该客户端对第一数据集中的数据进行编辑操作。在该客户端对第一数据集中的数据编辑完成之后,该客户端指示服务器端将第一数据集存储的数据提交至相应数据集,以此来执行第一任务。在第一数据集不再使用的情况下,该客户端指示服务器端删除第一数据集。Next, taking Figure 5 as an example, the data management process provided by the embodiment of the present application is fully described. In Figure 5, the client instructs the server to create a first data set, and the first data set is a custom data set created for the first task performed by the client. After the server creates the first data set, the client edits the data in the first data set. After the client completes editing the data in the first data set, the client instructs the server to submit the data stored in the first data set to the corresponding data set to perform the first task. When the first data set is no longer in use, the client instructs the server to delete the first data set.
以上内容是以各个客户端按照任务需求指示服务器端创建自定义数据集为例。即,服务器端存储有各 个客户端的各个任务所对应的自定义数据集。在任一客户端执行任一任务的情况下,该客户端向服务器端发送第一数据请求。服务器端通过第一数据请求携带的第一数据集的标识对第一数据集进行管理。或者,服务器端通过第一数据请求携带的第一任务的标识,对第一任务所对应的数据集进行管理。The above content is based on the example of each client instructing the server to create a custom data set according to the task requirements. The server manages the first data set through the identifier of the first data set carried in the first data request. Alternatively, the server manages the data set corresponding to the first task through the identifier of the first task carried in the first data request.
可选地,服务器端还存储有一个共享数据集,该共享数据集与各个自定义数据集相互独立。各个客户端也可以通过向服务器端发送第一数据请求,来指示服务器端对该共享数据集进行管理。此时,第一数据请求并不携带对象标识。也即是,如果任一客户端向服务器端发送的第一数据请求携带对象标识,则表明该客户端指示服务器端对特定的自定义数据集进行管理。如果任一客户端向服务器端发送的第一数据请求不携带对象标识,则表明该客户端指示服务器端对共享数据集进行管理。Optionally, the server also stores a shared data set, which is independent of each custom data set. Each client can also instruct the server to manage the shared data set by sending a first data request to the server. In this case, the first data request does not carry an object identifier. That is, if the first data request sent by any client to the server carries an object identifier, it indicates that the client instructs the server to manage a specific custom data set. If the first data request sent by any client to the server does not carry an object identifier, it indicates that the client instructs the server to manage the shared data set.
在本申请实施例中,由于客户端向服务器端发送的第一数据请求携带对象标识,该对象标识指示第一数据集且第一数据集是客户端指示服务器端为第一任务创建的自定义数据集,所以,服务器端接收到第一数据请求之后,能够基于该对象标识,对第一任务所对应的第一数据集进行管理。也即是,客户端按照任务需求指示服务器端创建自定义数据集,一个任务对应一个自定义数据集,各个自定义数据集之间相互独立,彼此互不影响。这样,在客户端执行某个任务的情况下,只需向服务器端发送携带相应对象标识的数据请求,以便于服务器端基于该数据请求所携带的对象标识,对该任务所对应的数据集进行管理,并不会对其他任务所对应的数据集进行管理。而且,各个客户端是按照任务需求指示服务器端创建的自定义数据集,只有在某个客户端需要对服务器端的数据进行管理的情况下,该客户端才按照执行任务的数量指示服务器端创建一个或多个自定义数据集,并不是在各个客户端与服务器端建立会话连接之后,各个客户端就指示服务器端创建自定义数据集。这样,能够解决每个与服务器端建立会话连接的客户端均指示服务器端创建自定义数据集造成的资源浪费问题。此外,通过各个客户端主动删除其指示服务器端创建的数据集,或者具有管理权限的客户端强制删除生存期到期的数据集,可以减少资源占用、节省系统资源。In the embodiment of the present application, since the first data request sent by the client to the server carries an object identifier, the object identifier indicates the first data set and the first data set is a custom data set that the client instructs the server to create for the first task, after receiving the first data request, the server can manage the first data set corresponding to the first task based on the object identifier. That is, the client instructs the server to create a custom data set according to the task requirements, one task corresponds to one custom data set, and each custom data set is independent of each other and does not affect each other. In this way, when the client performs a task, it only needs to send a data request carrying the corresponding object identifier to the server, so that the server manages the data set corresponding to the task based on the object identifier carried by the data request, and does not manage the data sets corresponding to other tasks. Moreover, each client instructs the server to create a custom data set according to the task requirements. Only when a client needs to manage the data on the server, the client instructs the server to create one or more custom data sets according to the number of tasks to be executed, and it is not that each client instructs the server to create a custom data set after establishing a session connection with the server. In this way, it can solve the problem of resource waste caused by each client that establishes a session connection with the server instructing the server to create a custom data set. In addition, by each client actively deleting the datasets that it instructed the server to create, or by a client with management authority forcibly deleting the datasets whose lifetime has expired, resource usage can be reduced and system resources can be saved.
图6是本申请实施例提供的一种数据管理装置的结构示意图,该数据管理装置可以由软件、硬件或者两者的结合实现成为通信设备的部分或者全部,该通信设备可以为图3所示的服务器端,该装置应用于服务器端。参见图6,该装置包括:接收模块601和管理模块602。FIG6 is a schematic diagram of the structure of a data management device provided in an embodiment of the present application, and the data management device can be implemented by software, hardware or a combination of both to become part or all of a communication device, and the communication device can be the server end shown in FIG3 , and the device is applied to the server end. Referring to FIG6 , the device includes: a receiving module 601 and a management module 602.
接收模块601,用于接收第一数据请求,第一数据请求携带对象标识,该对象标识指示第一数据集,第一数据集是为第一任务创建的自定义数据集,自定义数据集用于存储客户端用来管理服务器端的数据。详细实现过程参考上述各个实施例中对应的内容,此处不再赘述。The receiving module 601 is used to receive a first data request, the first data request carries an object identifier, the object identifier indicates a first data set, the first data set is a custom data set created for the first task, and the custom data set is used to store data used by the client to manage the server. The detailed implementation process refers to the corresponding content in the above embodiments, which will not be repeated here.
管理模块602,用于基于该对象标识,对第一数据集进行管理。详细实现过程参考上述各个实施例中对应的内容,此处不再赘述。The management module 602 is used to manage the first data set based on the object identifier. The detailed implementation process refers to the corresponding content in the above embodiments, which will not be repeated here.
可选地,该对象标识为第一数据集的标识,或者,该对象标识为第一任务的标识。Optionally, the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
可选地,第一数据请求指示对第一数据集中的数据进行编辑操作,第一数据请求还携带待编辑的第一数据,编辑操作包括增加、修改、删除中的任一种;Optionally, the first data request indicates to perform an editing operation on the data in the first data set, and the first data request further carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting;
管理模块602具体用于:The management module 602 is specifically used for:
基于该对象标识,对第一数据集执行关于第一数据的编辑操作。Based on the object identifier, an editing operation on the first data set is performed on the first data set.
可选地,第一数据请求指示对第一数据集中的数据进行编辑操作,第一数据请求还携带待编辑的第一数据,编辑操作包括增加、修改、删除中的任一种;Optionally, the first data request indicates to perform an editing operation on the data in the first data set, and the first data request further carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting;
管理模块602具体用于:The management module 602 is specifically used for:
在基于该对象标识确定第一数据集存在的情况下,基于该对象标识,对第一数据集执行关于第一数据的编辑操作。In a case where it is determined based on the object identifier that the first data set exists, an editing operation on the first data is performed on the first data set based on the object identifier.
可选地,第一数据请求还携带第一数据集的类型,管理模块602具体用于:Optionally, the first data request further carries the type of the first data set, and the management module 602 is specifically configured to:
在基于该对象标识确定第一数据集不存在,且服务器端已创建的数据集的总数量小于最大数据集数量的情况下,基于该对象标识和第一数据集的类型创建第一数据集;If it is determined based on the object identifier that the first data set does not exist and the total number of data sets created on the server is less than the maximum number of data sets, create the first data set based on the object identifier and the type of the first data set;
对第一数据集执行关于第一数据的编辑操作。An editing operation on the first data is performed on the first data set.
可选地,第一数据请求指示对服务器端进行配置,第一数据集的类型为候选数据集类型;Optionally, the first data request indicates configuration of the server side, and the type of the first data set is a candidate data set type;
管理模块602具体用于:The management module 602 is specifically used for:
基于该对象标识,将第一数据集存储的数据提交至运行数据集。Based on the object identifier, the data stored in the first data set is submitted to the running data set.
可选地,第一数据请求指示对服务器端进行配置,第一数据集的类型为动态数据集类型; Optionally, the first data request indicates configuration of the server side, and the type of the first data set is a dynamic data set type;
管理模块602具体用于:The management module 602 is specifically used for:
基于该对象标识,将第一数据集存储的数据提交至操作数据集。Based on the object identifier, the data stored in the first data set is submitted to the operation data set.
可选地,第一数据请求指示对第一数据集进行删除,第一数据请求还携带该客户端的标识;Optionally, the first data request indicates to delete the first data set, and the first data request also carries an identifier of the client;
管理模块602具体用于:The management module 602 is specifically used for:
在基于该对象标识和该客户端的标识,确定第一数据集满足数据集删除条件的情况下,基于该对象标识,删除第一数据集。When it is determined that the first data set meets the data set deletion condition based on the object identifier and the identifier of the client, the first data set is deleted based on the object identifier.
可选地,数据集删除条件包括:第一数据集是该客户端指示服务器端创建的;或者,第一数据集不是该客户端指示服务器端创建的,但该客户端具有管理权限。Optionally, the data set deletion condition includes: the first data set is created by the server side at the instruction of the client; or the first data set is not created by the server side at the instruction of the client, but the client has management authority.
可选地,第一数据请求指示服务器端创建第一数据集,第一数据请求还携带第一数据集的类型;Optionally, the first data request instructs the server to create a first data set, and the first data request also carries a type of the first data set;
管理模块602具体用于:The management module 602 is specifically used for:
在第一数据集满足数据集创建条件的情况下,基于该对象标识和第一数据集的类型创建第一数据集。When the first data set meets the data set creation condition, the first data set is created based on the object identifier and the type of the first data set.
可选地,数据集创建条件包括:服务器端已创建的数据集不包括第一数据集。Optionally, the data set creation condition includes: the data set created on the server side does not include the first data set.
可选地,数据集创建条件还包括:已创建的数据集的总数量小于最大数据集数量。Optionally, the data set creation condition further includes: the total number of created data sets is less than the maximum number of data sets.
可选地,第一数据请求还携带第一数据集的生存期;该装置还包括:Optionally, the first data request further carries a lifetime of the first data set; and the apparatus further comprises:
第一设置模块,用于设置第一数据集的生存期为第一数据请求携带的生存期。The first setting module is used to set the lifetime of the first data set to the lifetime carried in the first data request.
可选地,该装置还包括:Optionally, the device further comprises:
第二设置模块,用于设置第一数据集的生存期为默认生存期。The second setting module is used to set the lifetime of the first data set to a default lifetime.
可选地,该装置还包括:Optionally, the device further comprises:
删除模块,用于在检测到第一数据集的生存期到期时,删除第一数据集。The deleting module is used to delete the first data set when it is detected that the lifetime of the first data set expires.
可选地,该客户端通过网络配置管理协议对服务器端进行配置管理,网络配置管理协议包括但不限于网络配置协议NETCONF、表达性状态转移配置协议RESTCONF、约束应用协议管理接口CORECONF。Optionally, the client performs configuration management on the server through a network configuration management protocol, where the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
在本申请实施例中,由于客户端向服务器端发送的第一数据请求携带对象标识,该对象标识指示第一数据集且第一数据集是客户端指示服务器端为第一任务创建的自定义数据集,所以,服务器端接收到第一数据请求之后,能够基于该对象标识,对第一任务所对应的第一数据集进行管理。也即是,客户端按照任务需求指示服务器端创建自定义数据集,一个任务对应一个自定义数据集,各个自定义数据集之间相互独立,彼此互不影响。这样,在客户端执行某个任务的情况下,只需向服务器端发送携带相应对象标识的数据请求,以便于服务器端基于该数据请求所携带的对象标识,对该任务所对应的数据集进行管理,并不会对其他任务所对应的数据集进行管理。而且,各个客户端是按照任务需求指示服务器端创建的自定义数据集,只有在某个客户端需要对服务器端的数据进行管理的情况下,该客户端才按照执行任务的数量指示服务器端创建一个或多个自定义数据集,并不是在各个客户端与服务器端建立会话连接之后,各个客户端就指示服务器端创建自定义数据集。这样,能够解决每个与服务器端建立会话连接的客户端均指示服务器端创建自定义数据集造成的资源浪费问题。此外,通过各个客户端主动删除其指示服务器端创建的数据集,或者具有管理权限的客户端强制删除生存期到期的数据集,可以减少资源占用、节省系统资源。In the embodiment of the present application, since the first data request sent by the client to the server carries an object identifier, the object identifier indicates the first data set and the first data set is a custom data set that the client instructs the server to create for the first task, after receiving the first data request, the server can manage the first data set corresponding to the first task based on the object identifier. That is, the client instructs the server to create a custom data set according to the task requirements, one task corresponds to one custom data set, and each custom data set is independent of each other and does not affect each other. In this way, when the client performs a task, it only needs to send a data request carrying the corresponding object identifier to the server, so that the server manages the data set corresponding to the task based on the object identifier carried by the data request, and does not manage the data sets corresponding to other tasks. Moreover, each client instructs the server to create a custom data set according to the task requirements. Only when a client needs to manage the data on the server, the client instructs the server to create one or more custom data sets according to the number of tasks to be executed, and it is not that each client instructs the server to create a custom data set after establishing a session connection with the server. In this way, it can solve the problem of resource waste caused by each client that establishes a session connection with the server instructing the server to create a custom data set. In addition, by each client actively deleting the datasets that it instructed the server to create, or by a client with management authority forcibly deleting the datasets whose lifetime has expired, resource usage can be reduced and system resources can be saved.
需要说明的是:上述实施例提供的数据管理装置在进行数据管理时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据管理装置与数据管理方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: the data management device provided in the above embodiment only uses the division of the above functional modules as an example to illustrate when performing data management. 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. In addition, the data management device provided in the above embodiment and the data management method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
图7是本申请实施例提供的另一种数据管理装置的结构示意图,该数据管理装置可以由软件、硬件或者两者的结合实现成为通信设备的部分或者全部,该通信设备可以为图3所示的任一客户端,该装置应用于客户端。参见图7,该装置包括发送模块701。FIG7 is a schematic diagram of the structure of another data management device provided in an embodiment of the present application, the data management device can be implemented by software, hardware or a combination of both to become part or all of a communication device, the communication device can be any client shown in FIG3 , and the device is applied to the client. Referring to FIG7 , the device includes a sending module 701.
发送模块701,用于发送第一数据请求,第一数据请求携带对象标识,该对象标识指示第一数据集,第一数据集是为第一任务创建的自定义数据集,自定义数据集用于存储该客户端用来管理服务器端的数据,第一数据请求指示服务器端基于该对象标识,对第一数据集进行管理。详细实现过程参考上述各个实施例中对应的内容,此处不再赘述。The sending module 701 is used to send a first data request, the first data request carries an object identifier, the object identifier indicates a first data set, the first data set is a custom data set created for the first task, the custom data set is used to store data used by the client to manage the server, and the first data request instructs the server to manage the first data set based on the object identifier. The detailed implementation process refers to the corresponding content in the above embodiments, which will not be repeated here.
可选地,该对象标识为第一数据集的标识,或者,该对象标识为第一任务的标识。Optionally, the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
可选地,第一数据请求指示对第一数据集中的数据进行编辑操作,第一数据请求还携带待编辑的第一 数据,编辑操作包括增加、修改、删除中的任一种。Optionally, the first data request indicates to edit the data in the first data set, and the first data request also carries the first Data,editing operations include adding, modifying, and deleting.
可选地,第一数据请求指示对服务器端进行配置,第一数据集的类型为候选数据集类型或者动态数据集类型。Optionally, the first data request indicates configuration of the server side, and the type of the first data set is a candidate data set type or a dynamic data set type.
可选地,第一数据请求指示对第一数据集进行删除,第一数据请求还携带该客户端的标识。Optionally, the first data request indicates to delete the first data set, and the first data request also carries an identifier of the client.
可选地,第一数据请求指示服务器端创建第一数据集,第一数据请求还携带第一数据集的类型。Optionally, the first data request instructs the server to create a first data set, and the first data request also carries the type of the first data set.
可选地,第一数据请求还携带第一数据集的生存期。Optionally, the first data request also carries the lifetime of the first data set.
可选地,该客户端通过网络配置管理协议对服务器端进行配置管理,网络配置管理协议包括但不限于网络配置协议NETCONF、表达性状态转移配置协议RESTCONF、约束应用协议管理接口CORECONF。Optionally, the client performs configuration management on the server through a network configuration management protocol, where the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
在本申请实施例中,由于客户端向服务器端发送的第一数据请求携带对象标识,该对象标识指示第一数据集且第一数据集是客户端指示服务器端为第一任务创建的自定义数据集,所以,服务器端接收到第一数据请求之后,能够基于该对象标识,对第一任务所对应的第一数据集进行管理。也即是,客户端按照任务需求指示服务器端创建自定义数据集,一个任务对应一个自定义数据集,各个自定义数据集之间相互独立,彼此互不影响。这样,在客户端执行某个任务的情况下,只需向服务器端发送携带相应对象标识的数据请求,以便于服务器端基于该数据请求所携带的对象标识,对该任务所对应的数据集进行管理,并不会对其他任务所对应的数据集进行管理。而且,各个客户端是按照任务需求指示服务器端创建的自定义数据集,只有在某个客户端需要对服务器端的数据进行管理的情况下,该客户端才按照执行任务的数量指示服务器端创建一个或多个自定义数据集,并不是在各个客户端与服务器端建立会话连接之后,各个客户端就指示服务器端创建自定义数据集。这样,能够解决每个与服务器端建立会话连接的客户端均指示服务器端创建自定义数据集造成的资源浪费问题。此外,通过各个客户端主动删除其指示服务器端创建的数据集,或者具有管理权限的客户端强制删除生存期到期的数据集,可以减少资源占用、节省系统资源。In the embodiment of the present application, since the first data request sent by the client to the server carries an object identifier, the object identifier indicates the first data set and the first data set is a custom data set that the client instructs the server to create for the first task, after receiving the first data request, the server can manage the first data set corresponding to the first task based on the object identifier. That is, the client instructs the server to create a custom data set according to the task requirements, one task corresponds to one custom data set, and each custom data set is independent of each other and does not affect each other. In this way, when the client performs a task, it only needs to send a data request carrying the corresponding object identifier to the server, so that the server manages the data set corresponding to the task based on the object identifier carried by the data request, and does not manage the data sets corresponding to other tasks. Moreover, each client instructs the server to create a custom data set according to the task requirements. Only when a client needs to manage the data on the server, the client instructs the server to create one or more custom data sets according to the number of tasks to be executed, and it is not that each client instructs the server to create a custom data set after establishing a session connection with the server. In this way, it can solve the problem of resource waste caused by each client that establishes a session connection with the server instructing the server to create a custom data set. In addition, by each client actively deleting the datasets that it instructed the server to create, or by a client with management authority forcibly deleting the datasets whose lifetime has expired, resource usage can be reduced and system resources can be saved.
需要说明的是:上述实施例提供的数据管理装置在进行数据管理时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据管理装置与数据管理方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: the data management device provided in the above embodiment only uses the division of the above functional modules as an example to illustrate when performing data management. 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. In addition, the data management device provided in the above embodiment and the data management method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
请参考图8,图8是根据本申请实施例示出的一种通信设备的结构示意图。可选地,该通信设备为图3中所示的任一客户端或服务器端,该通信设备包括至少一个处理器801、通信总线802、存储器803以及至少一个通信接口804。Please refer to Figure 8, which is a schematic diagram of the structure of a communication device according to an embodiment of the present application. Optionally, the communication device is any client or server shown in Figure 3, and the communication device includes at least one processor 801, a communication bus 802, a memory 803 and at least one communication interface 804.
处理器801可以是一个通用中央处理器(central processing unit,CPU)、网络处理器(network processor,NP)、微处理器、或者可以是一个或多个用于实现本申请方案的集成电路,例如,专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor 801 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or may be one or more integrated circuits for implementing the solution of the present application, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
通信总线802用于在上述组件之间传送信息。通信总线802可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus 802 is used to transmit information between the above components. The communication bus 802 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
存储器803可以是只读存储器(read-only memory,ROM),也可以是随机存取存储器(random access memory,RAM),也可以是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、光盘(包括只读光盘(compact disc read-only memory,CD-ROM)、压缩光盘、激光盘、数字通用光盘、蓝光光盘等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器803可以是独立存在,并通过通信总线802与处理器801相连接。存储器803也可以和处理器801集成在一起。The memory 803 may be a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc (including a compact disc read-only memory (CD-ROM), a compressed optical disc, a laser disc, a digital versatile disc, a Blu-ray disc, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 803 may exist independently and be connected to the processor 801 via the communication bus 802. The memory 803 may also be integrated with the processor 801.
通信接口804使用任何收发器一类的装置,用于与其它设备或通信网络通信。通信接口804包括有线通信接口,还可以包括无线通信接口。其中,有线通信接口例如可以为以太网接口。以太网接口可以是光接口、电接口或其组合。无线通信接口可以为无线局域网(wireless local area networks,WLAN)接口、蜂窝网络通信接口或其组合等。The communication interface 804 uses any transceiver-like device to communicate with other devices or communication networks. The communication interface 804 includes a wired communication interface and may also include a wireless communication interface. Among them, the wired communication interface can be, for example, an Ethernet interface. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface can be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof, etc.
在具体实现中,作为一种实施例,处理器801可以包括一个或多个CPU,如图8中所示的CPU0和CPU1。 In a specific implementation, as an embodiment, the processor 801 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 8 .
在具体实现中,作为一种实施例,通信设备可以包括多个处理器,如图8中所示的处理器801和处理器805。这些处理器中的每一个可以是一个单核处理器,也可以是一个多核处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the communication device may include multiple processors, such as processor 801 and processor 805 shown in Figure 8. Each of these processors may be a single-core processor or a multi-core processor. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (such as computer program instructions).
在具体实现中,作为一种实施例,通信设备还可以包括输出设备806和输入设备807。输出设备806和处理器801通信,可以以多种方式来显示信息。例如,输出设备806可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备807和处理器801通信,可以以多种方式接收用户的输入。例如,输入设备807可以是鼠标、键盘、触摸屏设备或传感设备等。In a specific implementation, as an embodiment, the communication device may further include an output device 806 and an input device 807. The output device 806 communicates with the processor 801 and may display information in a variety of ways. For example, the output device 806 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 807 communicates with the processor 801 and may receive user input in a variety of ways. For example, the input device 807 may be a mouse, a keyboard, a touch screen device, or a sensor device.
在一些实施例中,存储器803用于存储执行本申请方案的程序代码810,处理器801可以执行存储器803中存储的程序代码810。该程序代码810中可以包括一个或多个软件模块,该通信设备可以通过处理器801以及存储器803中的程序代码810,来实现上文图4实施例提供的数据管理方法。In some embodiments, the memory 803 is used to store the program code 810 for executing the solution of the present application, and the processor 801 can execute the program code 810 stored in the memory 803. The program code 810 may include one or more software modules, and the communication device can implement the data management method provided in the embodiment of FIG. 4 above through the processor 801 and the program code 810 in the memory 803.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意结合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络或其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如:同轴电缆、光纤、数据用户线(digital subscriber line,DSL))或无线(例如:红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质,或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如:软盘、硬盘、磁带)、光介质(例如:数字通用光盘(digital versatile disc,DVD))或半导体介质(例如:固态硬盘(solid state disk,SSD))等。值得注意的是,本申请实施例提到的计算机可读存储介质可以为非易失性存储介质,换句话说,可以是非瞬时性存储介质。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (for example: coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example: infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiment of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.
也即是,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有指令,当该指令在计算机上运行时,使得计算机执行上述数据管理方法的步骤。That is, the embodiment of the present application further provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a computer, the computer executes the steps of the above-mentioned data management method.
本申请实施例还提供了一种包含指令的计算机程序产品,当该指令在计算机上运行时,使得计算机执行上述数据管理方法的步骤。或者说,提供了一种计算机程序,当计算机程序在计算机上运行时,使得计算机执行上述数据管理方法的步骤。The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps of the above data management method. In other words, a computer program is provided, which, when executed on a computer, enables the computer to execute the steps of the above data management method.
应当理解的是,本文提及的“多个”是指两个或两个以上。在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,为了便于清楚描述本申请实施例的技术方案,在本申请实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。It should be understood that the "multiple" mentioned herein refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.
需要说明的是,本申请实施例所涉及的信息(包括但不限于用户设备信息、用户个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、展示的数据等)以及信号,均为经用户授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。例如,本申请实施例中涉及到的第一数据请求是在充分授权的情况下获取的。It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the first data request involved in the embodiments of this application is obtained with full authorization.
以上所述为本申请提供的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。 The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims (27)

  1. 一种数据管理方法,其特征在于,所述方法包括:A data management method, characterized in that the method comprises:
    服务器端接收第一数据请求,所述第一数据请求携带对象标识,所述对象标识指示第一数据集,所述第一数据集是为第一任务创建的自定义数据集,所述自定义数据集用于存储客户端用来管理所述服务器端的数据;The server receives a first data request, the first data request carries an object identifier, the object identifier indicates a first data set, the first data set is a custom data set created for a first task, and the custom data set is used to store data used by the client to manage the server;
    所述服务器端基于所述对象标识,对所述第一数据集进行管理。The server manages the first data set based on the object identifier.
  2. 如权利要求1所述的方法,其特征在于,所述对象标识为所述第一数据集的标识,或者,所述对象标识为所述第一任务的标识。The method as claimed in claim 1 is characterized in that the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
  3. 如权利要求1所述的方法,其特征在于,所述第一数据请求指示对所述第一数据集中的数据进行编辑操作,所述第一数据请求还携带待编辑的第一数据,所述编辑操作包括增加、修改、删除中的任一种;The method according to claim 1, wherein the first data request indicates an edit operation to be performed on the data in the first data set, the first data request further carries the first data to be edited, and the edit operation includes any one of adding, modifying, and deleting;
    所述服务器端基于所述对象标识,对所述第一数据集进行管理,包括:The server manages the first data set based on the object identifier, including:
    所述服务器端基于所述对象标识,对所述第一数据集执行关于所述第一数据的编辑操作。The server performs an editing operation on the first data set based on the object identifier.
  4. 如权利要求1所述的方法,其特征在于,所述第一数据请求指示对所述第一数据集中的数据进行编辑操作,所述第一数据请求还携带待编辑的第一数据,所述编辑操作包括增加、修改、删除中的任一种;The method according to claim 1, wherein the first data request indicates an edit operation to be performed on the data in the first data set, the first data request further carries the first data to be edited, and the edit operation includes any one of adding, modifying, and deleting;
    所述服务器端基于所述对象标识,对所述第一数据集进行管理,包括:The server manages the first data set based on the object identifier, including:
    在基于所述对象标识确定所述第一数据集存在的情况下,所述服务器端基于所述对象标识,对所述第一数据集执行关于所述第一数据的编辑操作。In a case where it is determined based on the object identifier that the first data set exists, the server performs an editing operation on the first data set based on the object identifier.
  5. 如权利要求4所述的方法,其特征在于,所述第一数据请求还携带所述第一数据集的类型,所述方法还包括:The method according to claim 4, wherein the first data request further carries a type of the first data set, and the method further comprises:
    在基于所述对象标识确定所述第一数据集不存在,且所述服务器端已创建的数据集的总数量小于最大数据集数量的情况下,所述服务器端基于所述对象标识和所述第一数据集的类型创建所述第一数据集;When it is determined based on the object identifier that the first data set does not exist and the total number of data sets created by the server is less than the maximum number of data sets, the server creates the first data set based on the object identifier and the type of the first data set;
    所述服务器端对所述第一数据集执行关于所述第一数据的编辑操作。The server performs an editing operation on the first data set.
  6. 如权利要求1所述的方法,其特征在于,所述第一数据请求指示对所述服务器端进行配置,所述第一数据集的类型为候选数据集类型;The method according to claim 1, wherein the first data request indicates configuration of the server side, and the type of the first data set is a candidate data set type;
    所述服务器端基于所述对象标识,对所述第一数据集进行管理,包括:The server manages the first data set based on the object identifier, including:
    所述服务器端基于所述对象标识,将所述第一数据集存储的数据提交至运行数据集。The server submits the data stored in the first data set to the running data set based on the object identifier.
  7. 如权利要求1所述的方法,其特征在于,所述第一数据请求指示对所述服务器端进行配置,所述第一数据集的类型为动态数据集类型;The method according to claim 1, wherein the first data request indicates configuration of the server side, and the type of the first data set is a dynamic data set type;
    所述服务器端基于所述对象标识,对所述第一数据集进行管理,包括:The server manages the first data set based on the object identifier, including:
    所述服务器端基于所述对象标识,将所述第一数据集存储的数据提交至操作数据集。The server submits the data stored in the first data set to the operation data set based on the object identifier.
  8. 如权利要求1所述的方法,其特征在于,所述第一数据请求指示对所述第一数据集进行删除,所述第一数据请求还携带所述客户端的标识;The method according to claim 1, wherein the first data request indicates deletion of the first data set, and the first data request also carries an identifier of the client;
    所述服务器端基于所述对象标识,对所述第一数据集进行管理,包括:The server manages the first data set based on the object identifier, including:
    在基于所述对象标识和所述客户端的标识,确定所述第一数据集满足数据集删除条件的情况下,所述服务器端基于所述对象标识,删除所述第一数据集。When it is determined that the first data set meets a data set deletion condition based on the object identifier and the identifier of the client, the server deletes the first data set based on the object identifier.
  9. 如权利要求8所述的方法,其特征在于,所述数据集删除条件包括:所述第一数据集是所述客户端指示所述服务器端创建的;或者,所述第一数据集不是所述客户端指示所述服务器端创建的,但所述客户 端具有管理权限。The method of claim 8, wherein the data set deletion condition comprises: the first data set is created by the server at the instruction of the client; or the first data set is not created by the server at the instruction of the client, but the client The client has administrative privileges.
  10. 如权利要求1所述的方法,其特征在于,所述第一数据请求指示所述服务器端创建所述第一数据集,所述第一数据请求还携带所述第一数据集的类型;The method according to claim 1, wherein the first data request instructs the server to create the first data set, and the first data request also carries a type of the first data set;
    所述服务器端基于所述对象标识,对所述第一数据集进行管理,包括:The server manages the first data set based on the object identifier, including:
    在所述第一数据集满足数据集创建条件的情况下,所述服务器端基于所述对象标识和所述第一数据集的类型创建所述第一数据集。In the case that the first data set meets the data set creation condition, the server creates the first data set based on the object identifier and the type of the first data set.
  11. 如权利要求10所述的方法,其特征在于,所述数据集创建条件包括:所述服务器端已创建的数据集不包括所述第一数据集。The method according to claim 10, characterized in that the data set creation condition includes: the data sets already created on the server side do not include the first data set.
  12. 如权利要求11所述的方法,其特征在于,所述数据集创建条件还包括:所述已创建的数据集的总数量小于最大数据集数量。The method according to claim 11, characterized in that the data set creation condition further includes: the total number of the created data sets is less than the maximum number of data sets.
  13. 如权利要求10-12任一所述的方法,其特征在于,所述第一数据请求还携带所述第一数据集的生存期;The method according to any one of claims 10 to 12, characterized in that the first data request also carries the lifetime of the first data set;
    所述服务器端基于所述对象标识和所述第一数据集的类型创建所述第一数据集之后,所述方法还包括:After the server creates the first data set based on the object identifier and the type of the first data set, the method further includes:
    所述服务器端设置所述第一数据集的生存期为所述第一数据请求携带的生存期。The server sets the lifetime of the first data set to the lifetime carried in the first data request.
  14. 如权利要求10-12任一所述的方法,其特征在于,所述服务器端基于所述对象标识和所述第一数据集的类型创建所述第一数据集之后,所述方法还包括:The method according to any one of claims 10 to 12, characterized in that after the server creates the first data set based on the object identifier and the type of the first data set, the method further comprises:
    所述服务器端设置所述第一数据集的生存期为默认生存期。The server sets the lifetime of the first data set to a default lifetime.
  15. 如权利要求13或14所述的方法,其特征在于,所述方法还包括:The method according to claim 13 or 14, characterized in that the method further comprises:
    所述服务器端在检测到所述第一数据集的生存期到期时,删除所述第一数据集。When the server detects that the lifetime of the first data set expires, the server deletes the first data set.
  16. 如权利要求1-15任一所述的方法,其特征在于,所述客户端通过网络配置管理协议对所述服务器端进行配置管理,所述网络配置管理协议包括但不限于网络配置协议NETCONF、表达性状态转移配置协议RESTCONF、约束应用协议管理接口CORECONF。The method according to any one of claims 1-15 is characterized in that the client performs configuration management on the server through a network configuration management protocol, and the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
  17. 一种数据管理方法,其特征在于,所述方法包括:A data management method, characterized in that the method comprises:
    客户端发送第一数据请求,所述第一数据请求携带对象标识,所述对象标识指示第一数据集,所述第一数据集是为第一任务创建的自定义数据集,所述自定义数据集用于存储所述客户端用来管理服务器端的数据,所述第一数据请求指示所述服务器端基于所述对象标识,对所述第一数据集进行管理。The client sends a first data request, which carries an object identifier. The object identifier indicates a first data set. The first data set is a custom data set created for a first task. The custom data set is used to store data used by the client to manage a server. The first data request instructs the server to manage the first data set based on the object identifier.
  18. 如权利要求17所述的方法,其特征在于,所述对象标识为所述第一数据集的标识,或者,所述对象标识为所述第一任务的标识。The method as claimed in claim 17 is characterized in that the object identifier is an identifier of the first data set, or the object identifier is an identifier of the first task.
  19. 如权利要求17所述的方法,其特征在于,所述第一数据请求指示对所述第一数据集中的数据进行编辑操作,所述第一数据请求还携带待编辑的第一数据,所述编辑操作包括增加、修改、删除中的任一种。The method as claimed in claim 17 is characterized in that the first data request indicates an editing operation on the data in the first data set, and the first data request also carries the first data to be edited, and the editing operation includes any one of adding, modifying, and deleting.
  20. 如权利要求17所述的方法,其特征在于,所述第一数据请求指示对所述服务器端进行配置,所述第一数据集的类型为候选数据集类型或者动态数据集类型。The method as claimed in claim 17 is characterized in that the first data request indicates configuration of the server side, and the type of the first data set is a candidate data set type or a dynamic data set type.
  21. 如权利要求17所述的方法,其特征在于,所述第一数据请求指示对所述第一数据集进行删除,所述第一数据请求还携带所述客户端的标识。 The method as claimed in claim 17 is characterized in that the first data request indicates deletion of the first data set, and the first data request also carries an identifier of the client.
  22. 如权利要求17所述的方法,其特征在于,所述第一数据请求指示所述服务器端创建所述第一数据集,所述第一数据请求还携带所述第一数据集的类型。The method as claimed in claim 17 is characterized in that the first data request instructs the server to create the first data set, and the first data request also carries the type of the first data set.
  23. 如权利要求22所述的方法,其特征在于,所述第一数据请求还携带所述第一数据集的生存期。The method as claimed in claim 22 is characterized in that the first data request also carries the lifetime of the first data set.
  24. 如权利要求17-23任一所述的方法,其特征在于,所述客户端通过网络配置管理协议对所述服务器端进行配置管理,所述网络配置管理协议包括但不限于网络配置协议NETCONF、表达性状态转移配置协议RESTCONF、约束应用协议管理接口CORECONF。The method according to any one of claims 17-23 is characterized in that the client performs configuration management on the server through a network configuration management protocol, and the network configuration management protocol includes but is not limited to the network configuration protocol NETCONF, the expressive state transfer configuration protocol RESTCONF, and the constraint application protocol management interface CORECONF.
  25. 一种服务器端,其特征在于,所述服务器端包括存储器和处理器;A server side, characterized in that the server side includes a memory and a processor;
    所述存储器,用于存储计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述计算机程序,以实现权利要求1-16任一所述方法的步骤。The processor is used to execute the computer program to implement the steps of any method described in claims 1-16.
  26. 一种客户端,其特征在于,所述客户端包括存储器和处理器;A client, characterized in that the client comprises a memory and a processor;
    所述存储器,用于存储计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述计算机程序,以实现权利要求17-24任一所述方法的步骤。The processor is used to execute the computer program to implement the steps of any method described in claims 17-24.
  27. 一种数据管理系统,其特征在于,所述数据管理系统包括服务器端和客户端;A data management system, characterized in that the data management system comprises a server and a client;
    所述服务器端,用于实现权利要求1-16任一所述方法的步骤;The server side is used to implement the steps of any method described in claims 1-16;
    所述客户端,用于实现权利要求17-24任一所述方法的步骤。 The client is used to implement the steps of any method described in claims 17-24.
PCT/CN2023/122848 2022-10-11 2023-09-28 Data management method, server, client and system WO2024078366A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202211241732 2022-10-11
CN202211241732.0 2022-10-11
CN202211516827.9A CN117880075A (en) 2022-10-11 2022-11-29 Data management method, server side, client side and system
CN202211516827.9 2022-11-29

Publications (1)

Publication Number Publication Date
WO2024078366A1 true WO2024078366A1 (en) 2024-04-18

Family

ID=90588821

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/122848 WO2024078366A1 (en) 2022-10-11 2023-09-28 Data management method, server, client and system

Country Status (2)

Country Link
CN (1) CN117880075A (en)
WO (1) WO2024078366A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102427409A (en) * 2012-01-31 2012-04-25 迈普通信技术股份有限公司 Configuration data submission method based on network configuration (NETCONF) protocol and server thereof
CN107133243A (en) * 2016-02-29 2017-09-05 华为技术有限公司 A kind of data processing method and server
US20190245732A1 (en) * 2016-09-19 2019-08-08 Telefonaktiebolaget Lm Ericsson (Publ) Method for network management based on netconf protocol, and associated network device
CN110109953A (en) * 2018-01-19 2019-08-09 阿里巴巴集团控股有限公司 A kind of data query method, device and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102427409A (en) * 2012-01-31 2012-04-25 迈普通信技术股份有限公司 Configuration data submission method based on network configuration (NETCONF) protocol and server thereof
CN107133243A (en) * 2016-02-29 2017-09-05 华为技术有限公司 A kind of data processing method and server
US20190245732A1 (en) * 2016-09-19 2019-08-08 Telefonaktiebolaget Lm Ericsson (Publ) Method for network management based on netconf protocol, and associated network device
CN110109953A (en) * 2018-01-19 2019-08-09 阿里巴巴集团控股有限公司 A kind of data query method, device and equipment

Also Published As

Publication number Publication date
CN117880075A (en) 2024-04-12

Similar Documents

Publication Publication Date Title
US11277306B2 (en) Sending information of a network repository function instance storing network function instance information
CN111258627B (en) Interface document generation method and device
US9590853B1 (en) Configuration of applications for distributed computing systems
US10972564B2 (en) System and method for automating actions in distributed computing
WO2018137196A1 (en) Network slicing management method, and management unit and system
US10834141B1 (en) Service-level authorization policy management
WO2020062959A1 (en) Data configuration method and apparatus
US8438573B2 (en) Dependency on a resource type
US10715605B2 (en) System and method for limiting active sessions
Lin et al. A QoS‐aware service discovery method for elastic cloud computing in an unstructured peer‐to‐peer network
CN110351107B (en) Configuration management method and device
US20240012700A1 (en) Governing Access To Third-Party Application Programming Interfaces
WO2024045646A1 (en) Method, apparatus and system for managing cluster access permission
WO2024078366A1 (en) Data management method, server, client and system
TWI740210B (en) Method for terminal device management and server
US11968238B2 (en) Policy management system to provide authorization information via distributed data store
CN113553206B (en) Data event execution method and device, electronic equipment and computer readable medium
CN111061723A (en) Workflow implementation method and device
CN115225493A (en) Wiraguard-based configuration generation method and equipment for networking nodes
WO2021135404A1 (en) Configuration information subscription method and device
WO2023125308A1 (en) Configuration management method and apparatus, device, system, storage medium and program product
US9401837B2 (en) Network management method and network management system
WO2018120222A1 (en) Vnffg management method, device and system
US11863617B1 (en) Dynamic decentralized hierarchical Holon network system
WO2023005858A1 (en) Configuration updating method and apparatus, and system and computer-readable storage medium