A network model fine-tuning method, system and device adaptive to a community scenario

By preprocessing the smart community network model and constructing a fine-tuning auxiliary model, combined with a learning rate fine-tuning algorithm, the freezing and transfer fine-tuning of model parameters are optimized, solving the problem of long training cycles when the community scenario changes and improving fine-tuning efficiency.

CN117273165BActive Publication Date: 2026-03-03SHENZHEN JIEYI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311214817.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2026-03-03
Estimated Expiration
2043-09-19

AI Technical Summary

Technical Problem

When the community scenario changes, the network model of a smart community has a long training cycle, low fine-tuning efficiency, and difficulty in quickly adapting to scenario changes or additions.

Method used

By preprocessing the original community scenario network model, filtering model parameters, constructing a fine-tuning auxiliary model, and using encoders and decoders to extract and restore feature information, combined with learning rate fine-tuning algorithms, the freezing and transfer fine-tuning of model parameters are optimized.

Benefits of technology

This significantly shortens the model training cycle when the community scene changes, improves the fine-tuning efficiency of the network model, and enables rapid adaptation to changes in the community scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117273165B_ABST
    Figure CN117273165B_ABST
Patent Text Reader

Abstract

The application discloses a network model fine-tuning method, system and device suitable for a community scene, and the method comprises the following steps: performing model preprocessing on an original community scene network model to obtain a preprocessed scene network model, screening model parameters from the corresponding preprocessed scene network model based on an obtained scene fine-tuning request to obtain a fine-tuning original data set; constructing a fine-tuning auxiliary model according to the fine-tuning original data set and an obtained fine-tuning incremental data set and connecting the fine-tuning auxiliary model to the original community scene network model; inputting obtained scene information parameters into the original community scene network model and the fine-tuning auxiliary model for training; when the original community scene network model and the fine-tuning auxiliary model converge after training, fine-tuning the original community scene network model based on fine-tuning auxiliary parameters of the fine-tuning auxiliary model to obtain a fine-tuned scene network model; and the application has the effects of shortening the model training period of the network model of the community scene and improving the fine-tuning efficiency of the network model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart community technology, and in particular to methods, systems and devices for fine-tuning network models to adapt to community scenarios. Background Technology

[0002] A smart community refers to a new community management model that fully utilizes the integrated application of next-generation information technologies such as the Internet of Things, cloud computing, and mobile internet, forming a new model of community management based on information-based and intelligent social management and services.

[0003] Due to the variability and complexity of community scenarios, the network models for integrated smart community applications often have large datasets. When the community scenario changes significantly or new community scenario types are added due to residents' living needs, the data is usually increased incrementally and iteratively. The composition of the network model training set also needs to be adjusted accordingly to obtain a more suitable model.

[0004] When training models on large-scale datasets, the learning and training of network models requires a significant amount of time for parameter tuning and testing, resulting in a long cycle from data collection to training completion. Furthermore, when community scenarios change or new community scenarios are added, the training time for large-scale dataset models is also relatively long due to the complexity and diversity of these scenarios, leading to low efficiency in fine-tuning the network models. There is room for improvement. Summary of the Invention

[0005] In order to shorten the model training cycle required for network models in community scenarios when the community scenario changes, and to improve the fine-tuning efficiency of network models, this application provides a method, system, and device for fine-tuning network models adapted to community scenarios.

[0006] The first objective of this invention is achieved by the following technical solution:

[0007] A method for fine-tuning a network model to adapt to community scenarios includes:

[0008] The original community scene network model is preprocessed to obtain a preprocessed scene network model.

[0009] Based on the obtained scene fine-tuning request, model parameters are filtered from the corresponding preprocessed scene network model to obtain the fine-tuning original dataset;

[0010] A fine-tuning auxiliary model is constructed based on the original fine-tuning dataset and the obtained fine-tuning incremental dataset; and the fine-tuning auxiliary model is then integrated into the original community scenario network model.

[0011] The acquired scene information parameters are input into the original community scene network model and the fine-tuned auxiliary model for training; when the original community scene network model and the fine-tuned auxiliary model converge, the original community scene network model is fine-tuned based on the fine-tuning auxiliary parameters of the fine-tuned auxiliary model to obtain the fine-tuned scene network model.

[0012] By adopting the above technical solution, when the community scene changes, the original community scene network model is first preprocessed to obtain a preprocessed scene network model. Based on the scene fine-tuning request issued by the user, the model parameters of the corresponding preprocessed scene network model are filtered to obtain the fine-tuning original dataset. In the fine-tuning original dataset, the model parameters of the original network model related to the changed community scene in the original dataset are extracted for features. Based on the obtained scene information parameters, it is decided whether to freeze or migrate the model parameters for fine-tuning. For example, shallow model parameters such as the shape of community buildings, community area, and road planning in some community scenes that have not changed are directly frozen. Model parameters such as the shape of areas and living facilities in the scene that are directly affected by the change are migrated and fine-tuned. In this way, the model parameters in the original scene network model can be iteratively fine-tuned and optimized in a targeted manner, which greatly shortens the model training cycle required for the community scene network model when the community scene changes and improves the fine-tuning efficiency of the network model.

