Application library file management method, cloud server, network equipment and storage medium

By establishing a mapping relationship between application library files and devices between cloud servers and network devices, obtaining application library files only when needed and cleaning invalid files, the problem of a large number of unused and duplicated files in cloud servers is solved, and the storage space is improved utilization rate and management efficiency.

CN119292998APending Publication Date: 2025-01-10TP-LINK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411402760.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The prior art has caused cloud servers to store a large number of unused and duplicated application library files, reducing the efficiency of storage space.

Method used

By establishing a mapping relationship between application library files and devices between cloud servers and network devices, the required application library files are obtained from the target network device only when the user needs it, and regularly clean up invalid files to reduce the amount of stored invalid files .

Benefits of technology

It improves the storage space utilization of cloud servers, reduces the storage volume of invalid files, reduces management resource consumption, and ensures the stability of obtaining application library files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292998A_ABST
    Figure CN119292998A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of computers, and provides an application library file management method, a cloud server, network equipment and a storage medium. Querying an application library file corresponding to a first file identifier from a preset storage unit according to the first file identifier in the file acquisition instruction; if the storage unit does not contain the application library file corresponding to the first file identifier, querying at least one target network device corresponding to the first file identifier based on a mapping relationship between the application library file and the device; according to a preset communication protocol, sending a file acquisition request containing the first file identifier to target network equipment; and receiving an application library file uploaded by the target network device based on the file acquisition request. According to the method, the cloud server does not need to pre-store application library files of all network devices, and the storage space utilization rate of the cloud server is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application belong to the field of computer technology, and in particular, relate to a method for managing application library files, a cloud server, a network device, and a storage medium. Background Art

[0002] The application library file is one of the main configuration files used by the network device when implementing the firewall function. Users can configure different security policies for the firewall function in the network device through the application library file. When the network device performs the firewall function, the application library file can be used to identify which application the data packet flowing through belongs to, and determine whether to allow the data packet to be transmitted according to the security policy corresponding to the application. In the prior art, in order to facilitate users to configure the security policy of the network device using the application library file, each network device that performs the firewall function will upload and save the application library file stored in itself to the cloud server after being enabled. In addition, the network device will actively upload and save the updated application library file to the cloud server after each application library file is updated. However, the application library file uploaded by the network device may not be used by the user. And different network devices can perform security protection operations on the same batch of applications, that is, the application library files uploaded by different network devices can be the same. Therefore, the method provided by the prior art not only causes the cloud server to store a large number of unused application library files, but also causes the cloud server to store a large number of identical application library files, thereby reducing the storage space efficiency of the cloud server. Summary of the invention

[0003] In view of this, the embodiments of the present application provide an application library file management method, a cloud server, a network device and a storage medium to reduce invalid files stored in the cloud server, thereby improving the storage space efficiency of the cloud server.

[0004] A first aspect of an embodiment of the present application provides a method for managing application library files, which is applied to a cloud server and includes:

[0005] In response to a file acquisition instruction initiated by a user, querying an application library file corresponding to the first file identifier from a preset storage unit according to the first file identifier in the file acquisition instruction;

[0006] If the storage unit does not contain the application library file corresponding to the first file identifier, querying at least one target network device corresponding to the first file identifier based on the mapping relationship between the application library file and the device; the mapping relationship records the second file identifier corresponding to the application library file used by each network device;

[0007] According to a preset communication protocol, sending a file acquisition request including the first file identifier to the target network device;

[0008] Receive the application library file uploaded by the target network device based on the file acquisition request.

[0009] In a possible implementation manner of the first aspect, sending the file acquisition request including the first file identifier to the target network device according to a preset communication protocol includes:

[0010] If the number of the target network devices is greater than a preset number threshold, obtaining the writing time of the second file identifier corresponding to each of the target network devices;

[0011] Based on the write time, determining a request order corresponding to each of the target network devices;

[0012] According to the communication protocol and the request order, the file acquisition request is sent to each of the target network devices in sequence until an application library file sent by any of the target network devices based on the file acquisition request is received.

[0013] In a possible implementation manner of the first aspect, after receiving the application library file uploaded by the target network device based on the file acquisition request, the method includes:

[0014] Based on a preset data clearing cycle, obtaining third file identifiers corresponding to respective stored library files stored in the storage unit;

[0015] For any third file identifier in the storage unit, if the mapping relationship between the application library file and the device does not include any third file identifier, the stored library file corresponding to any third file identifier in the storage unit is deleted.

[0016] In a possible implementation manner of the first aspect, if the storage unit does not include the application library file corresponding to the first file identifier, before querying at least one target network device corresponding to the first file identifier based on a mapping relationship between the application library file and the device, the method includes:

[0017] Receive online information sent by any network device;

[0018] The device identifier in the online information and the second file identifier corresponding to the device identifier are written into the mapping relationship between the application library file and the device.

[0019] A second aspect of an embodiment of the present application provides a method for managing an application library file, which is applied to a network device, including:

