CN114722025A - Data prediction method, device and equipment based on prediction model and storage medium - Google Patents

Data prediction method, device and equipment based on prediction model and storage medium Download PDF

Info

Publication number
CN114722025A
CN114722025A CN202210245689.9A CN202210245689A CN114722025A CN 114722025 A CN114722025 A CN 114722025A CN 202210245689 A CN202210245689 A CN 202210245689A CN 114722025 A CN114722025 A CN 114722025A
Authority
CN
China
Prior art keywords
model
prediction
predicted
data
prediction model
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.)
Pending
Application number
CN202210245689.9A
Other languages
Chinese (zh)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202210245689.9A priority Critical patent/CN114722025A/en
Publication of CN114722025A publication Critical patent/CN114722025A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • G06F16/212Schema design and management with details for data modelling support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0637Strategic management or analysis, e.g. setting a goal or target of an organisation; Planning actions based on goals; Analysis or evaluation of effectiveness of goals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Databases & Information Systems (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Data Mining & Analysis (AREA)
  • Marketing (AREA)
  • General Engineering & Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Technology Law (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to the technical field of artificial intelligence, and discloses a data prediction method, a device, equipment and a storage medium based on a prediction model, wherein when a prediction model to be processed is on line, a model file corresponding to the prediction model to be processed is obtained, an initial model file is obtained, characteristic information is obtained, and the initial model file and the characteristic information are stored in a database; receiving and analyzing a calling model command to acquire a serial number of a main body to be predicted, a date of data to be predicted and a prediction model identifier; and acquiring a target model file corresponding to the prediction model from the database, analyzing the target model file to load the target prediction model, acquiring a main body to be predicted and data to be predicted, and inputting the main body to be predicted and the data to be predicted into the target prediction model for prediction to obtain a prediction result. The application also relates to blockchain techniques, the characteristic information being stored in the blockchain. The method and the device realize rapid deployment of the model, and are beneficial to improving the prediction efficiency of the prediction model on the prediction data.

Description

Data prediction method, device and equipment based on prediction model and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a data prediction method, apparatus, device, and storage medium based on a prediction model.
Background
Currently, mainstream internet enterprises generally generate hundreds of millions of business data every day, and analysis and decision-making based on the business data become the key for the survival and development of the enterprises. Since the speed and magnitude of business data generation have greatly exceeded the limits of manual processing, large-scale machine learning algorithms have become an important means for daily data analysis. When an enterprise implements a large-scale machine learning algorithm, a corresponding engineering architecture is generally divided into an offline module and an online module. The off-line module mainly completes the learning process of the decision model, specifically comprises a model training module and a model evaluation module, and outputs a decision model file. The online module mainly completes the inference process of the decision model, specifically, converts the online request into an input format corresponding to the decision model, and obtains an inference result through a computation logic in the decision model.
In the existing data prediction mode of the prediction model, the prediction model needs to be trained, a model file is exported, the prediction model is deployed, and finally data prediction is carried out through the prediction model. In such a mode, because each model interface is not uniform, a plurality of models cannot be deployed and maintained, and when a new model application needs to be added, the application needs to be reapplied, the model cannot be rapidly online, so that rapid prediction of prediction data cannot be performed. Therefore, how to realize the rapid prediction of the prediction data by the prediction model is a technical problem to be solved urgently by the technical personnel in the field.
Disclosure of Invention
The embodiment of the application aims to provide a data prediction method, a data prediction device, data prediction equipment and a storage medium based on a prediction model so as to improve the prediction efficiency of the prediction model on prediction data.
In order to solve the above technical problem, an embodiment of the present application provides a data prediction method based on a prediction model, including:
when a to-be-processed prediction model is online, obtaining a model file corresponding to the to-be-processed prediction model to obtain an initial model file, obtaining characteristic information corresponding to the to-be-processed prediction model based on the initial model file, and storing the model file and the characteristic information in a database, wherein the to-be-processed prediction model comprises a new version prediction model and/or a brand-new prediction model;
when a model calling command is received, analyzing the model calling command to acquire a main body number to be predicted, a data date to be predicted and a prediction model identifier in the model calling command, wherein the prediction model identifier comprises a model number, a model version number and a model file name;
based on the prediction model identification, obtaining a model file corresponding to the prediction model identification from a database as a target model file, and analyzing the target model file to load a target prediction model corresponding to the target model file;
and acquiring the main body to be predicted and the data to be predicted based on the serial number of the main body to be predicted and the date of the data to be predicted, and inputting the main body to be predicted and the data to be predicted into the target prediction model for prediction to obtain a prediction result.
In order to solve the above technical problem, an embodiment of the present application provides a data prediction apparatus based on a prediction model, including:
the characteristic information acquisition module is used for acquiring a model file corresponding to the prediction model to be processed when the prediction model to be processed is online to obtain an initial model file, acquiring characteristic information corresponding to the prediction model to be processed based on the initial model file, and storing the model file and the characteristic information in a database, wherein the prediction model to be processed comprises a new version prediction model and/or a brand new prediction model;
the model command analysis module is used for analyzing the calling model command when receiving the calling model command so as to obtain a main body number to be predicted, a data date to be predicted and a prediction model identifier in the calling model command, wherein the prediction model identifier comprises a model number, a model version number and a model file name;
the prediction model loading module is used for acquiring a model file corresponding to the prediction model identification from a database based on the prediction model identification to serve as a target model file, and analyzing the target model file to load a target prediction model corresponding to the target model file;
and the prediction result generation module is used for acquiring the main body to be predicted and the data to be predicted based on the serial number of the main body to be predicted and the date of the data to be predicted, and inputting the main body to be predicted and the data to be predicted into the target prediction model for prediction to obtain a prediction result.
In order to solve the technical problems, the invention adopts a technical scheme that: a computer device is provided that includes, one or more processors; a memory for storing one or more programs for causing the one or more processors to implement the predictive model-based data prediction method of any one of the above.
In order to solve the technical problems, the invention adopts a technical scheme that: a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the prediction model-based data prediction method of any one of the above.
The embodiment of the invention provides a data prediction method, a data prediction device, data prediction equipment and a storage medium based on a prediction model. The method comprises the following steps: when the prediction model to be processed is on-line, obtaining a model file corresponding to the prediction model to be processed to obtain an initial model file, obtaining characteristic information corresponding to the prediction model to be processed based on the model file, and storing the model file and the characteristic information in a database; when a calling model command is received, analyzing the calling model command to acquire a serial number of a main body to be predicted, a date of data to be predicted and a prediction model identifier in the calling model command; based on the prediction model identification, obtaining a model file corresponding to the prediction model from a database as a target model file, and analyzing the target model file to load the target prediction model; and acquiring the main body to be predicted and the data to be predicted based on the serial number of the main body to be predicted and the date of the data to be predicted, and inputting the main body to be predicted and the data to be predicted into a target prediction model for prediction to obtain a prediction result. According to the method and the device, the trained model files are uniformly maintained in the database, the configured characteristic variables are maintained in the database, the problem of non-uniform interfaces is avoided, rapid deployment and maintenance of one or more models are achieved, and meanwhile when a new model is required to be added, the model files are only needed to be configured, so that subsequent online deployment of the models can be rapidly completed, and the prediction efficiency of the prediction model on the prediction data is improved.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is a flow chart of an implementation of a sub-process in a prediction model-based data prediction method according to an embodiment of the present application;
FIG. 2 is a flowchart of another implementation of a sub-process in the prediction model-based data prediction method according to the embodiment of the present application;
FIG. 3 is a flow chart of another implementation of a sub-process in the prediction model-based data prediction method according to the embodiment of the present application;
FIG. 4 is a flow chart of another implementation of a sub-process in the prediction model-based data prediction method according to the embodiment of the present application;
FIG. 5 is a flow chart of another implementation of a sub-process in the prediction model-based data prediction method according to the embodiment of the present application;
FIG. 6 is a flow chart of another implementation of a sub-process in the prediction model-based data prediction method according to the embodiment of the present application;
FIG. 7 is a schematic diagram of a data prediction apparatus based on a prediction model according to an embodiment of the present application;
fig. 8 is a schematic diagram of a computer device provided in an embodiment of the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
It should be noted that the data prediction method based on the prediction model provided in the embodiments of the present application is generally executed by a server, and accordingly, the data prediction apparatus based on the prediction model is generally configured in the server.
Referring to fig. 1, fig. 1 shows an embodiment of a data prediction method based on a prediction model.
It should be noted that, if the result is substantially the same, the method of the present invention is not limited to the flow sequence shown in fig. 1, and the method includes the following steps:
s1: when the prediction model to be processed is on line, obtaining a model file corresponding to the prediction model to be processed to obtain an initial model file, obtaining characteristic information corresponding to the prediction model to be processed based on the initial model file, and storing the model file and the characteristic information in a database, wherein the prediction model to be processed comprises a new version prediction model and/or a brand new prediction model.
In this embodiment, for a clearer understanding of the technical solution, the following describes the terminal related to the present application in detail. The embodiment of the application describes the technical scheme from the perspective of a server.
The server can receive the prediction model to be processed, obtain the model file and the characteristic variables configured by the user side, and store the characteristic variables in the database; when a model calling model command is obtained, obtaining a main body to be predicted and prediction data, and deploying a prediction model; and predicting the prediction data by the prediction model to obtain a prediction result, monitoring whether the prediction result is abnormal or not at regular time, if so, generating alarm information and sending the alarm information to the user side.
Secondly, the user side can receive the model file returned by the server and configure the corresponding characteristic variable and the model identification for the model file; the user side can also send a model calling command to the server to predict the predicted data and receive the prediction result and the alarm information.
Referring to fig. 2, fig. 2 shows an embodiment of step S1, which is described in detail as follows:
s11: and when the prediction model to be processed is on line, obtaining a model file corresponding to the prediction model to be processed to obtain an initial model file.
S12: and returning the initial model file to the user side to acquire the characteristic information configured by the user side for the initial model file, wherein the characteristic information comprises a characteristic variable and a model identifier.
S13: and according to a preset arrangement sequence, serializing the characteristic variables and storing the characteristic variables in a database, and storing the model files and the model identifications in the database.
Specifically, when the prediction models to be processed are uploaded to the server, the server needs to configure and store the prediction models, and when the prediction models need to be deployed subsequently, the corresponding model files can be quickly acquired from the stored model files, so that the prediction models can be deployed quickly. When the prediction models to be processed are uploaded, the server only needs to return the corresponding initial model files to the user side, the initial model files are obtained after training and have characteristic variables and parameters, the user side only needs to configure the corresponding characteristic variable parameters according to needs and return the characteristic variable parameters to the server for storage, the server can store the plurality of prediction models, and then rapid deployment can be performed on a certain model.
And each model has a set of characteristic variables, and the characteristic variables are determined in the previous model training and parameter adjusting processes. And the model is predicted according to the characteristics, so that the model has the best prediction effect. The features are ordered because when the model is predicted, the input data is combined into a vector, the data at each position in the vector has a specific meaning, and the order must be consistent with the training phase. For example, the training is carried out according to the age, the working age and the sex; when the characteristic variables are configured, the sequence of age, working life and gender is also kept, and the age is mistaken for the working life due to disorder of the sequence, so that a great deviation occurs in a prediction result.
The existing prediction model deployment is to firstly train a model aiming at a certain model, then export a model file, then deploy a prediction model, and finally carry out data prediction through the prediction model. Therefore, due to the fact that the model interfaces are not uniform, deployment and maintenance of a plurality of models cannot be achieved, when a new model application needs to be added, the application needs to be reapplied, and the model cannot be rapidly brought online. In the embodiment of the application, the trained model files are uniformly maintained in the database, and the configured characteristic variables are maintained in the database, so that the rapid deployment and maintenance of one or more models can be realized.
S2: when a model calling command is received, analyzing the model calling command to obtain a main body number to be predicted, a data date to be predicted and a prediction model identifier in the model calling command, wherein the model identifier comprises a model number, a model version number and a model file name.
Specifically, when model deployment and prediction are needed, a user side sends a model calling command to a server, the model calling command comprises a main body number to be predicted, a data date to be predicted and a prediction model identifier, and the model identifier comprises a model number, a model version number and a model file name. The forecast subject number, date of data to be forecasted may be the company number and the reporting period of the financial report.
S3: and based on the prediction model identification, obtaining a model file corresponding to the prediction model identification from the database as a target model file, and analyzing the target model file to load a target prediction model corresponding to the target model file.
Referring to fig. 3, fig. 3 shows an embodiment of step S3, which is described in detail as follows:
s31: and traversing the database based on the prediction model identification to obtain a model file corresponding to the prediction model identification as a target model file.
S32: and analyzing the target model file to obtain parameters and characteristic variables corresponding to the target model file.
S33: based on the parameters and the characteristic variables, a target prediction model is deployed in the operating environment.
Specifically, when the prediction models are uploaded, model identifiers of the prediction models are configured and stored in the database. After a model calling command is obtained, traversing the database based on the prediction model identification, and obtaining a model file corresponding to the obtained prediction model identification as a target model file; and then analyzing the target model file to obtain parameters and characteristic variables corresponding to the target model file, and deploying the prediction model in the operating environment based on the parameters and the characteristic variables, so that the model file is converted into the prediction model, and the prediction model is deployed in the operating environment.
In this embodiment, based on the prediction model identifier, the database is traversed to obtain a model file corresponding to the prediction model identifier as a target model file, the target model file is then analyzed to obtain parameters and characteristic variables corresponding to the target model file, and then, based on the parameters and the characteristic variables, the prediction model is deployed in the operating environment to realize rapid deployment of the model.
S4: and acquiring the main body to be predicted and the data to be predicted based on the serial number of the main body to be predicted and the date of the data to be predicted, and inputting the main body to be predicted and the data to be predicted into a target prediction model for prediction to obtain a prediction result.
Specifically, a main body to be predicted is obtained according to the serial number of the main body to be predicted, and data to be predicted is obtained from a database according to the main body to be predicted and the date of the data to be predicted; and inputting the main body to be predicted and the data to be predicted into a target prediction model for prediction to obtain a prediction result.
When the prediction model to be processed is on line, obtaining a model file corresponding to the prediction model to be processed, obtaining characteristic information corresponding to the prediction model to be processed based on the model file, and storing the model file and the characteristic information in a database; when a calling model command is received, analyzing the calling model command to acquire a serial number of a main body to be predicted, a date of data to be predicted and a prediction model identifier in the calling model command; based on the prediction model identification, acquiring a target model file corresponding to the prediction model from a database, and analyzing the target model file to load the target prediction model; and acquiring the main body to be predicted and the data to be predicted based on the serial number of the main body to be predicted and the date of the data to be predicted, and inputting the main body to be predicted and the data to be predicted into a target prediction model for prediction to obtain a prediction result. According to the method and the device, the trained model files are uniformly maintained in the database, the configured characteristic variables are maintained in the database, the problem of non-uniform interfaces is avoided, rapid deployment and maintenance of one or more models are achieved, and meanwhile when a new model is required to be added, the model files are only needed to be configured, so that subsequent online deployment of the models can be rapidly completed, and the prediction efficiency of the prediction model on the prediction data is improved.
Referring to fig. 4, fig. 4 shows an embodiment of step S4, which is described in detail as follows:
s41: and traversing the database according to the serial number of the main body to be predicted to obtain the main body to be predicted.
S42: and acquiring the data to be predicted from the database based on the prediction subject and the date of the data to be predicted.
S43: and inputting the main body to be predicted and the data to be predicted into a target prediction model for prediction to obtain a prediction result.
Specifically, each main body to be predicted and data to be predicted are stored in a database in advance, and when prediction is needed, the database is traversed according to the obtained serial number of the main body to be predicted to obtain the main body to be predicted; and acquiring data to be predicted from the database based on the prediction subject and the date of the data to be predicted, and finally inputting the subject to be predicted and the data to be predicted into a target prediction model for prediction to obtain a prediction result. In the embodiment, the main body to be predicted and the data to be predicted are obtained by traversing the database and then are input into the prediction model for prediction to obtain the prediction result, so that the rapid prediction of the data to be predicted is realized, and the prediction efficiency of the prediction model on the prediction data is improved.
Referring to fig. 5, fig. 5 shows an embodiment of step S43, which is described in detail as follows:
s431: and inputting the subject to be predicted and the data to be predicted into a target prediction model.
S432: and identifying data corresponding to the characteristic variables in the data to be predicted as target data based on the characteristic variables of the target prediction model.
S433: and predicting the target data according to the preset weight of the characteristic variable to obtain a prediction result.
In one embodiment, the subject to be predicted is company number S001, the date of the data to be predicted is report period 20201231, and records satisfying the condition are searched from the financial data table according to the two data. And acquiring the financial data of the first record according to the request condition, acquiring numerical values corresponding to three characteristic variables in the financial report of the company in the period, and sequencing the numerical values according to the configured sequence. The model reads the values of these three parameters, giving the corresponding default risk probability. For example, the higher the asset liability rate, the lower the liquidity rate, and the lower the sales profit rate, the greater the risk of default, giving a default probability value of 0.8 between 0 and 1. Conversely, if the asset liability rate is low, the liquidity rate is high, and the sales profit rate is also high, a low default probability value of 0.1 is given. After the training of the model is finished, the weights of all the characteristic variables are obtained, and therefore when new data are input, a final prediction result can be calculated according to the existing weights and the data. The preset weight is set according to actual conditions, and is not limited herein.
Referring to fig. 6, fig. 6 shows a specific embodiment after step S4, which is described in detail as follows:
S4A: and detecting whether the prediction model obtains a prediction result or not in a timing detection mode to obtain a detection result.
S4B: and if the detection result is that the prediction result is not obtained, judging that the prediction model is abnormal, and generating alarm information.
S4C: and if the detection result is that the prediction result is obtained, traversing the prediction result and judging whether the prediction result comprises the error identification.
S4D: and if the error identification is included, judging that the prediction model is abnormal, and generating alarm information.
Specifically, whether a prediction result is obtained by monitoring the prediction model at regular time is judged, if the prediction result is not generated, the prediction model is judged to be abnormal, and alarm information is generated; if the prediction result is generated regularly, the prediction result needs to be further detected, whether an error identifier is generated in the prediction result is judged, if the error identifier can be FAILED, the prediction model is judged to be abnormal, and alarm information is generated.
In one embodiment, referring to table 1, table 1 is a sample prediction results table, assuming that new companies are introduced every day, there should normally be new prediction results every day, i.e. the prediction time column is continuous by date. If the predicted time is checked to have no data of a certain day, the abnormal model calling is likely to occur, and the alarm information needs to be sent; or the prediction time column is continuous, but a FAILED (indicating that model prediction fails) appears in the value of the prediction result column, which indicates that the model call is normal, but the prediction result cannot be normally predicted due to data lack or excessive number of introduced characteristic variables in the prediction process, and alarm information also needs to be sent.
Company number Period of reporting Predicted results Predicting time
S001 20201231 0.2 2021-01-01
S002 20201231 0.1 2021-01-02
S003 20201231 0.15 2021-01-03
S001 20200930 FAILED 2021-01-04
TABLE 1
It is emphasized that, in order to further ensure the privacy and security of the feature information, the feature information may also be stored in a node of a block chain.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
Referring to fig. 7, as an implementation of the method shown in fig. 1, the present application provides an embodiment of a data prediction apparatus based on a prediction model, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 1, and the apparatus may be applied to various electronic devices.
As shown in fig. 7, the data prediction apparatus based on the prediction model of the present embodiment includes: a characteristic information obtaining module 51, a model command analyzing module 52, a prediction model loading module 53 and a prediction result generating module 54, wherein:
the characteristic information obtaining module 51 is configured to obtain a model file corresponding to the prediction model to be processed when the prediction model to be processed is online, obtain an initial model file, obtain characteristic information corresponding to the prediction model to be processed based on the initial model file, and store the model file and the characteristic information in a database, where the prediction model to be processed includes a new version prediction model and/or a brand new prediction model;
the model command analysis module 52 is configured to, when a model calling command is received, analyze the model calling command to obtain a main body number to be predicted, a data date to be predicted, and a prediction model identifier in the model calling command, where the prediction model identifier includes a model number, a model version number, and a model file name;
a prediction model loading module 53, configured to obtain, based on the prediction model identifier, a model file corresponding to the prediction model identifier from the database, as a target model file, and analyze the target model file to load a target prediction model corresponding to the target model file;
and the prediction result generation module 54 is configured to obtain the subject to be predicted and the data to be predicted based on the number of the subject to be predicted and the date of the data to be predicted, and input the subject to be predicted and the data to be predicted into the target prediction model for prediction to obtain a prediction result.
Further, the feature information obtaining module 51 includes:
the model file acquisition unit is used for acquiring a model file corresponding to the prediction model to be processed when the prediction model to be processed is on line, so as to obtain an initial model file;
the model file returning unit is used for returning the initial model file to the user terminal so as to acquire characteristic information configured by the user terminal on the initial model file, wherein the characteristic information comprises a characteristic variable and a model identifier;
and the characteristic storage unit is used for serializing and storing the characteristic variables in the database according to a preset arrangement sequence and storing the model file and the model identification in the database.
Further, the prediction model loading module 53:
a target model file obtaining unit, configured to traverse the database based on the prediction model identifier, and obtain a model file corresponding to the prediction model identifier as a target model file;
the target model file analyzing unit is used for analyzing the target model file to obtain parameters and characteristic variables corresponding to the target model file;
and the prediction model deployment unit is used for deploying the target prediction model in the operating environment based on the parameters and the characteristic variables.
Further, the prediction result generation module 54 includes:
the device comprises a to-be-predicted main body obtaining unit, a to-be-predicted main body obtaining unit and a to-be-predicted main body obtaining unit, wherein the to-be-predicted main body obtaining unit is used for traversing a database according to the serial number of the to-be-predicted main body to obtain the to-be-predicted main body;
the data generating unit to be predicted is used for acquiring data to be predicted from a database based on a prediction subject and the date of the data to be predicted;
and the prediction model prediction unit is used for inputting the main body to be predicted and the data to be predicted into the target prediction model for prediction to obtain a prediction result.
Further, the prediction model prediction unit includes:
a prediction model receiving subunit, configured to input a subject to be predicted and data to be predicted into a target prediction model;
the target data generation subunit is used for identifying data corresponding to the characteristic variables in the data to be predicted as target data based on the characteristic variables of the target prediction model;
and the target data prediction subunit is used for predicting the target data according to the preset weight of the characteristic variable to obtain a prediction result.
Further, the prediction result generation module 54 further includes:
the detection result generation module is used for detecting whether the prediction model obtains a prediction result or not in a timing detection mode to obtain a detection result;
the warning information generation module is used for judging that the prediction model is abnormal and generating warning information if the detection result indicates that the prediction result is not obtained;
the prediction result traversing module is used for traversing the prediction result and judging whether the prediction result comprises an error identifier or not if the detection result is the prediction result;
and the prediction model abnormity module is used for judging that the prediction model is abnormal if the error identification is included, and generating alarm information.
It should be emphasized that, in order to further ensure the privacy and security of the feature information, the feature information may also be stored in a node of a block chain.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 8, fig. 8 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 6 includes a memory 61, a processor 62, and a network interface 63 communicatively connected to each other via a system bus. It is noted that only three components, memory 61, processor 62, and network interface 63, are shown in the figure as computer device 6, but it is understood that not all of the illustrated components are required to be implemented, and that more or fewer components may alternatively be implemented. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 61 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as a hard disk or a memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 6. Of course, the memory 61 may also include both internal and external storage devices for the computer device 6. In this embodiment, the memory 61 is generally used for storing an operating system and various types of application software installed in the computer device 6, such as program codes of a data prediction method based on a prediction model. Further, the memory 61 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 62 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 62 is typically used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is configured to execute the program code stored in the memory 61 or process data, such as the program code of the prediction model-based data prediction method described above, to implement various embodiments of the prediction model-based data prediction method.
Network interface 63 may include a wireless network interface or a wired network interface, with network interface 63 typically being used to establish communication connections between computer device 6 and other electronic devices.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing a computer program, which is executable by at least one processor to cause the at least one processor to perform the steps of a prediction model-based data prediction method as described above.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method of the embodiments of the present application.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A data prediction method based on a prediction model is characterized by comprising the following steps:
when a to-be-processed prediction model is online, obtaining a model file corresponding to the to-be-processed prediction model to obtain an initial model file, obtaining characteristic information corresponding to the to-be-processed prediction model based on the initial model file, and storing the model file and the characteristic information in a database, wherein the to-be-processed prediction model comprises a new version prediction model and a brand-new prediction model;
when a model calling command is received, analyzing the model calling command to acquire a main body number to be predicted, a data date to be predicted and a prediction model identifier in the model calling command, wherein the prediction model identifier comprises a model number, a model version number and a model file name;
based on the prediction model identification, obtaining a model file corresponding to the prediction model identification from a database as a target model file, and analyzing the target model file to load a target prediction model corresponding to the target model file;
and acquiring the main body to be predicted and the data to be predicted based on the serial number of the main body to be predicted and the date of the data to be predicted, and inputting the main body to be predicted and the data to be predicted into the target prediction model for prediction to obtain a prediction result.
2. The data prediction method based on the prediction model according to claim 1, wherein the obtaining a model file corresponding to the prediction model to be processed when the prediction model to be processed is online to obtain an initial model file, obtaining feature information corresponding to the prediction model to be processed based on the initial model file, and storing the model file and the feature information in a database comprises:
when the online of the prediction model to be processed is received, obtaining a model file corresponding to the prediction model to be processed to obtain the initial model file;
returning the initial model file to a user side to obtain the characteristic information configured by the user side for the initial model file, wherein the characteristic information comprises a characteristic variable and a model identifier;
and according to a preset arrangement sequence, serializing and storing the characteristic variables in the database, and storing the model file and the model identification in the database.
3. The method according to claim 1, wherein the obtaining a model file corresponding to the prediction model identifier from a database as an object model file based on the prediction model identifier, and parsing the object model file to load an object prediction model corresponding to the object model file comprises:
traversing the database based on the prediction model identification to obtain a model file corresponding to the prediction model identification as the target model file;
analyzing the target model file to obtain parameters and characteristic variables corresponding to the target model file;
deploying the target prediction model in an operating environment based on the parameters and the feature variables.
4. The data prediction method based on the prediction model as claimed in claim 1, wherein the obtaining the subject to be predicted and the data to be predicted based on the subject number to be predicted and the date of the data to be predicted, and inputting the subject to be predicted and the data to be predicted into the target prediction model for prediction to obtain a prediction result comprises:
traversing the database according to the serial number of the main body to be predicted to obtain the main body to be predicted;
acquiring the data to be predicted from the database based on the prediction subject and the date of the data to be predicted;
and inputting the main body to be predicted and the data to be predicted into the target prediction model for prediction to obtain the prediction result.
5. The data prediction method based on the prediction model as claimed in claim 4, wherein the inputting the subject to be predicted and the data to be predicted into the target prediction model for prediction to obtain the prediction result comprises:
inputting the subject to be predicted and the data to be predicted into the target prediction model;
identifying data corresponding to the characteristic variables in the data to be predicted as target data based on the characteristic variables of the target prediction model;
and predicting the target data according to the preset weight of the characteristic variable to obtain the prediction result.
6. The data prediction method based on the prediction model according to any one of claims 1 to 5, wherein the method further comprises, after obtaining the prediction result by obtaining the subject to be predicted and the data to be predicted based on the subject number to be predicted and the date of the data to be predicted and inputting the subject to be predicted and the data to be predicted into the target prediction model for prediction:
detecting whether the prediction model obtains the prediction result or not in a timing detection mode to obtain a detection result;
if the detection result is that the prediction result is not obtained, judging that the prediction model is abnormal, and generating alarm information;
if the detection result is that the prediction result is obtained, traversing the prediction result, and judging whether the prediction result comprises an error identifier;
and if the error identification is included, judging that the prediction model is abnormal, and generating the alarm information.
7. A data prediction apparatus based on a prediction model, comprising:
the characteristic information acquisition module is used for acquiring a model file corresponding to the prediction model to be processed when the prediction model to be processed is online to obtain an initial model file, acquiring characteristic information corresponding to the prediction model to be processed based on the initial model file, and storing the model file and the characteristic information in a database, wherein the prediction model to be processed comprises a new version prediction model and/or a brand new prediction model;
the model command analysis module is used for analyzing the calling model command when receiving the calling model command so as to obtain a main body number to be predicted, a data date to be predicted and a prediction model identifier in the calling model command, wherein the prediction model identifier comprises a model number, a model version number and a model file name;
the prediction model loading module is used for acquiring a model file corresponding to the prediction model identification from a database based on the prediction model identification to serve as a target model file, and analyzing the target model file to load a target prediction model corresponding to the target model file;
and the prediction result generation module is used for acquiring the main body to be predicted and the data to be predicted based on the serial number of the main body to be predicted and the date of the data to be predicted, and inputting the main body to be predicted and the data to be predicted into the target prediction model for prediction to obtain a prediction result.
8. The prediction model-based data prediction apparatus according to claim 7, wherein the feature information obtaining module includes:
the model file obtaining unit is used for obtaining a model file corresponding to the prediction model to be processed when the model to be processed is received to be online, and obtaining the initial model file;
the model file returning unit is used for returning the initial model file to a user side so as to acquire the characteristic information configured by the user side for the initial model file, wherein the characteristic information comprises a characteristic variable and a model identifier;
and the characteristic storage unit is used for storing the characteristic variables in the database in a serialized manner according to a preset arrangement sequence and storing the model file and the model identification in the database.
9. A computer device comprising a memory having stored therein a computer program and a processor that, when executing the computer program, implements a prediction model-based data prediction method according to any one of claims 1 to 6.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, implements a prediction model-based data prediction method according to any one of claims 1 to 6.
CN202210245689.9A 2022-03-10 2022-03-10 Data prediction method, device and equipment based on prediction model and storage medium Pending CN114722025A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210245689.9A CN114722025A (en) 2022-03-10 2022-03-10 Data prediction method, device and equipment based on prediction model and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210245689.9A CN114722025A (en) 2022-03-10 2022-03-10 Data prediction method, device and equipment based on prediction model and storage medium

Publications (1)

Publication Number Publication Date
CN114722025A true CN114722025A (en) 2022-07-08

Family

ID=82236850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210245689.9A Pending CN114722025A (en) 2022-03-10 2022-03-10 Data prediction method, device and equipment based on prediction model and storage medium

Country Status (1)

Country Link
CN (1) CN114722025A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708579A (en) * 2023-08-04 2023-09-05 浪潮电子信息产业股份有限公司 Data access method, device, electronic equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708579A (en) * 2023-08-04 2023-09-05 浪潮电子信息产业股份有限公司 Data access method, device, electronic equipment and computer readable storage medium
CN116708579B (en) * 2023-08-04 2024-01-12 浪潮电子信息产业股份有限公司 Data access method, device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN112052111B (en) Processing method, device and equipment for server abnormity early warning and storage medium
CN112700131B (en) AB test method and device based on artificial intelligence, computer equipment and medium
CN114662618B (en) Failure diagnosis method and device based on federal learning and related equipment
CN115841255B (en) On-site early warning method and system for building engineering based on-line analysis
CN113822421A (en) Neural network based anomaly positioning method, system, equipment and storage medium
CN109409780B (en) Change processing method, device, computer equipment and storage medium
CN113723956A (en) Abnormity monitoring method, device, equipment and storage medium
CN113327037A (en) Model-based risk identification method and device, computer equipment and storage medium
Kovtun et al. Model of information system communication in aggressive cyberspace: reliability, functional safety, economics
CN112950344A (en) Data evaluation method and device, electronic equipment and storage medium
CN115936895A (en) Risk assessment method, device and equipment based on artificial intelligence and storage medium
CN114722025A (en) Data prediction method, device and equipment based on prediction model and storage medium
CN113946492A (en) Intelligent operation and maintenance method, device, equipment and storage medium
CN118154186A (en) Method, device and server for determining abnormal operation of transaction service
CN111651652B (en) Emotion tendency identification method, device, equipment and medium based on artificial intelligence
CN117234844A (en) Cloud server abnormality management method and device, computer equipment and storage medium
US20240160811A1 (en) Industrial data extraction
US20240103504A1 (en) Blockchain-enabled digital twins for industrial automation systems
JP7062505B2 (en) Equipment management support system
CN115757075A (en) Task abnormity detection method and device, computer equipment and storage medium
CN112363747B (en) Data updating method and device in relay equipment online inspection process
CN116149971B (en) Equipment fault prediction method and device, electronic equipment and storage medium
CN116795064B (en) DCS-based alarm management method, electronic equipment and storage medium
CN117951625B (en) Device cluster operation abnormity determining method, electronic device and storage medium
CN116611351B (en) Rocket sublevel life assessment method, computer equipment and readable storage medium

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