Power data management and control method, device and equipment based on large model and storage medium
Through the power data control method based on the big model, the deleted text input by the user is analyzed, the user needs are determined and the power data control code is generated, which solves the problems of inefficiency and error-prone traditional data management methods, and realizes efficient and accurate power data Control.
Patent Information
- Application Number
- CN202411518685.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-07
AI Technical Summary
In the field of power marketing, traditional data management methods rely on manual operations, are inefficient and prone to errors, especially when processing large amounts of power data, the programming requirements are high, making it difficult to effectively control power data.
Using a large model-based power data management method, the user needs are determined by analyzing the initial text input by the user, including the power data to be controlled and the power data management type, and then the target database and associated fields are determined, and this information is finally input to the large model. , generate power data control code.
It improves the efficiency and accuracy of power data management, reduces the error rate of manual programming, reduces the requirements for programming capabilities, and simplifies the data management process.
Smart Images

Figure CN119398973A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of large model technology, and in particular to a large model-based power data management method, device, equipment and storage medium. Background Art
[0002] Power marketing means that power companies, in a changing market environment, aim to meet people's power consumption needs. Through a series of market-related business activities, they provide power products and corresponding services that meet consumer needs, thereby achieving corporate goals.
[0003] In the field of power marketing, data management is a vital task that can help staff update data in a timely manner, or promptly discover and handle abnormal data to ensure the normal progress of power marketing activities.
[0004] Traditional data management methods often rely on manual operations, which are inefficient and prone to errors. In order to improve the above situation, in the prior art, staff write corresponding codes according to the purpose of data management, such as data query codes, to manage data. Since the amount of power marketing data is large and involves multiple databases and fields, the staff's programming ability is high, which is inefficient and prone to errors. Summary of the invention
[0005] The present invention provides a large-model-based power data management method, device, equipment and storage medium to solve the problem of power data management difficulties in the power marketing field.
[0006] According to one aspect of the present invention, a method for power data management and control based on a large model is provided, comprising:
[0007] Parsing the initial text input by the user to determine the user requirements contained in the initial text; the user requirements include the power data to be controlled and the power data control type;
[0008] Determine a target database matching the user demand according to the power data to be controlled in the user demand, and determine at least one candidate database table in the target database;
[0009] Determining, in the initial text, a field associated with the power data to be controlled, and determining, according to the associated field, a target database table in the at least one candidate database table;
[0010] The target database table, the associated fields, the power data to be controlled and the power data control type are input into the large model to generate a power data control code.
[0011] According to another aspect of the present invention, there is provided a large model-based power data management and control device, comprising:
[0012] A user demand determination module, used to parse the initial text input by the user and determine the user demand contained in the initial text; the user demand includes the power data to be controlled and the power data control type;
[0013] A candidate table determination module, configured to determine a target database matching the user demand according to the power data to be controlled in the user demand, and determine at least one candidate database table in the target database;
[0014] a target table determination module, configured to determine, in the initial text, a field associated with the power data to be managed and regulated, and determine, according to the associated field, a target database table in the at least one candidate database table;
[0015] The code generation module is used to input the target database table, the associated fields, the power data to be controlled and the power data control type into the large model to generate the power data control code.
[0016] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the large model-based power data management and control method described in any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the large model-based power data management and control method described in any embodiment of the present invention when executed.
[0021] According to another aspect of the present invention, a computer program product is provided, including a computer program, which, when executed by a processor, implements the large model-based power data management and control method of any embodiment of the present disclosure.
[0022] The technical solution of the embodiment of the present invention parses the initial text input by the user to determine the user needs contained in the initial text; the user needs include the power data to be controlled and the power data control type, and then according to the power data to be controlled in the user needs, a target database matching the user needs is determined, and at least one candidate database table is determined in the target database, and further, the associated fields with the power data to be controlled are determined in the initial text, and according to the associated fields, the target database table is determined in at least one candidate database table, and finally the target database table, the associated fields, the power data to be controlled and the power data control type are input into the big model to generate the power data control code, thereby improving the efficiency and accuracy of power data control.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 is a flow chart of a power data management and control method based on a large model provided according to the first embodiment of the present invention;
[0026] Figure 2 is a flow chart of a power data management and control method based on a large model provided according to Embodiment 2 of the present invention;
[0027] Figure 3 is a structural schematic diagram of a power data management and control device based on a large model provided according to Embodiment 3 of the present invention;
[0028] Figure 4 It is a structural schematic diagram of an electronic device that implements the large model-based power data management and control method of an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Embodiment 1
[0032] Figure 1 A flowchart of a power data control method based on a large model is provided for the first embodiment of the present invention. This embodiment can be applied to provide a corresponding power data control code by parsing the initial text input by the user. The method can be executed by a power data control device based on a large model. The power data control device based on a large model can be implemented in the form of hardware and / or software. The power data control device based on a large model can be configured in various general-purpose computing devices. Figure 1 As shown, the method includes:
[0033] S110, parsing the initial text input by the user to determine the user requirements contained in the initial text; the user requirements include the power data to be controlled and the power data control type.
[0034] The initial text is a natural language in text form input by the user, and the initial text contains one or more sentences. For example, the initial text is "Please query the customer information of the electricity consumption database in January 2023 with an electricity consumption of more than 1 million kWh."
[0035] User demand is the power data control operation that the user needs to implement. User demand includes the power data to be controlled and the power data control type. For example, the user demand can be to query the power quantity, query the user, insert the power data, delete the power data, and modify the power data. For example, if the user demand is to query the power consumption, the power data to be controlled is the power quantity, and the power data control type is query.
[0036] In an embodiment of the present invention, after obtaining the initial text input by the user, the initial text is parsed to determine the user needs contained in the initial text. Specifically, the initial text can be input into a large language model for semantic understanding to obtain the user needs contained in the initial text; the initial text can also be segmented to obtain at least one word, and the word is tagged with parts of speech. Finally, based on the part-of-speech tagging results and the identified named entities, a syntax tree is constructed to determine the dependency relationship between the words, and based on the dependency relationship, the user needs contained in the initial text are determined.
[0037] In a specific example, the initial text is "Please query the customer information of the electricity quantity exceeding 1 million kWh in the electricity quantity database in January 2023". The above initial text is segmented to obtain the words including: please, query, January 2023, electricity quantity, database, in, electricity quantity, exceeding, 1 million kWh, of, customer information. Further, the above words are tagged with parts of speech to determine the parts of speech of each word, such as noun, verb, and adjective. Further, based on the results of part of speech tagging, named entities can be identified in the above words, such as company name, location, and affiliated organization. Based on the above part of speech tagging results and the identified named entities, the dependency relationship between the words is determined by constructing a syntax tree. For example, the named entity identified in the word is "A City B District". In addition, the initial text also includes the verbs "electricity consumption" and "January 2023". According to the results of part of speech tagging and the identified named entities, the dependency relationship between the above words is determined by constructing a syntax tree. Finally, based on the dependency relationship, it is determined that the user demand contained in the initial text is to query the electricity consumption.
[0038] S120: Determine a target database matching the user's needs according to the power data to be controlled in the user's needs, and determine at least one candidate database table in the target database.
[0039] To facilitate power data management and control, the data required in the power marketing field can be stored in multiple different databases according to their functions and meanings. For example, a business expansion database, a power consumption database, an electricity bill database and a customer database can be set up separately.
[0040] In each database, the database tables and table fields in the database are named according to the set naming rules. For example, "unit" data is stored in a database table with a name prefix of "dw", and "electricity fee accounting" data is stored in a database table with a name prefix of "hs".
[0041] In the embodiment of the present invention, after determining the user needs, a target database matching the user needs is further determined from multiple databases based on the power data to be managed in the user needs. Specifically, the field names of the power data to be managed can be compared one by one with the names of multiple databases, and the database with a name similarity greater than a set threshold is determined as the target database.
[0042] Furthermore, after determining the target database, at least one candidate database table is determined in the target database according to the power data to be controlled. Specifically, according to the naming rules of the database tables, a relationship can be established between the power data to be controlled and the names of the database tables, and at least one candidate database table associated with the power data to be controlled can be determined. Exemplarily, the naming rule of the database table is to use the pinyin initials of the stored data type as the name prefix of the database table. When the power data to be controlled is the electric quantity, a database table with a name prefix of "dl" is searched in the target database as a candidate database table.
[0043] S130, determining in the initial text the fields associated with the power data to be managed and controlled, and determining a target database table from at least one candidate database table based on the associated fields.
[0044] In an embodiment of the present invention, in addition to user needs, the initial text may also include fields associated with the power data to be controlled in the user needs. After determining the user needs, the associated fields with the power data to be controlled are further determined based on the power data to be controlled in the user needs. Specifically, entity extraction can be performed based on the dependency relationship between words in the initial text to obtain the time, place, quantity, etc. contained therein. For example, in addition to the user need "query power consumption", the initial text also includes associated fields of "January 2023" and "District B, City A".
[0045] After determining the associated fields, further determine the target database table in at least one candidate database table according to the associated fields. Specifically, search for the associated fields in each candidate database table in turn, and if the candidate database table contains one or more associated fields, determine the candidate database table as the target database table.
[0046] S140, input the target database table, related fields, power data to be controlled and the power data control type into the big model to generate the power data control code.
[0047] In an embodiment of the present invention, a power data control code is generated based on a target database table, associated fields, power data to be controlled, and a power data control type. Specifically, the target database table, associated fields, power data to be controlled, and a power data control type can be input into a large model, so that the large model generates a data control code using the power data control type as a code operation type, the target database table as a code operation table, the associated fields as an operation condition, and the power data to be controlled as an operation object.
[0048] In a specific example, the target database table is table dl_1, the associated field is "January 2023", the power data to be controlled is power, and the control type of power data is query. Then the generated data control code is "SELECT power FROM dl_1 WHERE power>1000000 AND time = '2023-01'".
[0049] The technical solution of the embodiment of the present invention parses the initial text input by the user to determine the user needs contained in the initial text, wherein the user needs include the power data to be controlled and the power data control type, and then determines the target database matching the user needs based on the power data to be controlled in the user needs, and determines at least one candidate database table in the target database, further, determines the associated fields with the power data to be controlled in the initial text, and determines the target database table in at least one candidate database table based on the associated fields, and finally inputs the target database table, the associated fields, the power data to be controlled and the power data control type into the large model, obtains the power data control code output by the large model, and improves the efficiency and accuracy of power data control.
[0050] Embodiment 2
[0051] Figure 2 A flowchart of a large-model-based power data management method provided in the second embodiment of the present invention. This embodiment further refines the above-mentioned embodiments and provides specific steps for parsing the initial text input by the user to determine the user requirements contained in the initial text, determining a target database matching the user requirements based on the power data to be controlled in the user requirements, and determining at least one candidate database table in the target database, determining the associated fields with the power data to be controlled in the initial text, and determining the target database table in at least one candidate database table based on the associated fields, and generating a power data management code based on the target database table, associated fields, power data to be controlled, and power data management type. Figure 2 As shown, the method includes:
[0052] S210: Segment the initial text input by the user to obtain at least one word.
[0053] In the embodiment of the present invention, in order to facilitate the analysis of the initial text input by the user, the initial text input by the user is first segmented into words or phrases to obtain at least one word. Specifically, a rule-based word segmentation method, a statistical-based word segmentation method, a dictionary-based word segmentation method, or a deep learning-based word segmentation method can be used for word segmentation.
[0054] S220: Perform part-of-speech tagging on at least one word, and identify a named entity in the at least one word according to the part-of-speech tagging result.
[0055] In the embodiment of the present invention, after multiple words are obtained through word segmentation, the word parts are identified and labeled for each word to facilitate the subsequent identification of user needs. Specifically, the labeled corpus is used for model training, and the trained model is used to identify the part of speech of each word, such as name, verb, and adjective.
[0056] S230: Based on the part-of-speech tagging results and the identified named entities, a syntactic tree is constructed to determine the dependency relationship between words.
[0057] In an embodiment of the present invention, based on the part-of-speech tagging results and the identified named entities, a syntax tree is constructed to determine the dependency relationship between words. Specifically, proper nouns in the text, such as names of people, unit names, places, and organizations, are identified through conditional random fields or deep learning methods. After the named entities are identified, the dependency relationship between words is determined by constructing a syntax tree, which facilitates the semantic understanding of the initial text.
[0058] S240. Based on the dependency relationship, determine the user requirements contained in the initial text; the user requirements include the power data to be controlled and the power data control type.
[0059] In an embodiment of the present invention, based on the dependency relationship between the above-determined words, the user needs contained in the initial text are determined. Specifically, a classification algorithm such as a support vector machine, a random forest or a deep neural network can be used to determine the user needs contained in the initial text based on the above-mentioned dependency relationship. The user needs include the power data to be controlled and the power data control type. Exemplarily, the user demand is "query power", where "power" is the power data to be controlled, and "query" is the power data control type.
[0060] S250: Determine a target database matching the user's needs based on the power data to be controlled contained in the user's needs.
[0061] Before conducting power data management and control, in order to facilitate data management and control, different data are stored in different databases according to their functions and meanings. For example, separate databases for business expansion, electricity consumption, electricity charges and customers are established.
[0062] In the embodiment of the present invention, after determining the user demand, a target database matching the user demand is determined based on the power data to be controlled in the user demand. Specifically, the target database matching the user demand can be determined based on the name of the database and the similarity between the power data to be controlled.
[0063] S260. Determine, in the target database, at least one candidate database table associated with the power data to be managed and controlled according to the database table naming rule.
[0064] In the embodiment of the present invention, after determining the target database, it is necessary to further determine the database table to be queried in the target database. First, according to the database table naming rules, at least one candidate database table associated with the power data to be controlled is searched in the target database.
[0065] Exemplarily, the naming rule of the database table is to name it with the first letter of the pinyin of the stored data type as the naming prefix. For example, unit data is stored in a database table with "dw" as the naming prefix, and electricity bill accounting data is stored in a database table with "hs" as the naming prefix. When it is determined that the power data to be controlled in the user's needs is the amount of electricity, in the target database, search for a database table with "dl" as the naming prefix as a candidate database table. Of course, the naming rule of the database table can also be to name it with the full English name or English abbreviation of the stored data as the naming prefix, which is not specifically limited here.
[0066] Optionally, according to the database table naming rule, determining at least one candidate database table associated with the power data to be managed and controlled in the target database includes:
[0067] According to the database table naming rules, determine the target characters associated with the name of the power data to be managed and controlled;
[0068] In the target database, at least one candidate database table named with the target character as a prefix is searched.
[0069] In this optional embodiment, a specific method is provided for determining at least one candidate database table associated with the power data to be managed in the target database according to the database table naming rules: first, according to the database table naming rules, determine the target characters associated with the name of the power data to be managed. Exemplarily, the naming rule of the database table is to name it with the first letter of the pinyin of the stored data type as the naming prefix. If the name of the power data to be managed is "electricity", then the target character associated with the name of the store data to be managed is "dl". Furthermore, in the target database, search for at least one candidate database table named with "dl" as the prefix.
[0070] S270. Based on the dependency relationship, entities are extracted from the initial text to obtain controlled entities.
[0071] In the embodiment of the present invention, after determining the dependency relationship between words in the initial text, entities are further extracted from the initial text based on rules or machine learning methods to obtain control entities. For example, the control entities may be time, place, quantity, etc.
[0072] In a specific example, the initial text input by the user is "Please query the electricity consumption information of more than 1 million kWh in the electricity database in January 2023". After the initial text is segmented to obtain the dependency relationship between the words, the control entities contained therein are extracted based on the dependency relationship, including "January 2023", "electricity database", "electricity", "1 million kWh" and "electricity consumption information".
[0073] S280. Based on dependency relationships and control entities, a deep learning model is used to determine the fields associated with the power data to be controlled in the initial text.
[0074] In an embodiment of the present invention, a deep learning model is used to determine the associated fields with the power data to be controlled in the initial text based on the dependency relationship and the identified control entities. Specifically, using a deep learning model, for example, the dependency relationship between words and the control entities are input into a pre-trained language representation model (Bidirectional Encoder Representation from Transformers, referred to as BERT), and the associated fields with the power data to be controlled output by the model are obtained. In addition, the associated fields with the power data to be controlled can also be determined by using a vocabulary database, such as WordNet or a knowledge graph.
[0075] In a specific example, after the initial text is segmented to obtain the dependency relationship between the words, the control entities contained therein are extracted based on the dependency relationship, including "January 2023", "electricity database", "electricity", "1 million kWh" and "electricity consumption information". According to the dependency relationship and control entities, it can be determined that the associated fields with the power data to be controlled include "January 2023", "electricity" and "1 million kWh".
[0076] S290: Search for a candidate database table containing associated fields in at least one candidate database table to determine as a target database table.
[0077] In an embodiment of the present invention, after determining the associated fields with the power data to be controlled, a candidate database table containing the associated fields is searched in at least one candidate database table to be determined as a target database table. Exemplarily, the user demand is to query the power quantity, and according to the user demand, multiple candidate database tables named with the prefix "dl" are determined. Further, the candidate database table containing the associated fields, such as the time field and the power quantity field, is searched in the above candidate database table as the target database table.
[0078] Optionally, when no candidate database containing the associated field is found in at least one candidate database table, an exception prompt is provided to the user.
[0079] S291. Input the target database table, associated fields, power data to be controlled and the power data control type into the big model, so that the big model uses the power data control type as the code operation type, the target database table as the code operation table, the associated fields as the operation conditions, and the power data to be controlled as the operation object to generate the power data control code.
[0080] In an embodiment of the present invention, the target database table, the associated fields, the power data to be controlled, and the power data control type are finally input into the large model, so that the large model uses the power data control type as the code operation type, the target database table as the code operation table, the associated fields as the operation conditions, and the power data to be controlled as the operation object to generate the power data control code. Specifically, a greedy decoding algorithm can be used to guide the large language model to generate the power data control code.
[0081] For example, if the power data control type is query, the code operation type is determined to be query (e.g., SELECT), the target database table is the code operation table (e.g., dl_1), the associated field is the operation condition (e.g., WHERE power > 1000000 AND time = '2023-01'), and the power data to be controlled is the operation object (e.g., power consumption), and the power data control code is generated. For example, SELECT power consumption FROM dl_1 WHERE power > 1000000 AND time = '2023-01'.
[0082] Optionally, after generating the power data control code, it also includes:
[0083] Generate a reply template based on the historical text and initial text entered by the user within a set historical time period;
[0084] Insert the power data control code into the set position of the reply template to obtain the reply information.
[0085] In an embodiment of the present invention, after generating the power data management and control code, the large language model can also generate a reply template based on the historical text and initial text entered by the user within the set historical time period. Finally, the power data management and control code is inserted into the set position of the reply template to obtain the reply information. Exemplarily, the initial text entered by the user is "Please query the electricity consumption information of more than 1 million kWh in the electricity database in January 2023". According to the historical text and initial text entered by the user within the set historical time period, the generated reply template is "You can query the electricity consumption information of more than 1 million kWh in the electricity database in January 2023 through the following code:". Finally, the generated power data management and control code is inserted into the above-mentioned reply template to obtain the reply information.
[0086] In addition, the user can also directly input the initial text in the form of a command, such as "open", "close" and "set", etc. When the initial text input by the user is in the form of a command, the corresponding operation is directly performed according to the user command.
[0087] The technical solution of the embodiment of the present invention performs word segmentation on the initial text input by the user to obtain at least one word, performs part-of-speech tagging on the at least one word, and identifies named entities in the at least one word based on the part-of-speech tagging result, and determines the dependency relationship between the words by constructing a syntax tree based on the part-of-speech tagging result and the identified named entities. Based on the dependency relationship between the words, user needs and fields associated with the user needs can be identified. Furthermore, according to the user needs and the associated fields, the target database table that needs to be controlled can be determined, and a data control code for the target database table is generated, thereby improving the efficiency and accuracy of power data control.
[0088] Embodiment 3
[0089] Figure 3 This is a schematic diagram of the structure of a power data control device based on a large model provided in the third embodiment of the present invention. Figure 3 As shown, the device comprises:
[0090] The user demand determination module 310 is used to parse the initial text input by the user to determine the user demand contained in the initial text; the user demand includes the power data to be controlled and the power data control type;
[0091] A candidate table determination module 320 is used to determine a target database matching the user demand according to the power data to be controlled in the user demand, and determine at least one candidate database table in the target database;
[0092] A target table determination module 330 is used to determine a field associated with the power data to be controlled in the initial text, and determine a target database table in the at least one candidate database table according to the associated field;
[0093] The code generation module 340 is used to input the target database table, the associated fields, the power data to be controlled and the power data control type into the large model to generate the power data control code.
[0094] The technical solution of the embodiment of the present invention parses the initial text input by the user to determine the user needs contained in the initial text; the user needs include the power data to be controlled and the power data control type, and then according to the power data to be controlled in the user needs, a target database matching the user needs is determined, and at least one candidate database table is determined in the target database, and further, the associated fields with the power data to be controlled are determined in the initial text, and according to the associated fields, the target database table is determined in at least one candidate database table, and finally the target database table, the associated fields, the power data to be controlled and the power data control type are input into the big model to generate the power data control code, thereby improving the efficiency and accuracy of power data control.
[0095] Optionally, the user demand determination module 310 is specifically configured to:
[0096] Segment the initial text input by the user to obtain at least one word;
[0097] Performing part-of-speech tagging on the at least one word, and identifying a named entity in the at least one word according to the part-of-speech tagging result;
[0098] Based on the part-of-speech tagging results and the identified named entities, determining the dependency relationship between words by constructing a syntactic tree;
[0099] Based on the dependency relationship, user requirements included in the initial text are determined.
[0100] Optionally, the candidate table determination module 320 includes:
[0101] A target database determining unit, configured to determine a target database matching the user demand according to the power data to be controlled contained in the user demand;
[0102] The candidate table determination unit is used to determine at least one candidate database table associated with the power data to be controlled in the target database according to a database table naming rule.
[0103] Optionally, the target table determination module 330 is specifically configured to:
[0104] Based on the dependency relationship, entity extraction is performed in the initial text to obtain a control entity;
[0105] Based on the dependency relationship and the control entity, a deep learning model is used to determine, in the initial text, a field associated with the power data to be controlled;
[0106] The at least one candidate database table is searched for a candidate database table containing the associated field as a target database table.
[0107] Optionally, the code generation module 340 is used to
[0108] The target database table, the associated fields, the power data to be controlled and the power data control type are input into the big model, so that the big model generates the power data control code with the power data control type as the code operation type, the target database table as the code operation table, the associated fields as the operation conditions and the power data to be controlled as the operation object.
[0109] Optionally, the candidate table determination unit is specifically used to:
[0110] Determine, according to the database table naming rules, the target characters associated with the name of the power data to be managed and controlled;
[0111] In the target database, at least one candidate database table named with the target character as a prefix is searched.
[0112] Optionally, the large-model-based power data management and control device also includes:
[0113] A reply template generation module, used to generate a reply template according to the historical text input by the user within a set historical time period and the initial text after generating the power data management and control code;
[0114] The reply information generating module is used to insert the power data control code into the set position of the reply template to obtain the reply information.
[0115] The large model-based power data control device provided in the embodiment of the present invention can execute the large model-based power data control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0116] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0117] Embodiment 4
[0118] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.
[0119] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, applicators, blade applicators, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0120] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0121] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0122] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a large model-based power data management and control method.
[0123] In some embodiments, the power data control method based on the large model may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the power data control method based on the large model described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the power data control method based on the large model in any other appropriate manner (e.g., by means of firmware).
[0124] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0125] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or application.
[0126] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0127] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0128] The systems and techniques described herein may be implemented in a computing system that includes a backend component (e.g., as a data applier), or a computing system that includes a middleware component (e.g., an application applier), or a computing system that includes a frontend component (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0129] A computing system may include a client and an application server. The client and the application server are generally remote from each other and usually interact through a communication network. The relationship between the client and the application server is generated by computer programs running on corresponding computers and having a client-application server relationship with each other. The application server may be a cloud application server, also known as a cloud computing application server or a cloud host, which is a host product in a cloud computing application system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS applications.
[0130] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0131] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A power data management and control method based on a large model, characterized in that: include: Parsing the initial text input by the user to determine the user needs contained in the initial text; The user requirements include power data to be controlled and power data control type; Determine a target database matching the user demand according to the power data to be controlled in the user demand, and determine at least one candidate database table in the target database; Determining, in the initial text, a field associated with the power data to be controlled, and determining, according to the associated field, a target database table in the at least one candidate database table; The target database table, the associated fields, the power data to be controlled and the power data control type are input into the large model to generate a power data control code.
2. The method according to claim 1, characterized in that Parsing the initial text input by the user to determine the user needs contained in the initial text includes: Segment the initial text input by the user to obtain at least one word; Performing part-of-speech tagging on the at least one word, and identifying a named entity in the at least one word according to the part-of-speech tagging result; Based on the part-of-speech tagging results and the identified named entities, determining the dependency relationship between words by constructing a syntactic tree; Based on the dependency relationship, user requirements included in the initial text are determined.
3. The method according to claim 1, characterized in that According to the power data to be controlled in the user demand, a target database matching the user demand is determined, and at least one candidate database table is determined in the target database, including: Determine a target database matching the user demand according to the power data to be controlled contained in the user demand; According to the database table naming rule, at least one candidate database table associated with the power data to be controlled is determined in the target database.
4. The method according to claim 2, characterized in that: Determining in the initial text a field associated with the power data to be controlled, and determining a target database table in the at least one candidate database table according to the associated field, including: Based on the dependency relationship, entity extraction is performed in the initial text to obtain a control entity; Based on the dependency relationship and the control entity, a deep learning model is used to determine, in the initial text, a field associated with the power data to be controlled; The at least one candidate database table is searched for a candidate database table containing the associated field as a target database table.
5. The method according to claim 1, characterized in that Inputting the target database table, the associated fields, the power data to be controlled and the power data control type into the large model, and generating the power data control code, including: The target database table, the associated fields, the power data to be controlled and the power data control type are input into the big model, so that the big model generates the power data control code with the power data control type as the code operation type, the target database table as the code operation table, the associated fields as the operation conditions and the power data to be controlled as the operation object.
6. The method according to claim 3, characterized in that: According to the database table naming rule, determining at least one candidate database table associated with the power data to be controlled in the target database includes: Determine, according to the database table naming rules, the target characters associated with the name of the power data to be managed and controlled; In the target database, at least one candidate database table named with the target character as a prefix is searched.
7. The method according to claim 1, characterized in that After generating the power data control code, it also includes: Generate a reply template based on the historical text entered by the user within a set historical time period and the initial text; The power data control code is inserted into the set position of the reply template to obtain reply information.
8. A power data management and control device based on a large model, characterized in that: include: A user demand determination module, used to parse the initial text input by the user to determine the user demand contained in the initial text; The user requirements include power data to be controlled and power data control type; A candidate table determination module, configured to determine a target database matching the user demand according to the power data to be controlled in the user demand, and determine at least one candidate database table in the target database; a target table determination module, configured to determine, in the initial text, a field associated with the power data to be managed and regulated, and determine, according to the associated field, a target database table in the at least one candidate database table; The code generation module is used to input the target database table, the associated fields, the power data to be controlled and the power data control type into the large model to generate the power data control code.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the large model-based power data management and control method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the large model-based power data management and control method described in any one of claims 1 to 7 when executed.