[0020] According to a preset communication protocol, receiving a file acquisition request including a first file identifier sent by a cloud server; the first file identifier is determined by the cloud server according to a file acquisition instruction initiated by a user; the file acquisition request is generated by the cloud server according to a mapping relationship between an application library file and a device when a storage unit of the cloud server does not contain an application library file corresponding to the first file identifier;

[0021] If the first file identifier matches the second file identifier of the locally used application library file, the application library file is sent to the cloud server according to the communication protocol.

[0022] In a possible implementation manner of the second aspect, before receiving, through the communication protocol with the cloud server, a file acquisition request including a first file identifier and sent by the cloud server, the method includes:

[0023] Generate a second file identifier corresponding to the application library file based on the number of application program identifiers included in the application library file and summary information corresponding to the application library file;

[0024] In response to an online instruction initiated by a user, online information is generated based on the second file identifier, and the online information is sent to the cloud server.

[0025] In a possible implementation manner of the second aspect, before, in response to the online instruction initiated by the user, generating a second file identifier corresponding to the application library file based on the number of application program identifiers included in the application library file and summary information corresponding to the application library file, the method includes:

[0026] The summary information is generated based on all application program identifiers contained in the application library file.

[0027] A third aspect of an embodiment of the present application provides a management device for application library files, which is applied to a cloud server and includes:

[0028] a configuration module, configured to respond to a file acquisition instruction initiated by a user, query an application library file corresponding to the first file identifier from a preset storage unit according to the first file identifier in the file acquisition instruction; if the storage unit does not contain the application library file corresponding to the first file identifier, query at least one target network device corresponding to the first file identifier based on a mapping relationship between application library files and devices; the mapping relationship records a second file identifier corresponding to the application library file used by each network device;

[0029] A file import and export module, used for sending a file acquisition request including the first file identifier to the target network device according to a preset communication protocol;

[0030] The file management module is used to receive the application library file uploaded by the target network device based on the file acquisition request.

[0031] A fourth aspect of an embodiment of the present application provides a management device for application library files, which is applied to a network device, including:

[0032] A receiving module, configured to receive a file acquisition request including a first file identifier sent by the cloud server through a communication protocol with the cloud server; the first file identifier is determined by the cloud server according to a file acquisition instruction initiated by a user; the file acquisition request is generated by the cloud server according to a mapping relationship between the application library file and the device when the storage unit of the cloud server does not contain an application library file corresponding to the first file identifier;

[0033] A sending module is used to send the application library file to the cloud server through the communication protocol if the first file identifier matches the second file identifier of the application library file used locally.

[0034] The fifth aspect of an embodiment of the present application provides a cloud server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for managing application library files as described in the first aspect above is implemented.

[0035] The sixth aspect of an embodiment of the present application provides a network device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for managing application library files as described in the second aspect above is implemented.

[0036] A seventh aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the application library file management method described in the first aspect or the application library file management method described in the second aspect.

[0037] An eighth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, the computer executes the application library file management method described in the first aspect or the application library file management method described in the second aspect.

[0038] Compared with the prior art, the embodiments of the present application have the following advantages:

[0039] In an embodiment of the present application, the cloud server can respond to a file acquisition instruction initiated by a user, and query the application library file corresponding to the first file identifier from the storage unit according to the first file identifier in the file acquisition instruction; if the cloud server determines that the storage unit does not contain the application library file corresponding to the first file identifier, the cloud server can query at least one target network device corresponding to the first file identifier according to the mapping relationship between the application library file and the device; wherein the mapping relationship records the second file identifier corresponding to the application library file used by each network device; then, the cloud server can send a file acquisition request containing the first file identifier to the target network device through the communication protocol between the target network device, and receive the application library file uploaded by the target network device based on the file acquisition request through the communication protocol. Through the method provided by this embodiment, since the cloud server can determine the target network device storing the application library file according to the first file identifier when the user needs to use a certain application library file, and obtain the application library file from the target network device through the file acquisition request. Therefore, the method provided by this embodiment can make the cloud server not need to pre-store the application library files used by all network devices, thereby reducing the amount of invalid files stored in the cloud server, thereby improving the storage efficiency of the cloud server. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 is a schematic diagram of a network device management system provided by an embodiment of the present application;

[0042] Figure 2 is a schematic diagram of a method for managing application library files provided in an embodiment of the present application;

[0043] Figure 3 This is a schematic diagram of a specific method for a cloud server to obtain an application library file provided in an embodiment of the present application;

[0044] Figure 4 It is a structural diagram of a cloud server provided in an embodiment of the present application;

[0045] Figure 5 is a schematic diagram of another method for managing application library files provided in an embodiment of the present application;

[0046] Figure 6is a schematic diagram of a management device for application library files provided in an embodiment of the present application;

[0047] Figure 7 is a schematic diagram of another device for managing application library files provided in an embodiment of the present application;

