WO2023125380A1 - Data management method and corresponding apparatus - Google Patents

Data management method and corresponding apparatus Download PDF

Info

Publication number
WO2023125380A1
WO2023125380A1 PCT/CN2022/141828 CN2022141828W WO2023125380A1 WO 2023125380 A1 WO2023125380 A1 WO 2023125380A1 CN 2022141828 W CN2022141828 W CN 2022141828W WO 2023125380 A1 WO2023125380 A1 WO 2023125380A1
Authority
WO
WIPO (PCT)
Prior art keywords
target data
data
service
resource
target
Prior art date
Application number
PCT/CN2022/141828
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 WO2023125380A1 publication Critical patent/WO2023125380A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/61Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present application relates to the fields of communication technology and data storage technology, and in particular to a data management method and a corresponding device.
  • Hierarchical storage can also be performed according to the frequency of data access, so as to reduce storage costs on the basis of guaranteed performance.
  • the present application provides a data management method for quickly identifying target data in a network and performing corresponding operations.
  • the embodiment of the present application also provides a corresponding device, a computer-readable storage medium, a computer program product, and the like.
  • the first aspect of the present application provides a data management method, the method is applied to network equipment, the network equipment is a switching equipment or a network interface device installed in the switching equipment or data node, the method includes: the network equipment obtains data management rules, Data management rules include message analysis rules, response conditions, and response strategies; network devices analyze service messages from clients according to message analysis rules to determine the target data associated with service messages, and the target data is application layer data; network The device counts the service requests related to the target data, and the service requests are obtained from the service messages; when the statistical results of the service requests related to the target data meet the response conditions, the network device will respond to the service messages received by the network device according to the response strategy. And/or act accordingly on the target data.
  • Data management rules include message analysis rules, response conditions, and response strategies
  • network devices analyze service messages from clients according to message analysis rules to determine the target data associated with service messages, and the target data is application layer data
  • network The device counts the service requests related to the target data, and the service requests are obtained from the service messages; when the statistical
  • the data system where the network device is located may be a distributed system or a centralized system
  • the distributed system may include a distributed database service system
  • the centralized system may include a centralized database service system
  • other related underlying storage system may be a distributed system or a centralized system
  • the switching device may be a switch, a router or a gateway device, etc. used to implement data forwarding in the network, such as: storage area network (storage area network, SAN) switch, Ethernet switch, fiber optic switch or other physical switches
  • the device can also be a virtual switch.
  • a data node can be a physical machine, a virtual machine (virtual machine, VM) or other forms of resources for data storage.
  • the network interface device may be a network card, an accelerator card, a data processing unit (data processing unit, DPU) or a network interface, such as a switch interface.
  • the client may be a terminal device or an application installed on the terminal device.
  • the data management rules may be pre-configured on the network equipment, or may be received from a rule management device or a service server related to the target data.
  • a service packet refers to a packet of data related to a service.
  • Service messages can be transmitted in the network using Transmission Control Protocol/Internet Protocol (Transmission Control Protocol/Internet Protocol, TCP/IP), or remote direct memory access (remote direct memory access, RDMA) protocol, or other communication protocols.
  • Transmission Control Protocol/Internet Protocol Transmission Control Protocol/Internet Protocol
  • RDMA remote direct memory access
  • the target data associated with the service message can be directly parsed from the service message, or can be searched according to the identifier (such as: index information or address information of the target data) parsed from the service message arrived.
  • the service request related to the target data refers to a request for reading or writing the target data, etc., and the type of the service request can be parsed from the service message.
  • the message parsing rules refer to the rules for parsing business messages, which can be: the content that needs to be parsed in the first step, the content that needs to be parsed in the second step, etc.
  • the rules of message parsing can specify the required Parsed fields.
  • the response condition refers to the condition that needs to be met to trigger the response policy to take effect.
  • the response strategy refers to a quality of service (Qos) adjustment strategy or a resource adjustment strategy made for service packets or target data.
  • Qos quality of service
  • the service quality in the embodiment of the present application refers to the network service quality.
  • the network equipment can identify and process the target data, and will not occupy the resources of the service server used to provide the target data-related services, and will not cause resource conflicts with the target data-related services, and, through the network equipment It can be identified in advance when the business request related to the target data is still being transmitted in the network, and then take corresponding actions, which can reduce the probability that the target data will be overloaded and accessed, resulting in excessive pressure on the business server.
  • the response condition includes a statistical rule and a response relationship; wherein, the statistical rule includes a statistical time length, and the response relationship includes a relationship between the number of business requests counted according to the statistical time length and the target threshold.
  • the statistical results of the business requests related to the target data include: the number of the business requests related to the target data within the statistical time period.
  • the statistical result meeting the response condition includes: according to the indication of the response relationship, the number of business requests related to the target data within the statistical time exceeds the target threshold, if the number exceeds the target threshold, and the target data is not existing hot data, it indicates that the target data is newly generated hot data; or, the statistical result meets the response condition including: according to the indication of the response relationship, the number of business requests related to the target data is low within the statistical period At the target threshold, if the quantity is lower than the target threshold and the target data is existing hot data, it indicates that the hot attribute of the target data disappears.
  • the statistical duration refers to the length of time used to count service requests, such as: 1 minute, 2 minutes, 5 minutes or other values.
  • the response relationship refers to the relationship between the number of business requests counted according to the statistical duration and the target threshold (such as: exceeding the target threshold or lower than the target threshold. It should be noted that there is only one relationship in a response relationship, or it is greater than the target threshold threshold, or less than the target threshold). When taking the response relationship greater than the target threshold as an example, for example: the statistical duration is 1 minute, and the target threshold is 10,000 times.
  • the target data is not existing hot data, it means that the target data is newly generated hot data, and the statistical result satisfies the response condition.
  • the response relationship is less than the target threshold as an example, if the statistical result is that the number of business requests related to the target data in one minute is 7,000 times, and when the target data is existing hot data, it means that the statistics The result also satisfies the response condition.
  • the process of hot data generation or hot data disappearance can be counted. If the statistics show that the service request for target data that is not hot data exceeds the target threshold within one minute, it can be understood as the process of hot data generation. If the statistics are counted If the one-minute business request of target data that is already hot data is lower than the target threshold, it can be understood as the process of hot data disappearing.
  • the target thresholds in the response relationship used for hotspot data generation and hotspot data disappearance may be different.
  • hot data refers to data whose active volume exceeds a certain threshold for a period of time, such as: data that has been visited, clicked, browsed, followed, and downloaded many times.
  • Hot data can be hot products, Various forms of data such as hot news, hot applications, hot programs, and node music.
  • statistical hotspot data can be used, such as: least recently used (least recently used, LRU), recently least frequently used (least frequently used, LFU), and first in first out (first in first out, FIFO), etc. algorithm.
  • the network device can quickly identify and process the hot data, and will not occupy the resources of the service server used to provide the target data-related services, and will not cause resource conflicts with the target data-related services. Moreover, through The network device can identify the hotspot data in advance and take corresponding actions when the hotspot data is still being transmitted in the network, which can reduce the probability that the hotspot data will be overloaded and accessed, resulting in excessive pressure on the business server.
  • the response conditions include multiple sets of statistical rules and response relationships, the statistical durations in different statistical rules are different, and the target thresholds in the response relationships corresponding to different statistical rules are different; different Different adjustment strategies in response strategies corresponding to statistical rules.
  • the statistical duration included in the statistical rule and the target threshold in the response relationship usually correspond.
  • the statistics time is 1 minute
  • the target threshold is 10,000 times
  • the statistics time is 2 minutes
  • the target threshold is 20,000 times
  • the statistics time is 5 minutes
  • the target threshold is 50,000 times.
  • the relationship between the statistical duration in different statistical rules and the target threshold in the corresponding response relationship does not necessarily change proportionally.
  • the statistical rules include the statistical duration
  • the statistical rules can also include other parameters, such as: the identification of the statistical object.
  • the identification of the statistical object can be, for example, the external business address of the target data corresponding business.
  • the statistical object identifier can be set in the statistical rule, and if the same set of response conditions is used for all data, the statistical object identifier may not be set.
  • the response strategy includes: a service quality adjustment strategy for service packets with target priority, and an adjustment strategy for resource expansion or resource shrinkage for target data; wherein, target priority level is included in the response policy.
  • the network device performs corresponding operations on the service packets received by the network device and/or on the target data according to the response policy, including: when the target data is a newly generated hotspot data, the network device lowers the service quality of target priority service packets according to the service quality adjustment policy, and/or performs resource expansion operations on the target data according to the resource expansion adjustment policy; when the hotspot attribute of the target data disappears
  • the network device adjusts the service quality of the service packets with the priority of the target service according to the service quality adjustment strategy, and/or performs resource shrinkage operations on the target data according to the resource shrinkage adjustment strategy.
  • the network equipment can receive service messages with different priorities.
  • hot data is generated, in order to avoid the impact of hot data on high priority services, the high priority service messages can be processed first.
  • the processing of high-priority service packets can reduce the service quality of target priority service packets according to the target priority specified in the response policy (for example: reduce the bandwidth, delay or packet loss rate, etc.). And/or, do resource expansion for hot data, that is, increase hot data resources, so that the impact of hot data on high-priority services can be alleviated.
  • resources for expansion or contraction of hotspot data include network resources, computing resources, and storage resources.
  • the disappearance of the hotspot data means that the resources occupied by the hotspot data will be vacated.
  • the service quality of the service message of the target priority can be improved, which is beneficial to the priority of these targets. better processing of business packets.
  • shrink resources for hot data that is, reduce hot data resources, which can improve resource utilization.
  • the network device parses the service message from the client according to the message parsing rules to determine the target data associated with the service message, including: the network device analyzes the service message according to the message The parsing rule parses the five-tuple of the service message to determine the service type of the service message; the network device parses the indication field according to the message parsing rule to determine the target data of the service type or the index information of the target data, and the index information is used to determine target data.
  • the five-tuple includes the destination address, and the service type of the service message can be determined through the destination address, such as: the destination address can be the IP address of the game server, the IP address of the video server, or the IP address of the music server , and the IP address of the e-commerce server.
  • the indication field in the service message can be located in the message header or in the message load.
  • the indication field can be the index information of a certain target data.
  • the index information can be the specific address of the target data or the address of the target data. name or logo etc.
  • the response strategy indicates that the control node used to manage the data node executes the adjustment strategy for resource expansion or resource reduction;
  • Perform resource expansion operations including: the network device sends an expansion notice to the control node, and the expansion notice is used to instruct the control node to perform resource expansion for the target data; or, the above steps: make resource shrinkage for the target data according to the resource shrinkage adjustment strategy
  • the operation includes: the network device sends a capacity reduction notification to the control node, and the capacity reduction notification is used to instruct the control node to perform resource reduction for the target data.
  • control node refers to a device that globally manages the resources in the system where the network device is located.
  • the control node can expand the resource capacity of the target data according to the received
  • the capacity notification performs resource shrinkage for the target data, because the control node coordinates the resources of the entire system, and can make better resource expansion or resource shrinkage for the target data.
  • the data node further includes a first control device; when the response strategy indicates that the first control device executes an adjustment strategy for resource expansion or resource shrinkage; the above steps: Adjusting the policy to perform resource expansion operations on the target data includes: the network device sends a capacity expansion notice to the first control device, and the capacity expansion notice is used to instruct the first control device to perform resource expansion for the target data; or, the above steps: The operation of adjusting the strategy to shrink resources for the target data includes: the network device sends a shrink notification to the first control device, and the shrink notification is used to instruct the first control device to shrink resources for the target data.
  • the process of resource expansion or resource reduction for target data is completed by the first control device in the data node.
  • the network device is a network interface device installed on the switching device; the switching device further includes a second control device, and when the response policy indicates that the resource expansion or resource reduction is performed by the control device
  • the above steps perform resource expansion operations on the target data according to the resource expansion adjustment strategy, including: the network interface device sends a capacity expansion notification to the second control device, and the capacity expansion notification is used to instruct the second control device to perform resource expansion for the target data. capacity expansion; or, the above step: performing a resource reduction operation on the target data according to the resource reduction adjustment strategy, including: the network interface device sends a capacity reduction notification to the second control device, and the capacity reduction notification is used to instruct the second control device to be Target data for resource shrinkage.
  • the second control device on the switching device completes the resource expansion or resource reduction process of the target data, which eliminates the need to configure a control node in the system and simplifies the network structure.
  • the network device obtains the data management rules includes: the network device obtains the data management rules from a service server or a rule management device, and the service server is a server related to the target data.
  • a second aspect of the present application provides a network device, where the network device has a function of implementing the first aspect or the method of any possible implementation manner of the first aspect.
  • This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions, for example: an acquisition unit, a first processing unit, a second processing unit, and an operation unit, wherein the first processing unit and the second processing unit can also be processed through a processing unit to achieve.
  • a third aspect of the present application provides a network device, the network device includes at least one processor, a memory, an input/output (input/output, I/O) interface, and a computer executable stored in the memory and operable on the processor Instructions, when the instruction executed by the network device is executed by the processor, the processor executes the method in the first aspect or any one possible implementation manner of the first aspect.
  • the fourth aspect of the present application provides a computer-readable storage medium that stores one or more computer-executable instructions.
  • the computer-executable instructions are executed by a processor, one or more processors execute any of the above-mentioned first aspect or first aspect.
  • the fifth aspect of the present application provides a computer program product that stores one or more computer-executable instructions.
  • the computer-executable instructions are executed by one or more processors, one or more processors execute the above-mentioned first aspect or first A method for any one of the possible implementations of the aspect.
  • the sixth aspect of the present application provides a network card
  • the network card includes an input interface, an output interface and at least one processor
  • the input interface is used to receive service messages
  • at least one processor is used to support the network card to realize the first aspect or the first aspect
  • the output interface is used to send the notification of capacity expansion or capacity reduction.
  • the network card may also include memory, memory, and necessary program instructions and data for network equipment.
  • FIG. 1 is a schematic structural diagram of a distributed system provided by an embodiment of the present application.
  • Fig. 2 is a schematic structural diagram of the centralized system provided by the embodiment of the present application.
  • Fig. 3 is a schematic diagram of an embodiment of a data management method provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of another embodiment of the data management method provided by the embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a service message provided by an embodiment of the present application.
  • Fig. 6 is a schematic diagram of another embodiment of the data management method provided by the embodiment of the present application.
  • Fig. 7 is a schematic diagram of another embodiment of the data management method provided by the embodiment of the present application.
  • Fig. 8 is a schematic diagram of another embodiment of the data management method provided by the embodiment of the present application.
  • Fig. 9 is a schematic diagram of another embodiment of the data management method provided by the embodiment of the present application.
  • FIG. 10 is another schematic structural diagram of a service message provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • FIG. 12 is another schematic structural diagram of a network device provided by an embodiment of the present application.
  • An embodiment of the present application provides a data management method for quickly identifying target data in a network and performing corresponding operations.
  • the embodiment of the present application also provides a corresponding device, a computer-readable storage medium, a computer program product, and the like. Each will be described in detail below.
  • the method provided by the embodiment of this application can be implemented on a network device.
  • the data system where the network device is located can be a distributed system or a centralized system.
  • the distributed system can include a distributed database service system
  • the centralized system can include a centralized database service system, and other systems involving underlying storage.
  • FIG. 1 is a schematic diagram of a scenario of a distributed system provided by an embodiment of the present application.
  • a client can access the distributed system through a network
  • the distributed system includes a service entry node, a switching device, a control node, and multiple data nodes.
  • the service entry node is in communication connection with the switching device
  • the switching device is in communication connection with the control node and each data node.
  • the distributed system may not include a control node, and the function of the control node is implemented by a switching device.
  • the service entry node is equivalent to the interface connecting the client network and the distributed system.
  • a service entry node can be connected to multiple switching devices (only one switching device is shown in Figure 1), and the service entry node is used to receive business from the client. message, and deliver the service message to the switching device, and the switching device distributes it to different data nodes.
  • the service entry node can realize the load balancing of each switching device.
  • Data nodes can communicate with control nodes through switching devices, and control nodes can also send messages to each data node through switching devices.
  • a service packet refers to a packet of data related to a service.
  • Service packets can be transmitted in the network using Transmission Control Protocol/Internet Protocol (Transmission Control Protocol/Internet Protocol, TCP/IP), or remote direct memory access (remote direct memory access, RDMA) protocol, or other communication protocols.
  • Transmission Control Protocol/Internet Protocol Transmission Control Protocol/Internet Protocol
  • RDMA remote direct memory access
  • the switching device can be a switch, a router or a gateway device, etc. used to implement data forwarding in the network, such as: a storage area network (storage area network, SAN) switch, an Ethernet switch, a fiber switch or other physical switching devices, or It is a virtual device, such as a virtual switch.
  • a storage area network storage area network, SAN
  • Ethernet switch Ethernet switch
  • fiber switch fiber switch
  • other physical switching devices or It is a virtual device, such as a virtual switch.
  • Data nodes can be physical machines, virtual machines (virtual machine, VM) or other forms of resources for data storage, such as: data storage (data storage) or non-volatile memory, the data storage includes but not Limited to solid state drives (SSD), disk arrays, or other types of non-transitory computer-readable media, it can also include traditional dynamic random access memory (dynamic random access memory, DRAM) and new persistent memory ( persistent memory, PMem).
  • Non-volatile memory includes semiconductor memory devices such as erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM) and flash memory (flash memory) ; Disks, such as internal hard disk or removable disk, magneto optical disk, and CD ROM and DVD-ROM.
  • the control node can be a physical machine or a virtual machine, and is used to manage global resources in a distributed system, including computing resources, storage resources, and network resources.
  • the client may be a terminal device or an application installed on the terminal device.
  • Terminal equipment also called user equipment (UE)
  • UE user equipment
  • UE user equipment
  • the terminal can be mobile phone (mobile phone), tablet computer (pad), computer with wireless transceiver function, virtual reality (virtual reality, VR) terminal, augmented reality (augmented reality, AR) terminal, industrial control (industrial control) Wireless terminals, wireless terminals in self driving, automatic driving devices, wireless terminals in remote medical, wireless terminals in smart grid, wireless in transportation safety Terminals, wireless terminals in smart cities, wireless terminals in smart homes, etc.
  • virtual reality virtual reality, VR
  • augmented reality augmented reality, AR
  • industrial control industrial control
  • Wireless terminals wireless terminals in self driving, automatic driving devices, wireless terminals in remote medical, wireless terminals in smart grid, wireless in transportation safety Terminals, wireless terminals in smart cities, wireless terminals in smart homes, etc.
  • FIG. 2 is a schematic diagram of a scenario of a centralized system provided by an embodiment of the present application.
  • the client can access the centralized system through the network, and the centralized system includes multiple centralized services, wherein each centralized service includes a The service entry node and a data node manage the computing resources, storage resources and network resources in the centralized service.
  • the service entry node is equivalent to the interface connecting the network of the client and the centralized system.
  • the service entry node is used to receive the business message from the client and pass the service message to the corresponding data node.
  • the structures of the distributed system and the centralized system have been introduced above.
  • the data management method provided by the embodiment of the present application can be applied to the distributed system shown in FIG. 1 and the centralized system shown in FIG. 2 , for example.
  • the data management method is applied to a network device, and the network device may be a switching device in the above-mentioned distributed system or a centralized system, or a network interface device installed in a switching device or a data node.
  • the network interface device may be a network card, an accelerator card, a data processing unit (data processing unit, DPU) or a network interface, such as a switch interface.
  • an embodiment of the data management method provided by the embodiment of the present application includes:
  • the network device acquires data management rules, and the data management rules include message parsing rules, response conditions, and response strategies.
  • the data management rules may be pre-configured on the network equipment, or may be received from a rule management device or a service server related to the target data, where the service server is a server related to the target data.
  • the message parsing rules refer to the rules for parsing business messages, which can be: the content that needs to be parsed in the first step, the content that needs to be parsed in the second step, etc.
  • the fields that need to be parsed can be specified in the message parsing rules.
  • Response conditions refer to the conditions that need to be met to trigger the response policy to take effect.
  • the response strategy refers to a quality of service (Qos) adjustment strategy or a resource adjustment strategy made for service packets or target data.
  • Qos quality of service
  • the service quality in the embodiment of the present application refers to the network service quality.
  • the network device parses the service message from the client according to the message parsing rules to determine the target data associated with the service message, and the target data is application layer data.
  • the target data associated with the service message can be directly parsed from the service message, or can be found according to the identifier (such as: index information or address information of the target data) parsed from the service message.
  • This step 102 may include: the network device parses the five-tuple of the service message according to the message parsing rule to determine the service type of the service message; the network device parses the indication field according to the message parsing rule to determine the target data or Index information of the target data, the index information is used to determine the target data.
  • the five-tuple includes the destination address, through which the business type of the service message can be determined, for example: the destination address can be the IP address of the game server, the IP address of the video server, the IP address of the music server, and the e-commerce The IP address of the server, etc.
  • the indication field in the service message can be located in the message header or in the message load.
  • the indication field can be the index information of a certain target data.
  • the index information can be the specific address of the target data or the address of the target data. name or logo etc.
  • the network device counts service requests related to the target data, and the service requests are obtained from service packets.
  • the service request related to the target data refers to a request for reading or writing the target data, etc., and the type of the service request can be parsed from the service message.
  • the network device When the statistical result of the service request related to the target data satisfies the response condition, the network device performs corresponding operations on the service message received by the network device and/or on the target data according to the response strategy.
  • the network device can identify and process the target data without occupying the resources of the service server used to provide the target data-related services, and will not cause resource conflicts with the target data-related services. Moreover, the network device can When the business request related to the target data is still transmitted in the network, it can be identified in advance and then take corresponding actions, which can reduce the probability of causing the target data to be overloaded and accessed, resulting in excessive pressure on the business server.
  • the response condition includes a statistical rule and a response relationship; wherein, the statistical rule includes a statistical time length, and the response relationship includes a relationship between the number of service requests counted according to the statistical time length and the target threshold.
  • the statistical results of the business requests related to the target data include: the number of the business requests related to the target data within the statistical time period.
  • Statistical results satisfying the response conditions include: according to the indication of the response relationship, the number of business requests related to the target data exceeds the target threshold within the statistical period. If the number exceeds the target threshold and the target data is not existing hot data, indicate the target data It is newly generated hotspot data; or, the statistical results meet the response conditions include: according to the indication of the response relationship, the number of business requests related to the target data within the statistical period is lower than the target threshold, if the number is lower than the target threshold, and the target data If it is existing hotspot data, the hotspot attribute indicating the target data disappears.
  • the statistical duration refers to the length of time used for statistical service requests, such as: 1 minute, 2 minutes, 5 minutes or other values.
  • the response relationship refers to the relationship between the number of business requests counted according to the statistical duration and the target threshold (such as: exceeding the target threshold or lower than the target threshold. It should be noted that there is only one relationship in a response relationship, or it is greater than the target threshold threshold, or less than the target threshold).
  • the response relationship is greater than the target threshold as an example, for example: the statistical duration is 1 minute, and the target threshold is 10,000 times. If the statistical result is that the number of business requests related to the target data in one minute is 12,000 times , and the target data is not existing hot data, it means that the target data is newly generated hot data, and the statistical result satisfies the response condition.
  • the response relationship is less than the target threshold as an example, if the statistical result is that the number of business requests related to the target data in one minute is 7,000 times, and when the target data is existing hot data, it means the The statistical results also meet the response conditions.
  • a record table of hot data can be maintained on the network device, and data information that has become hot data is marked in the record table.
  • the statistical time length is the same, the response relationship can be different, and whether the response condition is met or not needs to be considered whether the target data is an existing hot data.
  • the statistical rules can be marked as the rules used for the existing hotspot data, or the rules used for the non-existing hotspot data.
  • Table 1 is just an example.
  • the statistical duration can be set to be longer than the scene where the hotspot data is generated.
  • the statistical duration of the scene where the hotspot data is generated is set to 1 minute.
  • the statistical duration of the scene where the hotspot data disappears is set to 3 minutes or 5 minutes, of course, the specific value is not limited in this embodiment of the application.
  • the detection cycle can also be set for the scene where the hot data disappears, and the resource shrinking process or other service quality adjustments are made to the data when the business requests for the hot data are detected to be declining for several consecutive cycles.
  • the process of hot data generation or hot data disappearance can be counted. If the statistics show that the service request for target data that is not hot data exceeds the target threshold within one minute, it can be understood as the process of hot data generation. If It can be understood as the process of hot data disappearing if the business requests within one minute of the target data that are already hot data are lower than the target threshold.
  • the target thresholds in the response relationship used for hotspot data generation and hotspot data disappearance may be different.
  • hot data refers to data whose activity exceeds a certain threshold for a period of time, such as: data that has been accessed, clicked, browsed, followed, and downloaded many times.
  • Hot data can be hot Various forms of data such as commodities, hot news, hot applications, hot programs, and node music.
  • Statistical hotspot data can be used, such as: least recently used (least recently used, LRU), least recently used (least frequently used, LFU), and first in first out (first in first out, FIFO) and other algorithms.
  • the response conditions include multiple sets of statistical rules and response relationships.
  • the statistical durations in different statistical rules are different, and the target thresholds in the response relationships corresponding to different statistical rules are different; different statistical rules correspond to Different adjustment strategies in the response strategy.
  • the statistical duration included in the statistical rule and the target threshold in the response relationship usually correspond.
  • the statistics time is 1 minute
  • the target threshold is 10,000 times
  • the statistics time is 2 minutes
  • the target threshold is 20,000 times
  • the statistics time is 5 minutes
  • the target threshold is 50,000 times.
  • the relationship between the statistical duration in different statistical rules and the target threshold in the corresponding response relationship does not necessarily change proportionally.
  • the statistical rules include the statistical duration
  • the statistical rules can also include other parameters, such as: the identification of the statistical object.
  • the identification of the statistical object can be, for example, the external business address of the target data corresponding business.
  • the statistical object identifier can be set in the statistical rule, and if the same set of response conditions is used for all data, the statistical object identifier may not be set.
  • the response strategy includes: a service quality adjustment strategy for service packets with a target priority, and an adjustment strategy for resource expansion or resource shrinkage for target data; wherein, the target priority is included in response strategy.
  • the above step 104 may include two cases, one is the processing process when the hotspot data is generated, and the other is the processing process when the hotspot data disappears, which will be introduced respectively below.
  • the network device When the target data is newly generated hotspot data, the network device lowers the service quality of the target priority service packets according to the service quality adjustment strategy, and/or performs resource expansion operations on the target data according to the resource expansion adjustment strategy;
  • the network device can receive service messages of different priorities.
  • the high priority service messages can be processed first.
  • the service quality of target priority service packets can be lowered according to the target priority specified in the response policy (for example: reduce the bandwidth, time delay or packet loss rate, etc.).
  • do resource expansion for hot data that is, increase hot data resources, so that the impact of hot data on high-priority services can be alleviated.
  • resources for expansion or contraction of hotspot data include network resources, computing resources, and storage resources.
  • the network device adjusts the quality of service of the service packets with the priority of the target business according to the service quality adjustment strategy, and/or performs resource shrinkage operations on the target data according to the resource shrinkage adjustment strategy .
  • the disappearance of the hot data means that the resources occupied by the hot data before will be vacated.
  • the service quality of the service message with the target priority can be improved, which is beneficial to these targets.
  • Priority service packets are better processed.
  • shrink resources for hot data that is, reduce hot data resources, which can improve resource utilization.
  • the response condition includes multiple sets of statistical rules and response relationships
  • different sets of statistical rules may correspond to adjustment strategies in different response strategies, and the corresponding relationship may be understood with reference to the example in Table 2 below.
  • the management process of the target data is slightly different in different scenarios, and the management process of the target data in each scenario will be introduced respectively below.
  • the network device can be a switching device or a network interface device installed on the switching device or data node.
  • the network device is installed on the network card of the data node as an example.
  • another embodiment of the data management method provided by the embodiment of the present application includes:
  • the network card receives a service packet from the client.
  • the network card has pre-acquired the data management rules described above. As shown in FIG. 4 , the data management rules have been pre-acquired from the rule management device.
  • the network card parses the service packets from the client according to the packet parsing rules, so as to determine the target data associated with the service packets.
  • the service message includes the message header (Eth Header, IP Header, and TCP Header) and the message payload (RESP payload).
  • the text parsing rule parses the packet header, determines the destination address of the data requested by the service packet according to the IP address, and then parses the packet payload to determine that the packet payload includes the read request for the target data and the target data According to the index information, the target data can be obtained from the server at the IP address.
  • the network card counts the service requests related to the target data according to the statistical duration in the statistical rule.
  • the target data When the target data is not recorded in the hot data record table, it means that the target data is not hot data, then you can choose the response condition of not hot data, or the statistical rule of not hot data and the corresponding response relationship. Then count the number of business requests related to the target data during the statistical period. When the number is greater than the target threshold, it means that the target data is newly generated hot data.
  • the target data When the target data has been recorded in the hot data record table, it means that the target data is hot data, then you can choose the response condition of hot data, or the statistical rules of hot data and the corresponding response relationship. Then count the number of service requests related to the target data during the statistical period. When the data is less than the target threshold, it means that the hotspot attribute of the target data has disappeared.
  • the network card When the statistical result of the service request related to the target data satisfies the response condition, the network card lowers the service quality of the service message with the target priority, or increases the service quality of the service message with the target priority.
  • the network card For the newly generated hot data, the network card can lower the service quality of the target priority business packets. For the target data whose hotspot attribute has disappeared, the network card can increase the service quality of the target priority business packets.
  • the network card sends a capacity expansion notice or a capacity reduction notice to the control node through the switching device.
  • the capacity expansion notification is used to instruct the control node to perform resource expansion for the target data.
  • the capacity reduction notification is used to instruct the control node to perform resource reduction for the target data.
  • the NIC sends a capacity expansion notice; if it is a scene where hot data disappears, the network card sends a capacity reduction notice.
  • the control node performs resource expansion for the target data according to the capacity expansion notification, or, the control node performs resource reduction for the target data according to the capacity reduction notification.
  • the resource expansion process may be that the control node sends a notification to a certain data node, indicating that the data node is also a node for processing target data.
  • the resource shrinking process may be that the control node sends a notification to a certain data node, indicating that the data node is no longer a node for processing target data.
  • control node coordinates the resources of the entire network, it can make better resource expansion or resource reduction for the target data.
  • the above describes the process in which the network card on the data node is used as a network device to manage the above-mentioned hot data in conjunction with FIG. 4 .
  • the network device is a network interface device on a switching device, the above process can be understood with reference to FIG. 6 .
  • the following describes the hotspot data management process when the network device is a network interface on a switching device, such as a switch interface, in a distributed system scenario with reference to FIG. 6 .
  • FIG. 6 another embodiment of the data management method provided by the embodiment of the present application includes:
  • a network interface on the switching device receives a service packet from a client.
  • the network interface parses the service packets from the client according to the packet parsing rules, so as to determine the target data associated with the service packets.
  • the network interface counts service requests related to the target data according to the counting duration in the counting rule.
  • the network interface When the statistical result of the service request related to the target data satisfies the response condition, the network interface lowers the service quality of the service message with the target priority, or increases the service quality of the service message with the target priority.
  • the network interface sends a capacity expansion notice or a capacity reduction notice to the control node.
  • the control node performs resource expansion for the target data according to the capacity expansion notification, or, the control node performs resource reduction for the target data according to the capacity reduction notification.
  • the above describes the process of managing the above-mentioned hotspot data by using the network interface on the switching device as a network device in conjunction with Fig. 6.
  • the network device is a switching device
  • the process is the same as the process in Fig. 6 above, and you can refer to the process in Fig. 6 for understanding .
  • the solution introduced in FIG. 6 above is a process of implementing resource expansion or resource reduction through the control node when the network device is the network interface of the switching device.
  • a control device may also be installed on the switching device, and the resource expansion or resource reduction process may be implemented through the control device.
  • the process of this scenario may be understood by referring to FIG. 7 .
  • steps 401 to 404 in this scenario can be understood by referring to steps 301 to 304 in FIG. 6 , and steps 405 and 406 are different from FIG. 6 .
  • the network interface sends a capacity expansion notice or a capacity reduction notice to the control device.
  • the control device performs resource expansion for the target data according to the capacity expansion notification, or, the control device performs resource reduction for the target data according to the capacity reduction notification.
  • the control device in the distributed scenario may also be referred to as a second control device.
  • step 406 can be understood by referring to the corresponding description in the preceding step 206 .
  • the above describes the management process of hotspot data when the network device in the distributed system is the network card on the data node, the network interface on the switching device, and the switching device. data management process.
  • the network device is a network interface device installed on a data node, and the data node also includes a control device.
  • another embodiment of the data management method provided by the embodiment of the present application includes:
  • Steps 501 to 504 in this embodiment can be understood by referring to steps 201 to 204 in FIG. 4 , except for steps 505 and 506 .
  • the network card sends a capacity expansion notice or a capacity reduction notice to the control device.
  • the control device performs resource expansion for the target data according to the capacity expansion notification, or, the control device performs resource reduction for the target data according to the capacity reduction notification.
  • the control device in the centralized scenario may also be referred to as a first control device.
  • the amount of resources of each data node is usually very large, and the idle resources or business resources on the data node can be adjusted to serve the hot data, or the idle resources generated due to the disappearance of hot data can be recovered.
  • the solution provided by the embodiment of the present application can also be applied to the Redis business scenario.
  • the application process in the Redis business scenario can be understood by referring to FIG. 9.
  • Proxy nodes one of which can be selected as the control node
  • Redis data nodes the service entry node is mainly responsible for business distribution and processing
  • the business proxy node is mainly responsible for business link management and data caching
  • the Redis data node mainly provides data read and write services.
  • the data of video A, video B and video C are respectively distributed in three Redis data nodes, and each Redis data node is performed by a network card to perform data identification and statistics
  • the process the specific process includes:
  • the network card in the Redis data node of video A receives the service packet.
  • the network card first parses the service packets according to the packet parsing rules.
  • the format of the service message can be understood by referring to Figure 10.
  • the network card first analyzes the message header, determines the IP address of the server where the video A is located, and then analyzes the message load to determine the index information of the video A. , according to the index information, the specific content in the corresponding video A can be found.
  • the network card counts the service requests related to video A according to the statistical rules in the response condition.
  • the network card lowers the service quality of the service packets with the service priority specified in the response policy.
  • the network card sends a capacity expansion notice to the service proxy node serving as the control node.
  • the control node sends a notification to another idle Redis data node, instructing the Redis data node to provide video A with data processing services.
  • the above-mentioned Figures 4 to 9 all involve the process of expanding or shrinking the target data, and the device performing the expansion or shrinking can be the control node, or the first control device or the second control device , the process of which device will perform capacity expansion or contraction can be indicated in the response policy, and the network device can send a capacity expansion notice or a capacity contraction notice to the device for performing capacity expansion or contraction indicated in the response policy, and then the device to complete the expansion or reduction process.
  • the above provides centralized and distributed storage or database services, which changes the traditional method of hotspot statistics in the main control business process, and sends the statistics and identification of hotspots to network devices for operation.
  • the technology of this application can be used to replace them.
  • network resources can be fully utilized for statistical identification of data.
  • the model data can also be identified and counted through this solution.
  • the network device 70 provided by the embodiment of the present application may be a switching device or a network interface device installed in a switching device or a data node.
  • An embodiment of the network device 70 includes:
  • the acquiring unit 701 is configured to acquire data management rules, where the data management rules include message parsing rules, response conditions, and response policies.
  • the obtaining unit 701 may execute step 101 in the foregoing method embodiments.
  • the first processing unit 702 is configured to parse the service message from the client according to the message parsing rules acquired by the acquiring unit 701 to determine target data associated with the service message, where the target data is application layer data.
  • the first processing unit 702 may execute steps 102, 202, 302, 402, and 502 in the foregoing method embodiments.
  • the second processing unit 703 is configured to count service requests related to the target data analyzed by the first processing unit 702, and the service requests are obtained from service packets.
  • the second processing unit 703 may execute steps 103, 203, 303, 403, and 503 in the foregoing method embodiments.
  • the operation unit 704 is configured to respond to the service message received by the network device and/or to the target data according to the response strategy when the statistical result of the service request related to the target data collected by the second processing unit 703 satisfies the response condition operate.
  • the operation unit 704 may execute steps 104, 105, 204, 205, 304, 305, 404, 405, 504, and 505 in the foregoing method embodiments.
  • the network device can identify and process the target data without occupying the resources of the service server used to provide the target data-related services, and will not cause resource conflicts with the target data-related services. Moreover, the network device can When the business request related to the target data is still transmitted in the network, it can be identified in advance and then take corresponding actions, which can reduce the probability of causing the target data to be overloaded and accessed, resulting in excessive pressure on the business server.
  • the response condition includes a statistical rule and a response relationship; wherein, the statistical rule includes a statistical time length, and the response relationship includes a relationship between the number of business requests counted according to the statistical time length and the target threshold.
  • the statistical results of the business requests related to the target data include: the number of the business requests related to the target data within the statistical time period.
  • the statistical result meeting the response condition includes: according to the indication of the response relationship, the number of business requests related to the target data exceeds the target threshold within the statistical period, if the number exceeds the target threshold, and the target data is not existing hot data, It indicates that the target data is newly generated hot data; or, the statistical result meets the response condition including: according to the indication of the response relationship, the number of business requests related to the target data within the statistical time is lower than the target threshold, if the number is lower than the target threshold , and the target data is existing hotspot data, it indicates that the hotspot attribute of the target data disappears.
  • the response conditions include multiple sets of statistical rules and response relationships, different statistical rules have different statistical durations, and different statistical rules correspond to different target thresholds in the response relationships.
  • the response strategy includes: a service quality adjustment strategy for service packets with a target priority, and an adjustment strategy for resource expansion or resource shrinkage for target data; wherein the target priority is included in the response strategy.
  • the operation unit 704 is used to:
  • the target data When the target data is newly generated hot data, lower the service quality of the target priority service packets according to the service quality adjustment strategy, and/or perform resource expansion operations on the target data according to the resource expansion adjustment strategy.
  • the service quality adjustment policy When the hotspot attribute of the target data disappears, according to the service quality adjustment policy, the service quality of the service message with the target business priority is increased, and/or, according to the resource shrinkage adjustment policy, the resource shrinking operation is performed on the target data.
  • the first processing unit 702 is configured to: parse the five-tuple of the service message according to the message parsing rule to determine the service type of the service message; parse the indication field according to the message parsing rule to determine the target of the service type Index information of the data or target data, the index information is used to determine the target data.
  • the operation unit 704 is configured to send a capacity expansion notice to the control node when the response policy indicates that the control node for managing the data node executes the resource expansion or resource contraction adjustment policy, and the capacity expansion notice is used to instruct the control node to be The resource expansion is performed on the target data; or, a capacity reduction notification is sent to the control node, and the capacity reduction notification is used to instruct the control node to perform resource reduction for the target data.
  • the operation unit 704 is used for the data node to further include a first control device; when the response strategy indicates that the first control device executes an adjustment strategy for resource expansion or resource shrinkage; send a capacity expansion notification to the first control device, and the capacity expansion The notification is used to instruct the first control device to perform resource expansion for the target data; or, send a capacity reduction notification to the first control device, and the capacity reduction notification is used to instruct the first control device to perform resource reduction for the target data.
  • the operation unit 704 is used for the network device to be a network interface device installed on the switching device; the switching device further includes a second control device, and when the response policy indicates that the resource expansion or resource shrinkage adjustment is performed by the second control device
  • send a capacity expansion notice to the second control device and the capacity expansion notice is used to instruct the second control device to expand the resource capacity for the target data
  • send a capacity reduction notice to the second control device and the capacity reduction notice is used to instruct the second control device Resource shrinking for target data.
  • the obtaining unit 701 is configured to obtain data management rules from a service server or a rule management device, where the service server is a server related to target data.
  • the network device provided in the embodiment of the present application can be understood by referring to the corresponding content in the foregoing method embodiment, and details are not repeated here.
  • FIG. 12 is a schematic diagram of a possible logical structure of the network device 80 involved in the above-mentioned embodiments provided by the embodiments of the present application.
  • the network device 80 includes: a processor 801 , a communication interface 802 , a memory 803 and a bus 804 .
  • the processor 801 , the communication interface 802 and the memory 803 are connected to each other through a bus 804 .
  • the communication interface 802 is used to support the network device 80 to communicate, and the communication interface 802 may be a network card or a network interface. Such as executing steps 101, 201, 301, 401 and 501 in Fig. 3 to Fig. 10 .
  • the processor 801 is used to control and manage the actions of the network device 80, for example, the processor 801 is used to execute steps 102 to 106, 202 to 206, 302 to 306, 402 to 406, 502 to 506 in FIGS. 3 to 10 and/or other processes for the techniques described herein.
  • the memory 803 is used for storing program codes and data of the network device 80 .
  • the processor 801 may be a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like.
  • the bus 804 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • a computer-readable storage medium is also provided, and computer-executable instructions are stored in the computer-readable storage medium.
  • the device executes the above diagram. 3 to the method described in some embodiments in FIG. 10 .
  • a computer program product in another embodiment, includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; Reading the storage medium reads the computer-executable instructions, and at least one processor executes the computer-executable instructions so that the device executes the methods described in some embodiments in FIG. 3 to FIG. 10 .
  • a network card in another embodiment, is also provided, the network card includes an input interface, an output interface and at least one processor, the input interface is used to receive service packets, and at least one processor is used to support the network device to realize the above-mentioned
  • the output interface is used to send a notification of capacity expansion or capacity reduction when the statistics show that the service packet is hot data.
  • the network card may also include memory, memory, and necessary program instructions and data for network devices.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • a unit described as a separate component may or may not be physically separated, and a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the various embodiments of the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed in the present application is a data management method, which is applied to a network device, the network device being a switching device or a network interface apparatus, such as a network adapter, an accelerator card, etc., installed in a switching device or a data node. The method comprises: a network device analyzes a service message by means of a message analysis rule in an acquired data management rule, so as to determine target data associated with the service message and further acquire a statistical result of a service request related to the target data; and when the statistical result of the service request related to the target data meets a response condition, the network device performs, according to a response policy, corresponding operations on the service message received by the network device and/or the target data (hot data). In the present solution, the network device manages the hot data, does not create a resource conflict with a service related to the target data, and moreover, reduces the probability of heavy pressure on a service device caused by overloaded access to the hot data.