[0013] In a preferred embodiment of this application: the original community scene network model includes community scene images; the preprocessing of the original community scene network model to obtain a preprocessed scene network model specifically includes:

[0014] Select and identify community scene images in the original community scene network model, and extract the feature mapping information generated during the identification process; based on the preset image selection precision, convert the feature mapping information into a fixed number of model fixed points;

[0015] When the fixed-point number of the model exceeds the preset fixed-point number expression range, all network parameter layers in the original community scene network model are uniformly quantized according to the rule of quantization bit number to obtain a preprocessed scene network model.

[0016] or,

[0017] When the fixed-point number of the model does not exceed the preset fixed-point number expression range, the maximum number of quantization bits for each network parameter layer in the original community scene network model is determined by irregular quantization to obtain the preprocessed scene network model.

[0018] By adopting the above technical solution, high-precision community scene images are selected from the original community scene network model, and feature mapping information generated during the recognition process is extracted. Then, the feature mapping information in the original community scene network model is converted into a fixed-bit model fixed-point number. At this time, there are two situations: one is that the converted fixed-bit model fixed-point number exceeds the range of fixed-point number expression. In this case, regular quantization is required to uniformly quantize the number of fixed-point numbers for each network layer in the original community scene network model. The other is that the converted fixed-bit model fixed-point number does not exceed the range of fixed-point number expression. In this case, irregular quantization can be used to quantize each network layer in the original community scene network model. That is, the maximum number of fixed-point numbers satisfied in each layer of the network model is determined by irregular inter-layer quantization. This saves the storage space of the preprocessed scene network model. Optimizing the original community scene network model by quantization is beneficial for freezing and using shallow model parameters in the subsequent network model fine-tuning process.

[0019] In a preferred embodiment of this application: S2 filters model parameters from the corresponding preprocessed scene network model based on the acquired scene fine-tuning request to obtain the original dataset for fine-tuning, specifically including:

[0020] The fine-tuning scenarios and ranges of the scene network model are determined based on the acquired scene fine-tuning requests.

[0021] Based on the fine-tuning scenario and fine-tuning range of the scenario model, model parameters are selected from the corresponding preprocessed scenario network model to obtain the fine-tuned original dataset.

[0022] By adopting the above technical solution, the fine-tuning scenarios and the scope of fine-tuning scenarios in the entire community scenario are determined based on the content of the obtained scenario fine-tuning request. In the entire preprocessed scenario network model, the scope of scenarios that need fine-tuning and the scope of scenarios that do not need fine-tuning are determined. For the model parameters of the scope of scenarios that do not need fine-tuning, the original model parameters of the model to be used are determined from the preprocessed scenario network model and used as frozen model parameter training data during model fine-tuning training; that is, the frozen original model parameters are divided into the original fine-tuning dataset to serve as the original model parameters before model fine-tuning training.

[0023] In a preferred embodiment, this application involves constructing a fine-tuning auxiliary model based on the original fine-tuning dataset and the obtained fine-tuning incremental dataset; and then integrating the fine-tuning auxiliary model into the existing community scenario network model. The fine-tuning auxiliary model includes an encoder and a decoder, specifically comprising:

[0024] The encoder is used to extract scene feature information from the fine-tuned original dataset and the fine-tuned incremental dataset; the decoder is used to reconstruct the target scene information from the scene feature information;

[0025] Based on the obtained scene fine-tuning request, the scene feature information of the encoder of the fine-tuning auxiliary model is added to the corresponding model position in the original community scene network model;

[0026] Based on the obtained scene fine-tuning request, the target scene information of the decoder of the fine-tuning auxiliary model is added to the corresponding model position in the original community scene network model.

[0027] By adopting the above technical solution, users can manually input or automatically construct incremental datasets through the data acquisition module; the encoder is used to extract scene feature information from the fine-tuning original dataset and the fine-tuning incremental dataset and add the scene feature information to the corresponding model position in the original community scene network model; the decoder is used to restore the target scene information from the scene feature information within the range of the scene model to be fine-tuned according to the obtained scene fine-tuning request and add it to the corresponding model position in the original community scene network model, thereby changing the model fine-tuning result in the original community scene network model and realizing the distribution adjustment of the fine-tuning result of the fine-tuning auxiliary model on the original community scene network model.

[0028] In a preferred example, this application includes the following steps after inputting the acquired scene information parameters into the original community scene network model and the fine-tuned auxiliary model for training:

[0029] The preset learning rate fine-tuning algorithm determines the learning rate range for the i-th iteration, where i is not less than 1;