[0048] Figure 8 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In the following description, specific details such as specific system structures, technologies, etc. are proposed for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from hindering the description of the present application.

[0050] The technical solution of the present application is described below through specific embodiments.

[0051] See also Figure 1 , shows a schematic diagram of a network device management system provided by an embodiment of the present application. Figure 1 As shown, the network device management system may include a cloud server and N network devices with firewall functions. Wherein, N may be a positive integer greater than or equal to 1. The cloud server may be respectively connected to each network device for communication. The cloud server in this embodiment may be any server capable of providing computing or application services to a terminal device, and the network device may be any device capable of performing a firewall function, such as a hardware device specifically used to monitor and filter data packets entering and leaving the network, a router with a firewall application installed, or a terminal device with a firewall application installed.

[0052] Reference Figure 2 , shows a schematic diagram of a method for managing an application library file provided in an embodiment of the present application. The application library file provided in an embodiment of the present application can be applied to any network device management system. The above-mentioned method for managing an application library can specifically include the following steps:

[0053] S201. The cloud server responds to a file acquisition instruction initiated by a user and searches a preset storage unit for an application library file corresponding to the first file identifier according to the first file identifier in the file acquisition instruction.

[0054] In this embodiment, when a user needs to configure a security policy for a network device, for example, when a user needs to configure a security policy on a network device that prohibits a terminal device with a certain network address from transmitting data packets to a server where application A is located, since the application library file used on the network device stores application information of at least one application supported and recognized by the network device, the user needs to first obtain the application library file used on the network device, and then configure the security policy according to the application library file. At this time, the user can send a file acquisition instruction to the cloud server through the network device management webpage on the terminal device to obtain the application library file used by the network device that needs to configure the security policy. Exemplarily, the network device management webpage may include a file acquisition button. When the user needs to obtain the application library file, the user can select the file acquisition button on the terminal device, and the terminal device can initiate a file acquisition instruction to the cloud server in response to the user's selection operation of the file acquisition button. The cloud server can respond to the file acquisition instruction initiated by the user, and query the application library file corresponding to the first file identifier from the preset storage unit according to the first file identifier in the file acquisition instruction. Among them, the storage unit can be a memory on the cloud server, or a database server preset by the R&D personnel.

[0055] In a possible implementation, if the cloud server determines that the storage unit contains the application library file corresponding to the first file identifier, the cloud server can obtain the application library file corresponding to the first file identifier from the storage unit. Then, the cloud server can send the application library file corresponding to the first file identifier to the terminal device that initiates the file acquisition instruction, so that the user can configure the security policy according to the application library file.

[0056] S202: If the cloud server determines that the storage unit does not contain the application library file corresponding to the first file identifier, the cloud server queries at least one target network device corresponding to the first file identifier based on a mapping relationship between the application library file and the device.

[0057] In this embodiment, if the cloud server determines that the storage unit does not contain the application library file corresponding to the first file identifier, the cloud server can query at least one target network device corresponding to the first file identifier based on the mapping relationship between the application library file and the device. The mapping relationship can record the second file identifier corresponding to the application library file used by each network device. The mapping relationship between the application library file and the device can be stored in a database preset by the R&D personnel, such as a Mysql database.

[0058] S203: The cloud server sends a file acquisition request including a first file identifier to the target network device according to a preset communication protocol.

[0059] In this embodiment, after determining the target network device, the cloud server can generate a file acquisition request according to the device identifier corresponding to the target network device and the first file identifier corresponding to the file acquisition instruction. Then, the cloud server can send the file acquisition request including the first file identifier to the target network device through the communication protocol between the cloud server and the target network device. Exemplarily, the communication protocol between the cloud server and the target network device can be a Secure Sockets Layer (SSL) protocol.

[0060] In one possible implementation, referring to Figure 3 , shows a schematic diagram of a specific method for a cloud server to obtain an application library file provided by an embodiment of the present application. Figure 3 As shown, when the cloud server determines that the storage unit does not contain the application library file corresponding to the first file identifier, the cloud server can query the mapping relationship between the application library file and the device based on the first file identifier, and use the network device corresponding to the second file identifier that is the same as the first file identifier in the mapping relationship as the target network device. Exemplarily, the cloud server can query at least one target network device from the database based on the first file identifier. Then, the cloud server can determine whether the number of the queried target network devices is greater than the number threshold preset by the R&D personnel. Exemplarily, the number threshold can be 1.

[0061] If the cloud server determines that the number of target network devices is equal to the number threshold, the cloud server can directly generate a file acquisition request based on the device identifier corresponding to the currently determined target network device, the first file identifier, and the communication protocol pre-set by the R&D personnel, and send the file acquisition request to the target network device. If the cloud server determines that the number of target network devices is less than the number threshold, the cloud server can generate an error prompt message and send the generated error prompt message to the terminal device that initiated the file acquisition instruction. Among them, the error prompt message generated by the cloud server can be used to indicate that the application library file corresponding to the first file identifier does not exist.

