Method, device, storage medium and computer equipment for CPE management of user data
By loading data feature sets and control parameters in CPE devices and analyzing and marking user data packets, the problem of CPE devices failing to effectively manage user data is solved, and the refined management and security of data are achieved to meet diverse needs. Reduced management costs.
Patent Information
- Application Number
- CN202411097997.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-08-12
AI Technical Summary
The existing CPE equipment fails to effectively manage user data, resulting in the failure to fully utilize its use value and the problem of waste of resources.
By loading preset data feature sets and control parameters in the CPE device, user data packets are analyzed and marked, and forwarded or discarded according to the tagged results, the refined management of user data is achieved, including interception and optimization of data processing strategies.
It realizes refined and intelligent management of user data, improves network security and user experience, meets the special needs of different users, and reduces network management costs.
Smart Images

Figure CN118660300B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method, device, storage medium and computer equipment for CPE management of user data. Background Art
[0002] The full name of CPE is Customer Premises Equipment, which is a device that connects users and service provider networks. CPE plays an important role in connecting user devices and service provider networks. It can provide users with access to various services such as the Internet, telephone, and cable TV, and can also implement network management, data security and other functions. In existing technologies, CPE devices have been widely used in scenarios such as homes and offices, providing users with more convenient and efficient network access and service experience. With the gradual popularization of new-generation communication technologies such as 5G, optical fiber, and the Internet of Things, the functions and performance of CPE devices will continue to be improved, creating more possibilities for users.
[0003] However, most CPE devices are currently used only as channels for receiving / sending user data, and fail to effectively exert all the value of CPE, which is a great loss. Therefore, in-depth exploration of the use value of CPE devices has become an urgent problem to be solved. Summary of the invention
[0004] The main purpose of the present invention is to provide a method, device, storage medium and computer equipment for CPE to manage user data, so as to solve the problem in the prior art that CPE equipment cannot manage user data and thus has low use value.
[0005] To achieve the above object, the first aspect of the present invention provides a method for CPE to manage user data, which is applied to a CPE device, wherein the CPE device receives or sends a user data packet by routing forwarding, and connects the user data packet to a mobile network through a mobile network data module provided in the CPE device, and the method comprises:
[0006] Load preset data feature sets and control parameters;
[0007] Get the data packet;
[0008] Determine whether the data packet is a user data packet to be forwarded;
[0009] If yes, analyzing and marking the user data packet according to the preset data feature set and the control parameters;
[0010] According to the marking result, a control operation is performed on the user data packet, and the control operation includes one of forwarding and discarding.
[0011] Furthermore, the preset data feature set includes an app / website identification set and a user device type identification set; the control parameters include an interception mode, a control object list, and a control time period.
[0012] Furthermore, the step of analyzing and marking the user data packet according to the preset data feature set and the control parameters includes:
[0013] Acquire a set current interception mode, the interception mode including one of a whitelist mode and a blacklist mode, and the current interception mode is selected from the interception mode;
[0014] If the current interception mode is the blacklist mode, whether to intercept the access user corresponding to the user data packet is determined according to whether the user attribute corresponding to the user data packet is in the control object list; the user attribute includes at least one of a user personal identification identifier, a user host name, and a user device type;
[0015] If not intercepted, determine whether the user data packet is an HTTP / HTTPS data packet;
[0016] If it is the HTTP / HTTPS data packet, determining whether the app or website corresponding to the user data packet is in the app / website identification set;
[0017] If it is in the app / website identification set, determine whether the app or website is in the control time period;
[0018] If it is in the control time period, the user data packet is marked as intercepted.
[0019] Furthermore, the step of analyzing and marking the user data packet according to the preset data feature set and the control parameters includes:
[0020] Acquire a set current interception mode, the interception mode including one of a whitelist mode and a blacklist mode, and the current interception mode is selected from the interception mode;
[0021] If the current interception mode is the whitelist mode, whether to release the access user corresponding to the user data packet is determined according to whether the user attribute corresponding to the user data packet is in the control object list; the user attribute includes at least one of a user personal identification identifier, a user host name, and a user device type;
[0022] If not, determine whether the user data packet is an HTTP / HTTPS data packet;
[0023] If it is the HTTP / HTTPS data packet, determining whether the app or website corresponding to the user data packet is in the app / website identification set;
[0024] If it is in the app / website identification set, determine whether the app or website is in the control time period;
[0025] If it is within the control time period, the user data packet is marked as released.
[0026] Further, the step of performing a control operation on the user data packet according to the marking result, wherein the control operation includes a step of forwarding and discarding, and further includes:
[0027] If the control operation is forwarding, determining whether the number of data packets currently in the forwarding process exceeds a preset threshold;
[0028] If it exceeds the preset threshold, the current interception mode is switched from the blacklist mode to the whitelist mode.
[0029] Further, the control operation is performed on the user data packet according to the marking result, and the control operation includes one of the steps of forwarding and discarding, and further includes:
[0030] If the control operation is forwarding, determining whether the number of data packets currently in the forwarding process exceeds a preset threshold;
[0031] If the preset threshold is exceeded, the data packets currently in the forwarding process are classified according to the queuing time and the forwarding target, the data packets with respect to the same forwarding target are sorted in a vertical sequence according to the queuing time, and the data packets with respect to different forwarding targets are sorted in a horizontal sequence according to the queuing time to form a forwarding sequence array group, and the forwarding bandwidth is allocated to each horizontal sequence respectively;
[0032] Determine whether the forwarding object of the data packet currently in the forwarding process includes the forwarding object of the user data packet;
[0033] If not, arranging the user data packet to the end of the horizontal sequence and allocating forwarding bandwidth to the user data packet;
[0034] And if included, the user data packet is arranged at the end of the vertical sequence corresponding to the same forwarding object.
[0035] Furthermore, before the step of loading the preset data feature set and control parameters, the following steps are included:
[0036] Obtain information entered into the list of controlled objects by the manager in real time;
[0037] Determining whether the information input by the administrator has a similarity with the pre-stored information in the preset data feature set that exceeds a preset threshold;
[0038] If so, the pre-stored information in the preset data feature set whose similarity exceeds a preset threshold is displayed in real time.
[0039] A second aspect of the present invention provides a CPE device for managing user data, which is applied to a CPE device, wherein the CPE device receives or sends a user data packet by routing forwarding, and connects the user data packet to a mobile network through a mobile network data module provided in the CPE device, and the device comprises:
[0040] Loading module, used to load preset data feature sets and control parameters;
[0041] An acquisition module, used to acquire data packets;
[0042] A judging module, used to judge whether the data packet is a user data packet to be forwarded;
[0043] A hierarchical marking module, for analyzing and marking the user data packet according to the preset data feature set and the control parameters if the user data packet is a user data packet;
[0044] The control module is used to perform control operations on the user data packet according to the marking result, and the control operation includes one of forwarding and discarding.
[0045] A third aspect of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned CPE management user data method when executing the computer program.
[0046] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned method of CPE managing user data.
[0047] The present invention provides a method, device, storage medium and computer equipment for CPE management of user data, wherein the method loads a preset data feature set and control parameters; obtains a data packet; determines whether the data packet is a user data packet to be forwarded; if it is a user data packet, analyzes and marks the user data packet according to the preset data feature set and the control parameters; performs control operations on the user data packet according to the marking result, and the control operations include forwarding and discarding; thus, the present invention can flexibly adjust data processing strategies according to different situations to meet the diverse needs of users; and through refined user data packet analysis and marking, it can timely discover and intercept potential security threats, effectively protect user data from attacks and leaks, and improve the security of network use; in addition, users can also set parameters such as interception mode and control object list according to their own needs to achieve personalized network management, meet the special needs of different users, and reduce the need for manual intervention through automated data processing and control, thereby reducing the cost of network management; thereby achieving refined and intelligent management of user data. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is a flow chart of a method for CPE to manage user data in one embodiment of the present invention;
[0049] Figure 2 is a schematic diagram of the structure of a device for CPE managing user data in one embodiment of the present invention;
[0050] Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.
[0051] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0053] Reference Figure 1 This embodiment shows a method for managing user data by a CPE, which is applied to a CPE device. The CPE device receives or sends a user data packet by routing forwarding, and connects the user data packet to a mobile network through a mobile network data module provided in the CPE device. The method includes:
[0054] S1. Load preset data feature set and control parameters;
[0055] S2, obtain data packet;
[0056] S3, determining whether the data packet is a user data packet to be forwarded;
[0057] S4. If yes, analyzing and marking the user data packet according to the preset data feature set and the control parameters;
[0058] S5. Perform a control operation on the user data packet according to the marking result, wherein the control operation includes one of forwarding and discarding.
[0059] In this embodiment, the CPE device forwards the user data packet to the mobile network through a mobile network data module, wherein the mobile network data module includes, for example, a 4G or 5G data module, etc. The method of this embodiment is executed by a processor of the CPE device.
[0060] In the above step S1, when the CPE device is started or receives a management instruction, the processor will load the preset data feature set. In a specific embodiment, the preset data feature set includes but is not limited to the app / website identification set, the user device type identification set, etc., which are used for subsequent user data packet identification and analysis. At the same time, the loading also includes control parameters, which include interception mode (whitelist or blacklist mode), control object list, control time period, etc., where the control time period can include, for example, allowed or prohibited access time period, etc. These parameters provide a basis for subsequent user data packet control.
[0061] In the above steps S2 and S3, the CPE device will continuously receive or prepare to send data packets during normal operation. For each captured data packet, it is first necessary to determine whether it is a user data packet that needs to be forwarded. The CPE device uses its routing forwarding function to capture the data packets to be forwarded. Specifically, the step of obtaining the user data packets to be forwarded includes: obtaining the user data packets to be forwarded through the tracking chain hook function set by the IP_FORWARD node of the netfilter framework of the Linux system, thereby capturing the user data packets flowing through the node in real time. Only data that is confirmed to be a user data packet will enter the subsequent processing flow. This can optimize performance and strike a balance between interception accuracy and user applicability to avoid affecting users' normal use of the network.
[0062] In the above step S4, for the data confirmed as the user data packet, the processor will perform in-depth analysis and marking on the data according to the preset data feature set and control parameters loaded in step S1.
[0063] Specifically, the analysis process includes identifying the user name and user device type corresponding to the user data packet, determining whether the user data packet comes from or is sent to an object in the control object list, and identifying whether the user data packet is of HTTP / HTTPS type, and determining its corresponding app or website, etc.
[0064] The attributes of the tag include user personal identification, user host name, user device type, app / website name, etc. Exemplarily, the definition and acquisition methods of these attributes are as follows:
[0065] User personal identification: The source address of the user data packet is used as the personal identification of the access user. When the CPE device displays the access user information, the source address data is treated as an internal processing keyword. The CPE management user can add the access user to the list of control objects by using the keyword. Or infer the user host name based on the ARP information. The CPE management user can add the access user to the list of control objects by using the user host name;
[0066] User device type: Based on the user device type identification set in the preset data feature set, the user device type can be inferred through the User-Agent field of HTTP / HTTPS or the MAC address, such as mobile phones, computers or other smart devices. The CPE manager can add the user device types that need to be managed to the management object list, and can also further add the user device types that need to be managed by the managed users;
[0067] App / Website Name: Identify the app that the user is using or the website name that is generating traffic based on the app / website identification set in the preset data feature set. When the CPE device displays the information of the connected app / website, this data is treated as an internal processing keyword. The CPE administrator can use this keyword to add the name of the connected app / website to the list of controlled objects, and can also further add the names of the apps / websites that the controlled users need to control in the list of controlled objects.
[0068] Based on the analysis results, the processor will mark the user data packets according to predetermined rules, such as marking them as "allowed to be forwarded" or "need to be intercepted".
[0069] In the above step S5, according to the marking result of the user data packet, the CPE device will perform corresponding control operations. If the user data packet is marked as "need to be intercepted", the CPE device kernel will discard the user data packet and prevent it from continuing to transmit. If the user data packet is marked as "allow forwarding", the CPE device kernel will forward the user data packet normally.
[0070] In this way, through the refined management of user data packets, this embodiment can flexibly adjust data processing strategies according to different situations to meet the diverse needs of users; and through refined user data packet analysis and marking, it can timely discover and intercept potential security threats, effectively protect user data from attacks and leaks, and improve the security of network use; in addition, users can also set interception modes, control object lists and other parameters according to their own needs, realize personalized network management, meet the special needs of different users, and reduce the need for manual intervention through automated data processing and control, thereby reducing the cost of network management; thereby realizing refined and intelligent management of user data.
[0071] Specifically, the preset data feature set includes an app / website identification set and a user device type identification set; the control parameters include an interception mode, a control object list, and a control time period. Among them, the app / website identification set includes commonly used apps and websites. The user device type identification set includes commonly used device types of access users. Interception mode: blacklist mode or whitelist mode can be set. Blacklist mode means that user data packets belonging to this type are not allowed to pass through, and whitelist mode means that only user data packets of this type are allowed to pass through. The CPE administrator can add the access users and apps / websites used by the access users that he wants to control to the configuration list. The CPE administrator can set the time period for each access user and the app / website used by the access user to be controlled. In blacklist mode, the controlled object cannot be connected to the Internet during this time period, and in whitelist mode, the controlled object can only be connected to the Internet during this time period.
[0072] In one embodiment, the step S4 of analyzing and marking the user data packet according to the preset data feature set and the control parameter includes:
[0073] S401, obtaining a set current interception mode, wherein the interception mode includes one of a whitelist mode and a blacklist mode, and the current interception mode is selected from the interception mode;
[0074] S402: If the current interception mode is the blacklist mode, judging whether to intercept the access user corresponding to the user data packet according to whether the user attribute corresponding to the user data packet is in the control object list; the user attribute includes at least one of a user personal identification identifier, a user host name, and a user device type;
[0075] S403: If not intercepted, determine whether the user data packet is an HTTP / HTTPS data packet;
[0076] S404: If it is the HTTP / HTTPS data packet, determine whether the app or website corresponding to the user data packet is in the app / website identification set;
[0077] S405: If the app or website is in the app / website identification set, determine whether the app or website is in the control time period;
[0078] S406: If it is in the control time period, mark the user data packet as intercepted.
[0079] In this embodiment, in the above step S401, the processor obtains the currently set interception mode from the control parameters. The interception mode includes a whitelist mode and a blacklist mode. The whitelist mode means that only users or applications in the list are allowed to access the network, while the blacklist mode means that users or applications in the list are prohibited from accessing the network. The current interception mode is one of these two modes.
[0080] In the above step S402, if the current interception mode is the blacklist mode, the processor will determine whether it is necessary to intercept the access user corresponding to the user data packet according to whether the user attribute corresponding to the user data packet is in the control object list. The user attribute may include at least one of the user's personal identification identifier (such as user name, user ID, etc.), user host name, and user device type. The processor will check whether these user attributes exist in the control object list. Then, the processor will compare this information with the information in the blacklist. If they match, it means that the user or device is in the blacklist and its user data packet needs to be intercepted.
[0081] In the above step S403, if it is determined in step S402 that the user data packet does not need to be intercepted, the processor will further determine whether the user data packet is an HTTP / HTTPS data packet. This is because HTTP / HTTPS data packets usually contain rich user information and application layer data, and are the focus of network security management. If it is determined in step S402 that the user data packet needs to be intercepted, it can be further determined whether it belongs to the user's controlled time period. If so, the user data packet is intercepted. If not, it is further determined whether the user data packet is an HTTP / HTTPS data packet.
[0082] In the above step S404, if the user data packet is an HTTP / HTTPS data packet, the processor will then determine whether the app or website corresponding to the user data packet is in the preset app / website identification set. Specifically, the specific app or website information can be identified by parsing the payload of the user data packet. For example, the parsing method includes: capturing the flowing user data packet, converting the user data packet from binary format to a readable text or data structure for subsequent analysis; extracting payload data, wherein the payload data contains the data actually transmitted by the user, and for HTTP / HTTPS data packets, the payload usually contains information about the requested resources, request headers, cookies, etc.; performing keyword search and pattern matching on the payload data to find features that match the records in the database, wherein the database contains feature information of various apps and websites, such as specific URL patterns, user agent strings, specific cookie values, etc.; parsing application layer protocols, such as HTTP, to extract more context information, including the requested URL, request method (GET, POST, etc.), user agent information in the request header, etc.; identifying the app or website from which the user data packet comes, and comparing the identification result with the preset app / website identification set.
[0083] In the above step S405, if the app or website is in the app / website identification set, the processor will further check whether the current time is within the control time period for the app or website. The control time period is set by the administrator according to actual needs and is used to limit the access of a specific app or website within a specific time.
[0084] In the above step S406, if the current time is within the control time period, the processor will mark the user data packet as intercepted, which means that the user data packet will be blocked from further transmission, thereby achieving access control for a specific user, device, app or website within a specific time.
[0085] The method of this embodiment can achieve refined management and control of user data packets, thereby improving network security and management efficiency.
[0086] In another embodiment, the step S4 of analyzing and marking the user data packet according to the preset data feature set and the control parameter includes:
[0087] S411, obtaining a set current interception mode, wherein the interception mode includes one of a whitelist mode and a blacklist mode, and the current interception mode is selected from the interception mode;
[0088] S412: If the current interception mode is the whitelist mode, judging whether to release the access user corresponding to the user data packet according to whether the user attribute corresponding to the user data packet is in the control object list; the user attribute includes at least one of a user personal identification identifier, a user host name, and a user device type;
[0089] S413, if not allowed, determining whether the user data packet is an HTTP / HTTPS data packet;
[0090] S414, if it is the HTTP / HTTPS data packet, determining whether the app or website corresponding to the user data packet is in the app / website identification set;
[0091] S415, if it is in the app / website identification set, determine whether the app or website is in the control time period;
[0092] S416: If it is in the control time period, mark the user data packet as released.
[0093] In this embodiment, the difference from steps S402 to S406 in the above embodiment is that the steps in this embodiment correspond to the data analysis and marking process in the whitelist mode. The whitelist mode means that only users or applications on the whitelist are allowed to access the network.
[0094] In the above step S412, if the current interception mode is the whitelist mode, the processor will determine whether to release the user data packet according to the user attributes corresponding to the user data packet. The user attributes may include at least one of the user's personal identification (such as user name, user ID, etc.), user host name, and user device type. The processor will check whether these user attributes exist in the control object list. If the user attributes are in the control object list of the whitelist, the processor will release the user data packet; otherwise, the next step of judgment will be performed.
[0095] In the above step S413, if the user data packet does not meet the whitelist release conditions, the processor will then determine whether the user data packet is an HTTP / HTTPS data packet. This is because HTTP / HTTPS data packets occupy an important position in network communications and often contain more user information and application data, so they are the focus of network security management. If the user data packet meets the whitelist release conditions, it can be further determined whether the user is in a controlled time period. If not, the user data packet is intercepted; if so, it is further determined whether the user data packet is an HTTP / HTTPS data packet.
[0096] In the above step S414, if the user data packet is of HTTP / HTTPS type, the processor will further analyze the content of the user data packet to determine whether the corresponding app or website exists in the preset app / website identification set. The specific determination method is the same as step S404.
[0097] In the above step S415, if the app or website corresponding to the user data packet is in the app / website identification set, the processor checks whether the current time is within the control time period for the app or website. The control time period is set by the administrator according to actual needs and is used to limit or allow access to a specific app or website within a specific time.
[0098] In the above step S416, if the current time is within the control time period and the user data packet meets all the above conditions, the processor will mark the user data packet as released, which means that the user data packet will be allowed to continue to transmit, thereby achieving access control for a specific user, device, app or website within a specific time.
[0099] Through the above steps S411-S416, the method of this embodiment can achieve refined management of user data packets in the whitelist mode, ensuring that only qualified user data packets are released, thereby improving network security and management efficiency. At the same time, this method also provides flexibility and configurability, allowing CPE administrators to adjust the interception mode and control parameters according to actual conditions to meet different security management requirements.
[0100] In one embodiment, the step S5 of performing a control operation on the user data packet according to the marking result, wherein the control operation includes one of forwarding and discarding, comprises:
[0101] S51. If the control operation is forwarding, determine whether the number of data packets currently in the forwarding process exceeds a preset threshold;
[0102] S52: If the preset threshold is exceeded, the current interception mode is switched from the blacklist mode to the whitelist mode.
[0103] In this embodiment, since the CPE device needs to manage the forwarded user data, it may cause congestion and delay in data transmission. This embodiment is used to further solve this problem, thereby optimizing the user experience.
[0104] In the above step S51, after the user data packet is marked as needing to be forwarded, the processor will check the number of data packets currently being forwarded, thereby preventing network congestion or overload and ensuring that the data packets can be forwarded in an orderly and efficient manner. The above preset threshold is set based on factors such as the processing capacity of the network device and the network bandwidth.
[0105] In the above step S7, if the number of data packets currently in the forwarding process exceeds the preset threshold, it means that the CPE device may face a large forwarding pressure, so the number of data packets that need to be forwarded is reduced by limiting the types of data packets allowed to pass. Since the whitelist mode means that only users or applications in the list are allowed to access the network, and the blacklist mode means that users or applications in the list are prohibited from accessing the network. Therefore, in the blacklist mode, the number of data packets that can obtain release permission will be much greater than that in the whitelist mode. Therefore, by quickly switching the blacklist mode to the whitelist mode, the forwarding pressure of the CPE device can be greatly alleviated. Thereby optimizing device performance and user experience.
[0106] In one embodiment, after the step S5 of performing a control operation on the user data packet according to the marking result, wherein the control operation includes one of forwarding and discarding, the method further includes:
[0107] S6. If the control operation is forwarding, determine whether the number of data packets currently in the forwarding process exceeds a preset threshold;
[0108] S7. If the number of packets exceeds the preset threshold, the packets currently in the forwarding process are classified according to the queuing time and the forwarding target, the packets with respect to the same forwarding target are sorted in a vertical sequence according to the queuing time, and the packets with respect to different forwarding targets are sorted in a horizontal sequence according to the queuing time to form a forwarding sequence array group, and the forwarding bandwidth is allocated to each horizontal sequence respectively;
[0109] S8, determining whether the forwarding object of the data packet currently in the forwarding process includes the forwarding object of the user data packet;
[0110] S9, if not included, arranging the user data packet to the end of the horizontal sequence and allocating forwarding bandwidth to the user data packet; and
[0111] S10: If included, arranging the user data packet to the end of the vertical sequence corresponding to the same forwarding object.
[0112] In this embodiment, since the CPE device needs to manage the forwarded user data, it may cause congestion and delay in data transmission. This embodiment is used to further solve this problem, thereby optimizing the user experience.
[0113] In the above step S6, after the user data packet is marked as needing to be forwarded, the processor will check the number of data packets currently being forwarded, thereby preventing network congestion or overload and ensuring that the data packets can be forwarded in an orderly and efficient manner. The above preset threshold is set based on factors such as the processing capacity of the network device and the network bandwidth.
[0114] In the above step S7, if the number of data packets currently in the forwarding process exceeds the preset threshold, it means that the CPE device may face greater forwarding pressure. These data packets are classified and sorted to more effectively manage the forwarding process. Specifically, according to the queuing time and forwarding target of each data packet, the data packets of the same forwarding target are arranged vertically according to the queuing time to form multiple vertical sequences; at the same time, the data packets of different forwarding targets are also arranged horizontally according to the queuing time to form a forwarding sequence array group. And each horizontal sequence is allocated with forwarding bandwidth respectively, so that each horizontal sequence of different forwarding targets has data packets in transmission, avoiding a user from not receiving feedback for too long, thereby greatly optimizing the user experience. Such a structure helps the processor to reasonably schedule data packets according to priority and forwarding target. The specific forwarding bandwidth allocation rule can be uniform allocation, or it can be reduced in sequence according to the order of the horizontal sequence, or it can be allocated according to the number of data packets in each horizontal sequence.
[0115] In the above step S8, it is checked whether the forwarding object (ie, the destination of the data packet) of the data packet currently being forwarded includes the forwarding object of the newly arrived user data packet, thereby determining the position of the newly arrived user data packet in the forwarding sequence.
[0116] In the above step S9, if the forwarding object of the data packet in the current forwarding process does not include the forwarding object of the newly arrived user data packet, it means that the destination of the newly arrived user data packet is different from the existing data packets. In this case, the processor will arrange the newly arrived user data packet to the end of the horizontal sequence, that is, add it to a new position of the forwarding sequence array group, and allocate forwarding bandwidth, and start forwarding immediately, thereby greatly optimizing the user experience. The allocation of forwarding bandwidth for the newly arrived user data packet can be a preset fixed value, or it can be set according to the forwarding bandwidth of the previous horizontal sequence, for example, set to half of the forwarding bandwidth of the previous horizontal sequence, etc.
[0117] In the above step S10, if there is already a data packet with the same forwarding object as the newly arrived user data packet in the data packets currently being forwarded, it means that the destination of the newly arrived user data packet is the same as some existing data packets. At this time, the processor will arrange the newly arrived user data packet at the end of the vertical sequence corresponding to the same forwarding object. The advantage of doing so is that the continuity of the data packets with the same destination can be maintained during the forwarding process, thereby improving the forwarding efficiency. At the same time, since the new user data packet is added to the end of the sequence, it is also ensured that the first arriving data packet is forwarded first.
[0118] When faced with the demand for forwarding a large number of data packets, network congestion may occur due to the management of data analysis and marking in the previous steps. This embodiment can effectively manage the forwarding process, ensure that the data packets can be forwarded to their respective destinations in a reasonable order and priority, prevent network congestion, improve data transmission efficiency, and enhance user experience.
[0119] In one embodiment, before step S1 of loading the preset data feature set and control parameters, the following steps are included:
[0120] S01. Acquire the information in the list of controlled objects input by the manager in real time;
[0121] S02, determining whether the similarity between the information input by the administrator and the pre-stored information in the preset data feature set exceeds a preset threshold;
[0122] S03: If yes, the pre-stored information in the preset data feature set whose similarity exceeds a preset threshold is displayed in real time.
[0123] The main purpose of this embodiment is to pre-process the information input by the administrator, and to automatically remind or correct errors according to the similarity between the input information and the pre-stored information in the preset data feature set.
[0124] In the above step S01, the information entered by the administrator in the list of controlled objects is captured in real time. "Real time" means that the processor can respond to the user input immediately without waiting or performing other operations. The list of controlled objects can be an interface in which the user can enter or select specific objects for control. This information may be text, numbers, options, etc., used to describe the objects or conditions that the user wants to control.
[0125] In the above step S02, the information input by the user is compared with the pre-stored information in the preset data feature set. The preset data feature set is a set of various data features, which may be related to the information input by the user. The processor uses a similarity algorithm to calculate the similarity between the user input information and the pre-stored information. The similarity algorithm includes, for example, cosine similarity, Jaccard similarity, etc., and then compares the similarity with a preset threshold. If it is greater than the preset threshold, it can be determined that the two information are similar or identical.
[0126] In the above step S03, if the similarity calculated in step S02 exceeds the preset threshold, the processor will display in real time the pre-stored information that is highly similar to the user input information, thereby providing managers with instant feedback and helping them understand which pre-stored information the input information is similar to, which may guide them to make choices or correct errors, thereby greatly improving the interactivity of the user interface and user work efficiency.
[0127] Reference Figure 2 This embodiment shows a CPE device for managing user data, which is applied to a CPE device. The CPE device receives or sends a user data packet by routing forwarding, and connects the user data packet to a mobile network through a mobile network data module provided in the CPE device. The device includes:
[0128] Loading module 10, used to load preset data feature sets and control parameters;
[0129] An acquisition module 20, used for acquiring a data packet;
[0130] A judging module 30, used to judge whether the data packet is a user data packet to be forwarded;
[0131] A classification marking module 40, for analyzing and marking the user data packet according to the preset data feature set and the control parameters if the user data packet is a user data packet;
[0132] The control module 50 is used to perform a control operation on the user data packet according to the marking result, and the control operation includes one of forwarding and discarding.
[0133] For the specific implementation of each module in the above device embodiment, please refer to the above method embodiment, which will not be repeated here.
[0134] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above-mentioned CPE method for managing user data is implemented.
[0135] The steps of the processor executing the method for CPE to manage user data include:
[0136] The processor loads the preset data feature set and control parameters;
[0137] Get the data packet;
[0138] Determine whether the data packet is a user data packet to be forwarded;
[0139] If yes, analyzing and marking the user data packet according to the preset data feature set and the control parameters;
[0140] According to the marking result, a control operation is performed on the user data packet, and the control operation includes one of forwarding and discarding.
[0141] In a specific embodiment, the preset data feature set includes an app / website identification set and a user device type identification set; the control parameters include an interception mode, a control object list, and a control time period.
[0142] In a specific embodiment, the step of analyzing and marking the user data packet according to the preset data feature set and the control parameter includes:
[0143] The processor obtains a set current interception mode, where the interception mode includes one of a whitelist mode and a blacklist mode, and the current interception mode is selected from the interception mode;
[0144] If the current interception mode is the blacklist mode, whether to intercept the access user corresponding to the user data packet is determined according to whether the user attribute corresponding to the user data packet is in the control object list; the user attribute includes at least one of a user personal identification identifier, a user host name, and a user device type;
[0145] If not intercepted, determine whether the user data packet is an HTTP / HTTPS data packet;
[0146] If it is the HTTP / HTTPS data packet, determining whether the app or website corresponding to the user data packet is in the app / website identification set;
[0147] If it is in the app / website identification set, determine whether the app or website is in the control time period;
[0148] If it is in the control time period, the user data packet is marked as intercepted.
[0149] In a specific embodiment, the step of analyzing and marking the user data packet according to the preset data feature set and the control parameter includes:
[0150] The processor obtains a set current interception mode, where the interception mode includes one of a whitelist mode and a blacklist mode, and the current interception mode is selected from the interception mode;
[0151] If the current interception mode is the whitelist mode, whether to release the access user corresponding to the user data packet is determined according to whether the user attribute corresponding to the user data packet is in the control object list; the user attribute includes at least one of a user personal identification identifier, a user host name, and a user device type;
[0152] If not, determine whether the user data packet is an HTTP / HTTPS data packet;
[0153] If it is the HTTP / HTTPS data packet, determining whether the app or website corresponding to the user data packet is in the app / website identification set;
[0154] If it is in the app / website identification set, determine whether the app or website is in the control time period;
[0155] If it is within the control time period, the user data packet is marked as released.
[0156] In a specific embodiment, the step of performing a control operation on the user data packet according to the marking result, wherein the control operation includes a step of forwarding and discarding, and further includes:
[0157] If the control operation is forwarding, the processor determines whether the number of data packets currently in the forwarding process exceeds a preset threshold;
[0158] If it exceeds the preset threshold, the current interception mode is switched from the blacklist mode to the whitelist mode.
[0159] In a specific embodiment, the control operation is performed on the user data packet according to the marking result, and the control operation includes one of the steps of forwarding and discarding, and further includes:
[0160] If the control operation is forwarding, the processor determines whether the number of data packets currently in the forwarding process exceeds a preset threshold;
[0161] If the preset threshold is exceeded, the data packets currently in the forwarding process are classified according to the queuing time and the forwarding target, the data packets with respect to the same forwarding target are sorted in a vertical sequence according to the queuing time, and the data packets with respect to different forwarding targets are sorted in a horizontal sequence according to the queuing time to form a forwarding sequence array group, and the forwarding bandwidth is allocated to each horizontal sequence respectively;
[0162] Determine whether the forwarding object of the data packet currently in the forwarding process includes the forwarding object of the user data packet;
[0163] If not, arranging the user data packet to the end of the horizontal sequence and allocating forwarding bandwidth to the user data packet;
[0164] And if included, the user data packet is arranged at the end of the vertical sequence corresponding to the same forwarding object.
[0165] In a specific embodiment, the step of obtaining the data to be forwarded includes:
[0166] The processor determines whether a data packet is received;
[0167] If so, the data to be forwarded is obtained through the tracking chain hook function set by the IP_FORWARD node of the netfilter framework of the Linux system.
[0168] In a specific embodiment, before the step of loading the preset data feature set and control parameters, the following steps are included:
[0169] The processor obtains the information input into the list of controlled objects by the manager in real time;
[0170] Determining whether the information input by the administrator has a similarity with the pre-stored information in the preset data feature set that exceeds a preset threshold;
[0171] If so, the pre-stored information in the preset data feature set whose similarity exceeds a preset threshold is displayed in real time.
[0172] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.
[0173] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0174] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.
[0175] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0176] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for CPE to manage user data, characterized in that: Applied to a CPE device, the CPE device receives or sends a user data packet by routing forwarding, and connects the user data packet to a mobile network through a mobile network data module provided in the CPE device, the method comprising: Load preset data feature sets and control parameters; Get the data packet; Determine whether the data packet is a user data packet to be forwarded; If yes, analyzing and marking the user data packet according to the preset data feature set and the control parameters; According to the marking result, a control operation is performed on the user data packet, wherein the control operation includes one of forwarding and discarding; The preset data feature set includes an app / website identification set and a user device type identification set; the control parameters include an interception mode, a control object list, and a control time period; The step of analyzing and marking the user data packet according to the preset data feature set and the control parameters includes: Acquire a set current interception mode, the interception mode including one of a whitelist mode and a blacklist mode, and the current interception mode is selected from the interception mode; If the current interception mode is the blacklist mode, whether to intercept the access user corresponding to the user data packet is determined according to whether the user attribute corresponding to the user data packet is in the control object list; the user attribute includes at least one of a user personal identification identifier, a user host name, and a user device type; If not intercepted, determine whether the user data packet is an HTTP / HTTPS data packet; If it is the HTTP / HTTPS data packet, determining whether the app or website corresponding to the user data packet is in the app / website identification set; If it is in the app / website identification set, determine whether the app or website is in the control time period; If it is in the control time period, the user data packet is marked as intercepted.
2. The method for CPE to manage user data according to claim 1, characterized in that: The step of analyzing and marking the user data packet according to the preset data feature set and the control parameters includes: Acquire a set current interception mode, the interception mode including one of a whitelist mode and a blacklist mode, and the current interception mode is selected from the interception mode; If the current interception mode is the whitelist mode, whether to release the access user corresponding to the user data packet is determined according to whether the user attribute corresponding to the user data packet is in the control object list; the user attribute includes at least one of a user personal identification identifier, a user host name, and a user device type; If not, determine whether the user data packet is an HTTP / HTTPS data packet; If it is the HTTP / HTTPS data packet, determining whether the app or website corresponding to the user data packet is in the app / website identification set; If it is in the app / website identification set, determine whether the app or website is in the control time period; If it is within the control time period, the user data packet is marked as released.
3. The method for CPE managing user data according to claim 2, characterized in that: The step of performing a control operation on the user data packet according to the marking result, wherein the control operation includes a step of forwarding and discarding, further comprising: If the control operation is forwarding, determining whether the number of data packets currently in the forwarding process exceeds a preset threshold; If it exceeds the preset threshold, the current interception mode is switched from the blacklist mode to the whitelist mode.
4. The method for CPE to manage user data according to claim 1, characterized in that: According to the marking result, a control operation is performed on the user data packet, wherein the control operation includes a step of forwarding and discarding, and further includes: If the control operation is forwarding, determining whether the number of data packets currently in the forwarding process exceeds a preset threshold; If the preset threshold is exceeded, the data packets currently in the forwarding process are classified according to the queuing time and the forwarding target, the data packets with respect to the same forwarding target are sorted in a vertical sequence according to the queuing time, and the data packets with respect to different forwarding targets are sorted in a horizontal sequence according to the queuing time to form a forwarding sequence array group, and the forwarding bandwidth is allocated to each horizontal sequence respectively; Determine whether the forwarding object of the data packet currently in the forwarding process includes the forwarding object of the user data packet; If not, arranging the user data packet to the end of the horizontal sequence and allocating forwarding bandwidth to the user data packet; And if included, the user data packet is arranged at the end of the vertical sequence corresponding to the same forwarding object.
5. The method for CPE to manage user data according to claim 1, characterized in that: Before the step of loading the preset data feature set and control parameters, the following steps are included: Obtain information entered into the list of controlled objects by the manager in real time; Determining whether the information input by the administrator has a similarity with the pre-stored information in the preset data feature set that exceeds a preset threshold; If so, the pre-stored information in the preset data feature set whose similarity exceeds a preset threshold is displayed in real time.
6. A device for CPE to manage user data, characterized in that: Applied to a CPE device, the CPE device receives or sends a user data packet by routing forwarding, and connects the user data packet to a mobile network through a mobile network data module provided in the CPE device, the device comprising: Loading module, used to load preset data feature sets and control parameters; An acquisition module, used to acquire data packets; A judging module, used to judge whether the data packet is a user data packet to be forwarded; a hierarchical marking module, for analyzing and marking the user data packet according to the preset data feature set and the control parameters if the user data packet is a user data packet; wherein the preset data feature set includes an app / website identification set and a user device type identification set; the control parameters include an interception mode, a control object list, and a control time period; the hierarchical marking module is used to: obtain a set current interception mode, the interception mode includes one of a whitelist mode and a blacklist mode, and the current interception mode is selected from the interception mode; if the current interception mode is a blacklist mode, then determine whether to intercept the access user corresponding to the user data packet according to whether the user attribute corresponding to the user data packet is in the control object list; the user attribute includes at least one of a user personal identification identifier, a user host name, and a user device type; if not intercepted, determine whether the user data packet is an HTTP / HTTPS data packet; if it is an HTTP / HTTPS data packet, determine whether the app or website corresponding to the user data packet is in the app / website identification set; if it is in the app / website identification set, determine whether the app or website is in the control time period; if it is in the control time period, mark the user data packet as intercepted; The control module is used to perform control operations on the user data packet according to the marking result, and the control operation includes one of forwarding and discarding.
7. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method for CPE managing user data according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for CPE managing user data according to any one of claims 1 to 5 are implemented.