Description

一种数据管理的方法及相应装置A data management method and corresponding device
本申请要求于2021年12月31日提交中国专利局、申请号为202111679430.7、发明名称为“一种数据管理的方法及相应装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111679430.7 and the title of the invention "a data management method and corresponding device" filed with the China Patent Office on December 31, 2021, the entire contents of which are incorporated herein by reference Applying.
技术领域technical field
本申请涉及通信技术和数据存储技术领域,具体涉及一种数据管理的方法及相应装置。The present application relates to the fields of communication technology and data storage technology, and in particular to a data management method and a corresponding device.
背景技术Background technique
随着数据量的海量增加,对集中式存储、分布式存储、分布式数据库、集中式数据库等服务系统来说,一些数据的识别和快速访问一直都是业务性能的关键指标,如:对热点数据的识别和快速访问直接影响用户的业务体验。在文件存储和数据库存储的处理过程中,还可以根据数据的被访问频度进行分级存储,从而在保证性能的基础上降低存储的成本。With the massive increase in data volume, for centralized storage, distributed storage, distributed database, centralized database and other service systems, some data identification and fast access have always been key indicators of business performance, such as: Data identification and fast access directly affect the user's business experience. In the process of file storage and database storage, hierarchical storage can also be performed according to the frequency of data access, so as to reduce storage costs on the basis of guaranteed performance.
在分级存储的场景中,一些常用数据会被存放在缓存里,有利于这些常用数据被快速访问。但是,如果突然有大量用户需要访问同一个数据,就会导致流量过于集中,使得网络带宽、物理存储空间、数据库连接等很多物理资源无法支撑。当前无法快速识别这些访问过于集中的数据,影响了业务运行。In a hierarchical storage scenario, some commonly used data will be stored in the cache, which facilitates quick access to these commonly used data. However, if a large number of users suddenly need to access the same data, the traffic will be too concentrated, and many physical resources such as network bandwidth, physical storage space, and database connections cannot be supported. At present, it is impossible to quickly identify these data with too concentrated access, which affects business operations.
发明内容Contents of the invention
本申请提供一种数据管理的方法,用于快速识别网络中的目标数据并作出相应操作。本申请实施例还提供了相应的装置、计算机可读存储介质及计算机程序产品等。The present application provides a data management method for quickly identifying target data in a network and performing corresponding operations. The embodiment of the present application also provides a corresponding device, a computer-readable storage medium, a computer program product, and the like.
本申请第一方面提供一种数据管理的方法,该方法应用于网络设备,网络设备为交换设备或者安装于交换设备或数据节点中的网络接口装置,该方法包括:网络设备获取数据管理规则,数据管理规则包括报文解析规则、响应条件和响应策略;网络设备根据报文解析规则对来自客户端的业务报文进行解析,以确定业务报文关联的目标数据,目标数据是应用层数据;网络设备统计与目标数据相关的业务请求,业务请求从业务报文中得到;当与目标数据相关的业务请求的统计结果满足响应条件时,则网络设备根据响应策略对网络设备接收到的业务报文和/或对目标数据作出相应操作。The first aspect of the present application provides a data management method, the method is applied to network equipment, the network equipment is a switching equipment or a network interface device installed in the switching equipment or data node, the method includes: the network equipment obtains data management rules, Data management rules include message analysis rules, response conditions, and response strategies; network devices analyze service messages from clients according to message analysis rules to determine the target data associated with service messages, and the target data is application layer data; network The device counts the service requests related to the target data, and the service requests are obtained from the service messages; when the statistical results of the service requests related to the target data meet the response conditions, the network device will respond to the service messages received by the network device according to the response strategy. And/or act accordingly on the target data.
本申请中,网络设备所位于的数据系统可以为分布式系统或集中式系统,该分布式系统可以包括分布式数据库服务系统,集中式系统可以包括集中式数据库服务系统,以及其他涉及到底层存储的系统。In this application, the data system where the network device is located may be a distributed system or a centralized system, the distributed system may include a distributed database service system, the centralized system may include a centralized database service system, and other related underlying storage system.
本申请中,交换设备可以是交换机、路由器或网关设备等在网络中用于实现数据转发的设备,如:存储区网络(storage area network,SAN)交换机、以太网交换机,光纤交换机或其它物理交换设备,也可以为虚拟交换机。数据节点可以是物理机,也可以是虚拟机(virtual machine,VM)或者其他形式的用于数据存储的资源。网络接口装置可以是网卡、加速卡、数据处理单元(data processing unit,DPU)或者网络接口,如:交换机接口。客户端可以是终端设备或者安装于终端设备上的应用。In this application, the switching device may be a switch, a router or a gateway device, etc. used to implement data forwarding in the network, such as: storage area network (storage area network, SAN) switch, Ethernet switch, fiber optic switch or other physical switches The device can also be a virtual switch. A data node can be a physical machine, a virtual machine (virtual machine, VM) or other forms of resources for data storage. The network interface device may be a network card, an accelerator card, a data processing unit (data processing unit, DPU) or a network interface, such as a switch interface. The client may be a terminal device or an application installed on the terminal device.
本申请中,数据管理规则可以是预先配置在网络设备上的,也可以是从规则管理装置或与目标数据相关的业务服务器接收的。In this application, the data management rules may be pre-configured on the network equipment, or may be received from a rule management device or a service server related to the target data.
本申请中,业务报文指的是与业务相关的数据的报文。业务报文在网络中传输可以使 用传输控制协议/网际协议(Transmission Control Protocol/Internet Protocol,TCP/IP),也可以使用远程直接内存访问(remote direct memory access,RDMA)协议,或者其他通信协议。In this application, a service packet refers to a packet of data related to a service. Service messages can be transmitted in the network using Transmission Control Protocol/Internet Protocol (Transmission Control Protocol/Internet Protocol, TCP/IP), or remote direct memory access (remote direct memory access, RDMA) protocol, or other communication protocols.
本申请中,业务报文关联的目标数据可以是从业务报文中直接解析出的,也可以是根据从业务报文中解析出的标识(如:目标数据的索引信息或地址信息)可以查找到的。In this application, the target data associated with the service message can be directly parsed from the service message, or can be searched according to the identifier (such as: index information or address information of the target data) parsed from the service message arrived.
本申请中,与目标数据相关的业务请求指的是对该目标数据进行读操作或写操作的请求等,该业务请求的类型可以从业务报文中解析出。In this application, the service request related to the target data refers to a request for reading or writing the target data, etc., and the type of the service request can be parsed from the service message.
本申请中,报文解析规则指的是对业务报文进行解析的规则,可以是:第一步需要解析的内容,第二步需要解析的内容等,该报文解析的规则中可以指定需要解析的字段。In this application, the message parsing rules refer to the rules for parsing business messages, which can be: the content that needs to be parsed in the first step, the content that needs to be parsed in the second step, etc. The rules of message parsing can specify the required Parsed fields.
本申请中,响应条件指的是触发响应策略生效需满足的条件。In this application, the response condition refers to the condition that needs to be met to trigger the response policy to take effect.
本申请中,响应策略指的是针对业务报文或目标数据作出的服务质量(quality of service,Qos)调整策略或资源调整策略。In this application, the response strategy refers to a quality of service (Qos) adjustment strategy or a resource adjustment strategy made for service packets or target data.
需要说明的是,本申请实施例中的服务质量指的是网络服务质量。It should be noted that, the service quality in the embodiment of the present application refers to the network service quality.
由上述第一方面可知,网络设备可以对目标数据进行识别和处理,不会占用用于提供目标数据相关业务的业务服务器的资源,不会与目标数据相关业务产生资源冲突,而且,通过网络设备可以在目标数据相关的业务请求还网络中传输时就提前识别到然后作出相应操作,可以减少造成目标数据被过载访问导致业务服务器压力过大的机率。It can be seen from the above first aspect that the network equipment can identify and process the target data, and will not occupy the resources of the service server used to provide the target data-related services, and will not cause resource conflicts with the target data-related services, and, through the network equipment It can be identified in advance when the business request related to the target data is still being transmitted in the network, and then take corresponding actions, which can reduce the probability that the target data will be overloaded and accessed, resulting in excessive pressure on the business server.
在第一方面的一种可能的实现方式中,响应条件包括统计规则和响应关系;其中,统计规则包括统计时长,响应关系包括按照统计时长统计的业务请求的数量与目标阈值应满足的关系。与目标数据相关的业务请求的统计结果包括:与目标数据相关的业务请求在统计时长内的数量。In a possible implementation manner of the first aspect, the response condition includes a statistical rule and a response relationship; wherein, the statistical rule includes a statistical time length, and the response relationship includes a relationship between the number of business requests counted according to the statistical time length and the target threshold. The statistical results of the business requests related to the target data include: the number of the business requests related to the target data within the statistical time period.
在第一方面的另一种可能的实现方式中,统计结果满足响应条件包括:按照响应关系的指示,与目标数据相关的业务请求在统计时长内的数量超过目标阈值,若数量超过目标阈值,且目标数据不是已存在的热点数据,则指示目标数据为新产生的热点数据;或者,统计结果满足响应条件包括:按照响应关系的指示,与目标数据相关的业务请求在统计时长内的数量低于目标阈值,若数量低于目标阈值,且目标数据是已存在的热点数据时,则指示目标数据的热点属性消失。In another possible implementation of the first aspect, the statistical result meeting the response condition includes: according to the indication of the response relationship, the number of business requests related to the target data within the statistical time exceeds the target threshold, if the number exceeds the target threshold, and the target data is not existing hot data, it indicates that the target data is newly generated hot data; or, the statistical result meets the response condition including: according to the indication of the response relationship, the number of business requests related to the target data is low within the statistical period At the target threshold, if the quantity is lower than the target threshold and the target data is existing hot data, it indicates that the hot attribute of the target data disappears.
本申请中,统计时长指的是用于统计业务请求的时间长度,如:1分钟、2分钟、5分钟或者其他数值。响应关系指的是按照统计时长统计的业务请求的数量与目标阈值的关系(如:超过目标阈值或低于目标阈值,需要说明的是,一个响应关系中,只会有一种关系,要么大于目标阈值,要么小于目标阈值)。当以响应关系是大于目标阈值为例时,如:统计时长是1分钟,目标阈值是1万次,如果统计结果是统计到一分钟的与目标数据相关的业务请求的数量是1.2万次,而且该目标数据不是已存在的热点数据,则表示该目标数据是新产生的热点数据,那么该统计结果满足响应条件。当以响应关系是小于目标阈值为例时,如果统计结果是统计到一分钟的与目标数据相关的业务请求的数量是0.7万次,当目标数据是已存在的热点数据时,则表示该统计结果也满足响应条件。In this application, the statistical duration refers to the length of time used to count service requests, such as: 1 minute, 2 minutes, 5 minutes or other values. The response relationship refers to the relationship between the number of business requests counted according to the statistical duration and the target threshold (such as: exceeding the target threshold or lower than the target threshold. It should be noted that there is only one relationship in a response relationship, or it is greater than the target threshold threshold, or less than the target threshold). When taking the response relationship greater than the target threshold as an example, for example: the statistical duration is 1 minute, and the target threshold is 10,000 times. If the statistical result is that the number of business requests related to the target data in one minute is 12,000 times, If the target data is not existing hot data, it means that the target data is newly generated hot data, and the statistical result satisfies the response condition. When the response relationship is less than the target threshold as an example, if the statistical result is that the number of business requests related to the target data in one minute is 7,000 times, and when the target data is existing hot data, it means that the statistics The result also satisfies the response condition.
本申请中,可以统计热点数据产生或热点数据消失的过程,如果统计到针对不是热点 数据的目标数据在一分钟的业务请求超过目标阈值,则可以理解为是热点数据产生的过程,如果统计到已是热点数据的目标数据的在一分钟的业务请求低于目标阈值,则可以理解为是热点数据消失的过程。当然,针对热点数据产生和热点数据消失所使用的响应关系中的目标阈值可以不相同。In this application, the process of hot data generation or hot data disappearance can be counted. If the statistics show that the service request for target data that is not hot data exceeds the target threshold within one minute, it can be understood as the process of hot data generation. If the statistics are counted If the one-minute business request of target data that is already hot data is lower than the target threshold, it can be understood as the process of hot data disappearing. Of course, the target thresholds in the response relationship used for hotspot data generation and hotspot data disappearance may be different.
本申请中,热点数据指的是在一段时间活跃量超过一定阈值的数据,如:被访问、被点击、被浏览、被关注以及被下载等次数较多的数据,热点数据可以是热卖商品、热点新闻、热点的应用、热点的节目、节点的音乐等各种形式的数据。In this application, hot data refers to data whose active volume exceeds a certain threshold for a period of time, such as: data that has been visited, clicked, browsed, followed, and downloaded many times. Hot data can be hot products, Various forms of data such as hot news, hot applications, hot programs, and node music.
本申请中,统计热点数据可以采用,如:最近最少使用(least recently used,LRU),最近最不常使用(least frequently used,LFU),以及先入先出(first in first out,FIFO)等多种算法。In this application, statistical hotspot data can be used, such as: least recently used (least recently used, LRU), recently least frequently used (least frequently used, LFU), and first in first out (first in first out, FIFO), etc. algorithm.
该种可能的实现方式中,网络设备可以对热点数据进行快速识别与处理,不会占用用于提供目标数据相关业务的业务服务器的资源,不会与目标数据相关业务产生资源冲突,而且,通过网络设备可以在热点数据还网络中传输时就提前识别到然后作出相应操作,可以减少造成热点数据被过载访问导致业务服务器压力过大的机率。In this possible implementation mode, the network device can quickly identify and process the hot data, and will not occupy the resources of the service server used to provide the target data-related services, and will not cause resource conflicts with the target data-related services. Moreover, through The network device can identify the hotspot data in advance and take corresponding actions when the hotspot data is still being transmitted in the network, which can reduce the probability that the hotspot data will be overloaded and accessed, resulting in excessive pressure on the business server.
在第一方面的一种可能的实现方式中,响应条件包括多组统计规则和响应关系,不同统计规则中的统计时长不同,不同的统计规则对应的响应关系中的目标阈值不相同;不同的统计规则对应的响应策略中的不同调整策略。In a possible implementation of the first aspect, the response conditions include multiple sets of statistical rules and response relationships, the statistical durations in different statistical rules are different, and the target thresholds in the response relationships corresponding to different statistical rules are different; different Different adjustment strategies in response strategies corresponding to statistical rules.
本申请中,统计规则中包括的统计时长和响应关系中的目标阈值通常是对应的。如:统计时长是1分钟,目标阈值是10000次,统计时长是2分钟,目标阈值是20000次,统计时长是5分钟,目标阈值是50000次。当然,此处只是举例,实际上,不同统计规则中的统计时长与对应的响应关系中的目标阈值之间的关系不一定是成比例变化的。虽然,此处只介绍了统计规则中包括统计时长,实际上,统计规则中还可以包括其他参量,如:统计对象的标识,该统计对象的标识例如可以是目标数据对应业务对外的业务地址,例如:可以是目标数据所在设备的地址、也可以是VM的虚拟接口地址,或者可以表示该业务地址的其他信息,该其他信息例如可以是redis的键值(key),或者是视频的url地址,文件的索引等。当针对不同设备上的数据采用不同的响应条件时,统计规则中可以设置统计对象的标识,如果:针对所有数据都采用同一套响应条件,则也可以不设置统计对象的标识。In this application, the statistical duration included in the statistical rule and the target threshold in the response relationship usually correspond. For example: the statistics time is 1 minute, the target threshold is 10,000 times, the statistics time is 2 minutes, the target threshold is 20,000 times, the statistics time is 5 minutes, and the target threshold is 50,000 times. Of course, this is just an example. In fact, the relationship between the statistical duration in different statistical rules and the target threshold in the corresponding response relationship does not necessarily change proportionally. Although it is only introduced here that the statistical rules include the statistical duration, in fact, the statistical rules can also include other parameters, such as: the identification of the statistical object. The identification of the statistical object can be, for example, the external business address of the target data corresponding business. For example: it can be the address of the device where the target data is located, or the virtual interface address of the VM, or other information that can represent the business address, such as the key value (key) of redis, or the url address of the video , the index of the file, etc. When different response conditions are used for data on different devices, the statistical object identifier can be set in the statistical rule, and if the same set of response conditions is used for all data, the statistical object identifier may not be set.
该种可能的实现方式中,通过在响应条件中配置多组统计规则和响应关系,可以有效的启用不同的调整策略,这样,可以使调整的用于处理目标数据的资源与当前客户端对目标数据的访问量更匹配,可以避免因为资源不足导致业务过载或宕机的问题,还可以提高资源的利用率。In this possible implementation, by configuring multiple sets of statistical rules and response relationships in the response conditions, different adjustment strategies can be effectively enabled. The data access volume is more matched, which can avoid the problem of business overload or downtime due to insufficient resources, and can also improve resource utilization.
在第一方面的一种可能的实现方式中,响应策略包括:针对目标优先级的业务报文的服务质量调整策略,以及对目标数据做资源扩容或资源缩容的调整策略;其中,目标优先级包含于响应策略中。In a possible implementation of the first aspect, the response strategy includes: a service quality adjustment strategy for service packets with target priority, and an adjustment strategy for resource expansion or resource shrinkage for target data; wherein, target priority level is included in the response policy.
在第一方面的一种可能的实现方式中,上述步骤:网络设备根据响应策略对网络设备接收到的业务报文和/或对目标数据作出相应操作,包括:当目标数据为新产生的热点数据时,网络设备按照服务质量调整策略调低目标优先级的业务报文的服务质量,和/或,按照 资源扩容的调整策略对目标数据作出资源扩容的操作;当目标数据的热点属性消失时,网络设备按照服务质量调整策略调高目标业务优先级的业务报文的服务质量,和/或,按照资源缩容的调整策略对目标数据作出资源缩容的操作。In a possible implementation of the first aspect, the above steps: the network device performs corresponding operations on the service packets received by the network device and/or on the target data according to the response policy, including: when the target data is a newly generated hotspot data, the network device lowers the service quality of target priority service packets according to the service quality adjustment policy, and/or performs resource expansion operations on the target data according to the resource expansion adjustment policy; when the hotspot attribute of the target data disappears The network device adjusts the service quality of the service packets with the priority of the target service according to the service quality adjustment strategy, and/or performs resource shrinkage operations on the target data according to the resource shrinkage adjustment strategy.
本申请中,网络设备可以接收到不同优先级的业务报文,当产生热点数据时,为了避免热点数据对高优先级的业务造成冲击,可以优先处理高优先级的业务报文,为了对保障高优先级的业务报文的处理,可以按照响应策略中指定的目标优先级,调低目标优先级的业务报文的服务质量(如:降低目标优先级的业务报文的带宽、时延或丢包率等)。和/或,为热点数据做资源扩容,也就是增加热点数据的资源,这样,可以缓解热点数据对高优先级业务的冲击。In this application, the network equipment can receive service messages with different priorities. When hot data is generated, in order to avoid the impact of hot data on high priority services, the high priority service messages can be processed first. In order to ensure The processing of high-priority service packets can reduce the service quality of target priority service packets according to the target priority specified in the response policy (for example: reduce the bandwidth, delay or packet loss rate, etc.). And/or, do resource expansion for hot data, that is, increase hot data resources, so that the impact of hot data on high-priority services can be alleviated.
本申请中,针对热点数据的扩容或缩容的资源包括网络资源、计算资源以及存储资源等。In this application, resources for expansion or contraction of hotspot data include network resources, computing resources, and storage resources.
本申请中,当热点数据消失时,热点数据消失表示之前该热点数据所占用的资源会被空出,这时,可以提高目标优先级的业务报文的服务质量,有利于对这些目标优先级的业务报文进行较好的处理。和/或,为热点数据做资源缩容,也就是减少热点数据的资源,这样可以提高资源的利用率。In this application, when the hotspot data disappears, the disappearance of the hotspot data means that the resources occupied by the hotspot data will be vacated. At this time, the service quality of the service message of the target priority can be improved, which is beneficial to the priority of these targets. better processing of business packets. And/or, shrink resources for hot data, that is, reduce hot data resources, which can improve resource utilization.
在第一方面的一种可能的实现方式中,上述步骤:网络设备根据报文解析规则对来自客户端的业务报文进行解析,以确定业务报文关联的目标数据,包括:网络设备根据报文解析规则解析业务报文的五元组,以确定业务报文的业务类型;网络设备根据报文解析规则解析指示字段,以确定业务类型的目标数据或目标数据的索引信息,索引信息用于确定目标数据。In a possible implementation of the first aspect, the above steps: the network device parses the service message from the client according to the message parsing rules to determine the target data associated with the service message, including: the network device analyzes the service message according to the message The parsing rule parses the five-tuple of the service message to determine the service type of the service message; the network device parses the indication field according to the message parsing rule to determine the target data of the service type or the index information of the target data, and the index information is used to determine target data.
本申请中,五元组中包括目的地址,可以通过该目的地址确定该业务报文的业务类型,如:该目的地址可以是游戏服务器的IP地址,视频服务器的IP地址,音乐服务器的IP地址,以及电商服务器的IP地址等。业务报文中的指示字段可以位于报文头中,也可以位于报文载荷中,该指示字段可以是某个目标数据的索引信息,该索引信息可以是目标数据的具体地址,或者目标数据的名称或标识等。In this application, the five-tuple includes the destination address, and the service type of the service message can be determined through the destination address, such as: the destination address can be the IP address of the game server, the IP address of the video server, or the IP address of the music server , and the IP address of the e-commerce server. The indication field in the service message can be located in the message header or in the message load. The indication field can be the index information of a certain target data. The index information can be the specific address of the target data or the address of the target data. name or logo etc.
在第一方面的一种可能的实现方式中,当响应策略指示由用于管理数据节点的控制节点执行资源扩容或资源缩容的调整策略时;上述步骤:按照资源扩容的调整策略对目标数据作出资源扩容的操作,包括:网络设备向控制节点发送扩容通知,扩容通知用于指示控制节点为目标数据进行资源扩容;或者,上述步骤:按照资源缩容的调整策略对目标数据作出资源缩容的操作,包括:网络设备向控制节点发送缩容通知,缩容通知用于指示控制节点为目标数据进行资源缩容。In a possible implementation of the first aspect, when the response strategy indicates that the control node used to manage the data node executes the adjustment strategy for resource expansion or resource reduction; Perform resource expansion operations, including: the network device sends an expansion notice to the control node, and the expansion notice is used to instruct the control node to perform resource expansion for the target data; or, the above steps: make resource shrinkage for the target data according to the resource shrinkage adjustment strategy The operation includes: the network device sends a capacity reduction notification to the control node, and the capacity reduction notification is used to instruct the control node to perform resource reduction for the target data.
该种可能的实现方式中,控制节点指的是对网络设备所在的系统中的资源进行全局管理的设备,控制节点可以根据接收到的扩容通知对目标数据进行资源扩容,可以根据接收到的缩容通知对目标数据进行资源缩容,因为控制节点统筹整个系统的资源,可以为该目标数据做出较优的资源扩容或资源缩容。In this possible implementation, the control node refers to a device that globally manages the resources in the system where the network device is located. The control node can expand the resource capacity of the target data according to the received The capacity notification performs resource shrinkage for the target data, because the control node coordinates the resources of the entire system, and can make better resource expansion or resource shrinkage for the target data.
在第一方面的一种可能的实现方式中,数据节点还包括第一控制装置;当响应策略指示由第一控制装置执行资源扩容或资源缩容的调整策略时;上述步骤:按照资源扩容的调 整策略对目标数据作出资源扩容的操作,包括:网络设备向第一控制装置发送扩容通知,扩容通知用于指示第一控制装置为目标数据进行资源扩容;或者,上述步骤:按照资源缩容的调整策略对目标数据作出资源缩容的操作,包括:网络设备向第一控制装置发送缩容通知,缩容通知用于指示第一控制装置为目标数据进行资源缩容。In a possible implementation manner of the first aspect, the data node further includes a first control device; when the response strategy indicates that the first control device executes an adjustment strategy for resource expansion or resource shrinkage; the above steps: Adjusting the policy to perform resource expansion operations on the target data includes: the network device sends a capacity expansion notice to the first control device, and the capacity expansion notice is used to instruct the first control device to perform resource expansion for the target data; or, the above steps: The operation of adjusting the strategy to shrink resources for the target data includes: the network device sends a shrink notification to the first control device, and the shrink notification is used to instruct the first control device to shrink resources for the target data.
该种可能的实现方式中,由数据节点中的第一控制装置来完成对目标数据的资源扩容或资源缩容的过程。In this possible implementation manner, the process of resource expansion or resource reduction for target data is completed by the first control device in the data node.
在第一方面的一种可能的实现方式中,网络设备为安装于交换设备上的网络接口装置;交换设备还包括第二控制装置,当响应策略指示由控制装置执行资源扩容或资源缩容的调整策略时;上述步骤:按照资源扩容的调整策略对目标数据作出资源扩容的操作,包括:网络接口装置向第二控制装置发送扩容通知,扩容通知用于指示第二控制装置为目标数据进行资源扩容;或者,上述步骤:按照资源缩容的调整策略对目标数据作出资源缩容的操作,包括:网络接口装置向第二控制装置发送缩容通知,缩容通知用于指示第二控制装置为目标数据进行资源缩容。In a possible implementation of the first aspect, the network device is a network interface device installed on the switching device; the switching device further includes a second control device, and when the response policy indicates that the resource expansion or resource reduction is performed by the control device When adjusting the strategy; the above steps: perform resource expansion operations on the target data according to the resource expansion adjustment strategy, including: the network interface device sends a capacity expansion notification to the second control device, and the capacity expansion notification is used to instruct the second control device to perform resource expansion for the target data. capacity expansion; or, the above step: performing a resource reduction operation on the target data according to the resource reduction adjustment strategy, including: the network interface device sends a capacity reduction notification to the second control device, and the capacity reduction notification is used to instruct the second control device to be Target data for resource shrinkage.
该种可能的实现方式中,由交换设备上的第二控制装置来完成对目标数据的资源扩容或资源缩容的过程,可以不用再为系统中配置控制节点,简化了网络结构。In this possible implementation manner, the second control device on the switching device completes the resource expansion or resource reduction process of the target data, which eliminates the need to configure a control node in the system and simplifies the network structure.
在第一方面的一种可能的实现方式中,上述步骤:网络设备获取数据管理规则,包括:网络设备从业务服务器或规则管理装置获取数据管理规则,业务服务器是与目标数据相关的服务器。In a possible implementation manner of the first aspect, the above step: the network device obtains the data management rules includes: the network device obtains the data management rules from a service server or a rule management device, and the service server is a server related to the target data.
本申请第二方面提供一种网络设备,该网络设备具有实现上述第一方面或第一方面任意一种可能实现方式的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块,例如:获取单元、第一处理单元、第二处理单元和操作单元,其中,第一处理单元和第二处理单元也可以通过一个处理单元来实现。A second aspect of the present application provides a network device, where the network device has a function of implementing the first aspect or the method of any possible implementation manner of the first aspect. This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware. The hardware or software includes one or more modules corresponding to the above-mentioned functions, for example: an acquisition unit, a first processing unit, a second processing unit, and an operation unit, wherein the first processing unit and the second processing unit can also be processed through a processing unit to achieve.
本申请第三方面提供一种网络设备,该网络设备包括至少一个处理器、存储器、输入/输出(input/output,I/O)接口以及存储在存储器中并可在处理器上运行的计算机执行指令,当网络设备执行指令被处理器执行时,处理器执行如上述第一方面或第一方面任意一种可能的实现方式的方法。A third aspect of the present application provides a network device, the network device includes at least one processor, a memory, an input/output (input/output, I/O) interface, and a computer executable stored in the memory and operable on the processor Instructions, when the instruction executed by the network device is executed by the processor, the processor executes the method in the first aspect or any one possible implementation manner of the first aspect.
本申请第四方面提供一种存储一个或多个计算机执行指令的计算机可读存储介质,当计算机执行指令被处理器执行时,一个或多个处理器执行如上述第一方面或第一方面任意一种可能的实现方式的方法。The fourth aspect of the present application provides a computer-readable storage medium that stores one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, one or more processors execute any of the above-mentioned first aspect or first aspect. A method of one possible implementation.
本申请第五方面提供一种存储一个或多个计算机执行指令的计算机程序产品,当计算机执行指令被一个或多个处理器执行时,一个或多个处理器执行如上述第一方面或第一方面任意一种可能的实现方式的方法。The fifth aspect of the present application provides a computer program product that stores one or more computer-executable instructions. When the computer-executable instructions are executed by one or more processors, one or more processors execute the above-mentioned first aspect or first A method for any one of the possible implementations of the aspect.
本申请第六方面提供了一种网卡,该网卡包括输入接口、输出接口以及至少一个处理器,输入接口用于接收业务报文,至少一个处理器用于支持网卡实现上述第一方面或第一方面任意一种可能的实现方式中所涉及的功能,输出接口用于发送扩容通知或缩容通知。在一种可能的设计中,网卡还可以包括存储器,存储器,用于网络设备必要的程序指令和 数据。The sixth aspect of the present application provides a network card, the network card includes an input interface, an output interface and at least one processor, the input interface is used to receive service messages, and at least one processor is used to support the network card to realize the first aspect or the first aspect For the functions involved in any possible implementation, the output interface is used to send the notification of capacity expansion or capacity reduction. In a possible design, the network card may also include memory, memory, and necessary program instructions and data for network equipment.
附图说明Description of drawings
图1是本申请实施例提供的分布式系统的一结构示意图;FIG. 1 is a schematic structural diagram of a distributed system provided by an embodiment of the present application;
图2是本申请实施例提供的集中式系统的一结构示意图;Fig. 2 is a schematic structural diagram of the centralized system provided by the embodiment of the present application;
图3是本申请实施例提供的数据管理的方法的一实施例示意图;Fig. 3 is a schematic diagram of an embodiment of a data management method provided by an embodiment of the present application;
图4是本申请实施例提供的数据管理的方法的另一实施例示意图;Fig. 4 is a schematic diagram of another embodiment of the data management method provided by the embodiment of the present application;
图5是本申请实施例提供的业务报文的一结构示意图;FIG. 5 is a schematic structural diagram of a service message provided by an embodiment of the present application;
图6是本申请实施例提供的数据管理的方法的另一实施例示意图;Fig. 6 is a schematic diagram of another embodiment of the data management method provided by the embodiment of the present application;
图7是本申请实施例提供的数据管理的方法的另一实施例示意图;Fig. 7 is a schematic diagram of another embodiment of the data management method provided by the embodiment of the present application;
图8是本申请实施例提供的数据管理的方法的另一实施例示意图;Fig. 8 is a schematic diagram of another embodiment of the data management method provided by the embodiment of the present application;
图9是本申请实施例提供的数据管理的方法的另一实施例示意图;Fig. 9 is a schematic diagram of another embodiment of the data management method provided by the embodiment of the present application;
图10是本申请实施例提供的业务报文的另一结构示意图;FIG. 10 is another schematic structural diagram of a service message provided by an embodiment of the present application;
图11是本申请实施例提供的网络设备的一结构示意图;FIG. 11 is a schematic structural diagram of a network device provided by an embodiment of the present application;
图12是本申请实施例提供的网络设备的另一结构示意图。FIG. 12 is another schematic structural diagram of a network device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着技术发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。Embodiments of the present application are described below in conjunction with the accompanying drawings. Apparently, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Those of ordinary skill in the art know that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second" and the like in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.
本申请实施例提供一种数据管理的方法,用于快速识别网络中的目标数据并作出相应操作。本申请实施例还提供了相应的装置、计算机可读存储介质及计算机程序产品等。以下分别进行详细说明。An embodiment of the present application provides a data management method for quickly identifying target data in a network and performing corresponding operations. The embodiment of the present application also provides a corresponding device, a computer-readable storage medium, a computer program product, and the like. Each will be described in detail below.
本申请实施例提供的方法可以在网络设备上实现,该网络设备所位于的数据系统可以为分布式系统或集中式系统,该分布式系统可以包括分布式数据库服务系统,集中式系统可以包括集中式数据库服务系统,以及其他涉及到底层存储的系统。The method provided by the embodiment of this application can be implemented on a network device. The data system where the network device is located can be a distributed system or a centralized system. The distributed system can include a distributed database service system, and the centralized system can include a centralized database service system, and other systems involving underlying storage.
图1为本申请实施例提供的分布式系统的一场景示意图。FIG. 1 is a schematic diagram of a scenario of a distributed system provided by an embodiment of the present application.
如图1所示,本申请实施例提供的分布式系统的场景中,客户端可以通过网络访问分布式系统,该分布式系统中包括服务入口节点、交换设备、控制节点和多个数据节点。其中,服务入口节点与交换设备通信连接,交换设备与控制节点以及每个数据节点通信连接。需要说明的是,该分布式系统中也可以不包括控制节点,该控制节点的功能由交换设备来实现。As shown in FIG. 1 , in the distributed system scenario provided by the embodiment of the present application, a client can access the distributed system through a network, and the distributed system includes a service entry node, a switching device, a control node, and multiple data nodes. Wherein, the service entry node is in communication connection with the switching device, and the switching device is in communication connection with the control node and each data node. It should be noted that the distributed system may not include a control node, and the function of the control node is implemented by a switching device.
服务入口节点相当于连接客户端的网络与分布式系统的接口,一个服务入口节点下面可以连接多个交换设备(图1中只示出了一个交换设备),服务入口节点用于接收来自客户端的业务报文,并将业务报文传递给交换设备,由交换设备分发到不同的数据节点。服务入口节点可以实现各交换设备的负载均衡。数据节点可以通过交换设备与控制节点通信,控制节点也可以通过交换设备向每个数据节点发送消息。The service entry node is equivalent to the interface connecting the client network and the distributed system. A service entry node can be connected to multiple switching devices (only one switching device is shown in Figure 1), and the service entry node is used to receive business from the client. message, and deliver the service message to the switching device, and the switching device distributes it to different data nodes. The service entry node can realize the load balancing of each switching device. Data nodes can communicate with control nodes through switching devices, and control nodes can also send messages to each data node through switching devices.
业务报文指的是与业务相关的数据的报文。业务报文在网络中传输可以使用传输控制协议/网际协议(Transmission Control Protocol/Internet Protocol,TCP/IP),也可以使用远程直接内存访问(remote direct memory access,RDMA)协议,或者其他通信协议。A service packet refers to a packet of data related to a service. Service packets can be transmitted in the network using Transmission Control Protocol/Internet Protocol (Transmission Control Protocol/Internet Protocol, TCP/IP), or remote direct memory access (remote direct memory access, RDMA) protocol, or other communication protocols.
交换设备可以是交换机、路由器或网关设备等在网络中用于实现数据转发的设备,如:存储区网络(storage area network,SAN)交换机、以太网交换机,光纤交换机或其它物理交换设备,也可以为虚拟设备,如:虚拟交换机。The switching device can be a switch, a router or a gateway device, etc. used to implement data forwarding in the network, such as: a storage area network (storage area network, SAN) switch, an Ethernet switch, a fiber switch or other physical switching devices, or It is a virtual device, such as a virtual switch.
数据节点可以是物理机,也可以是虚拟机(virtual machine,VM)或者其他形式的用于数据存储的资源,如:数据存储器(data storage)或非易失性存储器,该数据存储器包括但不限于固态硬盘(solid state drives,SSD)、磁盘阵列或其他类型的非瞬态计算机可读介质,还可以包括传统的动态随机存取存储器(dynamic random access memory,DRAM)和新的持久化内存(persistent memory,PMem)。非易失性存储器包括半导体存储器设备,例如可擦可编程只读存储器(erasable programmable read only memory,EPROM),电可擦只读存储器(electrically erasable programmable read only memory,EEPROM)和闪存(flash memory);磁盘,例如内部硬盘(internal hard disk)或可移动磁盘(removable disk),磁光盘(magneto optical disk),以及CD ROM和DVD-ROM。Data nodes can be physical machines, virtual machines (virtual machine, VM) or other forms of resources for data storage, such as: data storage (data storage) or non-volatile memory, the data storage includes but not Limited to solid state drives (SSD), disk arrays, or other types of non-transitory computer-readable media, it can also include traditional dynamic random access memory (dynamic random access memory, DRAM) and new persistent memory ( persistent memory, PMem). Non-volatile memory includes semiconductor memory devices such as erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM) and flash memory (flash memory) ; Disks, such as internal hard disk or removable disk, magneto optical disk, and CD ROM and DVD-ROM.
控制节点可以是物理机或虚拟机,用于管理分布式系统中的全局资源,包括计算资源、存储资源和网络资源等。The control node can be a physical machine or a virtual machine, and is used to manage global resources in a distributed system, including computing resources, storage resources, and network resources.
客户端可以是终端设备或者安装于终端设备上的应用。终端设备(也可以称为用户设备(user equipment,UE))是一种具有无线收发功能的设备,可以部署在陆地上,包括室内或室外、手持或车载;也可以部署在水面上(如轮船等);还可以部署在空中(例如飞机、气球和卫星上等)。终端可以是手机(mobile phone)、平板电脑(pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端、增强现实(augmented reality,AR)终端、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、自动驾驶装置、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等。The client may be a terminal device or an application installed on the terminal device. Terminal equipment (also called user equipment (UE)) is a device with wireless transceiver function, which can be deployed on land, including indoor or outdoor, handheld or vehicle-mounted; it can also be deployed on water (such as ships etc.); can also be deployed in the air (such as aircraft, balloons and satellites, etc.). The terminal can be mobile phone (mobile phone), tablet computer (pad), computer with wireless transceiver function, virtual reality (virtual reality, VR) terminal, augmented reality (augmented reality, AR) terminal, industrial control (industrial control) Wireless terminals, wireless terminals in self driving, automatic driving devices, wireless terminals in remote medical, wireless terminals in smart grid, wireless in transportation safety Terminals, wireless terminals in smart cities, wireless terminals in smart homes, etc.
图2为本申请实施例提供的集中式系统的一场景示意图。FIG. 2 is a schematic diagram of a scenario of a centralized system provided by an embodiment of the present application.
如图2所示,本申请实施例提供的集中式系统的场景中,客户端可以通过网络访问集中式系统,该集中式系统中包括多个集中式服务,其中,每个集中式服务包括一个服务入口节点与一个数据节点,数据节点对集中式服务内计算资源、存储资源和网络资源等进行管理。As shown in Figure 2, in the scenario of the centralized system provided by the embodiment of the present application, the client can access the centralized system through the network, and the centralized system includes multiple centralized services, wherein each centralized service includes a The service entry node and a data node manage the computing resources, storage resources and network resources in the centralized service.
服务入口节点相当于连接客户端的网络与集中式系统的接口,服务入口节点用于接收 来自客户端的业务报文,并将业务报文传递给对应的数据节点。The service entry node is equivalent to the interface connecting the network of the client and the centralized system. The service entry node is used to receive the business message from the client and pass the service message to the corresponding data node.
以上,介绍了分布式系统和集中式系统的结构,本申请实施例提供的数据管理的方法可以应用于例如上述图1所示的分布式系统和图2所示的集中式系统中。下面结合附图介绍本申请实施例提供的数据管理的方法。该数据管理的方法的应用于网络设备,该网络设备可以为上述分布式系统或集中式系统中的交换设备或者安装于交换设备或数据节点中的网络接口装置。The structures of the distributed system and the centralized system have been introduced above. The data management method provided by the embodiment of the present application can be applied to the distributed system shown in FIG. 1 and the centralized system shown in FIG. 2 , for example. The following describes the data management method provided by the embodiment of the present application with reference to the accompanying drawings. The data management method is applied to a network device, and the network device may be a switching device in the above-mentioned distributed system or a centralized system, or a network interface device installed in a switching device or a data node.
其中,网络接口装置可以是网卡、加速卡、数据处理单元(data processing unit,DPU)或者网络接口,如:交换机接口。Wherein, the network interface device may be a network card, an accelerator card, a data processing unit (data processing unit, DPU) or a network interface, such as a switch interface.
如图3所示,本申请实施例提供的数据管理的方法的一实施例包括:As shown in Figure 3, an embodiment of the data management method provided by the embodiment of the present application includes:
101.网络设备获取数据管理规则,数据管理规则包括报文解析规则、响应条件和响应策略。101. The network device acquires data management rules, and the data management rules include message parsing rules, response conditions, and response strategies.
数据管理规则可以是预先配置在网络设备上的,也可以是从规则管理装置或与目标数据相关的业务服务器接收的,业务服务器是与目标数据相关的服务器。The data management rules may be pre-configured on the network equipment, or may be received from a rule management device or a service server related to the target data, where the service server is a server related to the target data.
报文解析规则指的是对业务报文进行解析的规则,可以是:第一步需要解析的内容,第二步需要解析的内容等,该报文解析的规则中可以指定需要解析的字段。The message parsing rules refer to the rules for parsing business messages, which can be: the content that needs to be parsed in the first step, the content that needs to be parsed in the second step, etc. The fields that need to be parsed can be specified in the message parsing rules.
响应条件指的是触发响应策略生效需满足的条件。Response conditions refer to the conditions that need to be met to trigger the response policy to take effect.
响应策略指的是针对业务报文或目标数据作出的服务质量(quality of service,Qos)调整策略或资源调整策略。The response strategy refers to a quality of service (Qos) adjustment strategy or a resource adjustment strategy made for service packets or target data.
需要说明的是,本申请实施例中的服务质量指的是网络服务质量。It should be noted that, the service quality in the embodiment of the present application refers to the network service quality.
102.网络设备根据报文解析规则对来自客户端的业务报文进行解析,以确定业务报文关联的目标数据,目标数据是应用层数据。102. The network device parses the service message from the client according to the message parsing rules to determine the target data associated with the service message, and the target data is application layer data.
业务报文关联的目标数据可以是从业务报文中直接解析出的,也可以是根据从业务报文中解析出的标识(如:目标数据的索引信息或地址信息)可以查找到的。The target data associated with the service message can be directly parsed from the service message, or can be found according to the identifier (such as: index information or address information of the target data) parsed from the service message.
该步骤102可以包括:网络设备根据报文解析规则解析业务报文的五元组,以确定业务报文的业务类型;网络设备根据报文解析规则解析指示字段,以确定业务类型的目标数据或目标数据的索引信息,索引信息用于确定目标数据。This step 102 may include: the network device parses the five-tuple of the service message according to the message parsing rule to determine the service type of the service message; the network device parses the indication field according to the message parsing rule to determine the target data or Index information of the target data, the index information is used to determine the target data.
五元组中包括目的地址,可以通过该目的地址确定该业务报文的业务类型,如:该目的地址可以是游戏服务器的IP地址,视频服务器的IP地址,音乐服务器的IP地址,以及电商服务器的IP地址等。业务报文中的指示字段可以位于报文头中,也可以位于报文载荷中,该指示字段可以是某个目标数据的索引信息,该索引信息可以是目标数据的具体地址,或者目标数据的名称或标识等。The five-tuple includes the destination address, through which the business type of the service message can be determined, for example: the destination address can be the IP address of the game server, the IP address of the video server, the IP address of the music server, and the e-commerce The IP address of the server, etc. The indication field in the service message can be located in the message header or in the message load. The indication field can be the index information of a certain target data. The index information can be the specific address of the target data or the address of the target data. name or logo etc.
103.网络设备统计与目标数据相关的业务请求,该业务请求从业务报文中得到。103. The network device counts service requests related to the target data, and the service requests are obtained from service packets.
与目标数据相关的业务请求指的是对该目标数据进行读操作或写操作的请求等,该业务请求的类型可以从业务报文中解析出。The service request related to the target data refers to a request for reading or writing the target data, etc., and the type of the service request can be parsed from the service message.
104.当与目标数据相关的业务请求的统计结果满足响应条件时,则网络设备根据响应策略对网络设备接收到的业务报文和/或对目标数据作出相应操作。104. When the statistical result of the service request related to the target data satisfies the response condition, the network device performs corresponding operations on the service message received by the network device and/or on the target data according to the response strategy.
本申请实施例中,网络设备可以对目标数据进行识别和处理,不会占用用于提供目标 数据相关业务的业务服务器的资源,不会与目标数据相关业务产生资源冲突,而且,通过网络设备可以在目标数据相关的业务请求还网络中传输时就提前识别到然后作出相应操作,可以减少造成目标数据被过载访问导致业务服务器压力过大的机率。In the embodiment of the present application, the network device can identify and process the target data without occupying the resources of the service server used to provide the target data-related services, and will not cause resource conflicts with the target data-related services. Moreover, the network device can When the business request related to the target data is still transmitted in the network, it can be identified in advance and then take corresponding actions, which can reduce the probability of causing the target data to be overloaded and accessed, resulting in excessive pressure on the business server.
可选地,本申请实施例中,响应条件包括统计规则和响应关系;其中,统计规则包括统计时长,响应关系包括按照统计时长统计的业务请求的数量与目标阈值应满足的关系。Optionally, in this embodiment of the application, the response condition includes a statistical rule and a response relationship; wherein, the statistical rule includes a statistical time length, and the response relationship includes a relationship between the number of service requests counted according to the statistical time length and the target threshold.
与目标数据相关的业务请求的统计结果包括:与目标数据相关的业务请求在统计时长内的数量。The statistical results of the business requests related to the target data include: the number of the business requests related to the target data within the statistical time period.
统计结果满足响应条件包括:按照响应关系的指示,与目标数据相关的业务请求在统计时长内的数量超过目标阈值,若数量超过目标阈值,且目标数据不是已存在的热点数据,则指示目标数据为新产生的热点数据;或者,统计结果满足响应条件包括:按照响应关系的指示,与目标数据相关的业务请求在统计时长内的数量低于目标阈值,若数量低于目标阈值,且目标数据是已存在的热点数据时,则指示目标数据的热点属性消失。Statistical results satisfying the response conditions include: according to the indication of the response relationship, the number of business requests related to the target data exceeds the target threshold within the statistical period. If the number exceeds the target threshold and the target data is not existing hot data, indicate the target data It is newly generated hotspot data; or, the statistical results meet the response conditions include: according to the indication of the response relationship, the number of business requests related to the target data within the statistical period is lower than the target threshold, if the number is lower than the target threshold, and the target data If it is existing hotspot data, the hotspot attribute indicating the target data disappears.
其中,统计时长指的是用于统计业务请求的时间长度,如:1分钟、2分钟、5分钟或者其他数值。Wherein, the statistical duration refers to the length of time used for statistical service requests, such as: 1 minute, 2 minutes, 5 minutes or other values.
响应关系指的是按照统计时长统计的业务请求的数量与目标阈值的关系(如:超过目标阈值或低于目标阈值,需要说明的是,一个响应关系中,只会有一种关系,要么大于目标阈值,要么小于目标阈值)。当以响应关系是以大于目标阈值为例时,如:统计时长是1分钟,目标阈值是1万次,如果统计结果是统计到一分钟的与目标数据相关的业务请求的数量是1.2万次,而且该目标数据不是已存在的热点数据,则表示该目标数据是新产生的热点数据,那么该统计结果满足响应条件。当以响应关系是以小于目标阈值为例时,如果统计结果是统计到一分钟的与目标数据相关的业务请求的数量是0.7万次,当目标数据是已存在的热点数据时,则表示该统计结果也满足响应条件。The response relationship refers to the relationship between the number of business requests counted according to the statistical duration and the target threshold (such as: exceeding the target threshold or lower than the target threshold. It should be noted that there is only one relationship in a response relationship, or it is greater than the target threshold threshold, or less than the target threshold). When the response relationship is greater than the target threshold as an example, for example: the statistical duration is 1 minute, and the target threshold is 10,000 times. If the statistical result is that the number of business requests related to the target data in one minute is 12,000 times , and the target data is not existing hot data, it means that the target data is newly generated hot data, and the statistical result satisfies the response condition. When the response relationship is less than the target threshold as an example, if the statistical result is that the number of business requests related to the target data in one minute is 7,000 times, and when the target data is existing hot data, it means the The statistical results also meet the response conditions.
网络设备上可以维护热点数据的记录表,在该记录表中标记已成为热点数据的数据信息。A record table of hot data can be maintained on the network device, and data information that has become hot data is marked in the record table.
本申请实施例中,结合上述示例关于统计规则、响应关系、统计结果,以及统计结果是否满足响应条件之间的关系可以参阅下表1进行理解。In the embodiment of the present application, in combination with the above example, the relationship between statistical rules, response relationships, statistical results, and whether the statistical results meet the response conditions can be understood by referring to Table 1 below.
表1:Table 1:
Figure PCTCN2022141828-appb-000001
Figure PCTCN2022141828-appb-000001
Figure PCTCN2022141828-appb-000002
Figure PCTCN2022141828-appb-000002
由上述表1可以看出,虽然统计时长相同,但响应关系可以不相同,而且,是否满足响应条件,需要考虑该目标数据是否是已存在的热点数据。统计规则中可以标记出是针对已存在的热点数据使用的规则,或者,针对不是已存在的热点数据使用的规则。而且表1中只是示例性的说明,实际上,在热点数据消失的场景中,统计时长可以设置的比热点数据产生的场景大一些,如:热点数据产生的场景的统计时长设置的是1分钟,热点数据消失的场景的统计时长设置的是3分钟或5分钟,当然,具体数值本申请实施例中不做限制。另外,针对热点数据消失的场景还可以设置检测周期,连续几个周期检测到该热点数据的业务请求一直在下降才对该数据做资源缩容处理或者其他服务质量方面的调整。It can be seen from the above Table 1 that although the statistical time length is the same, the response relationship can be different, and whether the response condition is met or not needs to be considered whether the target data is an existing hot data. The statistical rules can be marked as the rules used for the existing hotspot data, or the rules used for the non-existing hotspot data. And Table 1 is just an example. In fact, in the scene where the hotspot data disappears, the statistical duration can be set to be longer than the scene where the hotspot data is generated. For example, the statistical duration of the scene where the hotspot data is generated is set to 1 minute. , the statistical duration of the scene where the hotspot data disappears is set to 3 minutes or 5 minutes, of course, the specific value is not limited in this embodiment of the application. In addition, the detection cycle can also be set for the scene where the hot data disappears, and the resource shrinking process or other service quality adjustments are made to the data when the business requests for the hot data are detected to be declining for several consecutive cycles.
本申请实施例中,可以统计热点数据产生或热点数据消失的过程,如果统计到针对不是热点数据的目标数据在一分钟的业务请求超过目标阈值,则可以理解为是热点数据产生的过程,如果统计到已是热点数据的目标数据的在一分钟的业务请求低于目标阈值,则可以理解为是热点数据消失的过程。当然,针对热点数据产生和热点数据消失所使用的响应关系中的目标阈值可以不相同。In the embodiment of this application, the process of hot data generation or hot data disappearance can be counted. If the statistics show that the service request for target data that is not hot data exceeds the target threshold within one minute, it can be understood as the process of hot data generation. If It can be understood as the process of hot data disappearing if the business requests within one minute of the target data that are already hot data are lower than the target threshold. Of course, the target thresholds in the response relationship used for hotspot data generation and hotspot data disappearance may be different.
本申请实施例中,热点数据指的是在一段时间活跃量超过一定阈值的数据,如:被访问、被点击、被浏览、被关注以及被下载等次数较多的数据,热点数据可以是热卖商品、热点新闻、热点的应用、热点的节目、节点的音乐等各种形式的数据。统计热点数据可以采用,如:最近最少使用(least recently used,LRU),最近最不常使用(least frequently used,LFU),以及先入先出(first in first out,FIFO)等多种算法。In the embodiment of this application, hot data refers to data whose activity exceeds a certain threshold for a period of time, such as: data that has been accessed, clicked, browsed, followed, and downloaded many times. Hot data can be hot Various forms of data such as commodities, hot news, hot applications, hot programs, and node music. Statistical hotspot data can be used, such as: least recently used (least recently used, LRU), least recently used (least frequently used, LFU), and first in first out (first in first out, FIFO) and other algorithms.
可选地,本申请实施例中,响应条件包括多组统计规则和响应关系,不同统计规则中的统计时长不同,不同的统计规则对应的响应关系中的目标阈值不相同;不同的统计规则对应的响应策略中的不同调整策略。Optionally, in this embodiment of the application, the response conditions include multiple sets of statistical rules and response relationships. The statistical durations in different statistical rules are different, and the target thresholds in the response relationships corresponding to different statistical rules are different; different statistical rules correspond to Different adjustment strategies in the response strategy.
本申请实施例中,统计规则中包括的统计时长和响应关系中的目标阈值通常是对应的。如:统计时长是1分钟,目标阈值是10000次,统计时长是2分钟,目标阈值是20000次,统计时长是5分钟,目标阈值是50000次。当然,此处只是举例,实际上,不同统计规则中的统计时长与对应的响应关系中的目标阈值之间的关系不一定是成比例变化的。虽然,此处只介绍了统计规则中包括统计时长,实际上,统计规则中还可以包括其他参量,如:统计对象的标识,该统计对象的标识例如可以是目标数据对应业务对外的业务地址,例如:可以是目标数据所在设备的地址、也可以是VM的虚拟接口地址,或者可以表示该业务地址的其他信息,该其他信息例如可以是redis的键值(key),或者是视频的url地址,文件的索 引等。当针对不同设备上的数据采用不同的响应条件时,统计规则中可以设置统计对象的标识,如果:针对所有数据都采用同一套响应条件,则也可以不设置统计对象的标识。In this embodiment of the present application, the statistical duration included in the statistical rule and the target threshold in the response relationship usually correspond. For example: the statistics time is 1 minute, the target threshold is 10,000 times, the statistics time is 2 minutes, the target threshold is 20,000 times, the statistics time is 5 minutes, and the target threshold is 50,000 times. Of course, this is just an example. In fact, the relationship between the statistical duration in different statistical rules and the target threshold in the corresponding response relationship does not necessarily change proportionally. Although it is only introduced here that the statistical rules include the statistical duration, in fact, the statistical rules can also include other parameters, such as: the identification of the statistical object. The identification of the statistical object can be, for example, the external business address of the target data corresponding business. For example: it can be the address of the device where the target data is located, or the virtual interface address of the VM, or other information that can represent the business address, such as the key value (key) of redis, or the url address of the video , the index of the file, etc. When different response conditions are used for data on different devices, the statistical object identifier can be set in the statistical rule, and if the same set of response conditions is used for all data, the statistical object identifier may not be set.
本申请实施例,通过在响应条件中配置多组统计规则和响应关系,可以有效的启用不同的调整策略,这样,可以使调整的用于处理目标数据的资源与当前客户端对目标数据的访问量更匹配,提高了资源的利用率。In the embodiment of this application, by configuring multiple sets of statistical rules and response relationships in the response conditions, different adjustment strategies can be effectively enabled. In this way, the adjusted resources for processing target data and the current client access to target data The volume is more matched, and the utilization rate of resources is improved.
可选地,本申请实施例中,响应策略包括:针对目标优先级的业务报文的服务质量调整策略,以及对目标数据做资源扩容或资源缩容的调整策略;其中,目标优先级包含于响应策略中。Optionally, in this embodiment of the application, the response strategy includes: a service quality adjustment strategy for service packets with a target priority, and an adjustment strategy for resource expansion or resource shrinkage for target data; wherein, the target priority is included in response strategy.
结合该响应策略,上述步骤104可以包括两种情况,一种是热点数据产生时的处理过程,一种是热点数据消失时的处理过程,下面分别进行介绍。In combination with the response strategy, the above step 104 may include two cases, one is the processing process when the hotspot data is generated, and the other is the processing process when the hotspot data disappears, which will be introduced respectively below.
1.热点数据产生。1. Generate hotspot data.
当目标数据为新产生的热点数据时,网络设备按照服务质量调整策略调低目标优先级的业务报文的服务质量,和/或,按照资源扩容的调整策略对目标数据作出资源扩容的操作;When the target data is newly generated hotspot data, the network device lowers the service quality of the target priority service packets according to the service quality adjustment strategy, and/or performs resource expansion operations on the target data according to the resource expansion adjustment strategy;
本申请实施例中,网络设备可以接收到不同优先级的业务报文,当产生热点数据时,为了避免热点数据对高优先级的业务造成冲击,可以优先处理高优先级的业务报文,为了对保障高优先级的业务报文的处理,可以按照响应策略中指定的目标优先级,调低目标优先级的业务报文的服务质量(如:降低目标优先级的业务报文的带宽、时延或丢包率等)。和/或,为热点数据做资源扩容,也就是增加热点数据的资源,这样,可以缓解热点数据对高优先级业务的冲击。In the embodiment of this application, the network device can receive service messages of different priorities. When hot data is generated, in order to avoid the impact of hot data on high priority services, the high priority service messages can be processed first. To ensure the processing of high-priority service packets, the service quality of target priority service packets can be lowered according to the target priority specified in the response policy (for example: reduce the bandwidth, time delay or packet loss rate, etc.). And/or, do resource expansion for hot data, that is, increase hot data resources, so that the impact of hot data on high-priority services can be alleviated.
本申请实施例中,针对热点数据的扩容或缩容的资源包括网络资源、计算资源以及存储资源等。In the embodiment of the present application, resources for expansion or contraction of hotspot data include network resources, computing resources, and storage resources.
2.热点数据消失。2. Hotspot data disappears.
当目标数据的热点属性消失时,网络设备按照服务质量调整策略调高目标业务优先级的业务报文的服务质量,和/或,按照资源缩容的调整策略对目标数据作出资源缩容的操作。When the hotspot attribute of the target data disappears, the network device adjusts the quality of service of the service packets with the priority of the target business according to the service quality adjustment strategy, and/or performs resource shrinkage operations on the target data according to the resource shrinkage adjustment strategy .
本申请实施例中,当热点数据消失时,热点数据消失表示之前该热点数据所占用的资源会被空出,这时,可以提高目标优先级的业务报文的服务质量,有利于对这些目标优先级的业务报文进行较好的处理。和/或,为热点数据做资源缩容,也就是减少热点数据的资源,这样可以提高资源的利用率。In the embodiment of the present application, when the hot data disappears, the disappearance of the hot data means that the resources occupied by the hot data before will be vacated. At this time, the service quality of the service message with the target priority can be improved, which is beneficial to these targets. Priority service packets are better processed. And/or, shrink resources for hot data, that is, reduce hot data resources, which can improve resource utilization.
以上,当响应条件中包括多组统计规则和响应关系时,不同组的统计规则可以对应不同的响应策略中的调整策略,该对应关系可以参考如下表2中的示例进行理解。As mentioned above, when the response condition includes multiple sets of statistical rules and response relationships, different sets of statistical rules may correspond to adjustment strategies in different response strategies, and the corresponding relationship may be understood with reference to the example in Table 2 below.
表2:Table 2:
Figure PCTCN2022141828-appb-000003
Figure PCTCN2022141828-appb-000003
由表2的示例可见,不同统计时长统计到的业务请求的数量超过对应的目标阈值时,所执行的响应策略不同。当然,此处表1中的内容只是举例,只是提供一种不同统计规则对应不同响应策略的思想,其他可以在本思想之内的实现方式都可以理解为是本申请的方案。It can be seen from the examples in Table 2 that when the number of service requests counted by different statistical time periods exceeds the corresponding target threshold, different response strategies are executed. Of course, the content in Table 1 here is just an example, and only provides an idea that different statistical rules correspond to different response strategies. Other implementation methods that can be within this idea can be understood as the solutions of this application.
需要说明的是,上述表2中,执行资源扩容或资源缩容时,不同的统计规则还可以按照不同规格进行资源扩容或资源缩容,如:统计时长是2分钟,执行资源扩容时,可以增加1个数据节点用于处理热点数据,统计时长是5分钟,执行资源扩容时,可以增加2个数据节点用于处理热点数据,当然,此处只是提供一种思想,具体资源扩容或资源缩容的规格本申请中不做限定。It should be noted that in the above Table 2, when performing resource expansion or resource shrinkage, different statistical rules can also be used to perform resource expansion or resource shrinkage according to different specifications. For example, the statistics time is 2 minutes. Add 1 data node to process hot data, and the statistical time is 5 minutes. When performing resource expansion, you can add 2 data nodes to process hot data. Of course, this is just an idea, specific resource expansion or resource shrinking The specification of the content is not limited in this application.
另外,本申请实施例中,在不同的场景中,对目标数据的管理过程略有不同,下面分别对各场景中的目标数据的管理过程进行介绍。In addition, in the embodiment of the present application, the management process of the target data is slightly different in different scenarios, and the management process of the target data in each scenario will be introduced respectively below.
在上述图1所示的分布式系统的场景下,网络设备可以为交换设备或安装于交换设备或数据节点上的网络接口装置,图4中以网络设备是安装于数据节点上网卡为例进行介绍,如图4所示,本申请实施例提供的数据管理的方法的另一实施例包括:In the scenario of the distributed system shown in Figure 1 above, the network device can be a switching device or a network interface device installed on the switching device or data node. In Figure 4, the network device is installed on the network card of the data node as an example. Introduction, as shown in Figure 4, another embodiment of the data management method provided by the embodiment of the present application includes:
201.网卡接收到接收来自客户端的业务报文。201. The network card receives a service packet from the client.
该网卡已经预先获取了前面描述的数据管理规则,如图4中所示的,从规则管理装置预先获取了数据管理规则。The network card has pre-acquired the data management rules described above. As shown in FIG. 4 , the data management rules have been pre-acquired from the rule management device.
202.网卡根据报文解析规则对来自客户端的业务报文进行解析,以确定业务报文关联的目标数据。202. The network card parses the service packets from the client according to the packet parsing rules, so as to determine the target data associated with the service packets.
该报文解析过程可以参阅图5进行理解,如图5所示,业务报文包括报文头(Eth Header、IP Header和TCP Header),以及报文载荷(RESP payload)部分,可以先根据报文解析规则解析报文头,根据IP地址确定该业务报文所请求的数据的目的地址,然后再解析报文载荷部分,可以确定该报文载荷部分包括对目标数据的读请求,以及目标数据的索引信息,根据该索引信息,可以从该IP地址的服务器获取到该目标数据。The message parsing process can be understood by referring to Figure 5. As shown in Figure 5, the service message includes the message header (Eth Header, IP Header, and TCP Header) and the message payload (RESP payload). The text parsing rule parses the packet header, determines the destination address of the data requested by the service packet according to the IP address, and then parses the packet payload to determine that the packet payload includes the read request for the target data and the target data According to the index information, the target data can be obtained from the server at the IP address.
203.网卡根据统计规则中的统计时长统计与目标数据相关的业务请求。203. The network card counts the service requests related to the target data according to the statistical duration in the statistical rule.
当目标数据在热点数据记录表中没有记录时,表示该目标数据不是热点数据,则可以选择不是热点数据的响应条件,或者不是热点数据的统计规则以及对应的响应关系。然后统计该目标数据相关的业务请求在统计时长的数量,当该数量大于目标阈值,则表示该目标数据是新产生的热点数据。When the target data is not recorded in the hot data record table, it means that the target data is not hot data, then you can choose the response condition of not hot data, or the statistical rule of not hot data and the corresponding response relationship. Then count the number of business requests related to the target data during the statistical period. When the number is greater than the target threshold, it means that the target data is newly generated hot data.
当目标数据在热点数据记录表中已有记录时,表示该目标数据是热点数据,则可以选择是热点数据的响应条件,或者是热点数据的统计规则以及对应的响应关系。然后统计该目标数据相关的业务请求在统计时长的数量,当该数据小于目标阈值,则表示该目标数据的热点属性已消失。When the target data has been recorded in the hot data record table, it means that the target data is hot data, then you can choose the response condition of hot data, or the statistical rules of hot data and the corresponding response relationship. Then count the number of service requests related to the target data during the statistical period. When the data is less than the target threshold, it means that the hotspot attribute of the target data has disappeared.
204.当与目标数据相关的业务请求的统计结果满足响应条件时,网卡调低目标优先级的业务报文的服务质量,或者,网卡调高目标优先级的业务报文的服务质量。204. When the statistical result of the service request related to the target data satisfies the response condition, the network card lowers the service quality of the service message with the target priority, or increases the service quality of the service message with the target priority.
针对新产生的热点数据,网卡可以调低目标优先级的业务报文的服务质量。针对热点属性已消失的目标数据,网卡可以调高目标优先级的业务报文的服务质量。For the newly generated hot data, the network card can lower the service quality of the target priority business packets. For the target data whose hotspot attribute has disappeared, the network card can increase the service quality of the target priority business packets.
205.网卡通过交换设备向控制节点发送扩容通知或缩容通知。205. The network card sends a capacity expansion notice or a capacity reduction notice to the control node through the switching device.
扩容通知用于指示控制节点为目标数据进行资源扩容。The capacity expansion notification is used to instruct the control node to perform resource expansion for the target data.
缩容通知用于指示控制节点为目标数据进行资源缩容。The capacity reduction notification is used to instruct the control node to perform resource reduction for the target data.
如果是热点数据产生的场景,网卡发送的是扩容通知,如果是热点数据消失的场景,网卡发送的是缩容通知。If it is a scene where hot data is generated, the NIC sends a capacity expansion notice; if it is a scene where hot data disappears, the network card sends a capacity reduction notice.
206.控制节点根据扩容通知为目标数据进行资源扩容,或者,控制节点根据缩容通知为目标数据进行资源缩容。206. The control node performs resource expansion for the target data according to the capacity expansion notification, or, the control node performs resource reduction for the target data according to the capacity reduction notification.
该资源扩容的过程可以是控制节点向某个数据节点发通知,指示该数据节点也作为处理目标数据的节点。The resource expansion process may be that the control node sends a notification to a certain data node, indicating that the data node is also a node for processing target data.
该资源缩容的过程可以是控制节点向某个数据节点发通知,指示该数据节点不再作为处理目标数据的节点。The resource shrinking process may be that the control node sends a notification to a certain data node, indicating that the data node is no longer a node for processing target data.
因为控制节点统筹整个网络的资源,可以为该目标数据做出较优的资源扩容或资源缩容。Because the control node coordinates the resources of the entire network, it can make better resource expansion or resource reduction for the target data.
以上结合图4描述了数据节点上的网卡作为网络设备来实现上述热点数据的管理的过程,当网络设备是交换设备上的网络接口装置时,上述过程可以参阅图6进行理解。The above describes the process in which the network card on the data node is used as a network device to manage the above-mentioned hot data in conjunction with FIG. 4 . When the network device is a network interface device on a switching device, the above process can be understood with reference to FIG. 6 .
下面结合图6介绍在分布式系统的场景中,网络设备是交换设备上的网络接口,如交换机接口时的热点数据的管理过程。The following describes the hotspot data management process when the network device is a network interface on a switching device, such as a switch interface, in a distributed system scenario with reference to FIG. 6 .
如图6所示,本申请实施例提供的数据管理的方法的另一实施例包括:As shown in Figure 6, another embodiment of the data management method provided by the embodiment of the present application includes:
301.交换设备上的网络接口接收到来自客户端的业务报文。301. A network interface on the switching device receives a service packet from a client.
302.网络接口根据报文解析规则对来自客户端的业务报文进行解析,以确定业务报文关联的目标数据。302. The network interface parses the service packets from the client according to the packet parsing rules, so as to determine the target data associated with the service packets.
303.网络接口根据统计规则中的统计时长统计与目标数据相关的业务请求。303. The network interface counts service requests related to the target data according to the counting duration in the counting rule.
304.当与目标数据相关的业务请求的统计结果满足响应条件时,网络接口调低目标优先级的业务报文的服务质量,或者,网络接口调高目标优先级的业务报文的服务质量。304. When the statistical result of the service request related to the target data satisfies the response condition, the network interface lowers the service quality of the service message with the target priority, or increases the service quality of the service message with the target priority.
305.网络接口向控制节点发送扩容通知或缩容通知。305. The network interface sends a capacity expansion notice or a capacity reduction notice to the control node.
306.控制节点根据扩容通知为目标数据进行资源扩容,或者,控制节点根据缩容通知为目标数据进行资源缩容。306. The control node performs resource expansion for the target data according to the capacity expansion notification, or, the control node performs resource reduction for the target data according to the capacity reduction notification.
以上图6中网络接口所执行的步骤中的相关内容可以参阅图4中步骤201至步骤206中相关的解释进行理解,此处不再重复介绍。Relevant content in the above steps performed by the network interface in FIG. 6 can be understood by referring to related explanations in steps 201 to 206 in FIG. 4 , and will not be repeated here.
以上结合图6描述了交换设备上的网络接口作为网络设备来实现上述热点数据的管理的过程,当网络设备是交换设备时,过程与上述图6的过程相同,可以参阅图6的过程进行理解。The above describes the process of managing the above-mentioned hotspot data by using the network interface on the switching device as a network device in conjunction with Fig. 6. When the network device is a switching device, the process is the same as the process in Fig. 6 above, and you can refer to the process in Fig. 6 for understanding .
以上图6介绍的方案,是当网络设备是交换设备的网络接口时,通过控制节点来实现资源扩容或资源缩容的过程。可选地,交换设备上也可以安装有一个控制装置,可以通过该控制装置来实现资源扩容或资源缩容的过程,该场景的过程可以参阅图7进行理解。The solution introduced in FIG. 6 above is a process of implementing resource expansion or resource reduction through the control node when the network device is the network interface of the switching device. Optionally, a control device may also be installed on the switching device, and the resource expansion or resource reduction process may be implemented through the control device. The process of this scenario may be understood by referring to FIG. 7 .
如图7所示,该场景的步骤401至步骤404可以参阅图6部分的步骤301至步骤304进行理解,与图6不同的是步骤405和步骤406。As shown in FIG. 7 , steps 401 to 404 in this scenario can be understood by referring to steps 301 to 304 in FIG. 6 , and steps 405 and 406 are different from FIG. 6 .
405.网络接口向控制装置发送扩容通知或缩容通知。405. The network interface sends a capacity expansion notice or a capacity reduction notice to the control device.
406.控制装置根据扩容通知为目标数据进行资源扩容,或者,控制装置根据缩容通知为目标数据进行资源缩容。406. The control device performs resource expansion for the target data according to the capacity expansion notification, or, the control device performs resource reduction for the target data according to the capacity reduction notification.
该分布式场景中的控制装置也可以称为第二控制装置。The control device in the distributed scenario may also be referred to as a second control device.
步骤406的具体实现过程可以参阅前面的步骤206中的相应描述进行理解。The specific implementation process of step 406 can be understood by referring to the corresponding description in the preceding step 206 .
以上介绍了在分布式系统中网络设备是数据节点上的网卡、交换设备上的网络接口以及交换设备时,对热点数据的管理过程,下面结合附图介绍在集中式系统的场景中,对热点数据的管理过程。The above describes the management process of hotspot data when the network device in the distributed system is the network card on the data node, the network interface on the switching device, and the switching device. data management process.
如图8所示,在集中式系统的场景中,网络设备为安装于数据节点上的网络接口装置,数据节点还包括控制装置。As shown in FIG. 8 , in the scenario of a centralized system, the network device is a network interface device installed on a data node, and the data node also includes a control device.
如图8所示,本申请实施例提供的数据管理的方法的另一实施例包括:As shown in Figure 8, another embodiment of the data management method provided by the embodiment of the present application includes:
该实施例中步骤501至步骤504可以参阅图4中步骤201至步骤204进行理解,不同的是步骤505和步骤506。Steps 501 to 504 in this embodiment can be understood by referring to steps 201 to 204 in FIG. 4 , except for steps 505 and 506 .
505.网卡向控制装置发送扩容通知或缩容通知。505. The network card sends a capacity expansion notice or a capacity reduction notice to the control device.
506.控制装置根据扩容通知为目标数据进行资源扩容,或者,控制装置根据缩容通知为目标数据进行资源缩容。506. The control device performs resource expansion for the target data according to the capacity expansion notification, or, the control device performs resource reduction for the target data according to the capacity reduction notification.
该集中式场景中的控制装置也可以称为第一控制装置。The control device in the centralized scenario may also be referred to as a first control device.
该集中式系统中,每个数据节点的资源量通常非常大,可以通过调节该数据节点上空闲的资源或者业务的资源为该热点数据服务,或者,回收因热点数据消失而产生的空闲资源。In this centralized system, the amount of resources of each data node is usually very large, and the idle resources or business resources on the data node can be adjusted to serve the hot data, or the idle resources generated due to the disappearance of hot data can be recovered.
本申请实施例提供的方案也可以应用在Redis业务场景,在Redis业务场景中的应用过程可以参阅图9进行理解,如图9所示,在Redis业务场景中,Redis集群包括服务入口节点,业务代理节点(可以选择其中一个作为控制节点)和Redis数据节点。其中,服务入口节点主要负责业务的分发处理,业务代理节点主要负责业务链接的管理和数据缓存,Redis数据节点主要提供数据读写服务。The solution provided by the embodiment of the present application can also be applied to the Redis business scenario. The application process in the Redis business scenario can be understood by referring to FIG. 9. As shown in FIG. Proxy nodes (one of which can be selected as the control node) and Redis data nodes. Among them, the service entry node is mainly responsible for business distribution and processing, the business proxy node is mainly responsible for business link management and data caching, and the Redis data node mainly provides data read and write services.
在该Redis集群中,以视频场景为例,视频A的数据、视频B的数据和视频C的数据分别分布于三个Redis数据节点中,每个Redis数据节点都由网卡来执行数据识别与统计的过程,具体过程包括:In this Redis cluster, taking the video scene as an example, the data of video A, video B and video C are respectively distributed in three Redis data nodes, and each Redis data node is performed by a network card to perform data identification and statistics The process, the specific process includes:
601.视频A的Redis数据节点中的网卡接收到业务报文。601. The network card in the Redis data node of video A receives the service packet.
602.网卡先按照报文解析规则,对业务报文进行解析。602. The network card first parses the service packets according to the packet parsing rules.
该业务报文的格式可以参阅图10进行理解,该网卡先对报文头进行解析后,确定该视频A所在的服务器的IP地址,然后对报文载荷进行解析,确定出视频A的索引信息,根据该索引信息可以查找到相应的视频A中的具体内容。The format of the service message can be understood by referring to Figure 10. The network card first analyzes the message header, determines the IP address of the server where the video A is located, and then analyzes the message load to determine the index information of the video A. , according to the index information, the specific content in the corresponding video A can be found.
603.网卡根据响应条件中的统计规则统计与视频A相关的业务请求。603. The network card counts the service requests related to video A according to the statistical rules in the response condition.
604.当视频A为新产生的热点数据时,则网卡调低响应策略中指定的业务优先级的业务报文的服务质量。604. When the video A is newly generated hotspot data, the network card lowers the service quality of the service packets with the service priority specified in the response policy.
605.网卡向作为控制节点的业务代理节点发送扩容通知。605. The network card sends a capacity expansion notice to the service proxy node serving as the control node.
606.控制节点向另一个空闲的Redis数据节点发送通知,指示该Redis数据节点为视频A 提供数据处理服务。606. The control node sends a notification to another idle Redis data node, instructing the Redis data node to provide video A with data processing services.
需要说明的是,上述图4到图9中都涉及到了对目标数据进行扩容或缩容的过程,执行扩容或缩容的装置可以是控制节点,也可以是第一控制装置或第二控制装置,关于由哪个装置来执行扩容或缩容可以过程可以在响应策略中指示,网络设备可以向响应策略中指示出的用于执行扩容或缩容的装置发送扩容通知或缩容通知,然后由该装置来完成扩容或缩容过程。It should be noted that the above-mentioned Figures 4 to 9 all involve the process of expanding or shrinking the target data, and the device performing the expansion or shrinking can be the control node, or the first control device or the second control device , the process of which device will perform capacity expansion or contraction can be indicated in the response policy, and the network device can send a capacity expansion notice or a capacity contraction notice to the device for performing capacity expansion or contraction indicated in the response policy, and then the device to complete the expansion or reduction process.
以上提供了集中式、分布式的存储或数据库服务,改变了传统的在主控业务流程中进行热点统计的方法,将热点的统计和识别下发到网络设备进行操作,对于除存储或数据库之外的其它基础服务,如果需要进行一定特征的数据识别和统计的场景都可以应用本申请的技术来进行代替,在降低业务计算资源冲突的前提下能够充分的利用网络资源进行数据的统计识别,在人工智能AI模型训练的过程中也可以通过本方案对模型数据进行识别和统计。The above provides centralized and distributed storage or database services, which changes the traditional method of hotspot statistics in the main control business process, and sends the statistics and identification of hotspots to network devices for operation. In addition to other basic services, if certain characteristics of data identification and statistics are required, the technology of this application can be used to replace them. On the premise of reducing business computing resource conflicts, network resources can be fully utilized for statistical identification of data. In the process of AI model training, the model data can also be identified and counted through this solution.
以上结合不同的场景,介绍了本申请实施例提供的数据管理的方法,下面结合附图介绍本申请实施例提供的网络设备。The data management method provided by the embodiment of the present application is described above in combination with different scenarios, and the network device provided by the embodiment of the present application is described below in conjunction with the accompanying drawings.
如图11所示,本申请实施例提供的网络设备70,该网络设备70可以为交换设备或者安装于交换设备或数据节点中的网络接口装置,该网络设备70的一实施例包括:As shown in FIG. 11, the network device 70 provided by the embodiment of the present application may be a switching device or a network interface device installed in a switching device or a data node. An embodiment of the network device 70 includes:
获取单元701,用于获取数据管理规则,数据管理规则包括报文解析规则、响应条件和响应策略。该获取单元701可以执行上述方法实施例中的步骤101。The acquiring unit 701 is configured to acquire data management rules, where the data management rules include message parsing rules, response conditions, and response policies. The obtaining unit 701 may execute step 101 in the foregoing method embodiments.
第一处理单元702,用于根据获取单元701获取的报文解析规则对来自客户端的业务报文进行解析,以确定业务报文关联的目标数据,目标数据是应用层数据。该第一处理单元702可以执行上述方法实施例中的步骤102、202、302、402和502。The first processing unit 702 is configured to parse the service message from the client according to the message parsing rules acquired by the acquiring unit 701 to determine target data associated with the service message, where the target data is application layer data. The first processing unit 702 may execute steps 102, 202, 302, 402, and 502 in the foregoing method embodiments.
第二处理单元703,用于统计与第一处理单元702解析出的目标数据相关的业务请求,业务请求从业务报文中得到。该第二处理单元703可以执行上述方法实施例中的步骤103、203、303、403和503。The second processing unit 703 is configured to count service requests related to the target data analyzed by the first processing unit 702, and the service requests are obtained from service packets. The second processing unit 703 may execute steps 103, 203, 303, 403, and 503 in the foregoing method embodiments.
操作单元704,用于当第二处理单元703统计的与目标数据相关的业务请求的统计结果满足响应条件时,则根据响应策略对网络设备接收到的业务报文和/或对目标数据作出相应操作。该操作单元704可以执行上述方法实施例中的步骤104、105、204、205、304、305、404、405、504和505。The operation unit 704 is configured to respond to the service message received by the network device and/or to the target data according to the response strategy when the statistical result of the service request related to the target data collected by the second processing unit 703 satisfies the response condition operate. The operation unit 704 may execute steps 104, 105, 204, 205, 304, 305, 404, 405, 504, and 505 in the foregoing method embodiments.
本申请实施例中,网络设备可以对目标数据进行识别和处理,不会占用用于提供目标数据相关业务的业务服务器的资源,不会与目标数据相关业务产生资源冲突,而且,通过网络设备可以在目标数据相关的业务请求还网络中传输时就提前识别到然后作出相应操作,可以减少造成目标数据被过载访问导致业务服务器压力过大的机率。In the embodiment of the present application, the network device can identify and process the target data without occupying the resources of the service server used to provide the target data-related services, and will not cause resource conflicts with the target data-related services. Moreover, the network device can When the business request related to the target data is still transmitted in the network, it can be identified in advance and then take corresponding actions, which can reduce the probability of causing the target data to be overloaded and accessed, resulting in excessive pressure on the business server.
可选地,响应条件包括统计规则和响应关系;其中,统计规则包括统计时长,响应关系包括按照统计时长统计的业务请求的数量与目标阈值应满足的关系。Optionally, the response condition includes a statistical rule and a response relationship; wherein, the statistical rule includes a statistical time length, and the response relationship includes a relationship between the number of business requests counted according to the statistical time length and the target threshold.
与目标数据相关的业务请求的统计结果包括:与目标数据相关的业务请求在统计时长内的数量。The statistical results of the business requests related to the target data include: the number of the business requests related to the target data within the statistical time period.
可选地,统计结果满足响应条件包括:按照响应关系的指示,与目标数据相关的业务 请求在统计时长内的数量超过目标阈值,若数量超过目标阈值,且目标数据不是已存在的热点数据,则指示目标数据为新产生的热点数据;或者,统计结果满足响应条件包括:按照响应关系的指示,与目标数据相关的业务请求在统计时长内的数量低于目标阈值,若数量低于目标阈值,且目标数据是已存在的热点数据时,则指示目标数据的热点属性消失。Optionally, the statistical result meeting the response condition includes: according to the indication of the response relationship, the number of business requests related to the target data exceeds the target threshold within the statistical period, if the number exceeds the target threshold, and the target data is not existing hot data, It indicates that the target data is newly generated hot data; or, the statistical result meets the response condition including: according to the indication of the response relationship, the number of business requests related to the target data within the statistical time is lower than the target threshold, if the number is lower than the target threshold , and the target data is existing hotspot data, it indicates that the hotspot attribute of the target data disappears.
可选地,响应条件包括多组统计规则和响应关系,不同统计规则中的统计时长不同,不同的统计规则对应的响应关系中的目标阈值不相同。Optionally, the response conditions include multiple sets of statistical rules and response relationships, different statistical rules have different statistical durations, and different statistical rules correspond to different target thresholds in the response relationships.
不同的统计规则对应的响应策略中的不同调整策略。Different statistical rules correspond to different adjustment strategies in the response strategy.
可选地,响应策略包括:针对目标优先级的业务报文的服务质量调整策略,以及对目标数据做资源扩容或资源缩容的调整策略;其中,目标优先级包含于响应策略中。Optionally, the response strategy includes: a service quality adjustment strategy for service packets with a target priority, and an adjustment strategy for resource expansion or resource shrinkage for target data; wherein the target priority is included in the response strategy.
可选地,操作单元704用于:Optionally, the operation unit 704 is used to:
当目标数据为新产生的热点数据时,按照服务质量调整策略调低目标优先级的业务报文的服务质量,和/或,按照资源扩容的调整策略对目标数据作出资源扩容的操作。When the target data is newly generated hot data, lower the service quality of the target priority service packets according to the service quality adjustment strategy, and/or perform resource expansion operations on the target data according to the resource expansion adjustment strategy.
当目标数据的热点属性消失时,按照服务质量调整策略调高目标业务优先级的业务报文的服务质量,和/或,按照资源缩容的调整策略对目标数据作出资源缩容的操作。When the hotspot attribute of the target data disappears, according to the service quality adjustment policy, the service quality of the service message with the target business priority is increased, and/or, according to the resource shrinkage adjustment policy, the resource shrinking operation is performed on the target data.
可选地,第一处理单元702用于:根据报文解析规则解析业务报文的五元组,以确定业务报文的业务类型;根据报文解析规则解析指示字段,以确定业务类型的目标数据或目标数据的索引信息,索引信息用于确定目标数据。Optionally, the first processing unit 702 is configured to: parse the five-tuple of the service message according to the message parsing rule to determine the service type of the service message; parse the indication field according to the message parsing rule to determine the target of the service type Index information of the data or target data, the index information is used to determine the target data.
可选地,操作单元704,用于当响应策略指示由用于管理数据节点的控制节点执行资源扩容或资源缩容的调整策略时,向控制节点发送扩容通知,扩容通知用于指示控制节点为目标数据进行资源扩容;或者,向控制节点发送缩容通知,缩容通知用于指示控制节点为目标数据进行资源缩容。Optionally, the operation unit 704 is configured to send a capacity expansion notice to the control node when the response policy indicates that the control node for managing the data node executes the resource expansion or resource contraction adjustment policy, and the capacity expansion notice is used to instruct the control node to be The resource expansion is performed on the target data; or, a capacity reduction notification is sent to the control node, and the capacity reduction notification is used to instruct the control node to perform resource reduction for the target data.
可选地,操作单元704,用于数据节点还包括第一控制装置;当响应策略指示由第一控制装置执行资源扩容或资源缩容的调整策略时;向第一控制装置发送扩容通知,扩容通知用于指示第一控制装置为目标数据进行资源扩容;或者,向第一控制装置发送缩容通知,缩容通知用于指示第一控制装置为目标数据进行资源缩容。Optionally, the operation unit 704 is used for the data node to further include a first control device; when the response strategy indicates that the first control device executes an adjustment strategy for resource expansion or resource shrinkage; send a capacity expansion notification to the first control device, and the capacity expansion The notification is used to instruct the first control device to perform resource expansion for the target data; or, send a capacity reduction notification to the first control device, and the capacity reduction notification is used to instruct the first control device to perform resource reduction for the target data.
可选地,操作单元704,用于网络设备为安装于交换设备上的网络接口装置;交换设备还包括第二控制装置,当响应策略指示由第二控制装置执行资源扩容或资源缩容的调整策略时,向第二控制装置发送扩容通知,扩容通知用于指示第二控制装置为目标数据进行资源扩容;或者,向第二控制装置发送缩容通知,缩容通知用于指示第二控制装置为目标数据进行资源缩容。Optionally, the operation unit 704 is used for the network device to be a network interface device installed on the switching device; the switching device further includes a second control device, and when the response policy indicates that the resource expansion or resource shrinkage adjustment is performed by the second control device In the strategy, send a capacity expansion notice to the second control device, and the capacity expansion notice is used to instruct the second control device to expand the resource capacity for the target data; or, send a capacity reduction notice to the second control device, and the capacity reduction notice is used to instruct the second control device Resource shrinking for target data.
可选地,获取单元701,用于从业务服务器或规则管理装置获取数据管理规则,业务服务器是与目标数据相关的服务器。Optionally, the obtaining unit 701 is configured to obtain data management rules from a service server or a rule management device, where the service server is a server related to target data.
以上,本申请实施例提供的网络设备可以参阅前述方法实施例部分的相应内容进行理解,此处不再重复赘述。Above, the network device provided in the embodiment of the present application can be understood by referring to the corresponding content in the foregoing method embodiment, and details are not repeated here.
图12所示,为本申请的实施例提供的上述实施例中所涉及的网络设备80的一种可能的逻辑结构示意图。网络设备80包括:处理器801、通信接口802、存储器803以及总线804。处理器801、通信接口802以及存储器803通过总线804相互连接。FIG. 12 is a schematic diagram of a possible logical structure of the network device 80 involved in the above-mentioned embodiments provided by the embodiments of the present application. The network device 80 includes: a processor 801 , a communication interface 802 , a memory 803 and a bus 804 . The processor 801 , the communication interface 802 and the memory 803 are connected to each other through a bus 804 .
通信接口802用于支持网络设备80进行通信,该通信接口802可以是网卡或者网络接口。如执行图3至图10中的步骤101、201、301、401和501。The communication interface 802 is used to support the network device 80 to communicate, and the communication interface 802 may be a network card or a network interface. Such as executing steps 101, 201, 301, 401 and 501 in Fig. 3 to Fig. 10 .
在本申请的实施例中,处理器801用于对网络设备80的动作进行控制管理,例如,处理器801用于执行图3至图10中的步骤102至106,202至206,302至306,402至406,502至506和/或用于本文所描述的技术的其他过程。In the embodiment of the present application, the processor 801 is used to control and manage the actions of the network device 80, for example, the processor 801 is used to execute steps 102 to 106, 202 to 206, 302 to 306, 402 to 406, 502 to 506 in FIGS. 3 to 10 and/or other processes for the techniques described herein.
存储器803,用于存储网络设备80的程序代码和数据。The memory 803 is used for storing program codes and data of the network device 80 .
其中,处理器801可以是中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。总线804可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图12中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。Wherein, the processor 801 may be a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like. The bus 804 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus, etc. The bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 12 , but it does not mean that there is only one bus or one type of bus.
在本申请的另一实施例中,还提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,当设备的至少一个处理器执行该计算机执行指令时,设备执行上述图3至图10部分实施例所描述的方法。In another embodiment of the present application, a computer-readable storage medium is also provided, and computer-executable instructions are stored in the computer-readable storage medium. When at least one processor of the device executes the computer-executable instructions, the device executes the above diagram. 3 to the method described in some embodiments in FIG. 10 .
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得设备执行上述图3至图10部分实施例所描述的方法。In another embodiment of the present application, a computer program product is also provided, the computer program product includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; Reading the storage medium reads the computer-executable instructions, and at least one processor executes the computer-executable instructions so that the device executes the methods described in some embodiments in FIG. 3 to FIG. 10 .
在本申请的另一实施例中,还提供一种网卡,该网卡包括输入接口、输出接口以及至少一个处理器,输入接口用于接收业务报文,至少一个处理器用于支持网络设备实现上述图3至图7部分实施例所描述的方法,输出接口用于针对统计出所述业务报文为热点数据时发送扩容通知或缩容通知。在一种可能的设计中,网卡还可以包括存储器,存储器,用于网络设备必要的程序指令和数据。In another embodiment of the present application, a network card is also provided, the network card includes an input interface, an output interface and at least one processor, the input interface is used to receive service packets, and at least one processor is used to support the network device to realize the above-mentioned In the methods described in some embodiments in Figures 3 to 7, the output interface is used to send a notification of capacity expansion or capacity reduction when the statistics show that the service packet is hot data. In a possible design, the network card may also include memory, memory, and necessary program instructions and data for network devices.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the embodiments of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请实施例所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所 显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。A unit described as a separate component may or may not be physically separated, and a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请实施例各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the various embodiments of the embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Claims (26)

  1. 一种数据管理的方法,其特征在于,所述方法应用于网络设备,所述网络设备为交换设备或者安装于所述交换设备或数据节点中的网络接口装置,所述方法包括:A data management method, characterized in that the method is applied to a network device, the network device is a switching device or a network interface device installed in the switching device or a data node, and the method includes:
    所述网络设备获取数据管理规则,所述数据管理规则包括报文解析规则、响应条件和响应策略;The network device acquires data management rules, and the data management rules include message parsing rules, response conditions, and response strategies;
    所述网络设备根据所述报文解析规则对来自客户端的业务报文进行解析,以确定所述业务报文关联的目标数据,所述目标数据是应用层数据;The network device parses the service message from the client according to the message parsing rule, so as to determine the target data associated with the service message, and the target data is application layer data;
    所述网络设备统计与所述目标数据相关的业务请求,所述业务请求从所述业务报文中得到;The network device counts service requests related to the target data, and the service requests are obtained from the service packets;
    当与所述目标数据相关的业务请求的统计结果满足响应条件时,则所述网络设备根据所述响应策略对所述网络设备接收到的业务报文和/或对所述目标数据作出相应操作。When the statistical result of the service request related to the target data satisfies the response condition, the network device performs corresponding operations on the service message received by the network device and/or on the target data according to the response policy .
  2. 根据权利要求1所述的方法,其特征在于,所述响应条件包括统计规则和响应关系;其中,所述统计规则包括统计时长,所述响应关系包括按照所述统计时长统计的业务请求的数量与目标阈值应满足的关系;The method according to claim 1, wherein the response condition includes a statistical rule and a response relationship; wherein the statistical rule includes a statistical duration, and the response relationship includes the number of service requests counted according to the statistical duration The relationship with the target threshold that should be met;
    所述与所述目标数据相关的业务请求的统计结果包括:与所述目标数据相关的业务请求在所述统计时长内的数量。The statistical result of the service requests related to the target data includes: the number of service requests related to the target data within the statistical period.
  3. 根据权利要求2所述的方法,其特征在于,The method according to claim 2, characterized in that,
    所述统计结果满足响应条件包括:按照所述响应关系的指示,所述与所述目标数据相关的业务请求在所述统计时长内的数量超过所述目标阈值,若所述数量超过所述目标阈值,且所述目标数据不是已存在的热点数据,则指示所述目标数据为新产生的热点数据;或者,The statistical result meeting the response condition includes: according to the indication of the response relationship, the number of service requests related to the target data within the statistical time span exceeds the target threshold, if the number exceeds the target threshold, and the target data is not existing hotspot data, indicating that the target data is newly generated hotspot data; or,
    所述统计结果满足响应条件包括:按照所述响应关系的指示,所述与所述目标数据相关的业务请求在所述统计时长内的数量低于所述目标阈值,若所述数量低于所述目标阈值,且所述目标数据是已存在的热点数据时,则指示所述目标数据的热点属性消失。The statistical result meeting the response condition includes: according to the indication of the response relationship, the number of service requests related to the target data within the statistical time period is lower than the target threshold, if the number is lower than the specified When the target threshold is set and the target data is existing hotspot data, it indicates that the hotspot attribute of the target data disappears.
  4. 根据权利要求2或3所述的方法,其特征在于,所述响应条件包括多组统计规则和响应关系,不同统计规则中的统计时长不同,不同的统计规则对应的响应关系中的目标阈值不相同;The method according to claim 2 or 3, wherein the response conditions include multiple sets of statistical rules and response relationships, the statistical durations in different statistical rules are different, and the target thresholds in the response relationships corresponding to different statistical rules are different. same;
    不同的统计规则对应的所述响应策略中的不同调整策略。Different statistical rules correspond to different adjustment strategies in the response strategy.
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述响应策略包括:针对目标优先级的业务报文的服务质量调整策略,以及对所述目标数据做资源扩容或资源缩容的调整策略;其中,所述目标优先级包含于所述响应策略中。The method according to any one of claims 2-4, wherein the response strategy includes: a service quality adjustment strategy for service packets with a target priority, and resource expansion or resource reduction for the target data A content adjustment strategy; wherein, the target priority is included in the response strategy.
  6. 根据权利要求5所述的方法,其特征在于,所述网络设备根据所述响应策略对所述网络设备接收到的业务报文和/或对所述目标数据作出相应操作,包括:The method according to claim 5, wherein the network device performs corresponding operations on the service message received by the network device and/or on the target data according to the response policy, including:
    当所述目标数据为新产生的热点数据时,所述网络设备按照所述服务质量调整策略调低所述目标优先级的业务报文的服务质量,和/或,按照所述资源扩容的调整策略对所述目标数据作出资源扩容的操作;When the target data is newly generated hotspot data, the network device lowers the service quality of service packets with the target priority according to the service quality adjustment policy, and/or, according to the resource expansion adjustment The strategy performs resource expansion operations on the target data;
    当所述目标数据的热点属性消失时,所述网络设备按照所述服务质量调整策略调高所述目标业务优先级的业务报文的服务质量,和/或,按照所述资源缩容的调整策略对所述目 标数据作出资源缩容的操作。When the hot spot attribute of the target data disappears, the network device adjusts the service quality of service packets with the target service priority according to the service quality adjustment policy, and/or adjusts according to the resource shrinkage The strategy performs resource shrinking operations on the target data.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述网络设备根据所述报文解析规则对来自客户端的业务报文进行解析,以确定所述业务报文关联的目标数据,包括:The method according to any one of claims 1-6, wherein the network device parses the service message from the client according to the message analysis rule, so as to determine the target data associated with the service message ,include:
    所述网络设备根据所述报文解析规则解析所述业务报文的五元组,以确定所述业务报文的业务类型;The network device parses the quintuple of the service message according to the message parsing rule to determine the service type of the service message;
    所述网络设备根据所述报文解析规则解析指示字段,以确定所述业务类型的目标数据或所述目标数据的索引信息,所述索引信息用于确定所述目标数据。The network device parses the indication field according to the packet parsing rule to determine the target data of the service type or index information of the target data, where the index information is used to determine the target data.
  8. 根据权利要求6所述的方法,其特征在于,当所述响应策略指示由用于管理所述数据节点的控制节点执行所述资源扩容或资源缩容的调整策略时;The method according to claim 6, wherein when the response strategy indicates that the control node for managing the data node executes the resource expansion or resource shrinkage adjustment strategy;
    所述按照所述资源扩容的调整策略对所述目标数据作出资源扩容的操作,包括:The resource expansion operation for the target data according to the resource expansion adjustment strategy includes:
    所述网络设备向所述控制节点发送扩容通知,所述扩容通知用于指示所述控制节点为所述目标数据进行资源扩容;The network device sends a capacity expansion notice to the control node, where the capacity expansion notice is used to instruct the control node to perform resource expansion for the target data;
    或者,or,
    所述按照所述资源缩容的调整策略对所述目标数据作出资源缩容的操作,包括:The resource shrinking operation on the target data according to the resource shrinking adjustment strategy includes:
    所述网络设备向所述控制节点发送缩容通知,所述缩容通知用于指示所述控制节点为所述目标数据进行资源缩容。The network device sends a capacity reduction notification to the control node, where the capacity reduction notification is used to instruct the control node to perform resource reduction for the target data.
  9. 根据权利要求6所述的方法,其特征在于,所述数据节点还包括第一控制装置;当所述响应策略指示由所述第一控制装置执行所述资源扩容或资源缩容的调整策略时;The method according to claim 6, wherein the data node further comprises a first control device; when the response strategy indicates that the resource expansion or resource shrinkage adjustment strategy is executed by the first control device ;
    所述按照所述资源扩容的调整策略对所述目标数据作出资源扩容的操作,包括:The resource expansion operation for the target data according to the resource expansion adjustment strategy includes:
    所述网络设备向所述第一控制装置发送扩容通知,所述扩容通知用于指示所述第一控制装置为所述目标数据进行资源扩容;The network device sends a capacity expansion notice to the first control device, where the capacity expansion notice is used to instruct the first control device to perform resource expansion for the target data;
    或者,or,
    所述按照所述资源缩容的调整策略对所述目标数据作出资源缩容的操作,包括:The resource shrinking operation on the target data according to the resource shrinking adjustment strategy includes:
    所述网络设备向所述第一控制装置发送缩容通知,所述缩容通知用于指示所述第一控制装置为所述目标数据进行资源缩容。The network device sends a capacity reduction notification to the first control device, where the capacity reduction notification is used to instruct the first control device to perform resource reduction for the target data.
  10. 根据权利要求6所述的方法,其特征在于,所述网络设备为安装于所述交换设备上的网络接口装置;所述交换设备还包括第二控制装置,当所述响应策略指示由所述控制装置执行所述资源扩容或资源缩容的调整策略时;The method according to claim 6, wherein the network device is a network interface device installed on the switching device; the switching device further includes a second control device, when the response policy indicates that the When the control device executes the resource expansion or resource reduction adjustment strategy;
    所述按照所述资源扩容的调整策略对所述目标数据作出资源扩容的操作,包括:The resource expansion operation for the target data according to the resource expansion adjustment strategy includes:
    所述网络接口装置向所述第二控制装置发送扩容通知,所述扩容通知用于指示所述第二控制装置为所述目标数据进行资源扩容;The network interface device sends a capacity expansion notification to the second control device, and the capacity expansion notification is used to instruct the second control device to perform resource expansion for the target data;
    或者,or,
    所述按照所述资源缩容的调整策略对所述目标数据作出资源缩容的操作,包括:The resource shrinking operation on the target data according to the resource shrinking adjustment strategy includes:
    所述网络接口装置向所述第二控制装置发送缩容通知,所述缩容通知用于指示所述第二控制装置为所述目标数据进行资源缩容。The network interface device sends a capacity reduction notification to the second control device, where the capacity reduction notification is used to instruct the second control device to perform resource reduction for the target data.
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述网络设备获取数据管理规则,包括:The method according to any one of claims 1-10, wherein the acquisition of data management rules by the network device includes:
    所述网络设备从业务服务器或规则管理装置获取所述数据管理规则,所述业务服务器是与所述目标数据相关的服务器。The network device obtains the data management rules from a service server or a rule management device, and the service server is a server related to the target data.
  12. 一种网络设备,其特征在于,所述网络设备为交换设备或者安装于所述交换设备或数据节点中的网络接口装置,所述网络设备包括:A network device, characterized in that the network device is a switching device or a network interface device installed in the switching device or a data node, and the network device includes:
    获取单元,用于获取数据管理规则,所述数据管理规则包括报文解析规则、响应条件和响应策略;An acquisition unit, configured to acquire data management rules, where the data management rules include message parsing rules, response conditions, and response strategies;
    第一处理单元,用于根据所述获取单元获取的报文解析规则对来自客户端的业务报文进行解析,以确定所述业务报文关联的目标数据,所述目标数据是应用层数据;The first processing unit is configured to analyze the service message from the client according to the message analysis rule acquired by the acquisition unit, so as to determine the target data associated with the service message, and the target data is application layer data;
    第二处理单元,用于统计与所述第一处理单元解析出的目标数据相关的业务请求,所述业务请求从所述业务报文中得到;The second processing unit is configured to count service requests related to the target data parsed by the first processing unit, where the service requests are obtained from the service packets;
    操作单元,用于当所述第二处理单元统计的与所述目标数据相关的业务请求的统计结果满足响应条件时,则根据所述响应策略对所述网络设备接收到的业务报文和/或对所述目标数据作出相应操作。An operation unit, configured to, when the statistical result of the service request related to the target data collected by the second processing unit satisfies the response condition, perform the service message received by the network device and/or according to the response policy Or perform corresponding operations on the target data.
  13. 根据权利要求12所述的网络设备,其特征在于,所述响应条件包括统计规则和响应关系;其中,所述统计规则包括统计时长,所述响应关系包括按照所述统计时长统计的业务请求的数量与目标阈值应满足的关系;The network device according to claim 12, wherein the response condition includes a statistical rule and a response relationship; wherein the statistical rule includes a statistical time length, and the response relationship includes statistics of service requests according to the statistical time length The relationship between the quantity and the target threshold should be met;
    所述与所述目标数据相关的业务请求的统计结果包括:与所述目标数据相关的业务请求在所述统计时长内的数量。The statistical result of the service requests related to the target data includes: the number of service requests related to the target data within the statistical period.
  14. 根据权利要求13所述的网络设备,其特征在于,The network device according to claim 13, characterized in that,
    所述统计结果满足响应条件包括:按照所述响应关系的指示,所述与所述目标数据相关的业务请求在所述统计时长内的数量超过所述目标阈值,若所述数量超过所述目标阈值,且所述目标数据不是已存在的热点数据,则指示所述目标数据为新产生的热点数据;或者,The statistical result meeting the response condition includes: according to the indication of the response relationship, the number of service requests related to the target data within the statistical time span exceeds the target threshold, if the number exceeds the target threshold, and the target data is not existing hotspot data, it indicates that the target data is newly generated hotspot data; or,
    所述统计结果满足响应条件包括:按照所述响应关系的指示,所述与所述目标数据相关的业务请求在所述统计时长内的数量低于所述目标阈值,若所述数量低于所述目标阈值,且所述目标数据是已存在的热点数据时,则指示所述目标数据的热点属性消失。The statistical result meeting the response condition includes: according to the indication of the response relationship, the number of service requests related to the target data within the statistical time period is lower than the target threshold, if the number is lower than the specified When the target threshold is set and the target data is existing hotspot data, it indicates that the hotspot attribute of the target data disappears.
  15. 根据权利要求13或14所述的网络设备,其特征在于,所述响应条件包括多组统计规则和响应关系,不同统计规则中的统计时长不同,不同的统计规则对应的响应关系中的目标阈值不相同;The network device according to claim 13 or 14, wherein the response conditions include multiple sets of statistical rules and response relationships, the statistical time lengths in different statistical rules are different, and the target thresholds in the response relationships corresponding to different statistical rules Are not the same;
    不同的统计规则对应的所述响应策略中的不同调整策略。Different statistical rules correspond to different adjustment strategies in the response strategy.
  16. 根据权利要求13-15任一项所述的网络设备,其特征在于,所述响应策略包括:针对目标优先级的业务报文的服务质量调整策略,以及对所述目标数据做资源扩容或资源缩容的调整策略;其中,所述目标优先级包含于所述响应策略中。The network device according to any one of claims 13-15, wherein the response policy includes: a service quality adjustment policy for service packets with target priority, and resource expansion or resource allocation for the target data. A shrinkage adjustment strategy; wherein, the target priority is included in the response strategy.
  17. 根据权利要求16所述的网络设备,其特征在于,The network device according to claim 16, characterized in that,
    所述操作单元用于:The operating unit is used for:
    当所述目标数据为新产生的热点数据时,按照所述服务质量调整策略调低所述目标优先级的业务报文的服务质量,和/或,按照所述资源扩容的调整策略对所述目标数据作出资源扩容的操作;When the target data is newly generated hotspot data, lower the service quality of service packets with the target priority according to the service quality adjustment policy, and/or adjust the resource expansion policy according to the resource expansion adjustment policy. The target data performs resource expansion operations;
    当所述目标数据的热点属性消失时,按照所述服务质量调整策略调高所述目标业务优先级的业务报文的服务质量,和/或,按照所述资源缩容的调整策略对所述目标数据作出资源缩容的操作。When the hot spot attribute of the target data disappears, according to the quality of service adjustment strategy, the service quality of the service packet with the priority of the target service is increased, and/or, according to the resource shrinkage adjustment strategy, the The target data performs resource shrinking operations.
  18. 根据权利要求12-17任一项所述的网络设备,其特征在于,The network device according to any one of claims 12-17, characterized in that,
    所述第一处理单元用于:The first processing unit is used for:
    根据所述报文解析规则解析所述业务报文的五元组,以确定所述业务报文的业务类型;Parsing the quintuple of the service message according to the message parsing rules to determine the service type of the service message;
    根据所述报文解析规则解析指示字段,以确定所述业务类型的目标数据或所述目标数据的索引信息,所述索引信息用于确定所述目标数据。Parsing the indication field according to the packet parsing rules to determine the target data of the service type or index information of the target data, where the index information is used to determine the target data.
  19. 根据权利要求17所述的网络设备,其特征在于,所述操作单元,用于当所述响应策略指示由用于管理所述数据节点的控制节点执行所述资源扩容或资源缩容的调整策略时,向所述控制节点发送扩容通知,所述扩容通知用于指示所述控制节点为所述目标数据进行资源扩容;或者,向所述控制节点发送缩容通知,所述缩容通知用于指示所述控制节点为所述目标数据进行资源缩容。The network device according to claim 17, wherein the operation unit is configured to, when the response strategy indicates that the control node for managing the data node executes the resource expansion or resource shrinkage adjustment strategy , sending a capacity expansion notice to the control node, where the capacity expansion notice is used to instruct the control node to perform resource expansion for the target data; or, sending a capacity reduction notice to the control node, where the capacity reduction notice is used to Instructing the control node to perform resource shrinkage for the target data.
  20. 根据权利要求17所述的网络设备,其特征在于,所述操作单元,用于所述数据节点还包括第一控制装置;当所述响应策略指示由所述第一控制装置执行所述资源扩容或资源缩容的调整策略时,向所述第一控制装置发送扩容通知,所述扩容通知用于指示所述第一控制装置为所述目标数据进行资源扩容;或者,向所述第一控制装置发送缩容通知,所述缩容通知用于指示所述第一控制装置为所述目标数据进行资源缩容。The network device according to claim 17, wherein the operation unit is used for the data node and further includes a first control device; when the response strategy indicates that the resource expansion is performed by the first control device or resource shrinkage adjustment strategy, send a capacity expansion notice to the first control device, where the capacity expansion notice is used to instruct the first control device to perform resource expansion for the target data; or, to the first control device The device sends a capacity reduction notification, where the capacity reduction notification is used to instruct the first control device to perform resource reduction for the target data.
  21. 根据权利要求17所述的网络设备,其特征在于,所述操作单元,用于所述网络设备为安装于所述交换设备上的网络接口装置;所述交换设备还包括第二控制装置,当所述响应策略指示由所述第二控制装置执行所述资源扩容或资源缩容的调整策略时,向所述第二控制装置发送扩容通知,所述扩容通知用于指示所述第二控制装置为所述目标数据进行资源扩容;或者,向所述第二控制装置发送缩容通知,所述缩容通知用于指示所述第二控制装置为所述目标数据进行资源缩容。The network device according to claim 17, wherein the operation unit is used for the network device to be a network interface device installed on the switching device; the switching device further includes a second control device, when When the response strategy indicates that the resource expansion or resource reduction adjustment strategy is executed by the second control device, a capacity expansion notification is sent to the second control device, and the capacity expansion notification is used to instruct the second control device performing resource expansion for the target data; or sending a capacity reduction notification to the second control device, where the capacity reduction notification is used to instruct the second control device to perform resource reduction for the target data.
  22. 根据权利要求12-21任一项所述的网络设备,其特征在于,The network device according to any one of claims 12-21, characterized in that,
    所述获取单元,用于从业务服务器或规则管理装置获取所述数据管理规则,所述业务服务器是与所述目标数据相关的服务器。The obtaining unit is configured to obtain the data management rules from a service server or a rule management device, the service server being a server related to the target data.
  23. 一种网络设备,其特征在于,包括一个或多个处理器和存储有计算机程序的存储介质;A network device, characterized by including one or more processors and a storage medium storing computer programs;
    所述计算机程序被所述一个或多个处理器执行时实现如权利要求1-11任一项所述的方法。The computer program implements the method according to any one of claims 1-11 when executed by the one or more processors.
  24. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被一个或多个处理器执行时实现如权利要求1-11任一项所述的方法。A computer-readable storage medium on which a computer program is stored, wherein the computer program implements the method according to any one of claims 1-11 when executed by one or more processors.
  25. 一种计算机程序产品,其特征在于,包括计算机程序,所述计算机程序当被一个或多个处理器执行时用于实现如权利要求1-11任一项所述的方法。A computer program product, characterized by comprising a computer program, the computer program is used to implement the method according to any one of claims 1-11 when executed by one or more processors.
  26. 一种数据系统,其特征在于,所述数据系统包括交换设备、数据节点、所述交换设备和所述数据节点上均安装有网络接口装置,所述交换设备、所述交换设备或所述数据节 点上安装的网络接口装置用于实现如权利要求1-11任一项所述的方法。A data system, characterized in that the data system includes a switching device, a data node, and a network interface device is installed on the switching device and the data node, and the switching device, the switching device or the data The network interface device installed on the node is used to implement the method according to any one of claims 1-11.
PCT/CN2022/141828 2021-12-31 2022-12-26 Data management method and corresponding apparatus WO2023125380A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111679430.7 2021-12-31
CN202111679430.7A CN116418893A (en) 2021-12-31 2021-12-31 Data management method and corresponding device

Publications (1)

Publication Number Publication Date
WO2023125380A1 true WO2023125380A1 (en) 2023-07-06

Family

ID=86997930

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/141828 WO2023125380A1 (en) 2021-12-31 2022-12-26 Data management method and corresponding apparatus

Country Status (2)

Country Link
CN (1) CN116418893A (en)
WO (1) WO2023125380A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117332881A (en) * 2023-11-27 2024-01-02 荣耀终端有限公司 Distributed training method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995866A (en) * 2019-12-20 2020-04-10 深圳市网心科技有限公司 Node scheduling method, node scheduling device, scheduling server and storage medium
WO2021189203A1 (en) * 2020-03-23 2021-09-30 华为技术有限公司 Bandwidth equalization method and apparatus
CN113535606A (en) * 2020-04-14 2021-10-22 阿里巴巴集团控股有限公司 Data processing method and device
CN113672652A (en) * 2021-09-06 2021-11-19 中国银行股份有限公司 Data access method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995866A (en) * 2019-12-20 2020-04-10 深圳市网心科技有限公司 Node scheduling method, node scheduling device, scheduling server and storage medium
WO2021189203A1 (en) * 2020-03-23 2021-09-30 华为技术有限公司 Bandwidth equalization method and apparatus
CN113535606A (en) * 2020-04-14 2021-10-22 阿里巴巴集团控股有限公司 Data processing method and device
CN113672652A (en) * 2021-09-06 2021-11-19 中国银行股份有限公司 Data access method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117332881A (en) * 2023-11-27 2024-01-02 荣耀终端有限公司 Distributed training method and electronic equipment
CN117332881B (en) * 2023-11-27 2024-04-05 荣耀终端有限公司 Distributed training method and electronic equipment

Also Published As

Publication number Publication date
CN116418893A (en) 2023-07-11

Similar Documents

Publication Publication Date Title
EP3758412B1 (en) Multichannel data transmission method, apparatus, system and computer-readable medium
WO2016015582A1 (en) Packet transmission method, apparatus and system
CN106972985B (en) Method for accelerating data processing and forwarding of DPI (deep packet inspection) equipment and DPI equipment
US10715592B2 (en) Network node, endpoint node and method of receiving an interest message
US20220191140A1 (en) Data transmission control method, apparatus, and storage medium
WO2020063299A1 (en) Method and system for collecting statistics about the number of active flows, and network device
US11782869B2 (en) Data transmission method and related device
WO2021128927A1 (en) Message processing method and apparatus, storage medium, and electronic apparatus
US11165716B2 (en) Data flow processing method and device
CN110445723B (en) Network data scheduling method and edge node
CN111107017A (en) Method, equipment and storage medium for processing switch message congestion
US11316804B2 (en) Forwarding entry update method and apparatus in a memory
CN112511325A (en) Network congestion control method, node, system and storage medium
US20230283492A1 (en) Traffic charging method, network device and storage medium
WO2021098425A1 (en) Qos policy method, device, and computing device for service configuration
WO2022111329A1 (en) Message processing method and device
WO2023125380A1 (en) Data management method and corresponding apparatus
EP3678337B1 (en) Message processing method and apparatus
JP2010538551A (en) Method and system for automatically confirming connectivity status of an IP link on an IP network
EP2903233B1 (en) Network storage method, switch device, and controller
WO2019192318A1 (en) Traffic smoothing method, server, and forwarding device
US10412006B2 (en) Bandwith sentinel
US20210084100A1 (en) Packet Processing Method, Related Device, and Computer Storage Medium
CN113645140A (en) Message statistical method, device, storage medium and network equipment
US11115857B2 (en) Bandwidth sentinel

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22914634

Country of ref document: EP

Kind code of ref document: A1