[0062] If the cloud server determines that the number of target network devices is greater than the number threshold, the cloud server obtains the write time of the second file identifier corresponding to each target network device into the database. Then, the cloud server can determine the request order corresponding to each network device according to the write time corresponding to each target network device. Exemplarily, the cloud server can sort each network device from the latest to the earliest according to the write time, and use the sorting result as the request order corresponding to each network device. After determining the request order corresponding to each network device, the cloud server can send a file acquisition request to each target network device in turn according to the communication protocol, the request order and the waiting time pre-set by the R&D personnel until receiving the application library file sent by any target network device based on the file acquisition request. Specifically, the cloud server can continue to receive the feedback information of the target network device currently sending the file acquisition request according to the waiting time after each file acquisition request is sent. If the cloud server does not receive the application library file fed back by the target network device within the waiting time, the cloud server can send a file acquisition request to the target network device of the next request order. If the cloud server receives the application library file fed back by the target network device within the waiting time, the cloud server can stop sending the file acquisition request to the target network device of the next request order.

[0063] In this embodiment, since the cloud server can send file acquisition requests to each target network device that uses the application library file corresponding to the first file identifier in turn, even if a target network device encounters problems such as network connection interruption, the cloud server can still obtain the application library file from other target network devices, thereby ensuring the stability of obtaining the application library file.

[0064] Exemplarily, the cloud server may first send a file acquisition request to the target network device of the first request order, and continue to receive information fed back by the target network device of the first request order according to the file acquisition request based on the waiting time. If the cloud server receives the application library file sent by the target network device of the first request order within the waiting time, the cloud server may determine that the application library file has been successfully acquired, and the cloud server may stop sending the file acquisition request. If the cloud server does not receive the application library file sent by the target network device of the first request order within the waiting time, or receives an error message sent by the target network device, the cloud server may send a file acquisition request to the target network device of the next request order, and the cloud server may send the file acquisition request to each target network device in turn according to the request order until the application library file fed back by any target network device is received.

[0065] In one possible implementation, see Figure 4, shows a schematic diagram of the structure of a cloud server provided in an embodiment of the present application. Figure 4 As shown, the cloud server may include a configuration module, a file management module, a message center module, a message processing module, a file import and export module, and an access module.

[0066] Specifically, the configuration module on the cloud server may include a configuration management submodule, an object management submodule, and a device management submodule. The configuration management submodule may be used to provide a configuration management interface for the web page, and update the security policy in the network device after going online according to the user's configuration operation. The configuration management submodule may also call the file management module in response to the file acquisition instruction initiated by the user, so as to query and obtain the application library file corresponding to the file acquisition instruction from the storage unit through the file management module. When the storage unit does not contain the application library file corresponding to the file acquisition instruction, the configuration management submodule may also send a file acquisition request to the file import and export module, so as to request the application library file from the network device through the file import and export module. The device management submodule may be used to perform operations such as updating, saving, and deleting on the device information of the network device after going online. Specifically, the device management submodule may write the device information in the online information into a preset database for storage. The device management submodule may also perform an update operation on the device information stored in the database according to the received update event, such as the application library update event. The object management submodule may update the mapping relationship between the application library file and the device in response to the application library update event sent by any network device.

[0067] The message center module on the cloud server can be used to receive various data packets sent by any network device, such as online information, application library update events, device information update events, network abnormal events, network device failure events, system service status change events, etc., and forward the received messages to the corresponding message processing module so that the message processing module can perform corresponding operations on the received data packets.

[0068] The message processing module on the cloud server may include at least an event distribution submodule and an online processing submodule. Among them, the event distribution submodule in the message processing module can be used to receive various events forwarded by the message center module, such as application library update events, device information update events, network abnormality events, network device failure events, system service status change events, etc. The event distribution submodule can also distribute the various events received to the corresponding processing functions or modules for further processing. For example, when the event distribution submodule in the message processing module receives the application library update event sent by the message center module, the event distribution submodule can distribute the received application library update event to the configuration module, so that the configuration module updates the mapping relationship between the application library file and the device according to the application library update event. After receiving the online information forwarded by the message center module, the online processing submodule in the message processing module can perform online operations on the received online information, for example, write the device information in the online information into the database pre-set by the R&D personnel and other operations.

[0069] The file import and export module on the cloud server can be used to send a file acquisition request to the network device through a communication protocol with the network device. Then, the cloud server can receive the application library file sent by the network device based on the file acquisition request through the file management module.

[0070] The access module on the cloud server can be used to provide multiple interfaces, for example, to provide a communication interface for the file import and export module, such as a Passthrough API, so that the file import and export module can access the communication protocol between the network device through the communication interface.

[0071] The file management module on the cloud server can be used to receive application library files sent by any network device based on a file acquisition request, and perform management operations such as storage, deletion, and query on the received application library files.

[0072] Through the method provided in this embodiment, since the cloud server may include multiple different modules, each module is used to perform a specific operation, the method provided in this embodiment can improve the maintainability, scalability and reusability of the cloud server.