[0030] The learning rate of the original community scenario network model is adjusted according to the preset learning rate fine-tuning algorithm at different iteration cycles and / or different model levels.

[0031] By adopting the above technical solution, in the fine-tuning training of the community scene network model, the learning rate of the original community scene network model is adjusted according to the preset learning rate fine-tuning algorithm at different iteration cycles and different network model levels. For example, for shallow features of community scenes that have not changed in multiple community scenes, and ignoring the differences between shallow and deep features, the learning rate fine-tuning algorithm can use a smaller learning rate and ignore the differences between shallow and deep features. However, for community scenes that have changed, the differences in deep features are larger during model fine-tuning, requiring a larger learning rate and a wider learning range. By adjusting the learning rate of the original community scene network model at different iteration cycles and different levels according to the preset learning rate fine-tuning algorithm, the original community scene network model can converge quickly, which is beneficial for completing rapid iterative training of changed or added model parameters.

[0032] The second objective of this application is achieved by the following technical solution:

[0033] A network model fine-tuning system adapted to community scenarios includes:

[0034] The preprocessing module is used to preprocess the original community scene network model to obtain a preprocessed scene network model; the parameter filtering module is used to filter model parameters from the corresponding preprocessed scene network model based on the obtained scene fine-tuning request to obtain the fine-tuning original dataset.

[0035] An access module is constructed to build a fine-tuning auxiliary model based on the original fine-tuning dataset and the obtained fine-tuning incremental dataset; and to connect the fine-tuning auxiliary model to the original community scenario network model.

[0036] The training and fine-tuning module is used to input the acquired scene information parameters into the original community scene network model and the fine-tuning auxiliary model for training; when the original community scene network model and the fine-tuning auxiliary model converge, the original community scene network model is fine-tuned based on the fine-tuning auxiliary parameters of the fine-tuning auxiliary model to obtain the fine-tuned scene network model.

[0037] By adopting the above technical solution, the model parameters in the original network model related to the changed community scene in the original dataset are extracted for feature adjustment. Based on the acquired scene information parameters, it is decided to freeze or migrate the model parameters for fine-tuning. For example, shallow model parameters such as the shape of community buildings, community area, and road planning in some community scenes that have not changed are directly frozen, while model parameters such as the shape of areas and living facilities in community scenes that have directly changed are migrated and fine-tuned. This allows for targeted iterative fine-tuning and optimization of the model parameters in the original scene network model, greatly shortening the model training cycle required for the network model when the community scene changes, and improving the fine-tuning efficiency of the network model.

[0038] In a preferred embodiment of this application, the preprocessing module includes:

[0039] The image information extraction submodule is used to select and recognize community scene images in the original community scene network model, and extract the feature mapping information generated during recognition.

[0040] The information conversion submodule is used to convert the feature mapping information into a fixed-bit model fixed-point number based on a preset image selection precision.

[0041] The rule quantization submodule is used to perform rule quantization of all network parameter layers in the original community scene network model with a unified quantization bit when the fixed number of fixed points in the model exceeds the preset fixed number of fixed points to obtain a preprocessed scene network model.

[0042] The irregular quantization submodule is used to determine the maximum number of quantization bits for each network parameter layer in the original community scene network model through irregular quantization when the fixed-bit model fixed-point number does not exceed the preset fixed-point number expression range, so as to obtain a preprocessed scene network model.

[0043] By adopting the above technical solutions, if the number of fixed-point bits in the converted fixed-bit model exceeds the range of fixed-point representation, then regular quantization is required to uniformly quantize the number of fixed-point bits in each network layer of the original community scene network model. Alternatively, if the number of fixed-point bits in the converted fixed-bit model does not exceed the range of fixed-point representation, then irregular quantization can be used to quantize each network layer of the original community scene network model. That is, the maximum number of fixed-point bits in each layer of the network model is determined through irregular inter-layer quantization, so as to save the storage space of the preprocessed scene network model. Optimizing the original community scene network model by quantization is beneficial for freezing and using shallow model parameters in the subsequent network model fine-tuning process.

[0044] In a preferred embodiment of this application, the filtering parameter module includes:

[0045] The scene range determination submodule is used to determine the fine-tuning scene and fine-tuning range of the scene network model based on the acquired scene fine-tuning request;

[0046] The filtering submodule is used to filter model parameters from the corresponding preprocessed scene network model to obtain the fine-tuned original dataset based on the fine-tuning scene and fine-tuning range of the scene model.

[0047] By adopting the above technical solution, based on the content of the acquired scene fine-tuning request, the corresponding fine-tuning scene and the scope of the fine-tuning scene are determined in the entire community scene. Within the entire pre-processed scene network model, the scope of scenes requiring fine-tuning and the scope of scenes not requiring fine-tuning are determined. For the model parameters in the scope of scenes not requiring fine-tuning, the original model parameters of that model are selected from the pre-processed scene network model and used as frozen model parameter training data during model fine-tuning training. In other words, the frozen original model parameters are allocated to the original fine-tuning dataset to serve as the original model parameters before model fine-tuning training.

