CN116094924B - Method for updating model and related device - Google Patents

Method for updating model and related device Download PDF

Info

Publication number
CN116094924B
CN116094924B CN202210853467.5A CN202210853467A CN116094924B CN 116094924 B CN116094924 B CN 116094924B CN 202210853467 A CN202210853467 A CN 202210853467A CN 116094924 B CN116094924 B CN 116094924B
Authority
CN
China
Prior art keywords
message
identified
service
information
identification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210853467.5A
Other languages
Chinese (zh)
Other versions
CN116094924A (en
Inventor
黄子岩
邵磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210853467.5A priority Critical patent/CN116094924B/en
Publication of CN116094924A publication Critical patent/CN116094924A/en
Application granted granted Critical
Publication of CN116094924B publication Critical patent/CN116094924B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method and a related device for updating a model, which are beneficial to improving the efficiency of collecting a sample message. The method comprises the following steps: acquiring a first ID and a second ID of a message to be identified, wherein the first ID is an identification ID obtained by identifying the message to be identified through an identification model, and the second ID is a service ID of a service to which the message to be identified belongs; and under the condition that the first ID and the second ID are inconsistent, determining the message to be identified as a sample message, wherein the sample message is used for updating the identification model.

Description

Method for updating model and related device
Technical Field
The present application relates to the field of communications, and more particularly, to a method and related apparatus for model update.
Background
With the continuous development of intelligent terminals, explosive growth of applications is brought, so that interactive messages between the applications and the server are complex, and therefore, the requirements of identifying the service types of the messages for further processing and processing are met. For example, for game applications, the requirement for time delay is high, so that after the service type of the message is identified as the game service, service functions such as game acceleration or child internet surfing protection can be realized.
Typically, routers identify the traffic type of a message by an identification model. Each service type corresponds to a service Identification (ID). However, the message characteristics of each service ID may change with the update of its version, and as the update of the version of the application iterates, the recognition accuracy of the old recognition model gradually decreases, so that the recognition model needs to be updated. In the existing scheme for updating the identification model, a developer is required to collect the message and calibrate the sample, so that a great deal of labor cost is brought, and the efficiency of collecting the sample message is low.
Disclosure of Invention
The application provides a method and a related device for updating a model, aiming at improving the efficiency of collecting a sample message.
In a first aspect, a method for updating a model is provided, applied to a routing device, the method comprising: acquiring a first ID and a second ID of a message to be identified; and under the condition that the first ID and the second ID are inconsistent, determining the message to be identified as a sample message, wherein the sample message is used for updating the identification model.
In the application, the routing device can acquire the first ID and the second ID, wherein the first ID is the identification ID obtained by identifying the message to be identified through the identification model, and since the message characteristics of the same service ID may change along with the update of the version of the application, if the identification model is not updated in time, the first ID acquired by the routing device through the identification model may not be the service ID to which the message to be identified really belongs, i.e. the result of identifying the message to be identified through the identification model may be wrong. The second ID is the service ID of the service to which the message to be identified belongs, and is the real service ID of the message to be identified.
When the routing device determines that the first ID and the second ID are inconsistent, the routing device determines that the second ID obtained through the identification model is wrong, and is not the service ID of the service to which the message to be identified belongs, so that the routing device can determine the message to be identified as a sample message, and the server updates the identification model based on the sample message to obtain an updated identification model. Therefore, the routing equipment can automatically collect the sample message of the calibrated service ID without manually collecting the sample message and calibrating the version message, thereby being beneficial to saving manpower and time cost, improving the efficiency of collecting the sample message and further improving the efficiency of updating the identification model.
It will be appreciated that the application is exemplified by messages transmitted over a transmission control protocol (transmission control protocol, TCP) connection or a user datagram protocol (user datagram protocol, UDP) connection between the terminal device and the server. The messages transmitted over the one TCP connection or UDP connection have the same five-tuple information. For ease of description, a TCP connection or a UDP connection will be hereinafter simply referred to as a connection.
With reference to the first aspect, in some implementations of the first aspect, obtaining the first ID and the second ID of the message to be identified includes: identifying the message to be identified through an identification model to obtain a first ID; based on the first quintuple information, a corresponding second ID is obtained from pre-stored mapping relation information, the mapping relation information indicates at least one group of corresponding relation among the service ID, the identification ID and the quintuple information, and the first quintuple information is the quintuple information of the message to be identified.
In the application, the routing equipment can acquire the message to be identified based on the routing forwarding protocol, and the message header of the message to be identified comprises the first quintuple information, namely, the routing equipment is the first quintuple information acquired through the routing forwarding protocol. Before the routing device obtains the first ID, mapping relation information indicating the service ID, the identification ID and the quintuple information is pre-stored in the routing device, so that the routing device can obtain the service ID corresponding to the first quintuple information, namely the second ID, from the pre-stored mapping relation information after obtaining the first quintuple information and the first ID. In this way, the routing device can obtain the first ID and the second ID, so as to compare whether the first ID and the second ID are consistent, and determine whether the message to be identified can be used as a sample message.
With reference to the first aspect, in some implementations of the first aspect, before acquiring the corresponding second ID from the pre-stored mapping relationship information based on the first quintuple information, the method further includes: receiving a second ID and second quintuple information from the terminal equipment, wherein the first quintuple information is the same as the second quintuple information; and updating the mapping relation information based on the second ID and the second quintuple information.
In the present application, the routing device may receive the second ID and the second quintuple information from the terminal device based on a private protocol (e.g., a mac-link protocol) with the terminal device, and update the mapping relationship information. Thus, after receiving the first quintuple information, the routing device can obtain the second ID from the updated mapping relationship information based on the first quintuple information.
It should be understood that the routing device may obtain five-tuple information (i.e. the second five-tuple information) and the service ID (i.e. the second ID) of a connection from the first Application (APP) of the terminal device to the server. The first quintuple information indicates quintuple information carried in any message to be identified transmitted from the first APP to the server, and the first quintuple information is the same as the second quintuple information.
With reference to the first aspect, in some implementations of the first aspect, obtaining the first ID and the second ID of the message to be identified includes: receiving second ID and second quintuple information from the terminal equipment, wherein the second quintuple information is the same as the first quintuple information, and the first quintuple information is quintuple information of a message to be identified; based on the second quintuple information, a corresponding first ID is obtained from the pre-stored mapping relation information. Wherein the mapping relation information indicates at least one group of correspondence relation of the service ID, the identification ID and the quintuple information.
In the application, before the routing equipment receives the second quintuple information and the second ID, the routing equipment pre-stores the mapping relation information indicating the service ID, the identification ID and the first quintuple information. After receiving the second quintuple information and the second ID, the routing device may obtain an identification ID corresponding to the second quintuple information from the mapping relationship information, and determine the first ID based on the identification ID, because the first quintuple information and the second quintuple information are the same. In this way, the routing device can obtain the first ID and the second ID, so as to compare whether the first ID and the second ID are consistent, and determine whether the message to be identified can be used as a sample message.
With reference to the first aspect, in certain implementation manners of the first aspect, before acquiring the corresponding first ID from the pre-stored mapping relationship information based on the second quintuple information, the method further includes: receiving a message to be identified, wherein the message to be identified carries first quintuple information, and the first quintuple information is identical to the second quintuple information; identifying the message to be identified through an identification model to obtain a first ID; the mapping relationship information is updated based on the first ID and the first quintuple information.
In the application, the routing equipment receives the message to be identified first, identifies the message to be identified through the identification model to obtain the first ID, and updates the mapping relation information based on the first ID and the first quintuple information. The routing device may then obtain the first ID from the pre-stored updated mapping information.
With reference to the first aspect, in some implementations of the first aspect, the second ID is carried in a message to be identified. The method for acquiring the first ID and the second ID of the message to be identified comprises the following steps: acquiring a second ID from a message to be identified; and identifying the message to be identified through the identification model to obtain a first ID.
In the application, the message to be identified received by the routing equipment comprises the second ID, and the routing equipment can identify the message to be identified through the identification model to obtain the first ID. In this way, the routing device can obtain the first ID and the second ID, so as to compare whether the first ID and the second ID are consistent, and determine whether the message to be identified can be used as a sample message.
With reference to the first aspect, in certain implementations of the first aspect, the method further includes: and storing mapping relation information, wherein the mapping relation information indicates the corresponding relation of the first ID, the second ID and first quintuple information, and the first quintuple information is quintuple information of the message to be identified.
With reference to the first aspect, in some implementations of the first aspect, the mapping relationship information is stored in a hash bucket with the first quintuple information as a key and the service ID and the identification ID as values.
In the application, the first ID and/or the second ID can be rapidly queried by storing the mapping relation information in the hash bucket, which is beneficial to improving the data query rate.
With reference to the first aspect, in certain implementation manners of the first aspect, after determining that the message to be identified is a sample message, the method further includes: the payload of the sample message and the second ID are sent to the server.
In the application, after determining the sample message, the routing device may send the payload of the sample message and the label of the sample message, that is, the second ID, to the server, so that the server updates the identification model based on the sample message. Thus, the routing equipment automatically completes the collection and calibration of the sample message, which is beneficial to improving the efficiency of collecting the sample message and further improving the efficiency of updating the identification model.
In a second aspect, a method for updating a model is provided, applied to a terminal device, and the method includes: under the condition that the new connection is perceived and the destination address of the new connection is a wide area network address, determining a service ID corresponding to the server and five-tuple information for providing the transmission message of the new connection, wherein the service ID is the ID of the service provided by the server; and sending the service ID and the quintuple information to the routing equipment.
In the application, the terminal equipment can acquire the service ID of the newly added connection and five-tuple information required by the transmission of the message on the newly added connection when sensing the newly added non-local connection. The destination address of the non-local connection is a wide area network address, and may be understood as an item of an external network server (non-class C address).
The terminal equipment can send the service ID and the quintuple information to the routing equipment, so that the service ID of the service to which the message transmitted on the newly added connection belongs is favorably provided for the routing equipment, the efficiency of collecting the sample message is further improved, and the service identification optimization function of the terminal equipment is enhanced.
With reference to the second aspect, in certain implementation manners of the first aspect, sending the service ID and the quintuple information to the routing device includes: and sending a message to the routing equipment, wherein the message carries the service ID and quintuple information.
In the application, the terminal equipment can send the message to the routing equipment through the routing forwarding protocol, and the terminal equipment carries the service ID and the quintuple information in the message header.
In a third aspect, an apparatus for model updating is provided, comprising: for performing the method in any one of the possible implementations of the above aspect. In particular, means for performing the method in any one of the possible implementations of the above aspect are included.
In a fourth aspect, there is provided another apparatus for model updating, comprising a processor and a memory, the processor being coupled to the memory, the memory being operable to store a computer program, the processor being operable to invoke and execute the computer program in the memory to implement the method of any of the possible implementations of the first aspect.
In one implementation, the means for model updating is a routing device. When the means for model updating is a routing device, the communication interface may be a transceiver, or an input/output interface.
In another implementation, the means for model updating is a chip configured in the routing device. When the means for model updating is a chip configured in the routing device, the communication interface may be an input/output interface.
In a fifth aspect, there is provided an apparatus for model updating comprising a processor and a memory, the processor being coupled to the memory, the memory being operable to store a computer program, the processor being operable to invoke and execute the computer program in the memory to implement the method of any of the possible implementations of the second aspect.
In one implementation, the means for updating the model is a terminal device. When the means for model updating is a terminal device, the communication interface may be a transceiver, or an input/output interface.
In another implementation, the means for model updating is a chip configured in the terminal device. When the means for model updating is a chip configured in the terminal device, the communication interface may be an input/output interface.
In a sixth aspect, there is provided a processor comprising: input circuit, output circuit and processing circuit. The processing circuitry is configured to receive signals via the input circuitry and to transmit signals via the output circuitry such that the processor performs the method of any one of the possible implementations of the above aspect.
In a specific implementation process, the processor may be a chip, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a trigger, various logic circuits, and the like. The input signal received by the input circuit may be received and input by, for example and without limitation, a receiver, the output signal may be output by, for example and without limitation, a transmitter and transmitted by a transmitter, and the input circuit and the output circuit may be the same circuit, which functions as the input circuit and the output circuit, respectively, at different times. The specific implementation of the processor and various circuits is not limited by the present application.
In a seventh aspect, a processing apparatus is provided that includes a processor and a memory. The processor is configured to read instructions stored in the memory and to receive signals via the receiver and to transmit signals via the transmitter to perform the method of any one of the possible implementations of the above aspect.
Optionally, the processor is one or more and the memory is one or more.
Alternatively, the memory may be integrated with the processor or the memory may be separate from the processor.
In a specific implementation process, the memory may be a non-transient (non-transitory) memory, for example, a Read Only Memory (ROM), which may be integrated on the same chip as the processor, or may be separately disposed on different chips.
It should be appreciated that the related data interaction process, for example, transmitting the indication information, may be a process of outputting the indication information from the processor, and the receiving the capability information may be a process of receiving the input capability information by the processor. Specifically, the data output by the processing may be output to the transmitter, and the input data received by the processor may be from the receiver. Wherein the transmitter and receiver may be collectively referred to as a transceiver.
The processing means in the seventh aspect may be a chip, and the processor may be implemented by hardware or software, and when implemented by hardware, the processor may be a logic circuit, an integrated circuit, or the like; when implemented in software, the processor may be a general-purpose processor, implemented by reading software code stored in a memory, which may be integrated in the processor, or may reside outside the processor, and exist separately.
In an eighth aspect, there is provided a computer program product comprising: computer program code which, when run, causes a computer to perform the method of any one of the possible implementations of the above aspect.
In a ninth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program which, when executed, causes a computer to perform the method of any one of the possible implementations of the above aspect.
Drawings
FIG. 1 is a schematic diagram of a communication scenario to which embodiments of the present application are applicable;
FIG. 2 is a schematic flow chart of a method for model update provided by an embodiment of the present application;
FIG. 3 is a schematic flow chart of another method for model update provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of a hash bucket according to an embodiment of the present application;
FIG. 5 is a schematic flow chart diagram of yet another method for model updating provided by an embodiment of the present application;
FIG. 6 is a diagram of a model framework of a proprietary protocol provided by an embodiment of the present application;
FIG. 7 is a schematic flow chart diagram of yet another method for model updating provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of a center-edge networking provided by an embodiment of the present application;
FIG. 9 is a schematic flow chart diagram of yet another method for model updating provided by an embodiment of the present application;
FIG. 10 is a schematic block diagram of an apparatus for model update provided by an embodiment of the present application;
FIG. 11 is a schematic block diagram of another apparatus for model updating provided by an embodiment of the present application;
fig. 12 is a schematic block diagram of still another apparatus for model updating provided by an embodiment of the present application.
Detailed Description
The technical scheme of the application will be described below with reference to the accompanying drawings.
In order to clearly describe the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. For example, the first ID and the second ID are for distinguishing different IDs, and the order of the different IDs is not limited. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
In the present application, the words "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
Furthermore, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, and c may represent: a, b, or c, or a and b, or a and c, or b and c, or a, b and c, wherein a, b and c can be single or multiple.
Currently, the routing equipment can intelligently identify the service type of a message through a service awareness (service awareness, SA) module in a kernel protocol stack, so that the service functions of accelerating game, protecting children from surfing the internet, and the like are realized, and the user experience is improved. Wherein, the recognition needs to be completed by relying on a knowledge base, which is called a recognition model in the embodiment of the application.
Each service type corresponds to a service identifier, the message characteristic of each service ID may change along with the update of the version of the service ID, and if the identification model is not updated in time as the update iteration of the version of the application is performed, the identification accuracy of the old identification model is gradually reduced, so that the identification model needs to be updated. In the existing scheme for updating the identification model, a developer is required to collect a message and calibrate a sample, so that a great deal of labor cost is brought, and the efficiency of updating the identification model is low.
In view of this, an embodiment of the present application provides a method and a related device for updating a model, where in the method, a routing device may obtain a service ID of a service to which a message to be identified belongs, and an identification ID obtained by identifying the message to be identified through an identification model. Since the message characteristics of the message may change as the APP version is updated, the identification ID obtained through the identification model may not be consistent with the service ID. Under the condition that the service ID and the identification ID are inconsistent, the routing equipment can determine that the message to be identified is a sample message and send the sample message to the server. The server updates the identification model based on the sample message, so that the updated identification model can be obtained, the labor and time cost for manually collecting the sample message can be saved, and the efficiency for collecting the sample message can be improved.
The terminal device in the embodiment of the present application may be a handheld device, an in-vehicle device, or the like with a wireless connection function, and the terminal device may also be referred to as a terminal (terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), or the like. Currently, examples of some terminal devices are: mobile phone (mobile phone), tablet, smart tv, notebook, tablet (Pad), palm, mobile internet device (mobile internet device, MID), virtual Reality (VR) device, augmented reality (augmented reality, AR) device, wireless terminal in industrial control (industrial control), wireless terminal in unmanned driving (self driving), wireless terminal in teleoperation (remote medical surgery), wireless terminal in smart grid (smart grid), wireless terminal in transportation security (transportation safety), wireless terminal in smart city (smart home), wireless terminal in smart home (smart home), cellular phone, cordless phone, session initiation protocol (session initiation protocol, SIP) phone, wireless local loop (wireless local loop, WLL) station, personal digital assistant (personal digital assistant, PDA), handheld device with wireless communication function, computing device or other processing device connected to wireless modem, vehicle device, wearable device, terminal device in 5G network or terminal device in future evolution, public mode of the application is not adopted for specific embodiments of the present application, and the present application.
By way of example, and not limitation, in embodiments of the present application, the terminal device may also be a wearable device. The wearable device can also be called as a wearable intelligent device, and is a generic name for intelligently designing daily wear by applying wearable technology and developing wearable devices, such as glasses, gloves, watches, clothes, shoes and the like. The wearable device is a portable device that is worn directly on the body or integrated into the clothing or accessories of the user. The wearable device is not only a hardware device, but also can realize a powerful function through software support, data interaction and cloud interaction. The generalized wearable intelligent device includes full functionality, large size, and may not rely on the smart phone to implement complete or partial functionality, such as: smart watches or smart glasses, etc., and focus on only certain types of application functions, and need to be used in combination with other devices, such as smart phones, for example, various smart bracelets, smart jewelry, etc. for physical sign monitoring.
It should be understood that in the embodiment of the present application, the terminal device may be a device for implementing a function of the terminal device, or may be a device capable of supporting the terminal device to implement the function, for example, a chip system, and the device may be installed in the terminal. In the embodiment of the application, the chip system can be composed of chips, and can also comprise chips and other discrete devices.
The terminal device in the embodiment of the present application may also be referred to as: a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent, or a user equipment, etc.
Fig. 1 is a schematic diagram of a communication scenario 100 to which embodiments of the present application are applicable. The communication scenario 100 shows a routing device 01, a server 02 and a terminal device 03.
The terminal device 03 is a down-hanging device of the routing device 02, and the terminal device 03 can access the routing device 01 to access the network, and request network services from the server 02 through the routing device 01.
The routing device 01 may be any device with routing forwarding, message processing capabilities, such as a router.
The server 02 is a server that establishes a TCP/UDP connection with an application in the terminal device, for example,is->Is a server of (a). When the user opens at the terminal 03 +.>Terminal 03 anda connection is established between servers.
The embodiment of the present application takes as an example the transmission of a message on a connection (TCP connection or UDP connection) between the terminal device 03 and the server 01. The messages transmitted over the one connection have the same five-tuple information, and the messages transmitted over the one connection belong to the same service type, i.e. the messages transmitted over the one connection have the same service ID.
FIG. 2 is a schematic flow chart of a method 200 for model update provided by an embodiment of the present application. The method 200 may be applied to the communication scenario 100 as shown in fig. 1, but embodiments of the present application are not limited thereto. The steps of the method 200 may be performed by a routing device, the method 200 comprising the steps of:
s201, acquiring a first ID and a second ID of a message to be identified;
s202, under the condition that the first ID and the second ID are inconsistent, determining the message to be identified as a sample message, wherein the sample message is used for updating the identification model.
In the embodiment of the application, the first ID is an identification ID obtained by identifying the message to be identified through the identification model, and the second ID is a service ID of a service to which the message to be identified belongs.
Since the message characteristics of the message may change with the update of the APP version, if the identification model is not updated in time, the first ID obtained by the identification model may not be the true service ID of the message to be identified. Therefore, the routing device can acquire the first ID and the second ID, compare the first ID with the second ID, and determine that the message to be identified is a sample message under the condition that the first ID and the second ID are inconsistent. Thus, the routing equipment automatically completes the collection of the sample message and the label (namely the second ID) of the sample message, which is beneficial to saving the manpower and time cost for manually collecting the sample message, improving the efficiency of collecting the sample message and further improving the efficiency of updating the identification model.
By way of example only, and in an illustrative,the routing device is to +.A.A service ID of (1) is 101 by identifying model>The message of (2) is identified to obtain an identification ID of 102, and when the service ID and the identification ID are inconsistent, the routing equipment is used for carrying out +.>Is erroneous, the routing device may send +.>Is sent to +.>Is composed of (1) a server composed ofThe server of (a) updates the identification model.
In the embodiment of the application, the first ID is an identification ID obtained after the routing device receives a message to be identified transmitted on a connection through a routing forwarding protocol, and the routing device identifies the service type of the message to be identified through an identification model. The second ID is a service ID received by the routing device from the terminal device. There are two ways for the routing device to receive the traffic ID: in one mode, the routing device receives a service ID through a private protocol (e.g., a mac-link protocol); and in a second mode, the routing equipment acquires the service ID from the message to be identified received through the routing forwarding protocol, wherein the mode needs to design the message, and the message to be identified carries the service ID.
It should be understood that, for the first mode, the message to be identified that is received by the routing device through the routing forwarding protocol may be a message to be identified from the terminal device, or may be a message to be identified from the server. For the second mode, the message to be identified including the service ID is a message to be identified from the terminal device.
The following describes the specific implementation flow of the method provided by the embodiment of the present application in combination with the two modes respectively.
First, description will be made in connection with mode one:
based on the first mode, the routing device receives a message to be identified through the routing forwarding protocol, and the message to be identified does not comprise a service ID. The routing device receives the traffic ID from the terminal device via a proprietary protocol (e.g., a mac-link protocol). It may also be understood that the routing device receives the message to be identified through a first link, and receives the service ID through a second link, where the first link is a link established by the terminal device and the routing device based on the routing forwarding protocol, and the second link is a link established by the terminal device and the routing device based on the private protocol, and the first link and the second link are different.
In the embodiment of the application, the routing equipment may identify the message to be identified through the identification model to obtain the identification ID, and then receive the service ID based on the private protocol; or the method comprises the steps of receiving the service ID based on the private protocol, and identifying the message to be identified through the identification model to obtain the identification ID.
The following describes the process that the routing device firstly receives the service ID and then identifies the message to be identified through the identification model to obtain the identification ID by combining with the drawing.
FIG. 3 is a schematic flow chart of another method 300 for model update provided by an embodiment of the present application. The method 300 may be applied to the communication scenario 100 shown in fig. 1, but embodiments of the present application are not limited thereto. The method 300 includes steps S301 to S305, which are as follows:
s301, the terminal equipment sends a second ID and second quintuple information to the routing equipment. Accordingly, the routing device receives the second ID and the second quintuple information.
In this step, when the terminal device senses the new connection and the destination address of the new connection is the wide area network address, determining a second ID corresponding to the server and providing second quintuple information of the transmission message of the new connection. After determining the second ID and the second quintuple information, the terminal device and the routing device transmit the second ID and the second quintuple information based on a private protocol.
It should be understood that the second quintuple information is quintuple information of a message transmitted on the newly added connection, and the quintuple information of the message transmitted on the newly added connection is the same as the second quintuple information.
The second quintuple information comprises a source IP address, a source port, a destination IP address, a destination port and a protocol type, wherein the protocol type is TCP or UDP. Illustratively, "0" means UDP and "1" means TCP.
S302, the routing device updates the mapping relation information based on the second ID and the second quintuple information.
Illustratively, the routing device receives the second ID and the second quintuple information serialized into the json format, and the routing device may deserialize the second ID and the second quintuple information in the json format into a structure.
In the embodiment of the application, the routing equipment pre-stores mapping relation information, wherein the mapping relation information comprises at least one group of corresponding relation of service ID, identification ID and quintuple information.
After receiving the second ID and the second quintuple information, the routing device may update the pre-stored mapping relationship information, that is, add a set of service IDs, a correspondence between the identification IDs and the second quintuple information to the pre-stored mapping relationship information.
Fig. 4 is a schematic diagram of a hash bucket according to an embodiment of the present application. The routing device takes the second quintuple information as a key, takes the service ID and the identification ID as values, and adds the corresponding relation of the service ID, the identification ID and the second quintuple information into the hash bucket.
The routing device first determines an index index_1 of a hash bucket for storing the correspondence between the service ID, the identification ID and the second quintuple information, and the calculation formula is as follows:
index_1=jhash(key_1,len_1,salt)%DM_BUCKET_NUM
Where key_1 represents the second quintuple information, len_1 represents the length of key_1, salt is hash BUCKET salt, random value, dm_buffer_num is the number of hash BUCKETs, and dm_buffer_num=255, for example.
As shown in fig. 4, one hash bucket corresponds to at least one hash chain (hashlist), which is an ordered one-way chain ordered by source ports.
Illustratively, index_1=1, and the routing device may store the correspondence relationship of the service ID, the identification ID, and the second quintuple information in hash bucket No. 1. Two hash chain tables are corresponding in the hash bucket 1, wherein the source port in one hash chain table is 49152, and the source port in the other hash chain table is 49199. For example, the source port in the second quintuple information is 49153, so the routing device may insert a linked list with a source port 49153 between the two hash linked lists, and add a set of service IDs, an identification ID, and a correspondence relationship between the second quintuple information in the linked list with a source port 49153.
Optionally, as shown in fig. 4, the linked list of the source port 49153 further includes a message pointer (pData), where the message pointer points to a successfully identified message to be identified.
As shown in fig. 4, the routing device illustratively assigns a traffic ID of 101, indicating a traffic type of If the routing device identifies a message to be identified on one connection through the identification model, but the message is not identified successfully temporarily, the routing device may assign an identification ID of "-1" in the linked list with a source port 49153, and continue to identify the message to be identified that is received subsequently on the one connection.
Illustratively, the meaning of the identification ID assignment corresponds to: "-1" indicates that the temporary unrecognization was successful; "0" indicates no recognition; a value greater than 0 indicates successful recognition.
Illustratively, the meaning of the business ID assignment corresponds to: "-1" indicates that the terminal device has not reported the service ID; a value greater than 0 indicates a service ID that has been successfully reported.
S303, the routing equipment identifies the message to be identified through the identification model, and a first ID is obtained.
In this step, the message to be identified includes first quintuple information, and the first quintuple information is the same as the second quintuple information. The routing device may identify the first N messages received on a connection, where the first N messages are messages to be identified. Each time the identifications are independent of each other, there is no confidence accumulating effect.
Illustratively, taking fig. 4 as an example, in a case where the routing device does not receive the packet to be identified, the routing device may not assign an ID in the linked list of source ports 49153, or the routing device assigns an ID in the linked list of source ports 49153 to be "-1".
Taking fig. 4 as an example, after receiving a first message to be identified on a connection, the routing device identifies the first message to be identified through an identification model. If the identification is unsuccessful, the routing device updates the identification ID in the linked list with the source port 49153 based on the five-tuple information of the first message to be identified, and assigns the identification ID to be "-1". The routing equipment continues to receive a second message to be identified on the same connection, identifies the second message to be identified through an identification model, and if the identification is successful, the obtained identification ID is a value larger than 0, and the routing equipment determines that the identification ID of the second message to be identified is the second ID. After the identification is successful, the routing equipment does not identify the message on the same connection.
Taking fig. 4 as an example, if the routing device does not successfully identify the first N-1 messages to be identified, when the N-th message to be identified is still not successfully identified, the ID of the identification obtained by the routing device is 0. In this case, the routing device no longer recognizes the messages on the same connection.
In combination with the above examples of successful or unsuccessful recognition, the routing device determines an identification ID greater than or equal to 0 as the first ID.
The above identification ID assignment and service ID assignment are merely examples, and embodiments of the present application are not limited thereto.
S304, the routing equipment acquires a corresponding second ID from the pre-stored mapping relation information based on the first quintuple information. The mapping relation information indicates at least one set of correspondence relation of the service ID, the identification ID and the quintuple information.
In this step, the first quintuple information is quintuple information of the message to be identified. After obtaining the first ID, the routing device uses the first five-tuple information as a key to obtain the second ID from the mapping relation information pre-stored in the hash bucket. The message to be identified here is, for example, a message to be identified successfully in the first N messages to be identified in the above example, or an nth message to be identified in a case that none of the first N messages to be identified is identified successfully.
Illustratively, the routing device first determines index_2 of the hash bucket storing the mapping relationship information, and the calculation formula is as follows:
index_2=jhash(key_2,len_2,salt)%DM_BUCKET_NUM
where key_2 represents the first quintuple information, len_2 represents the length of key_2, salt is hash BUCKET salt, random value, dm_buffer_num is the number of hash BUCKETs, and dm_buffer_num=255, for example. It should be understood that the routing device may find the hash bucket salt of computing index_1 above, where the hash bucket salt of computing index_1 is the same as the hash bucket salt of computing index_2.
Since the first quintuple information and the second quintuple information are the same, len_1 and len_2 are the same, and thus index_2 obtained by the hash calculation is the same as index_1. In this way, the routing device can find the hash bucket storing the mapping relationship information. Taking fig. 4 as an example, index_1=index_2=1, and the routing device determines that the service ID corresponding to the first five-tuple information is stored in the hash bucket No. 1. Further, the routing device searches the hash bucket No. 1 for a linked list of source ports identical to the source ports in the first five-tuple information, such as the linked list of source ports 49153 in fig. 4. The linked list of the source port 49153 indicates the correspondence between the service ID, the identification ID and the second quintuple information. Because the first quintuple information and the second quintuple information are the same, the corresponding relationship between the service ID, the identification ID and the second quintuple information is the corresponding relationship between the service ID, the identification ID and the first quintuple information. Thus, the routing device acquires the service ID corresponding to the first five-tuple information from the linked list of the source port 49153, and determines the service ID as the second ID.
S305, the routing equipment determines that the message to be identified is a sample message under the condition that the first ID and the second ID are inconsistent.
In this step, the routing device determines the message to be identified successfully in the first N messages to be identified as a sample message, or determines the nth message to be identified as a sample message when none of the first N messages to be identified is successfully identified.
After acquiring the first ID and the second ID, the routing device compares the first ID and the second ID. If the first ID and the second ID are inconsistent, it indicates that the identification ID of the message to be identified by the routing device through the identification model is wrong, which may be caused by degradation of identification accuracy due to untimely updating of the identification model. In this case, the routing device determines that the message to be identified is a sample message, which is used to update the identification model. Therefore, the routing equipment can collect the sample message and the service ID corresponding to the sample message without manual collection and manual calibration, thereby being beneficial to saving manpower and time cost and improving the efficiency of collecting the sample message.
If the first ID and the second ID are consistent, it is indicated that the identification ID of the message to be identified by the routing device through the identification model is correct, and in this case, the routing device may not generate the sample message temporarily.
Optionally, after determining the sample packet, the routing device may remove the header of the sample packet, only the content of the application layer, i.e. the payload, remains, and send the payload of the sample packet and the second ID to the server. In this way, the server, after receiving the payload of the sample message and the corresponding second ID, may determine that an update to the identification model is required, and thus the server may update the identification model based on the collected sample message.
In the embodiment of the application, the routing equipment receives the service ID through the private protocol first, and the service ID is obtained. The routing device stores the correspondence of the service ID, the identification ID, and the second quintuple information, where the service ID is stored along with the correspondence. The routing equipment receives the first N messages to be identified, identifies the nth message to be identified in the first N messages to be identified through an identification model, and determines the identification ID as a first ID if the identification ID meets a first preset value after the identification ID is obtained. Further, the routing device searches for the service ID from the corresponding relationship between the service ID, the identification ID and the first quintuple information based on the first quintuple information of the nth message to be identified. In the case that the routing device finds a service ID satisfying the second preset value, the routing device determines the service ID as the second ID. Thus, the routing device acquires the first ID and the second ID.
Illustratively, the first preset value is a value greater than or equal to 0 and the second preset value is a value greater than 0.
The following describes the process that the routing device firstly identifies the message to be identified through the identification model to obtain the identification ID, and then receives the service ID.
Fig. 5 is a schematic flow chart diagram of yet another method 500 for model updating provided by an embodiment of the present application. The method 500 may be applied to the communication scenario 100 shown in fig. 1, but embodiments of the present application are not limited thereto. The method 500 includes S501 to S505, which specifically include the following steps:
s501, the routing equipment identifies the message to be identified through the identification model to obtain a first ID.
In this step, the routing device receives a message to be identified, where the message to be identified carries first quintuple information. After receiving the message to be identified, the routing equipment starts to identify the message to be identified through the identification model to obtain an identification ID.
The routing device identifies the first N messages to be identified on one connection, and stops the message identification on the one connection until the nth message to be identified is successfully identified. Illustratively, successful recognition results in a recognition ID greater than 0. Or the first N messages to be identified are not successfully identified, which means that the messages cannot be identified, and the routing equipment stops the message identification on the connection. Illustratively, the identification ID obtained from the unrecognizable message is equal to 0. And the routing equipment determines the identification ID obtained by successful identification or the identification ID obtained by the message which cannot be identified as the first ID.
S502, the routing equipment updates mapping relation information based on the first ID and the first quintuple information.
The routing equipment identifies the first message to be identified through the identification model. Whether the identification is successful or not, the routing equipment updates the pre-stored mapping relation information based on the first quintuple information of the first message to be identified.
Similar to the description above for method 300, the routing device updates pre-stored mapping relationship information, including: and adding a group of service IDs, and the corresponding relation between the identification IDs and the first quintuple information into the pre-stored mapping relation information based on the first quintuple information. The specific adding process can be referred to the description of fig. 4, and will not be repeated here.
After the service ID, the corresponding relation between the identification ID and the first quintuple information are added, the routing equipment assigns the identification ID according to the identification result. Illustratively, N >1, if the first message to be identified is not successfully identified, the identification ID is assigned to "-1"; if n=1, the first message to be identified is not successfully identified, and the identification ID is assigned to "0". Illustratively, N is greater than or equal to 1, and if the first message to be identified is successfully identified, the identification ID is assigned a value greater than 0, illustratively, the identification ID is "101".
At this point the routing device has not received the traffic ID, the routing device may illustratively assign the traffic ID to "-1", indicating that the traffic ID is not reported temporarily.
The routing equipment successfully identifies the nth message to be identified in the first N messages to be identified, and the obtained identification ID meets a first preset value, but caches the nth message to be identified under the condition that the service ID is not received temporarily, so as to obtain a second ID for use.
And under the condition that the first message to be identified is not successfully identified, the routing equipment identifies the second message to be identified through the identification model after receiving the second message to be identified, and determines the identification ID of the second message to be identified. If the second message to be identified is successfully identified, the routing device updates the mapping relation information, which comprises the following steps: and updating the values of the identification IDs in the corresponding relation among the service IDs, the identification IDs and the first quintuple information. Illustratively, the value of the identification ID is updated from "-1" to "101".
S503, the terminal device sends a second ID and second quintuple information to the routing device, wherein the second quintuple information is the same as the first quintuple information, and the first quintuple information is the quintuple information of the message to be identified. Accordingly, the routing device receives the second quintuple information and the second ID.
For this step, reference may be made to the description of S301, and the description is omitted here.
It should be understood that, in the embodiment of the present application, the second ID and the second quintuple information are received after the routing device obtains the identification ID of the first packet to be identified.
And S504, the routing equipment acquires a corresponding first ID from the pre-stored mapping relation information based on the second quintuple information. The mapping relation information indicates at least one set of correspondence relation of the service ID, the identification ID and the quintuple information.
In this step, since the first quintuple information and the second quintuple information are the same, the routing device may search the mapping relationship information for the service ID, the correspondence between the identification ID and the first quintuple information based on the second quintuple information, and obtain the identification ID from the searched correspondence. If the identification ID meets the first preset value, the routing equipment determines that the identification ID is the first ID. If the identification ID does not meet the first preset value, the routing device updates the value of the service ID, illustratively, from "-1" to "101".
S505, the routing equipment determines the message to be identified as a sample message under the condition that the first ID and the second ID are inconsistent.
The routing device obtains the second ID based on S503 described above, and the routing device obtains the first ID based on S504 described above. In this way, the routing device can compare the first ID with the second ID, and determine the message to be identified corresponding to the second ID as the sample message under the condition that the first ID and the second ID are inconsistent.
In the embodiment of the application, the routing equipment firstly receives a first message to be identified on a connection through a routing forwarding protocol, and adds a service ID, a corresponding relation between the ID and the first quintuple information in the mapping relation information based on the first quintuple information and the ID of the first message to be identified. And then, the routing equipment receives the service ID and the second quintuple information, wherein the service ID is the second ID. The routing equipment searches the identification ID in the mapping relation information based on the second quintuple information, and if the searched identification ID meets a first preset value, the routing equipment determines the searched identification ID as the first ID. If the found identification ID does not meet the first preset value, the routing equipment updates the service ID, the value of the service ID in the corresponding relation between the identification ID and the first quintuple information, namely, records the second ID, waits for obtaining the identification ID meeting the first preset value, namely, obtains the first ID, and then obtains the second ID from the mapping relation information based on the first quintuple information.
In the embodiments described above with respect to fig. 3 to 5, the routing device receives the traffic ID via a private protocol with the terminal device.
Fig. 6 is a model framework diagram of a proprietary protocol according to an embodiment of the present application. As shown in fig. 6, the terminal device includes a smart life APP and a system module, where the smart life APP may obtain quintuple information of the newly added TCP/UDP connection and an APP name through the system module. The routing equipment comprises a service control (service control) module, a linkMgr module and an upgrading module.
Since the terminal device is connected to the routing device through wireless fidelity (wireless fidelity, wi-Fi), the embodiment of the application corresponds to the local management part, that is, the channel between the terminal device and the routing device is a hypertext transfer protocol (hyper text transfer protocol over secure socket layer, HTTPS) channel based on a secure encryption layer. For remote management, the terminal device connects to the device cloud via a message queue telemetry transport protocol (message queuing telemetry transport, MQTT) first, and then to the routing device via the MQTT.
Based on fig. 6, fig. 7 is a schematic flow chart of yet another method 700 for model update provided by an embodiment of the present application. The method 700 may be applied to the communication scenario 100 shown in fig. 1, but embodiments of the application are not limited thereto. The method 700 includes S701 to S714, which specifically include the following steps:
s701, the intelligent life APP sends a permission request to the system module, wherein the permission request is used for requesting permission to acquire connection information of the APP from the system module. Accordingly, the system module receives the permission request.
The user can use intelligent life APP at the terminal equipment to openThe "join service identification automatic activity optimization" function of the intelligent life APP. At this functional interface, the user can set the APP name that needs to be optimized, e.g.,
The intelligent life APP completes event subscription of connection tracking change when the function of 'joining service identification automatic optimizing activity' is started.
S702, the system module sends a permission response to the intelligent life APP, wherein the permission response is used for allowing the intelligent life APP to acquire permission of connection information of the APP. Accordingly, the smart life APP receives the permission response.
After the system module agrees to allow, the intelligent life APP can acquire connection information of the APP which needs to be optimized and is set from the system module.
S703, the system module sends newly-connected quintuple information and APP names to the intelligent life APP. Accordingly, the smart life APP receives the quintuple information and the APP name.
Illustratively, whenAfter start-up, since the user sets +.>To require an optimized APP, therefore, the system module can track the perception +.>Is a new connection to the network. The system module detects whether the intelligent life APP registers a callback function. If yes, triggering a callback. The system module further judges->If in the optimization term, if yes, the system module sends +_to the intelligent life APP>APP name and quintuple information.
S704, the intelligent life APP sends quintuple information and service ID to the linkMgr module through a private protocol. The service ID is the service ID corresponding to the received APP name. The linkMgr module receives the quintuple information and the service ID.
After receiving the APP name and the quintuple information, the intelligent life APP converts the APP name into a corresponding service ID.
S705, the linkMgr module sends quintuple information and service ID to the service control module. Accordingly, the service control module receives the quintuple information and the service ID.
S706, the service control module updates the mapping relation information.
The process of updating the mapping information can be referred to above, and will not be described here.
S707, the service control module identifies the message to be identified through the identification model to obtain an identification ID.
The service control module can continuously identify the received message to be identified until the identification is successful, and stop identifying the message. Or the message to be identified is not successfully identified, and the message identification is stopped. The message to be identified includes the first N messages on a connection.
S708, the service control module compares whether the identification ID is consistent with the service ID when the identification ID meets the first preset value and the service ID meets the second preset value.
In this step, the routing device triggers a comparison operation if both the identification ID and the service ID meet the requirements. Illustratively, the first preset value is a value greater than or equal to 0 and the second preset value is a value greater than 0.
S709, the service control module determines that the message to be identified is a sample message under the condition that the identification ID is inconsistent with the service ID.
S710, the service control module sends the effective load and service ID of the sample message to the server. Accordingly, the server receives the payload and the service ID of the sample message.
In this step, the service control module may send the payload of the sample packet and the service ID to the server through the HTTPS channel.
S711, the server integrates the samples and screens out high-frequency samples.
In a center-edge networking scenario, a server may receive multiple sample messages from multiple routing devices. Fig. 8 is a schematic diagram of a center-edge networking according to an embodiment of the present application. Illustratively, a total of L routing devices are connected to the server. Each of the L routing devices is connected to at least one terminal device.
The number of routing devices connected to the server in fig. 8 is merely an example, and the number of terminal devices connected to each routing device is merely an example, which is not limited by the embodiment of the present application.
The server receives a plurality of sample messages from the L routing devices aiming at the same service ID through the HTTPS channel. The server uses any data similarity analysis algorithm to calculate the similarity between every two sample messages in a plurality of sample messages of the same service ID, and clusters according to the similarity to obtain a plurality of clustering sets. And determining a target cluster set with the proportion of the number of the sample messages in the total number of the reported plurality of sample messages larger than a preset threshold value from the plurality of cluster sets. And performing de-duplication operation on samples in the target cluster set to obtain a high-frequency sample message which can be used for training the recognition model.
The sample message in the step is a sample message which is not recognized or is not recognized by a plurality of routing devices. After frequency screening, the obtained high-frequency sample message has high reliability. The service ID received by the server is the service ID of the APP concerned by the user, and the server can pertinently strengthen the identification accuracy of the message aiming at the service ID, thereby bringing better use experience for the user.
S712, the server trains the recognition model by using the high-frequency sample message to obtain an updated recognition model.
The server adopts the existing model training technology, and carries out model training based on the training process of the convolutional neural network. The training process comprises the following steps: initializing the weight of the identification model by using the weight trained by the previous version; and inputting the high-frequency sample message into an identification model, and extracting the feature vector of the high-frequency sample message through convolution and pooling of the multi-layer convolution layers. Transmitting the feature vector to a full connection layer, and outputting a recognition result; calculating an error between the identification result and a target value, wherein the target value can be a value obtained by normalizing the service ID; when the error is larger than the expected value, the error is transmitted back to the network, the errors of the full-connection layer, the downsampling layer and the convolution layer are sequentially obtained, and when the error is equal to or smaller than the expected value, training is finished; and updating the weight according to the error, and outputting the updated identification model.
S713, the server sends a hint message to the upgrade module, the hint message being used to hint that the recognition model has been updated. Accordingly, the upgrade model receives the hint message.
After finishing updating the identification model, the server issues the updated identification model to a plurality of routing devices.
S714, the upgrade model completes the upgrade of the identification model based on the prompt message.
The upgrade model may download the updated identification model from the server, and then may identify the traffic type of the message based on the updated identification model.
The following is described in connection with mode two:
fig. 9 is a schematic flow chart diagram of yet another method 900 for model updating provided by an embodiment of the present application. The method 900 may be applied to the communication scenario 100 as shown in fig. 1, but embodiments of the present application are not limited thereto. The method 900 includes steps S901 to S904, which specifically include the following steps:
s901, a terminal device sends a message to be identified to a routing device, wherein the message to be identified comprises first quintuple information and a second ID. Accordingly, the routing device receives the message to be identified. After receiving the message to be identified, the routing equipment can obtain the second ID by analyzing the message to be identified.
Optionally, the terminal device may carry the service ID in the first M messages to be identified in the first N messages to be identified sent to the routing device, where N is greater than or equal to M.
Optionally, the second ID is carried in a header of the message to be identified.
S902, the routing equipment identifies the message to be identified through the identification model, and a first ID is obtained.
And the routing equipment identifies the currently received message to be identified through the identification model to obtain an identification ID. If the identification ID meets the first preset value, the routing equipment determines that the identification ID is the first ID.
The routing device obtains the second ID through S901, and the routing device obtains the first ID through S902.
If the identification ID does not meet the first preset value, the routing equipment updates pre-stored mapping relation information, adds the corresponding relation between the service ID and the identification ID and the first quintuple information, and the service ID meets the second preset value in the corresponding relation, wherein the identification ID does not meet the first preset value. The routing equipment continues to receive the message to be identified, and when the identification ID of the received message to be identified meets a first preset value, the routing equipment determines the identification ID as a first ID. The routing equipment updates the mapping relation information based on the first quintuple information of the message to be identified, namely, updates the service ID and the identification ID in the corresponding relation between the identification ID and the first quintuple information. Illustratively, the identification ID is updated from "-1" to "101".
S903, under the condition that the first ID and the second ID are inconsistent, determining the message to be identified as a sample message, wherein the sample message is used for updating the identification model.
And S904, the routing equipment stores mapping relation information, wherein the mapping relation information indicates the corresponding relation between the first ID, the second ID and the first five-tuple information.
In this step, the routing device stores the mapping relationship information, so that when the routing device receives the subsequent message after obtaining the first ID stop message identification, the routing device can search the second ID in the stored mapping relationship information, determine the service type of the subsequent received message according to the second ID, and perform corresponding processing on the received message.
Alternatively, as shown in fig. 4, the routing device may store the first ID, the second ID, and the correspondence of the first quintuple information in the hash bucket with the first quintuple information as a key.
In the above-described embodiments, it is mentioned that the routing device identifies the first N messages to be identified on one connection, and once there are successfully identified messages to be identified in the first N messages to be identified, or none of the first N messages to be identified are successfully identified, the routing device stops identifying the messages.
In addition to this scheme, optionally, the routing device identifies up to the nth message to be identified, whether there are successfully identified messages to be identified in the first N messages to be identified on a connection. In the first N messages to be identified, if none of the N messages to be identified is successfully identified, the routing device may determine the N messages to be identified as sample messages. If the nth message to be identified in the N messages to be identified is successfully identified, the routing device may determine other messages to be identified except the nth message to be identified in the first N messages to be identified as sample messages.
It should be understood that the sequence numbers of the above processes do not mean the order of execution, and the execution order of the processes should be determined by the functions and internal logic of the processes, and should not be construed as limiting the implementation process of the embodiments of the present application.
The method for model update according to the embodiment of the present application is described in detail above with reference to fig. 1 to 9, and the apparatus for model update according to the embodiment of the present application will be described in detail below with reference to fig. 10 to 12.
Fig. 10 is a schematic block diagram of an apparatus 1000 for model update according to an embodiment of the present application, where the apparatus 1000 includes an acquisition module 1010 and a processing module 1020.
Wherein, the acquisition module 1010 is configured to: the method comprises the steps of obtaining a first ID and a second ID of a message to be identified, wherein the first ID is an identification ID obtained by identifying the message to be identified through an identification model, and the second ID is a service ID of a service to which the message to be identified belongs. The processing module 1020 is configured to: and under the condition that the first ID and the second ID are inconsistent, determining the message to be identified as a sample message, wherein the sample message is used for updating the identification model.
Optionally, the obtaining module 1010 is configured to: identifying the message to be identified through an identification model to obtain a first ID; and acquiring a corresponding second ID from pre-stored mapping relation information based on the first quintuple information, wherein the mapping relation information indicates at least one group of corresponding relation among the service ID, the identification ID and the quintuple information, and the first quintuple information is the quintuple information of the message to be identified.
Optionally, the obtaining module 1010 is configured to: and receiving the second ID and the second quintuple information from the terminal equipment, wherein the first quintuple information is the same as the second quintuple information. The processing module 1020 is configured to: and updating the mapping relation information based on the second ID and the second quintuple information.
Optionally, the obtaining module 1010 is configured to: receiving second ID and second quintuple information from the terminal equipment, wherein the second quintuple information is the same as the first quintuple information, and the first quintuple information is quintuple information of a message to be identified; and based on the second quintuple information, acquiring a corresponding first ID from pre-stored mapping relation information, wherein the mapping relation information indicates at least one group of corresponding relation among the service ID, the identification ID and the quintuple information.
Optionally, the obtaining module 1010 is configured to: receiving a message to be identified, wherein the message to be identified carries first quintuple information, and the first quintuple information is identical to the second quintuple information; and identifying the message to be identified through the identification model to obtain a first ID. The processing module 1020 is configured to: the mapping relationship information is updated based on the first ID and the first quintuple information.
Optionally, the obtaining module 1010 is configured to: acquiring a second ID from a message to be identified; and identifying the message to be identified through the identification model to obtain a first ID.
Optionally, the processing module 1020 is configured to: and storing mapping relation information, wherein the mapping relation information indicates the corresponding relation of the first ID, the second ID and first quintuple information, and the first quintuple information is quintuple information of the message to be identified.
Optionally, the mapping relation information uses the first quintuple information as a key, uses the service ID and the identification ID as values, and is stored in the hash bucket.
Optionally, the apparatus 1000 further comprises a sending module, configured to: the payload of the sample message and the second ID are sent to the server.
In an alternative example, it will be appreciated by those skilled in the art that the apparatus 1000 may be embodied as a routing device in the above embodiment, or the functions of the routing device in the above embodiment may be integrated in the apparatus 1000. The above functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above. The apparatus 1000 may be configured to perform the various processes and/or steps corresponding to the routing device in the method embodiments described above.
It should be appreciated that the apparatus 1000 herein is embodied in the form of functional modules. The term module herein may refer to an application specific integrated circuit (application specific integrated circuit, ASIC), an electronic circuit, a processor (e.g., a shared, dedicated, or group processor, etc.) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that support the described functionality. In an embodiment of the present application, the apparatus 1000 may also be a chip or a chip system, for example: system on chip (SoC).
Fig. 11 is a schematic block diagram of another apparatus 1100 for model updating provided by an embodiment of the present application, where the apparatus 1100 includes a processing module 1110 and a transceiver module 1120.
Wherein, the processing module 1110 is configured to: and under the condition that the new connection is perceived and the destination address of the new connection is a wide area network address, determining a service ID corresponding to the server and five-tuple information for providing the transmission message of the new connection, wherein the service ID is the ID of the service provided by the server. The transceiver module 1120 is configured to: and sending the service ID and the quintuple information to the routing equipment.
Optionally, the transceiver module 1120 is configured to: and sending a message to the routing equipment, wherein the message carries the service ID and quintuple information.
In an alternative example, it will be appreciated by those skilled in the art that the apparatus 1100 may be embodied as a terminal device in the above embodiment, or the functions of the terminal device in the above embodiment may be integrated in the apparatus 1100. The above functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above. The apparatus 1100 may be configured to perform the respective processes and/or steps corresponding to the terminal device in the above-described method embodiment.
It should be appreciated that the apparatus 1100 herein is embodied in the form of functional modules. The term module herein may refer to an application specific integrated circuit (application specific integrated circuit, ASIC), an electronic circuit, a processor (e.g., a shared, dedicated, or group processor, etc.) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that support the described functionality. In an embodiment of the present application, the apparatus 1100 may also be a chip or a chip system, for example: system on chip (SoC).
Fig. 12 is a schematic block diagram of yet another apparatus 1200 for model updating provided by an embodiment of the present application. The apparatus 1200 includes a processor 1210, a transceiver 1220, and a memory 1230. Wherein the processor 1210, the transceiver 1220 and the memory 1230 are in communication with each other through an internal connection path, the memory 1230 is used for storing instructions, and the processor 1210 is used for executing the instructions stored in the memory 1230 to control the transceiver 1220 to transmit signals and/or receive signals.
It should be understood that the apparatus 1200 may be configured to perform the steps and/or flows corresponding to the routing device or the terminal device in the above-described method embodiments. The memory 1230 may optionally include read-only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store information of the device type. The processor 1210 may be configured to execute instructions stored in the memory, and when the processor executes the instructions, the processor may perform steps and/or flows corresponding to the routing device or the terminal device in the above-described method embodiments.
It is to be appreciated that in embodiments of the application, the processor 1210 may be a central processing unit (central processing unit, CPU), which may also be other general purpose processors, digital signal processors (digital signal processing, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), field programmable gate arrays (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The application also provides a computer readable storage medium, in which computer executable instructions are stored, where the computer executable instructions when executed by a processor can implement a method performed by a routing device in any of the above method embodiments, or can implement a method performed by a terminal device in any of the above method embodiments.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program can realize the method executed by the routing device in any method embodiment or can realize the method executed by the terminal device in any method embodiment when being executed by a processor.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system, apparatus and module may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific implementation of the present application, but the scope of the embodiments of the present application is not limited thereto, and any person skilled in the art may easily think about changes or substitutions within the technical scope of the embodiments of the present application, and all changes and substitutions are included in the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. A method for model updating, characterized by being applied to a routing device, comprising:
acquiring a first identification ID and a second ID of a message to be identified, wherein the first ID is an identification ID obtained by identifying the message to be identified through an identification model, and the second ID is a service ID of a service to which the message to be identified belongs;
under the condition that the first ID and the second ID are inconsistent, determining the message to be identified as a sample message, wherein the sample message is used for updating the identification model;
the obtaining the first ID and the second ID of the message to be identified includes:
receiving the second ID and second quintuple information from the terminal equipment, wherein the second quintuple information is the same as the first quintuple information, and the first quintuple information is the quintuple information of the message to be identified;
Based on the second quintuple information, a corresponding first ID is obtained from pre-stored mapping relation information, wherein the mapping relation information indicates at least one group of corresponding relation of service ID, identification ID and quintuple information.
2. The method according to claim 1, wherein the obtaining the first ID and the second ID of the message to be identified includes:
identifying the message to be identified through an identification model to obtain the first ID;
based on the first quintuple information, a corresponding second ID is obtained from pre-stored mapping relation information, wherein the mapping relation information indicates at least one group of corresponding relation among the service ID, the identification ID and the quintuple information.
3. The method of claim 2, wherein before the obtaining the corresponding second ID from the pre-stored mapping information based on the first quintuple information, the method further comprises:
receiving the second ID and the second quintuple information from the terminal equipment;
and updating the mapping relation information based on the second ID and the second quintuple information.
4. The method of claim 1, wherein prior to the obtaining the corresponding first ID from the pre-stored mapping information based on the second five-tuple information, the method further comprises:
Receiving the message to be identified, wherein the message to be identified carries the first quintuple information;
identifying the message to be identified through the identification model to obtain the first ID;
and updating the mapping relation information based on the first ID and the first quintuple information.
5. The method according to claim 1, wherein the message to be identified carries the second ID; the obtaining the first ID and the second ID of the message to be identified includes:
acquiring the second ID from the message to be identified;
and identifying the message to be identified through the identification model to obtain the first ID.
6. The method of claim 5, wherein the method further comprises:
and storing mapping relation information, wherein the mapping relation information indicates the corresponding relation among the first ID, the second ID and the first quintuple information.
7. The method according to any one of claims 2 to 6, wherein the mapping relation information is stored in a hash bucket with five-tuple information as a key, with service ID and identification ID as values.
8. The method according to any one of claims 1 to 6, wherein after said determining that the message to be identified is a sample message, the method further comprises:
And sending the payload of the sample message and the second ID to a server.
9. A method for model updating, characterized by being applied to a terminal device, comprising:
under the condition that the new connection is perceived and the destination address of the new connection is a wide area network address, determining a service ID corresponding to a server and second quintuple information for providing the transmission message of the new connection, wherein the service ID is the ID of the service provided by the server;
the service ID and the second quintuple information are sent to the routing equipment, the second quintuple information is used for the routing equipment, a corresponding first ID is obtained from pre-stored mapping relation information, and the mapping relation information indicates at least one group of corresponding relations among the service ID, the first ID and the quintuple information; the first ID is an identification ID obtained by identifying the message through an identification model, the service ID is a service ID of a service to which the message belongs, the second quintuple information is the same as the first quintuple information, and the first quintuple information is quintuple information of the message; the routing device is configured to determine that the packet is a sample packet when the first ID is inconsistent with the service ID, where the sample packet is used to update the identification model.
10. The method of claim 9, wherein the sending the service ID and the five-tuple information to a routing device comprises:
and sending the message to the routing equipment, wherein the message carries the service ID and the second quintuple information.
11. An apparatus for model updating, characterized by comprising means for performing the method of any one of claims 1 to 8, or means for performing the method of claim 9 or 10.
12. An apparatus for model updating, comprising: a processor and a memory, wherein,
the memory is used for storing a computer program;
the processor is configured to invoke and execute the computer program to cause the apparatus to perform the method of any of claims 1 to 8 or to cause the apparatus to perform the method of claim 9 or 10.
13. A computer readable storage medium storing a computer program which, when run on a computer, causes the computer to perform the method of any one of claims 1 to 8 or causes the computer to perform the method of claim 9 or 10.
CN202210853467.5A 2022-07-08 2022-07-08 Method for updating model and related device Active CN116094924B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210853467.5A CN116094924B (en) 2022-07-08 2022-07-08 Method for updating model and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210853467.5A CN116094924B (en) 2022-07-08 2022-07-08 Method for updating model and related device

Publications (2)

Publication Number Publication Date
CN116094924A CN116094924A (en) 2023-05-09
CN116094924B true CN116094924B (en) 2023-11-21

Family

ID=86205203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210853467.5A Active CN116094924B (en) 2022-07-08 2022-07-08 Method for updating model and related device

Country Status (1)

Country Link
CN (1) CN116094924B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008049368A1 (en) * 2006-10-18 2008-05-02 Huawei Technologies Co., Ltd. A management method and system of the multicast broadcast service
CN106330584A (en) * 2015-06-19 2017-01-11 中国移动通信集团广东有限公司 Identification method and identification device of business flow
CN110855576A (en) * 2015-12-31 2020-02-28 杭州数梦工场科技有限公司 Application identification method and device
CN111404833A (en) * 2020-02-28 2020-07-10 华为技术有限公司 Data stream type recognition model updating method and related equipment
CN112333169A (en) * 2020-10-28 2021-02-05 锐捷网络股份有限公司 Message processing method and device, electronic equipment and computer readable medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008049368A1 (en) * 2006-10-18 2008-05-02 Huawei Technologies Co., Ltd. A management method and system of the multicast broadcast service
CN106330584A (en) * 2015-06-19 2017-01-11 中国移动通信集团广东有限公司 Identification method and identification device of business flow
CN110855576A (en) * 2015-12-31 2020-02-28 杭州数梦工场科技有限公司 Application identification method and device
CN111404833A (en) * 2020-02-28 2020-07-10 华为技术有限公司 Data stream type recognition model updating method and related equipment
CN112333169A (en) * 2020-10-28 2021-02-05 锐捷网络股份有限公司 Message processing method and device, electronic equipment and computer readable medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
P2P流量监测系统的设计;柴琦;曹旭东;王洪蕾;王雪凤;;电子设计工程(11);全文 *

Also Published As

Publication number Publication date
CN116094924A (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN108664957B (en) License plate number matching method and device, and character information matching method and device
US8301594B2 (en) Context providing method, system, and apparatus
US20150094088A1 (en) Location model updating apparatus and position estimating method
CN114422267B (en) Flow detection method, device, equipment and medium
CN110147237A (en) A kind of redundant resource minimizing technology and device
US20230224226A1 (en) Methods and Apparatus Relating to Machine-Learning in a Communications Network
CN108737954B (en) Apparatus, method and system for generating and transmitting message
WO2021000485A1 (en) Positioning method and apparatus, and storage medium and electronic device
JP2018014765A5 (en)
CN109543734A (en) User portrait method and device, storage medium
CN111309946B (en) Established file optimization method and device
CN116094924B (en) Method for updating model and related device
CN112367215B (en) Network traffic protocol identification method and device based on machine learning
WO2019195690A1 (en) Mechanisms for service layer resource ranking and enhanced resource discovery
CN115376192B (en) User abnormal behavior determination method, device, computer equipment and storage medium
CN116743785A (en) Cloud network data storage method, device, equipment and medium based on fog calculation
CN111314855A (en) Electronic equipment searching method and device
CN112148962A (en) Method and device for pushing information
US11895559B2 (en) Moving means determination device
CN107888772A (en) A kind of method, apparatus and storage medium for determining configuration information
CN115705476A (en) Information display method and device, electronic equipment and computer readable medium
WO2019216046A1 (en) Information processing device
CN112437469A (en) Service quality assurance method, apparatus and computer readable storage medium
CN105989159A (en) Information pushing method, device and system
CN106936663B (en) Method and device for determining application installed in terminal

Legal Events

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