[0073] S204: The network device receives a file acquisition request including a first file identifier sent by a cloud server according to a preset communication protocol.

[0074] In this embodiment, the network device may receive a file acquisition request including a first file identifier sent by the cloud server according to a communication protocol with the cloud server. After receiving the file acquisition request, the network device may determine whether the first file identifier in the currently received file acquisition request matches the second file identifier of the locally used application library file. Among them, after the network device updates the application library file for a certain time, the application library event sent by the network device to the cloud server may fail due to reasons such as network connection interruption. At this time, the second file identifier corresponding to the network device in the mapping relationship stored in the cloud device may be inconsistent with the actual second file identifier used by the network device. If the network device determines that the first file identifier does not match the second file identifier of the locally used application library file, the network device may not send the application library file to the cloud server, and return an error message to the cloud server, so that the cloud server sends a file acquisition request to other network devices.

[0075] In one possible implementation, when the network device determines that the first file identifier does not match the second file identifier of the application library file used locally, the network device may also send an application library update event to the cloud server to update the second file identifier corresponding to the network device in the mapping relationship stored on the cloud server.

[0076] S205: If the network device determines that the first file identifier matches the second file identifier of the locally used application library file, the network device sends the application library file to the cloud server according to the communication protocol.

[0077] In this embodiment, if the network device determines that the first file identifier matches the second file identifier of the locally used application library file, the network device can send the application library file to the cloud server according to the communication protocol preset by the R&D personnel.

[0078] S206: The cloud server receives the application library file uploaded by the target network device based on the file acquisition request.

[0079] In this embodiment, the cloud server can receive the application library file uploaded by the target network device based on the file acquisition request. The cloud server can send the received application library file to the terminal device used by the user, so that the user can configure the security policy according to the application library file.

[0080] Through the method provided in this embodiment, the cloud server will only obtain an application library file from a network device when a user needs the application library file, and will not save all the application library files used by all network devices to the cloud server in advance. Therefore, the method provided in this embodiment can reduce the memory pressure of the cloud server and reduce disk space consumption. Since the prior art will save the application library files used by all network devices to the cloud server in advance, if the user has not used a certain application library file, the application library file is a useless file, but because it is stored in the cloud server, the cloud server also needs to consume resources to manage the useless application library file. It can be seen that the method provided in this embodiment can also avoid the cloud server from managing useless files, thereby improving the management resource utilization of the cloud server.

[0081] In a possible implementation, after receiving the application library file sent by the target network device, the cloud server can also write the received application library file and the file identifier corresponding to the application library file into the storage unit for storage. The cloud server can also periodically obtain the third file identifiers corresponding to each stored library file stored in the storage unit according to the data clearing cycle pre-set by the R&D personnel. Among them, the stored library file can be any application library file after the cloud server writes the storage unit. For any third file identifier in the storage unit, the cloud server can determine whether the mapping relationship between the application library file and the device contains the third file identifier. If the cloud server determines that the mapping relationship between the application library file and the device does not contain the third file identifier, the cloud server can delete the stored library file corresponding to the third file identifier in the storage unit. If the cloud server determines that the mapping relationship between the application library file and the device contains the third file identifier, the cloud server can retain the stored library file corresponding to the third file identifier in the storage unit.

[0082] For example, when a certain network device is online, the second file identifier corresponding to the application library file it uses is A1. When the user needs to configure a security policy for the network device, the cloud server can obtain the application library file with the second file identifier A1 from the network device, and write the application library file with the second file identifier A1 into the storage unit for storage. Later, the application library file used by the network device was updated, and the cloud database changed the second file identifier corresponding to the network device in the mapping relationship to A2 based on the received application library update event. When the cloud server performs a data clearing operation at a scheduled time, the cloud server finds that there is a stored library file with the third file identifier A1 in the storage unit, but finds that there is no network device with the second file identifier A1 corresponding to the used application library file in the mapping relationship between the application library file and the device. Therefore, the stored library file with the third file identifier A1 has expired, and the cloud server can delete the stored library file from the storage unit.

[0083] Through the method provided in this embodiment, after the cloud server pulls the application library file from a certain network device, the application library file can be written into the storage unit. When the subsequent user needs the application library file, the cloud can directly obtain the application library file from the storage unit without repeated uploading, so the method provided in this embodiment can reduce the consumption of transmission resources. In addition, the cloud server can regularly clean up useless application library files in the storage unit to free up disk space. Therefore, the method provided in this embodiment can reduce useless files in the storage unit and improve the utilization rate of storage space.

[0084] Figure 5 FIG. 2 shows a flowchart of another method for managing application library files provided in the second embodiment of the present application. Figure 5 , compared to Figure 1 In the embodiment, the management method of an application library file provided in the embodiment includes before S201: S501 to S504, which are described in detail as follows:

[0085] S501: The network device generates a second file identifier corresponding to the application library file based on the number of application program identifiers included in the application library file and summary information corresponding to the application library file.

[0086] In this embodiment, an application control feature library (Application Control Gateway, ACG) may be configured in a network device with a firewall function. Specifically, the application control feature library may be a database that stores multiple applications and feature information corresponding to each application. For any data packet flowing through the network device, the network device may identify and classify the application to which the data packet belongs based on the application control feature library. After the network device responds to a startup instruction initiated by the user and executes the initialization startup operation pre-set by the R&D personnel, it may generate an application library file based on the application control feature library used. Among them, the application library file generated by the network device may include application information corresponding to multiple applications that the network device supports and identifies.

[0087] Specifically, the application library file may include an application supported for a certain network device, and the application library file may include an application identifier, application name, subclass name, subclass identifier, and major category identifier, etc. corresponding to the application. Exemplarily, the program information of application A in the application library file may include application identifier 1001, subclass IM, and major category social entertainment. Exemplarily, the file format of the application library file generated by the network device may be any text file format, such as CSV format (Comma-Separated Values).

[0088] Among them, using CSV format as the file format of the application library file has the following benefits. (1) Simplicity: The structure of the CSV format is very simple. Each row represents a record, each column represents a field, and different fields are separated by commas (or other delimiters). This simplicity makes CSV format files easy for the human eye to read and write. (2) High versatility: CSV format files are supported by most databases, spreadsheet applications (such as Microsoft Excel, Google Sheets), and data analysis tools. Therefore, using CSV format files can easily exchange data between multiple systems. Therefore, it has extremely strong versatility. (3) Compatibility and persistence (4) Storage efficiency: Compared with files in other formats, CSV format files usually take up less disk space because they do not contain additional key names and brackets in JSON. Therefore, using CSV format can improve the storage efficiency of application library files.

[0089] After generating the application library file, the network device may also generate a second file identifier corresponding to the application library file according to the number of application program identifiers contained in the application library file and the summary information corresponding to the application library file. The structure of the second file identifier corresponding to a certain application library file may be: "number of application programs_first 16 bits of the summary information of the application library file".

[0090] In a possible implementation, when generating the second identifier, the network device may input all application program identifiers contained in the application library file into a preset information digest algorithm to generate summary information corresponding to the application library file through the information digest algorithm. The same information digest algorithm may be configured in each network device. Exemplarily, the information digest algorithm configured in the network device may be a cryptographic hash function (Message-Digest Algorithm 5, MD5). For example, when an application library file contains 6480 applications, and the first 16 bits of the summary information calculated by the cryptographic hash function of the application library file are 98e3306c3ad45410, the second file identifier corresponding to the application library file may be 6480_98e3306c3ad45410.

[0091] In this embodiment, since the summary information corresponding to the application library file is generated based on all application program identifiers and information summary algorithms contained in the application library file, and the information summary algorithms equipped on different network devices are the same, the method provided in this embodiment can ensure that the second file identifiers generated by application library files containing the same application program information in different network devices are the same, that is, the information in the application library file corresponding to the same second file identifier is completely consistent, thereby ensuring the consistency of the file identifier and the application library file.

[0092] S502: The network device generates online information based on the second file identifier in response to the online instruction initiated by the user, and sends the online information to the cloud server.

[0093] In this embodiment, when the user needs to upload the device information corresponding to the network device to the cloud server, the user can initiate an online instruction to the network device. Specifically, the user can enter the device identification and device password corresponding to the network device on which the online operation needs to be performed on the network device management webpage of the terminal device. The cloud server can establish a communication link with the network device corresponding to the device identification and device password based on the device identification and device password entered by the user, and initiate an online instruction to the network device through the communication link. The network device can respond to the online instruction initiated by the user, generate online information based on the second file identification and the device information corresponding to the network device, and send the online information to the cloud server according to the preset communication protocol. Among them, the device information may include but is not limited to the device identification corresponding to the network device, the device model, the device type, the software version of the application used by the network device, the hardware version and other information.

[0094] In a possible implementation, when a user needs to update the application control feature library on a network device, the user can click the update control on the management page of the network device and upload an update program for performing the update operation, so that the network device updates the application control feature library according to the update program. After updating the application control feature library, the network device can also generate a new application library file based on the updated application control feature library, and generate a second file identifier corresponding to the new application library file. Among them, the specific method of the second file identifier corresponding to the new application library file of the network device can refer to the relevant content of this embodiment, which will not be repeated here. Then, the network device can send an application library update event to the cloud server based on the newly generated second file identifier and the device identifier corresponding to the network device to update the mapping relationship stored in the cloud server. After receiving the application library update event sent by any network device, the cloud server can update the mapping relationship stored in the database according to the device identifier and the second file identifier in the application library update event.

[0095] Through the method provided in this embodiment, after the application control feature library in the network device is updated, the network device can send an application library update event to the cloud device to update the mapping relationship in the cloud server. Therefore, the method provided in this embodiment can improve the accuracy of the mapping relationship stored in the cloud server.