[0048] The third objective of this invention is achieved by the following technical solution:

[0049] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for fine-tuning a network model adapted to a community scenario.

[0050] The fourth objective of this invention is achieved by the following technical solution:

[0051] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method for fine-tuning a network model adapted to a community scenario.

[0052] In summary, this application includes at least one of the following beneficial technical effects:

[0053] 1. When the community scene changes, the original community scene network model is first preprocessed to obtain a preprocessed scene network model. Based on the scene fine-tuning request issued by the user, the model parameters of the corresponding preprocessed scene network model are filtered to obtain the fine-tuning original dataset. In the fine-tuning original dataset, the model parameters of the original network model related to the changed community scene in the original dataset are extracted for features. Based on the obtained scene information parameters, it is decided whether to freeze the model parameters or perform model parameter migration fine-tuning. For example, shallow model parameters such as the shape of community buildings, community area, and road planning in some community scenes that have not changed are directly frozen. Model parameters such as the shape of areas and living facilities in the scene that are directly involved in the change are migrated and fine-tuned. In this way, the model parameters in the original scene network model can be iteratively fine-tuned and optimized in a targeted manner, which greatly shortens the model training cycle required for the community scene network model when the community scene changes and improves the fine-tuning efficiency of the network model.

[0054] 2. Fine-tuning the original dataset involves extracting features from the original network model parameters related to the changed community scene in the original dataset. Based on the acquired scene information parameters, it is decided whether to freeze or migrate and fine-tune the model parameters. For example, shallow model parameters such as the shape of community buildings, community area, and road planning in some unchanged community scenes are directly frozen, while model parameters such as the shape of areas and living facilities in community scenes that are directly affected by changes are migrated and fine-tuned. This allows for targeted iterative fine-tuning and optimization of the model parameters in the original scene network model, greatly shortening the model training cycle required for the network model when the community scene changes, and improving the fine-tuning efficiency of the network model.

[0055] 3. Select high-precision community scene images from the existing community scene network model and extract the feature mapping information generated during the recognition process. Then, convert the feature mapping information in the existing community scene network model into a fixed-bit model fixed-point number. There are two scenarios: one is that the converted fixed-bit model fixed-point number exceeds the range of fixed-point numbers, in which case regular quantization is required to uniformly quantize the number of fixed-point bits for each network layer in the existing community scene network model; the other is that the converted fixed-bit model fixed-point number does not exceed the range of fixed-point numbers, in which case irregular quantization can be used to quantize each network layer in the existing community scene network model, that is, to determine the maximum number of fixed-point bits in each network layer through irregular inter-layer quantization, so as to save the storage space of the preprocessed scene network model. Optimizing the existing community scene network model by quantization is beneficial for freezing and using shallow model parameters during subsequent network model fine-tuning. Attached Figure Description

[0056] Figure 1 This is a flowchart of a network model fine-tuning method adapted to a community scenario in one embodiment of this application;

[0057] Figure 2 This is a flowchart of step S1 in a network model fine-tuning method adapted to a community scenario according to an embodiment of this application;

[0058] Figure 3 This is a flowchart of step S2 in a network model fine-tuning method adapted to a community scenario according to an embodiment of this application;

[0059] Figure 4 This is a flowchart of step S3 in a network model fine-tuning method adapted to a community scenario according to an embodiment of this application;

[0060] Figure 5 This is a flowchart following step S4 in a network model fine-tuning method adapted to a community scenario according to an embodiment of this application;

[0061] Figure 6 This is a principle block diagram of a network model fine-tuning system adapted to a community scenario according to one embodiment of this application;

[0062] Figure 7 This is a schematic diagram of a device according to one embodiment of this application. Detailed Implementation

[0063] The present application will be further described in detail below with reference to the accompanying drawings.

[0064] In one embodiment, such as Figure 1As shown, this application discloses a method for fine-tuning a network model to adapt to community scenarios, which specifically includes the following steps:

[0065] S1: The original community scene network model is preprocessed to obtain a preprocessed scene network model.

[0066] In this embodiment, a model fine-tuning control platform is set up to store and control the community scene network model. The model fine-tuning control platform is an intelligent interactive terminal with a processor equipped with network model training and calculation functions. The original community scene network model is subjected to forward testing and the feature mapping in the original community scene network model is extracted and identified, such as rule-based fixed-point quantization of the original community scene network model based on binary methods.

[0067] Specifically, the features of each model parameter layer in the original community scene network model are mapped to a volume using fixed-point values, and the fixed-point values ​​are saved in an indexed manner. Users can input the quantized model accuracy through the model fine-tuning control platform. If the model accuracy of the original community scene network model deviates too much, an accuracy loss threshold is set.

