CN117032765A - Model upgrading method, model upgrading device and computer storage medium - Google Patents

Model upgrading method, model upgrading device and computer storage medium Download PDF

Info

Publication number
CN117032765A
CN117032765A CN202311304249.7A CN202311304249A CN117032765A CN 117032765 A CN117032765 A CN 117032765A CN 202311304249 A CN202311304249 A CN 202311304249A CN 117032765 A CN117032765 A CN 117032765A
Authority
CN
China
Prior art keywords
protocol
model
matching
version
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311304249.7A
Other languages
Chinese (zh)
Other versions
CN117032765B (en
Inventor
殷俊
王康
陈波扬
熊宇鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202311304249.7A priority Critical patent/CN117032765B/en
Publication of CN117032765A publication Critical patent/CN117032765A/en
Application granted granted Critical
Publication of CN117032765B publication Critical patent/CN117032765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/10Interfaces, programming languages or software development kits, e.g. for simulating neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Communication Control (AREA)

Abstract

The application discloses a model upgrading method, a model upgrading device and a computer storage medium, wherein the model upgrading method comprises the following steps: obtaining a configuration protocol table and model configuration of an upgrade model; matching the model configuration with the configuration protocol table to obtain a matching protocol and a corresponding version number; and upgrading the initial model based on the matching protocol to obtain an upgraded model. By the method, the protocol can be matched with the protocol in the configuration protocol table according to the required model configuration, so that the protocol of the lowest version which can meet the model configuration is obtained, the updating and upgrading of the model are realized, the protocol is minimally updated on the premise of meeting the service requirement of the model, and the model can be updated under the condition of not updating the model operation library.

Description

Model upgrading method, model upgrading device and computer storage medium
Technical Field
The present application relates to the field of software updating, and in particular, to a model updating method, a model updating device, and a computer storage medium.
Background
With the continuous development of computer science, people are no longer satisfied with performing mechanical computation only by using a computer, but hope that the computer can simulate human learning activities to autonomously perform learning, so machine learning is generated. Machine learning is an automated method based on data, learning patterns and rules of the data through an algorithm model, and thus predicting and classifying future data. Machine learning has found wide application in the fields of artificial intelligence, natural language processing, image recognition, medicine, finance, and the like.
In machine learning, in order to enable a computer to implement a wide variety of different business functions, various models can be built to meet business needs of different scenarios. Various models can learn different kinds of data such as characters, images and sounds, and acquire characteristics in the data, so that the machine can have the capability of analyzing and learning various kinds of data like a person.
In order to meet the newly increased service requirement or to make the data features acquired by the model more accurate, operations such as newly increasing and fine tuning are usually required to be performed on the network layer or parameters in the model, so as to update the network model. In the updating process, the interactive protocol in the network model is updated incrementally, so that an offline conversion tool for generating the model and a running library of the model need to be updated together, the maintenance pressure of the system is high, and the compatibility among all modules in the model is poor.
Disclosure of Invention
The application mainly solves the technical problem of realizing the minimized upgrade of a network model under the condition of ensuring service functions, and provides a model upgrade method, a model upgrade device and a computer storage medium.
In order to solve the technical problems, the application adopts a technical scheme that: a method of model upgrade is provided, the method comprising: obtaining a configuration protocol table and model configuration of an upgrade model; matching the model configuration with the configuration protocol table to obtain a matching protocol and a corresponding version number; and upgrading the initial model based on the matching protocol to obtain an upgraded model.
Wherein, based on the configuration protocol of each version, a configuration protocol table is established; the version comprises a main version and an upgrade version; establishing a configuration protocol table based on each version of the configuration protocol, including: storing the base protocol of the master version in a first row of a configuration protocol table; and establishing the rest rows of the configuration protocol table based on the protocol change content of each upgrade version and the corresponding version number, wherein the protocol change content is the difference content between the configuration protocol of the upgrade version and the base protocol.
Wherein the changing operation corresponding to the protocol changing content comprises one or more of deletion, addition and modification; establishing the rest rows of the configuration protocol table based on the protocol change content of each upgrade version and the corresponding version number, including: when the change operation is deleting, the field state in the corresponding line record protocol change content of the configuration protocol table is a deleting state based on the version number corresponding to the upgrade version; and/or when the change operation is increased, the field and the corresponding field state in the corresponding line record protocol change content of the configuration protocol table are in a new state based on the version number corresponding to the upgrade version; and/or when the change operation is modification, the field state of the first field in the corresponding line record protocol change content of the configuration protocol table is a deletion state based on the version number corresponding to the upgrade version, and the field states of the second field and the second field are a new addition state.
The method for matching the model configuration with the configuration protocol table to obtain a matching protocol and a corresponding version number comprises the following steps: traversing the fields of each row from the last row in the configuration protocol table, and matching the fields in the model configuration; when the fields in the configuration protocol table are the same as the fields in the model configuration, the matching is considered to be successful; and obtaining a matching protocol and a corresponding version number based on the matching result.
Wherein, the matching result comprises a matching line number; obtaining the matching protocol and the corresponding version number based on the matching result comprises the following steps: and obtaining protocol change contents of corresponding versions in the configuration protocol table based on the matching line numbers, and splicing the protocol change contents of the corresponding versions to obtain the matching protocol and the corresponding version numbers.
The method for obtaining the protocol change content of the corresponding version in the configuration protocol table based on the matching line number, and splicing the protocol change content of the corresponding version to obtain the matching protocol comprises the following steps: acquiring the basic protocol of the main version and the protocol change content of the next row; inserting the protocol change content of the next row into the base protocol of the main version to be combined to obtain a first combination result; responding to the line number of the current inserted line being smaller than the matching line number, acquiring protocol modification content of the next line of the current inserted line, and inserting the first merging result to obtain a second merging result until the line number of the current inserted line is equal to the matching line number; and taking the second combination result as a matching protocol.
After the initial model is upgraded based on the matching protocol to obtain an upgraded model, the method further comprises the following steps: judging whether an operation library of the initial model supports an upgrade model or not; if yes, running an upgrade model based on a running library; if not, upgrading the operation library.
Wherein, judging whether the operation library of the initial model supports the upgrade model comprises: judging whether the version number of the operation library of the initial model is larger than the version number of the matching protocol; if yes, determining that the operation library of the initial model supports the upgrade model.
In order to solve the technical problems, the application adopts another technical scheme that: there is provided a model upgrade apparatus comprising a processor and a memory, the memory coupled to the processor, the memory storing program data, the processor being operable to execute the program data to implement a model upgrade method as described above.
In order to solve the technical problems, the application adopts another technical scheme that: there is provided a computer readable storage medium storing program data which, when executed, is used to implement the above-described model upgrade method.
The beneficial effects of the application are as follows: different from the prior art, the model upgrading method provided by the application comprises the following steps: obtaining a configuration protocol table and model configuration of an upgrade model; matching the model configuration with the configuration protocol table to obtain a matching protocol and a corresponding version number; and upgrading the initial model based on the matching protocol to obtain an upgraded model. Compared with the conventional model upgrading method, the method has the advantages that the matching of the model configuration required to be met by upgrading and the protocol in the configuration protocol table is adopted, so that the matching protocol is obtained, the initial model is upgraded by using the matching protocol, the minimized updating of the initial model is realized under the condition that the service function is ensured, each module and the related library in the model are not updated in a large area along with the updating of the protocol, the compatibility among the modules after the model is upgraded is ensured, and all the modules are not required to be checked when the model has a problem, so that the maintenance cost of the model is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Wherein:
FIG. 1 is a schematic flow chart of a first embodiment of a model upgrade method provided by the present application;
FIG. 2 is a schematic diagram of an overall flow of a model upgrading method applied to a model upgrading device provided by the application;
FIG. 3 is a schematic flow chart of generating a configuration protocol table in the model upgrading method provided by the application;
FIG. 4 is a schematic flow chart of a second embodiment of a model upgrade method provided by the present application;
FIG. 5 is a schematic flow chart of a matching configuration protocol in the model upgrading method provided by the application;
FIG. 6 is a schematic flow chart of a third embodiment of a model upgrade method provided by the present application;
FIG. 7 is a flow chart of generating a complete matching protocol in the model upgrade method provided by the application;
FIG. 8 is a schematic flow chart of an offline conversion tool in a model upgrade apparatus according to the present application for generating a model of a corresponding version based on different configuration protocols;
FIG. 9 is a schematic diagram of the relationship between the offline conversion tool, the protocol and the runtime library in the model upgrade method provided by the present application;
FIG. 10 is a schematic diagram of a first embodiment of a model upgrade apparatus provided by the present application;
FIG. 11 is a schematic diagram of a second embodiment of a model upgrade apparatus provided by the present application;
fig. 12 is a schematic structural diagram of an embodiment of a computer readable storage medium provided by the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship. Further, "a plurality" herein means two or more than two. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
The model upgrading method provided by the application is mainly applied to a model upgrading device or a model upgrading tool, wherein the model upgrading device can be a server or a system formed by mutually matching a server and terminal equipment. Accordingly, each part, such as each unit, sub-unit, module and sub-module, included in the model upgrading device may be all disposed in the server, or may be disposed in the server and the terminal device respectively.
Further, the server may be hardware or software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules, for example, software or software modules for providing a distributed server, or may be implemented as a single software or software module, which is not specifically limited herein. In some possible implementations, the model upgrade method of the embodiments of the present application may be implemented by way of a processor invoking computer readable instructions stored in a memory.
The model upgrading method provided by the application is mainly applied to a model upgrading tool used in the upgrading process of the network model, and the initial model is upgraded based on the matching protocol by matching the corresponding matching protocol in the configuration protocol table according to the configuration requirement of the model to be upgraded, so that the corresponding upgrading version can be selected only according to the configuration of the model, and the minimum updating of the model can be realized under the function of meeting the service requirement.
When the model is upgraded, the current model upgrading method needs to upgrade the operation library of the model due to the change of the version protocol, so that each protocol version needs to have a corresponding operation library and an offline conversion tool for converting the model, and the cost of software maintenance is increased. Based on the above, the application provides a model upgrading method, and the technical scheme adopted by the application is described in detail below.
Referring to fig. 1 to 2, fig. 1 is a schematic flow chart of a first embodiment of a model upgrading method provided by the present application; fig. 2 is a schematic overall flow chart of a model upgrading method applied to a model upgrading device provided by the application.
Step 11: and obtaining a configuration protocol table and model configuration of the upgrade model.
Specifically, the configuration protocol table is used to define an interaction protocol between the offline conversion tool and the runtime. The offline conversion tool is used for generating a model format which can be identified by corresponding operation hardware based on the interaction protocol. The operation library is used for obtaining corresponding information through the interactive protocol, calling corresponding hardware resources to calculate, and realizing the algorithm service function of the deep learning model.
Specifically, the model upgrading device establishes a configuration protocol table based on the configuration protocol of each version, wherein the version comprises a main version and an upgraded version. Establishing a configuration protocol table based on each version of the configuration protocol, including: storing the base protocol of the master version in a first row of a configuration protocol table; and establishing the rest rows of the configuration protocol table based on the protocol change content of each upgrade version and the corresponding version number, wherein the protocol change content is the difference content between the configuration protocol of the upgrade version and the base protocol.
Specifically, as shown in table 1, the IDX column in the configuration protocol table may be a row number, and the content on the right of the row number includes a corresponding version number and version protocol content. In the line ID1, the major version number and the base protocol content, "base_v1_0" are recorded, and the version numbers for the upgrade, such as "change_1.1.0" in ID2, and the protocol modification content with respect to the base protocol, "change_v1_1", and the like, are recorded in the remaining lines. Each version number and the protocol modification content corresponding to the version number, such as ID3, are recorded in the configuration protocol table in sequence: "Change_1.2.0": "Change_V1_2". The version number of each row corresponds to the number of protocol modification contents: such as "Change_M.N.0": "Change_VM_N".
TABLE 1 configuration protocol table
Specifically, the protocol version number is defined in terms of a major version number, an auxiliary version number, and a patch version number, as the first bit in "1.2.0" of the second row in table 1 represents the major version number, which is typically modified by changing the field in the protocol over a large area; the second bit represents the auxiliary version number, and a newly added field (including the new addition of the effective options of the field) exists in the protocol, namely, when a certain characteristic function is newly added in the deep learning service, the bit number is modified; the third bit is the patch version number, and when a grammar error needs to be modified after the definition of the protocol, the bit number is modified.
Specifically, the modification operation corresponding to the protocol modification content in the configuration protocol table includes one or more of deletion, addition, and modification. When the change operation is deleting, the model upgrading device changes the field state in the corresponding row record protocol change content of the configuration protocol table into a deleting state based on the version number corresponding to the upgrading version; when the change operation is increased, the model upgrading device is based on the field and the corresponding field state in the corresponding line record protocol change content of the configuration protocol table of the version number corresponding to the upgrading version to be a new state; when the change operation is modification, the model upgrading device is based on that the field state of the first field in the corresponding line record protocol change content of the configuration protocol table is a deletion state, and the field states of the second field and the second field are a new addition state.
In an embodiment of the present application, the model upgrade apparatus may construct a configuration protocol table by using the method of fig. 3, and referring to fig. 3, fig. 3 is a schematic flow chart of generating the configuration protocol table in the model upgrade method provided by the present application. The model upgrade apparatus defines a base protocol as a protocol of a major version and a major version number as V1.0.0. When the protocol of the subsequent upgrading version changes and needs to be changed, the model upgrading device builds a configuration protocol table based on the changing operation.
When a protocol change operation of a certain version is modification, the model upgrading device marks the field state of the protocol before modification as del state, and records the del state and the modified protocol content in a configuration protocol table. For example, in a protocol of a certain version, the name of a certain field is modified from a to B, the model upgrading device marks the state of the a field as del state, records the content of the B field of the newly added field, and marks the state of the B field as default value, wherein the default value is the newly added state.
When a protocol change operation of a certain version is increased, the model upgrading device records newly increased protocol contents in a configuration protocol table and marks the state of a field as a default value, wherein the default value is the newly increased state. For example, if field C is newly added to a protocol of a certain version, the content of field C is recorded in a corresponding row of the configuration protocol table and the state of field C is marked as a default value.
When a modification operation of a certain version to a protocol is deleted, the model upgrading device marks the state of the deleted protocol field as del state in the configuration protocol table. For example, if field D is deleted in a version of the protocol, the state of field D is marked as deleted in the corresponding row of the configuration protocol table.
In another embodiment of the present application, the configuration protocol table may be pre-constructed and then extracted from the database by input or importing. The configuration protocol table may be stored in advance in a database, and the model upgrade apparatus may acquire the configuration protocol table by calling the database. Of course, the configuration protocol table may also be imported by a user, and the user may collect the configuration protocol table in advance and then import the configuration protocol table into the model upgrading device. Therefore, there are many ways of how to acquire the configuration protocol table, and no specific limitation is made here. The configuration protocol table has the same structure as that when the configuration protocol table is constructed.
Step 12: and matching the model configuration with the configuration protocol table to obtain a matching protocol and a corresponding version number.
In an embodiment of the present application, the model upgrading device matches the model configuration with the configuration protocol table by using the method shown in fig. 4 and fig. 5, referring to fig. 4 and fig. 5, fig. 4 is a schematic flow chart of a second embodiment of the model upgrading method provided by the present application; fig. 5 is a schematic flow chart of a matching configuration protocol in the model upgrading method provided by the application.
Step 51: traversing the fields of each row from the last row in the configuration protocol table and matching the fields in the model configuration.
Specifically, the model upgrading device matches with the existing protocol in the configuration protocol table after obtaining the model configuration to be upgraded. The model upgrading device obtains the protocol content in the last row of IDX from the configuration protocol table, and matches the fields in the protocol content with the fields in the model configuration to determine whether the IDX has the same fields as the model configuration.
Step 52: when the fields in the configuration protocol table are the same as the fields in the model configuration, then the match is considered successful.
Specifically, if the same field in the model configuration does not exist in the IDX, the IDX is considered to be not the matched protocol, and the field identical to the model configuration is continuously searched in the last row in the configuration protocol table, i.e., IDX-1, until the field in the configuration protocol table is identical to the field in the model configuration, the matching is considered to be successful, and the ID of the successful matching is the matching row number.
Step 53: and obtaining a matching protocol and a corresponding version number based on the matching result.
Specifically, the matching result includes a matching line number, i.e., an ID number. By the matching method, the model upgrading device can acquire the version number corresponding to the version protocol meeting the lowest model configuration requirement, and upgrade the network model to be upgraded based on the version protocol with the lowest version number, so that the network model is updated in a minimized mode.
In an embodiment of the present application, a method for obtaining a matching protocol and a corresponding version number by a model upgrade apparatus based on a matching result may refer to fig. 6 and fig. 7, and fig. 6 is a flow chart of a third embodiment of the model upgrade method provided by the present application; fig. 7 is a schematic flow chart of generating a complete matching protocol in the model upgrading method provided by the application.
Step 71: and acquiring the base protocol of the main version and the protocol change content of the next row.
Specifically, the model upgrading device acquires the field content and the field state in the base protocol of the main version of the first row and the protocol change content of the next row in the configuration protocol table.
Step 72: and inserting the protocol change content of the next row into the base protocol of the main version to be combined to obtain a first combination result.
Specifically, the model upgrading device inserts the field content and the field state into the base protocol of the main version as a first merging result, judges whether the line number of the currently inserted line is the same as the matching line number, if so, takes the first merging result as the matching protocol, and obtains the corresponding version number based on the matching line number, namely the ID number.
Step 73: and responding to the fact that the line number of the current inserted line is smaller than the matching line number, acquiring protocol modification content of the next line of the current inserted line, and inserting the first merging result to obtain a second merging result until the line number of the current inserted line is equal to the matching line number.
Specifically, if the line number of the currently inserted line is smaller than the matching line number, the model upgrading device continues to acquire the field content and the field state in the protocol modification content of the next line and inserts the field content and the field state into the first merging result, namely, the ID number is added by one, and acquires the protocol modification content of the corresponding line until the ID number is equal to the matching line number.
Step 74: and taking the second combination result as a matching protocol.
Specifically, the model upgrading device inserts the protocol changing content with all the line numbers smaller than or equal to the matching line number into the base protocol of the main version as the matching protocol.
Taking the matching line number as ID4 as an example, the model upgrading device starts from ID2 and inserts the protocol modification content in the ID2 line into the base protocol of the main version in the ID1 line to obtain a first merging protocol S1. And after the insertion, if the current ID2 is not equal to the ID4, adding one to the ID number to obtain an ID3, and continuously inserting the protocol modification content in the ID3 into the first merging protocol S1 to obtain a second merging protocol S2. After the insertion, judging whether the current ID3 is equal to the ID4, adding one to the ID number to obtain the ID4, continuing to insert protocol modification content in the ID4 into the second merging protocol S2 to obtain a third merging protocol S3, and judging that the current ID4 is equal to the matching line number, taking the content in the third merging protocol S3 as the matching protocol and obtaining a corresponding version number.
Step 13: and upgrading the initial model based on the matching protocol to obtain an upgraded model.
Specifically, after the model upgrading device obtains the matching protocol and the version number, an offline conversion tool is also used for generating a corresponding model, so that the model is upgraded. Referring to fig. 8, fig. 8 is a schematic flow chart of generating a model with a corresponding version based on different configuration protocols by an offline conversion tool in the model upgrading device provided by the application.
In an embodiment of the present application, the offline conversion tool generates three different versions of the deep learning models V1.0.0, V1.1.0 and v1.2.0 based on the input configuration protocol 1, configuration protocol 2 and configuration protocol 3, respectively, so as to upgrade the initial model into three different versions of the upgrade model.
In an embodiment of the present application, after upgrading the initial model based on the matching protocol to obtain an upgraded model, the model upgrading device further includes: judging whether an operation library of the initial model supports an upgrade model or not; if yes, running an upgrade model based on a running library; if not, upgrading the operation library. Referring to fig. 9, fig. 9 is a schematic diagram of a relationship among an offline conversion tool, a protocol and a runtime library in the model upgrading method provided by the application.
The same protocol is used by the operation library and the offline conversion tool, and when the protocol version used by the offline conversion tool is smaller than or equal to the protocol version of the operation library, the operation library can operate the upgrade model.
Specifically, the model upgrading device determines that the runtime of the initial model supports the upgrading model by judging whether the version number of the runtime of the initial model is greater than the version number of the matching protocol, if yes, the model upgrading device can upgrade the version number of the runtime of the initial model.
When a service scene requiring an iterative model exists, the model upgrading device or the model upgrading tool obtained by the model upgrading method is used for obtaining a matching protocol which is smaller than that of an initial model operation library when the model is generated, so that the upgrading process can be completed only by upgrading the model in the upgrading process, the operation library is not required to be upgraded together, the minimized updating of the model is realized, and the compatibility of the model upgrading is ensured.
Different from the prior art, the model upgrading method provided by the application comprises the following steps: obtaining a configuration protocol table and model configuration of an upgrade model; matching the model configuration with the configuration protocol table to obtain a matching protocol and a corresponding version number; and upgrading the initial model based on the matching protocol to obtain an upgraded model. Compared with the conventional model upgrading method, the method has the advantages that the matching of the model configuration required to be met by upgrading and the protocol in the configuration protocol table is adopted, so that the matching protocol is obtained, the initial model is upgraded by using the matching protocol, the minimized updating of the initial model is realized under the condition that the service function is ensured, each module and the related library in the model are not updated in a large area along with the updating of the protocol, the compatibility among the modules after the model is upgraded is ensured, and all the modules are not required to be checked when the model has a problem, so that the maintenance cost of the model is reduced.
The method of the foregoing embodiment may be implemented by using a model upgrade apparatus, and is described below with reference to fig. 10, where fig. 10 is a schematic structural diagram of a first embodiment of a model upgrade apparatus according to the present application.
As shown in fig. 10, the model upgrading device 110 of the embodiment of the present application includes a configuration obtaining module 111, a matching module 112, and an upgrading module 113.
The configuration obtaining module 111 is configured to obtain a configuration protocol table and a model configuration of the upgrade model.
The matching module 112 is configured to match the model configuration with the configuration protocol table, so as to obtain a matching protocol and a corresponding version number.
And the upgrading module 113 is used for upgrading the initial model based on the matching protocol to obtain an upgraded model.
The method of the above embodiment may be implemented by a model upgrade apparatus, and referring to fig. 11, fig. 11 is a schematic structural diagram of a second embodiment of the model upgrade apparatus provided in the present application, where the model upgrade apparatus 120 includes a memory 121 and a processor 122, the memory 121 is used for storing program data, and the processor 122 is used for executing the program data to implement the following method:
obtaining a configuration protocol table and model configuration of an upgrade model; matching the model configuration with the configuration protocol table to obtain a matching protocol and a corresponding version number; and upgrading the initial model based on the matching protocol to obtain an upgraded model.
Referring to fig. 12, fig. 12 is a schematic structural diagram of an embodiment of a computer readable storage medium provided by the present application, where the computer readable storage medium 130 stores program data 131, and the program data 131, when executed by a processor, is configured to implement the following method:
obtaining a configuration protocol table and model configuration of an upgrade model; matching the model configuration with the configuration protocol table to obtain a matching protocol and a corresponding version number; and upgrading the initial model based on the matching protocol to obtain an upgraded model.
Embodiments of the present application may be stored in a computer readable storage medium when implemented in the form of software functional units and sold or used as a stand alone product. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description is only of embodiments of the present application, and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes using the descriptions and the drawings of the present application or directly or indirectly applied to other related technical fields are included in the scope of the present application.

Claims (10)

1. A model upgrade method, characterized in that the model upgrade method comprises:
obtaining a configuration protocol table and model configuration of an upgrade model;
matching the model configuration with the configuration protocol table to obtain a matching protocol and a corresponding version number;
and upgrading the initial model based on the matching protocol to obtain the upgrading model.
2. The method for upgrading a model according to claim 1, wherein,
before the configuration protocol table is acquired, the model upgrading method further comprises the following steps:
establishing the configuration protocol table based on the configuration protocol of each version;
the version comprises a main version and an upgrade version;
the establishing the configuration protocol table based on the configuration protocol of each version comprises the following steps:
storing the base protocol of the master version in a first row of the configuration protocol table;
and establishing the rest rows of the configuration protocol table based on the protocol changing content of each upgrading version and the corresponding version number, wherein the protocol changing content is the difference content between the configuration protocol of the upgrading version and the basic protocol.
3. The method for upgrading a model according to claim 2, wherein,
the changing operation corresponding to the protocol changing content comprises one or more of deleting, adding and modifying;
the establishing the rest rows of the configuration protocol table based on the protocol change content of each upgrade version and the corresponding version number comprises the following steps:
when the change operation is deleting, recording a field state in the protocol change content as a deleting state on the basis of a version number corresponding to the upgrade version in a corresponding row of the configuration protocol table;
and/or the number of the groups of groups,
when the change operation is increased, recording fields in the protocol change content and corresponding field states in the configuration protocol table as new addition states based on version numbers corresponding to the upgrade versions;
and/or the number of the groups of groups,
when the change operation is modification, recording the field state of a first field in the protocol change content as a deletion state and the field states of a second field and the second field as a new addition state in a corresponding row of the configuration protocol table based on the version number corresponding to the upgrade version.
4. The method for upgrading a model according to claim 2, wherein,
the matching the model configuration with the configuration protocol table to obtain a matching protocol and a corresponding version number comprises the following steps:
traversing the fields of each row from the last row in the configuration protocol table, and matching the fields in the model configuration;
when the fields in the configuration protocol table are the same as the fields in the model configuration, the matching is considered to be successful;
and obtaining the matching protocol and the corresponding version number based on the matching result.
5. The method for upgrading a model according to claim 4, wherein,
the matching result comprises a matching line number;
the obtaining the matching protocol and the corresponding version number based on the matching result includes:
and obtaining protocol change contents of corresponding versions in the configuration protocol table based on the matching line numbers, and splicing the protocol change contents of the corresponding versions to obtain the matching protocol and the corresponding version numbers.
6. The method for upgrading a model according to claim 5, wherein,
the step of obtaining the protocol changing content of the corresponding version in the configuration protocol table based on the matching line number, and splicing the protocol changing content of the corresponding version to obtain the matching protocol comprises the following steps:
acquiring the basic protocol of the main version and the protocol change content of the next row;
inserting the protocol changing content of the next row into the base protocol of the main version to be combined to obtain a first combination result;
responding to the line number of the current inserted line being smaller than the matching line number, acquiring protocol modification content of the next line of the current inserted line, and inserting the first merging result to obtain a second merging result until the line number of the current inserted line is equal to the matching line number;
and taking the second combination result as the matching protocol.
7. The method for upgrading a model according to claim 1, wherein,
after the initial model is upgraded based on the matching protocol to obtain the upgrade model, the method further comprises the following steps:
judging whether the running library of the initial model supports the upgrade model or not;
if yes, operating the upgrade model based on the operation library;
if not, upgrading the operation library.
8. The method for upgrading a model according to claim 7, wherein,
the determining whether the running base of the initial model supports the upgrade model includes:
judging whether the version number of the operation library of the initial model is larger than the version number of a matching protocol;
if yes, determining that the running base of the initial model supports the upgrading model.
9. A model upgrade apparatus, comprising a memory and a processor coupled to the memory;
wherein the memory is for storing program data and the processor is for executing the program data to implement the model upgrade method according to any one of claims 1 to 8.
10. A computer storage medium for storing program data which, when executed by a computer, is adapted to carry out the model upgrade method according to any one of claims 1 to 8.
CN202311304249.7A 2023-10-10 2023-10-10 Model upgrading method, model upgrading device and computer storage medium Active CN117032765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311304249.7A CN117032765B (en) 2023-10-10 2023-10-10 Model upgrading method, model upgrading device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311304249.7A CN117032765B (en) 2023-10-10 2023-10-10 Model upgrading method, model upgrading device and computer storage medium

Publications (2)

Publication Number Publication Date
CN117032765A true CN117032765A (en) 2023-11-10
CN117032765B CN117032765B (en) 2024-01-16

Family

ID=88623143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311304249.7A Active CN117032765B (en) 2023-10-10 2023-10-10 Model upgrading method, model upgrading device and computer storage medium

Country Status (1)

Country Link
CN (1) CN117032765B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080098037A1 (en) * 2006-07-17 2008-04-24 Tim Neil Markup language based database upgrades
WO2017198015A1 (en) * 2016-05-17 2017-11-23 中兴通讯股份有限公司 Software upgrading method and apparatus
CN110879815A (en) * 2019-11-26 2020-03-13 上海莉莉丝科技股份有限公司 Method, device, equipment and storage medium for upgrading game database server
CN111008028A (en) * 2019-11-22 2020-04-14 杭州数式网络科技有限公司 Software upgrading method, device and storage medium
CN113641451A (en) * 2021-08-13 2021-11-12 济南浪潮数据技术有限公司 Method, device, equipment and readable medium for upgrading container in local area network
CN113872971A (en) * 2021-09-28 2021-12-31 芜湖雄狮汽车科技有限公司 New energy Internet of vehicles communication protocol upgrading method and device and cloud platform
CN115408032A (en) * 2022-09-29 2022-11-29 建信金融科技有限责任公司 Data model management method, device, server, medium and product
CN116208487A (en) * 2022-12-30 2023-06-02 杭州趣链科技有限公司 Method, device, equipment and medium for upgrading consensus algorithm in block chain system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080098037A1 (en) * 2006-07-17 2008-04-24 Tim Neil Markup language based database upgrades
WO2017198015A1 (en) * 2016-05-17 2017-11-23 中兴通讯股份有限公司 Software upgrading method and apparatus
CN111008028A (en) * 2019-11-22 2020-04-14 杭州数式网络科技有限公司 Software upgrading method, device and storage medium
CN110879815A (en) * 2019-11-26 2020-03-13 上海莉莉丝科技股份有限公司 Method, device, equipment and storage medium for upgrading game database server
CN113641451A (en) * 2021-08-13 2021-11-12 济南浪潮数据技术有限公司 Method, device, equipment and readable medium for upgrading container in local area network
CN113872971A (en) * 2021-09-28 2021-12-31 芜湖雄狮汽车科技有限公司 New energy Internet of vehicles communication protocol upgrading method and device and cloud platform
CN115408032A (en) * 2022-09-29 2022-11-29 建信金融科技有限责任公司 Data model management method, device, server, medium and product
CN116208487A (en) * 2022-12-30 2023-06-02 杭州趣链科技有限公司 Method, device, equipment and medium for upgrading consensus algorithm in block chain system

Also Published As

Publication number Publication date
CN117032765B (en) 2024-01-16

Similar Documents

Publication Publication Date Title
EP2600258A2 (en) Systems and methods for extraction of concepts for reuse-based schema matching
CN111831911A (en) Query information processing method and device, storage medium and electronic device
US9536444B2 (en) Evaluating expert opinions in a question and answer system
CN111310074B (en) Method and device for optimizing labels of interest points, electronic equipment and computer readable medium
CN111782826A (en) Knowledge graph information processing method, device, equipment and storage medium
CN111435367B (en) Knowledge graph construction method, system, equipment and storage medium
CN104408118A (en) Database establishing method and device
CN110929041A (en) Entity alignment method and system based on layered attention mechanism
CN113704343A (en) Data blood margin visualization implementation method and system in data processing
CN112582073B (en) Medical information acquisition method, device, electronic equipment and medium
CN115438158A (en) Intelligent dialogue method, device, equipment and storage medium
CN117032765B (en) Model upgrading method, model upgrading device and computer storage medium
CN114691630B (en) Smart supply chain big data sharing method and system
CN115577085A (en) Processing method and equipment for table question-answering task
CN114020962A (en) Video system management method, electronic device, and computer-readable storage medium
CN113934748A (en) Mixed type SQL script file generation method, execution method and device
CN111143582A (en) Multimedia resource recommendation method and device for updating associative words in real time through double indexes
CN108920676A (en) A kind of method and system handling diagram data
CN115168673B (en) Data graphical processing method, device, equipment and storage medium
CN112863627B (en) Medical quality control information detection method, system and storage medium
CN116755683B (en) Data processing method and related device
CN117708304B (en) Database question-answering method, equipment and storage medium
CN115393659B (en) Personalized classification process optimization method and device based on multi-level decision tree
CN117851835B (en) Deep learning internet of things recognition system and method
CN111553379B (en) Asynchronous training-based image data processing method and system

Legal Events

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