[0096] S503: The cloud server receives online information sent by any network device, and writes the device identifier in the online information and the second file identifier corresponding to the device identifier into the mapping relationship between the application library file and the device.

[0097] In this embodiment, the cloud server can receive the online information sent by each network device through the message center module. The cloud server can write the device identifier in the online information and the second file identifier corresponding to the device identifier into the mapping relationship between the application library file and the device. The cloud server can also write the device information contained in the online information into the database for storage, so as to facilitate the user to manage the network device through the cloud server.

[0098] In this embodiment, when the network device performs online operations and updates the application control feature library, it only needs to send the second file identifier corresponding to the application library file to the cloud server, and there is no need to send the application library file to the cloud server. Therefore, the method provided in this embodiment can greatly reduce the consumption of cloud server system resources.

[0099] It should be noted that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0100] Reference Figure 6 , shows a management device for application library files provided in an embodiment of the present application, which is applied to a cloud server and may specifically include a configuration module 601, a file import and export module 602 and a file management module 603, wherein:

[0101] Configuration module 601, for responding to a file acquisition instruction initiated by a user, querying an application library file corresponding to the first file identifier from a preset storage unit according to the first file identifier in the file acquisition instruction; if the storage unit does not contain the application library file corresponding to the first file identifier, querying at least one target network device corresponding to the first file identifier based on a mapping relationship between application library files and devices; the mapping relationship records the second file identifier corresponding to the application library file used by each network device;

[0102] A file import and export module 602, configured to send a file acquisition request including the first file identifier to the target network device according to a preset communication protocol;

[0103] The file management module 603 is used to receive the application library file uploaded by the target network device based on the file acquisition request.

[0104] The configuration module can also be used to obtain the write time of the second file identifier corresponding to each of the target network devices if the number of the target network devices is greater than a preset number threshold; determine the request order corresponding to each of the target network devices based on the write time; and send the file acquisition request to each of the target network devices in turn according to the communication protocol and the request order until an application library file sent by any of the target network devices based on the file acquisition request is received.

[0105] The file management module can also be used to obtain the third file identifiers corresponding to each stored library file stored in the storage unit based on a preset data clearing cycle; for any third file identifier in the storage unit, if the mapping relationship between the application library file and the device does not contain any third file identifier, the stored library file corresponding to any third file identifier in the storage unit is deleted.

[0106] The configuration module can also be used to receive online information sent by any network device; write the device identifier in the online information and the second file identifier corresponding to the device identifier into the mapping relationship between the application library file and the device.

[0107] Reference Figure 7 , shows a management device for application library files provided in an embodiment of the present application, which is applied to a network device and may specifically include a receiving module 701 and a file import and export module 702, wherein:

[0108] The receiving module 701 is used to receive a file acquisition request including a first file identifier sent by the cloud server through a communication protocol with the cloud server; the first file identifier is determined by the cloud server according to a file acquisition instruction initiated by a user; the file acquisition request is generated by the cloud server according to a mapping relationship between the application library file and the device when the storage unit of the cloud server does not contain an application library file corresponding to the first file identifier;

[0109] The file import and export module 702 is used to send the application library file to the cloud server through the communication protocol if the first file identifier matches the second file identifier of the application library file used locally.

[0110] The file import and export module can also be used to generate a second file identifier corresponding to the application library file based on the number of application identifiers contained in the application library file and the summary information corresponding to the application library file; generate online information based on the second file identifier, and send the online information to the cloud server.

[0111] The file import and export module can also be used to respond to the online instruction initiated by the user, input all application identifiers contained in the application library file into the preset information summary algorithm to generate the summary information; the same information summary algorithm is configured in each of the network devices.

[0112] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment part.

[0113] Reference Figure 8 , shows a schematic diagram of an electronic device provided by an embodiment of the present application. Figure 8 As shown, the electronic device 800 in the embodiment of the present application includes: a processor 810, a memory 820, and a computer program 821 stored in the memory 820 and executable on the processor 810. When the processor 810 executes the computer program 821, the steps in each embodiment of the above-mentioned application library file management method are implemented, such as Figure 2 S201 to S202 and S206 shown, and Figure 2 Alternatively, when the processor 810 executes the computer program 821, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 6 The functions of modules 601 to 602 are shown in FIG. Figure 7 Functions of modules 701 to 702 are shown.

[0114] Exemplarily, the computer program 821 may be divided into one or more modules / units, which are stored in the memory 820 and executed by the processor 810 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which may be used to describe the execution process of the computer program 821 in the electronic device 800. For example, the computer program 821 may be divided into a configuration module, a file import and export module, and a file management module, and the specific functions of each module are as follows:

[0115] a configuration module, configured to respond to a file acquisition instruction initiated by a user, query an application library file corresponding to the first file identifier from a preset storage unit according to the first file identifier in the file acquisition instruction; if the storage unit does not contain the application library file corresponding to the first file identifier, query at least one target network device corresponding to the first file identifier based on a mapping relationship between application library files and devices; the mapping relationship records a second file identifier corresponding to the application library file used by each network device;