[0068] Furthermore, the accuracy loss threshold is equal to the accuracy value A minus the accuracy value B. The accuracy value A represents the accuracy of the original community scene network model in the full-precision fixed-point representation state, and the accuracy value B represents the accuracy of the community scene network model after quantization using fixed-point representation. If the accuracy of the preprocessed scene network model obtained after quantization exceeds the accuracy loss threshold, the number of fixed points for quantization is increased.

[0069] S2: Based on the obtained scene fine-tuning request, filter model parameters from the corresponding preprocessed scene network model to obtain the original dataset for fine-tuning.

[0070] In this embodiment, the scene fine-tuning request can be based on the user input through the model fine-tuning control platform, or the user can automatically control the model fine-tuning control platform to automatically output the scene fine-tuning request by setting a fixed model fine-tuning cycle.

[0071] Specifically, when the community scenario changes or a new community scenario is added, the model parameters in multiple network layers of the preprocessed scenario network model are determined based on the obtained scenario fine-tuning request. The model parameters are then either the original model parameters of the current network layer or they need to be migrated to the next network parameter layer for fine-tuning, so as to divide the fine-tuning range in the scenario network model.

[0072] S3: Construct a fine-tuning auxiliary model based on the original fine-tuning dataset and the obtained fine-tuning incremental dataset; and integrate the fine-tuning auxiliary model into the original community scenario network model.

[0073] In this embodiment, the acquired fine-tuning incremental dataset can be a set of model design parameters input by the user based on a changed or newly added community scenario, or it can be community scenario images captured by surveillance cameras and / or model design parameters collected by data acquisition devices. The acquired fine-tuning incremental dataset is a set of model parameters for the community scenario that needs fine-tuning.

[0074] Specifically, the fine-tuning auxiliary model is equipped with fine-tuning parameters, thereby adding an interface to modify the original community scenario network model and integrating the fine-tuning parameters into the original community scenario network model.

[0075] S4: Input the acquired scene information parameters into the original community scene network model and the fine-tuning auxiliary model for training.

[0076] In this embodiment, the acquired scene information parameters are the scene design parameters of the changed or newly added community scene and the changed community scene image acquired by the camera device. The model fine-tuning control platform can identify the image and extract image feature information from the community scene image, and convert the image feature information in the identification process into model fine-tuning parameters.

[0077] S5: When the original community scene network model and the fine-tuning auxiliary model converge, the original community scene network model is fine-tuned based on the fine-tuning auxiliary parameters of the fine-tuning auxiliary model to obtain the fine-tuned scene network model.

[0078] Specifically, the original community scene network model and the fine-tuning auxiliary model are trained by inputting model fine-tuning parameters. When the model converges (i.e., the change unit is within an acceptable range), training is stopped, and the fine-tuning auxiliary parameters of the fine-tuning auxiliary model are obtained at this time to fine-tune the original community scene network model.

[0079] In this embodiment, the original community scene network model is fine-tuned based on the scene fine-tuning request sent by the user or automatically obtained. This enables the network model to be fine-tuned with a small number of model fine-tuning parameters and fine-tuning auxiliary parameters in the fine-tuning auxiliary model. This helps to reduce the fine-tuning training cycle of the community scene network model, promotes the application of the community scene network model in smart communities, and makes the services of smart communities more high-quality, convenient and digital.

[0080] In one embodiment, such as Figure 2 As shown, in step S1, the original community scene network model includes community scene images; the original community scene network model is preprocessed to obtain a preprocessed scene network model, specifically including: S11: Selecting and recognizing community scene images in the original community scene network model, and extracting feature mapping information generated during recognition.

[0081] In this embodiment, community scene images are acquired through camera devices deployed in the community. The model fine-tuning control platform can select community scene images with high shooting accuracy and clarity, and extract feature mapping information generated by the selected community scene images during the calculation process.

[0082] S12: Based on the preset image selection precision, the feature mapping information is converted into a fixed number of fixed-point models.

[0083] In this embodiment, while ensuring the image selection accuracy is met, the feature mapping, which was originally a full-precision floating-point number, is replaced with a fixed-point number model representation.

[0084] S13: When the fixed-point number of the model exceeds the preset fixed-point number expression range, perform unified quantization of the number of network parameter layers in the original community scene network model to obtain a preprocessed scene network model.

[0085] In this embodiment, if the number of bits exceeds the fixed-point representation range, the bits exceeding the specified number of bits are truncated in binary, and the number of bits in all convolutional network layers in the community scenario network model is uniformly quantized according to the rule.

[0086] or,

[0087] S14: When the fixed-point number of the model does not exceed the preset fixed-point number expression range, the maximum number of quantization bits for each network parameter layer in the original community scene network model is determined by irregular quantization to obtain the preprocessed scene network model.