[0116] A file import and export module, used for sending a file acquisition request including the first file identifier to the target network device according to a preset communication protocol;

[0117] The file management module is used to receive the application library file uploaded by the target network device based on the file acquisition request.

[0118] The electronic device 800 may be a cloud server or a network device in the above-mentioned embodiments. The electronic device 800 may include, but is not limited to, a processor 810 and a memory 820. Those skilled in the art will appreciate that Figure 8 It is only an example of the electronic device 800 and does not constitute a limitation of the electronic device 800. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 800 may also include input and output devices, network access devices, buses, etc.

[0119] The processor 810 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0120] The memory 820 may be an internal storage unit of the electronic device 800, such as a hard disk or memory of the electronic device 800. The memory 820 may also be an external storage device of the electronic device 800, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 800. Further, the memory 820 may also include both an internal storage unit of the electronic device 800 and an external storage device. The memory 820 is used to store the computer program 821 and other programs and data required by the electronic device 800. The memory 820 may also be used to temporarily store data that has been output or is to be output.

[0121] An embodiment of the present application also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for managing application library files as described in the aforementioned embodiments is implemented.

[0122] The embodiment of the present application further discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the management method of the application library file as described in the above-mentioned embodiments is implemented.

[0123] The embodiment of the present application further discloses a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the application library file management method described in the above-mentioned embodiments.

[0124] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above-mentioned embodiments, a person skilled in the art should understand that the technical solutions described in the above-mentioned embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method for managing application library files, characterized in that: Applied to cloud servers, including: In response to a file acquisition instruction initiated by a user, querying an application library file corresponding to the first file identifier from a preset storage unit according to the first file identifier in the file acquisition instruction; If the storage unit does not contain the application library file corresponding to the first file identifier, querying at least one target network device corresponding to the first file identifier based on the mapping relationship between the application library file and the device; the mapping relationship records the second file identifier corresponding to the application library file used by each network device; According to a preset communication protocol, sending a file acquisition request including the first file identifier to the target network device; Receive the application library file uploaded by the target network device based on the file acquisition request.

2. The method according to claim 1, characterized in that The sending, according to a preset communication protocol, a file acquisition request including the first file identifier to the target network device comprises: If the number of the target network devices is greater than a preset number threshold, obtaining the writing time of the second file identifier corresponding to each of the target network devices; Based on the write time, determining a request order corresponding to each of the target network devices; According to the communication protocol and the request order, the file acquisition request is sent to each of the target network devices in sequence until an application library file sent by any of the target network devices based on the file acquisition request is received.

3. The method according to claim 1, characterized in that After receiving the application library file uploaded by the target network device based on the file acquisition request, the method includes: Based on a preset data clearing cycle, obtaining third file identifiers corresponding to respective stored library files stored in the storage unit; For any third file identifier in the storage unit, if the mapping relationship between the application library file and the device does not include any third file identifier, the stored library file corresponding to any third file identifier in the storage unit is deleted.

4. The method according to claim 1, characterized in that: Before querying at least one target network device corresponding to the first file identifier based on a mapping relationship between an application library file and a device if the storage unit does not include the application library file corresponding to the first file identifier, the method includes: Receive online information sent by any network device; The device identifier in the online information and the second file identifier corresponding to the device identifier are written into the mapping relationship between the application library file and the device.

5. A method for managing application library files, characterized in that: Applied to network equipment, including: According to a preset communication protocol, receiving a file acquisition request including a first file identifier sent by a cloud server; the first file identifier is determined by the cloud server according to a file acquisition instruction initiated by a user; the file acquisition request is generated by the cloud server according to a mapping relationship between an application library file and a device when a storage unit of the cloud server does not contain an application library file corresponding to the first file identifier; If the first file identifier matches the second file identifier of the locally used application library file, the application library file is sent to the cloud server according to the communication protocol.

6. The method according to claim 5, characterized in that Before receiving the file acquisition request including the first file identifier sent by the cloud server according to the preset communication protocol, the method includes: Generate a second file identifier corresponding to the application library file based on the number of application program identifiers included in the application library file and summary information corresponding to the application library file; In response to an online instruction initiated by a user, online information is generated based on the second file identifier, and the online information is sent to the cloud server.

7. The method according to claim 6, characterized in that Before generating, in response to the online instruction initiated by the user, a second file identifier corresponding to the application library file based on the number of application program identifiers included in the application library file and the summary information corresponding to the application library file, the method includes: The summary information is generated based on all application program identifiers contained in the application library file.

8. A cloud server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for managing the application library file according to any one of claims 1 to 4 is implemented.

9. A network device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for managing the application library file according to any one of claims 5 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for managing application library files according to any one of claims 1 to 4 or claims 5 to 7 is implemented.