[0088] In this embodiment, without exceeding the number of quantization bits determined by regular quantization, the maximum number of quantization bits required for each layer of the convolutional neural network in the community scenario network model is determined by inter-layer irregular quantization, in order to save more storage space.

[0089] In one embodiment, such as Figure 3 As shown, in step S2, model parameters are filtered from the corresponding preprocessed scene network model based on the obtained scene fine-tuning request to obtain the original dataset for fine-tuning, specifically including:

[0090] S21: Determine the fine-tuning scenario and fine-tuning range of the scene network model based on the obtained scene fine-tuning request.

[0091] Specifically, due to the complexity and diversity of community scenarios, when fine-tuning community scenarios that have changed or been added, it is necessary to specifically determine the fine-tuning scenarios and the scope of fine-tuning for the network model of the specific changed scenario.

[0092] S22: Based on the fine-tuning scene and fine-tuning range of the scene model, filter model parameters from the corresponding preprocessed scene network model to obtain the fine-tuned original dataset.

[0093] In this embodiment, the model parameters in the original network model related to the changed community scene in the original dataset are extracted for feature extraction. Based on the obtained scene information parameters, it is decided whether to freeze or migrate the model parameters for fine-tuning. For example, shallow model parameters such as the shape of community buildings, community area, and road planning in some community scenes that have not changed are directly frozen, while model parameters such as the shape of areas and living facilities in community scenes that have directly changed are migrated and fine-tuned. This allows for targeted iterative fine-tuning and optimization of the model parameters in the original scene network model, greatly shortening the model training cycle required for the network model of the community scene when the community scene changes, and improving the fine-tuning efficiency of the network model.

[0094] In one embodiment, such as Figure 4 As shown, in step S3, a fine-tuning auxiliary model is constructed based on the original fine-tuning dataset and the obtained fine-tuning incremental dataset; and the fine-tuning auxiliary model is then integrated into the original community scenario network model. The fine-tuning auxiliary model includes an encoder and a decoder, specifically including:

[0095] S31: The encoder is used to extract scene feature information from the fine-tuned original dataset and the fine-tuned incremental dataset; the decoder is used to reconstruct the target scene information from the scene feature information.

[0096] S32: Based on the obtained scene fine-tuning request, add the scene feature information of the encoder of the fine-tuning auxiliary model to the corresponding model position in the original community scene network model.

[0097] S33: Based on the obtained scene fine-tuning request, add the target scene information of the decoder of the fine-tuning auxiliary model to the corresponding model position in the original community scene network model.

[0098] In this embodiment, users can manually input data or automatically construct incremental datasets through the data acquisition module. The encoder is used to extract scene feature information from the original fine-tuning dataset and the incremental fine-tuning dataset and add the scene feature information to the corresponding model position in the original community scene network model. The decoder is used to restore the target scene information from the scene feature information within the range of the scene model to be fine-tuned according to the obtained scene fine-tuning request and add it to the corresponding model position in the original community scene network model. This changes the model fine-tuning result in the original community scene network model and realizes the distribution adjustment of the fine-tuning result of the fine-tuning auxiliary model on the original community scene network model.

[0099] In one embodiment, such as Figure 5 As shown, after step S4, the method for fine-tuning the network model to adapt to the community scenario further includes:

[0100] S41: The preset learning rate fine-tuning algorithm determines the learning rate range for the i-th iteration period, where i is not less than 1.

[0101] S42: Adjust the learning rate of the original community scenario network model at different iteration cycles and / or different model levels according to the preset learning rate fine-tuning algorithm.

[0102] In this embodiment, the preset learning rate fine-tuning algorithm is constructed based on the preset cosine function and the learning rate range of the i-th iteration period: The preset learning rate fine-tuning algorithm is composed of the following formula:

[0103] Specifically, and Let T be the learning rate range for the i-th iteration period. cr Let T be the iteration step number of the current iteration cycle, and T i This indicates the current iteration period, and α and β represent the coordination factors of the learning rate for different model layers. m This represents the relative position of the m-th layer in the network model. all This indicates the total number of layers in the network model.

[0104] In this embodiment, the fine-tuning incremental dataset is input into the original community scene network model for training, and the model fine-tuning result, i.e. the corresponding model training state node, is output according to the preset learning rate fine-tuning algorithm. Thus, based on the complexity and diversity of community scenes, this application realizes rapid iterative training based on community scenes, and can effectively learn the model data and model parameter features of changed or newly added community scenes while maintaining accuracy, thereby improving the model fine-tuning efficiency of community scene models.

[0105] It should be understood that the sequence number of each step in the above embodiments does not imply 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 this application.

[0106] In one embodiment, a network model fine-tuning system adapted to community scenarios is provided, which corresponds to the network model fine-tuning method adapted to community scenarios in the above embodiments.

[0107] like Figure 6 As shown, a network model fine-tuning system adapted to community scenarios includes a preprocessing module, a parameter filtering module, an access construction module, and a training fine-tuning module. Detailed descriptions of each functional module are as follows:

[0108] The preprocessing module is used to preprocess the original community scene network model to obtain a preprocessed scene network model; the parameter filtering module is used to filter model parameters from the corresponding preprocessed scene network model based on the obtained scene fine-tuning request to obtain the fine-tuning original dataset.

[0109] An access module is built to construct a fine-tuning auxiliary model based on the original fine-tuning dataset and the acquired fine-tuning incremental dataset; and the fine-tuning auxiliary model is then integrated into the existing community scenario network model.

[0110] The training and fine-tuning module is used to input the acquired scene information parameters into the original community scene network model and the fine-tuning auxiliary model for training. When the original community scene network model and the fine-tuning auxiliary model converge, the original community scene network model is fine-tuned based on the fine-tuning auxiliary parameters of the fine-tuning auxiliary model to obtain the fine-tuned scene network model.

[0111] Optionally, the preprocessing module includes:

[0112] The image information extraction submodule is used to select and recognize community scene images in the original community scene network model, and extract the feature mapping information generated during recognition.

[0113] The information conversion submodule is used to convert feature mapping information into fixed-bit model fixed-point numbers based on a preset image selection precision.

[0114] The rule quantization submodule is used to perform rule quantization on all network parameter layers in the original community scene network model with a uniform quantization bit when the fixed number of fixed points in the model exceeds the preset range of fixed point representation, so as to obtain a preprocessed scene network model.

[0115] The irregular quantization submodule is used to determine the maximum number of quantization bits for each network parameter layer in the original community scene network model in order to obtain a preprocessed scene network model when the fixed-bit model fixed-point number does not exceed the preset fixed-point number expression range.

[0116] Optionally, the filter parameter module includes:

[0117] The scene range determination submodule is used to determine the fine-tuning scene and fine-tuning range of the scene network model based on the acquired scene fine-tuning request;

[0118] The filtering submodule is used to filter model parameters from the corresponding preprocessed scene network model to obtain the original dataset for fine-tuning, based on the fine-tuning scene and fine-tuning range of the scene model.

[0119] For specific limitations regarding the network model fine-tuning system adapted to community scenarios, please refer to the limitations of the network model fine-tuning method adapted to community scenarios mentioned above, which will not be repeated here. Each module in the above-mentioned network model fine-tuning system adapted to community scenarios can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in the processor of the computer device in hardware form or independent of the processor, or it can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0120] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and the database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores the original community scenario network model, the original fine-tuned dataset, the fine-tuned incremental dataset, and the fine-tuned scenario network model. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for fine-tuning a network model adapted to the community scenario.

[0121] In one embodiment, a computer device is provided, 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, it performs the following steps: preprocessing an existing community scene network model to obtain a preprocessed scene network model.

[0122] Based on the obtained scene fine-tuning request, model parameters are filtered from the corresponding preprocessed scene network model to obtain the original dataset for fine-tuning;

[0123] A fine-tuning auxiliary model is constructed based on the original fine-tuning dataset and the obtained fine-tuning incremental dataset; and the fine-tuning auxiliary model is then integrated into the original community scenario network model.

[0124] The acquired scene information parameters are input into the original community scene network model and the fine-tuning auxiliary model for training;

[0125] When the original community scene network model and the fine-tuning auxiliary model converge, the original community scene network model is fine-tuned based on the fine-tuning auxiliary parameters of the fine-tuning auxiliary model to obtain the fine-tuned scene network model.

[0126] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0127] The original community scene network model is preprocessed to obtain a preprocessed scene network model.

[0128] Based on the obtained scene fine-tuning request, model parameters are filtered from the corresponding preprocessed scene network model to obtain the original dataset for fine-tuning;

[0129] A fine-tuning auxiliary model is constructed based on the original fine-tuning dataset and the obtained fine-tuning incremental dataset; and the fine-tuning auxiliary model is then integrated into the original community scenario network model.

[0130] The acquired scene information parameters are input into the original community scene network model and the fine-tuning auxiliary model for training;

[0131] When the original community scene network model and the fine-tuning auxiliary model converge, the original community scene network model is fine-tuned based on the fine-tuning auxiliary parameters of the fine-tuning auxiliary model to obtain the fine-tuned scene network model.

[0132] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0133] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0134] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A network model fine-tuning method suitable for a community scenario, characterized in that, The method comprises the following steps: model preprocessing is performed on the original community scene network model to obtain a preprocessed scene network model; based on the obtained scene fine-tuning request, model parameters corresponding to the scene fine-tuning request are screened from the preprocessed scene network model to obtain a fine-tuning original data set; a fine-tuning auxiliary model is constructed according to the fine-tuning original data set and an obtained fine-tuning incremental data set; and the fine-tuning auxiliary model is connected to the original community scene network model; the obtained scene information parameters are input into the original community scene network model and the fine-tuning auxiliary model for joint training; when the original community scene network model and the fine-tuning auxiliary model converge after training, the original community scene network model is fine-tuned based on fine-tuning auxiliary parameters of the fine-tuning auxiliary model to obtain a fine-tuned scene network model; the original community scene network model comprises community scene images; the model preprocessing of the original community scene network model comprises the following steps: select and identify the community scene images in the original community scene network model, and extract feature mapping information generated during identification; the feature mapping information is converted into fixed-bit model fixed-point numbers based on a preset image selection precision; when the fixed-bit model fixed-point numbers exceed a preset fixed-point number expression range, all network parameter layers in the original community scene network model are uniformly quantized according to a quantization rule to obtain a preprocessed scene network model; or, when the fixed-bit model fixed-point numbers do not exceed the preset fixed-point number expression range, the maximum quantization bit number of each network parameter layer in the original community scene network model is determined by a non-regular quantization method to obtain a preprocessed scene network model; after the obtained scene information parameters are input into the original community scene network model and the fine-tuning auxiliary model for training, the following steps are included: a preset learning rate fine-tuning algorithm determines a learning rate range of an i-th iteration cycle, where i is not less than 1; the learning rate of the original community scene network model at different iteration cycles and / or different model levels is adjusted according to the preset learning rate fine-tuning algorithm; the preset learning rate fine-tuning algorithm is composed of the following formula: wherein, and is the learning rate range for the i-th iteration cycle, is the iteration step number for the current iteration cycle, and denotes the current iteration cycle, and denotes the coordination factor of the learning rate for different model layers, denotes the relative position of the m-th layer of the network model, denotes the total number of layers of the network model.

2. A network model fine-tuning system adaptive to community scenarios, characterized in that, The method comprises the following steps: a preprocessing module is configured to perform model preprocessing on an original community scene network model to obtain a preprocessed scene network model; a screening parameter module is configured to screen model parameters from the corresponding preprocessed scene network model based on an obtained scene fine-tuning request to obtain a fine-tuning original data set; a construction and connection module is configured to construct a fine-tuning auxiliary model according to the fine-tuning original data set and an obtained fine-tuning incremental data set, and connect the fine-tuning auxiliary model to the original community scene network model; a training and fine-tuning module is configured to input obtained scene information parameters into the original community scene network model and the fine-tuning auxiliary model for joint training; ​ When the original community scene network model and the fine-tuning auxiliary model are trained to converge, the original community scene network model is fine-tuned based on fine-tuning auxiliary parameters of the fine-tuning auxiliary model to obtain a fine-tuned scene network model; The preprocessing module comprises: An image information extraction submodule is configured to select and identify community scene images in the original community scene network model and extract feature mapping information generated during the identification; An information conversion submodule is configured to convert the feature mapping information into fixed-bit model fixed-point numbers based on a preset image selection accuracy; A regular quantization submodule is configured to perform regular quantization on all network parameter layers in the original community scene network model to obtain a preprocessed scene network model when the fixed-bit model fixed-point numbers exceed a preset fixed-point number expression range; An irregular quantization submodule is configured to determine a maximum quantization bit number of each network parameter layer in the original community scene network model by an irregular quantization method to obtain a preprocessed scene network model when the fixed-bit model fixed-point numbers do not exceed the preset fixed-point number expression range; After the obtained scene information parameters are input into the original community scene network model and the fine-tuning auxiliary model for training, the method comprises: A preset learning rate fine-tuning algorithm is used to determine a learning rate range of an i-th iteration cycle, where i is not less than 1; The learning rate of the original community scene network model at different iteration cycles and / or different model levels is adjusted according to the preset learning rate fine-tuning algorithm; The preset learning rate fine-tuning algorithm is composed of the following formula: wherein, and is the learning rate range for the i-th iteration cycle, is the iteration step number for the current iteration cycle, and denotes the current iteration cycle, and denotes the coordination factor of the learning rate for different model layers, denotes the relative position of the m-th layer of the network model, denotes the total number of layers of the network model.

3. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the network model fine-tuning method for adapting to community scenes according to claim 1.

4. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 3. The computer program is executed by the processor to implement the steps of the network model fine-tuning method for adapting to community scenes according to claim 1.

Citation Information

Patent Citations

  • Deep convolutional neural network-based inter-layer non-uniform K-means clustering fixed-point quantification method

    CN106897734A

  • Reinforcement learning model training method, reinforcement learning model training device, decision-making method, decision-making device, equipment, and medium

    CN113962362A

  • Fine adjustment method and device for large model in banking business, equipment and storage medium

    CN116579402A