CN115292436A - Carbon emission information generation method, apparatus, electronic device, medium, and program product - Google Patents
Carbon emission information generation method, apparatus, electronic device, medium, and program product Download PDFInfo
- Publication number
- CN115292436A CN115292436A CN202210739115.7A CN202210739115A CN115292436A CN 115292436 A CN115292436 A CN 115292436A CN 202210739115 A CN202210739115 A CN 202210739115A CN 115292436 A CN115292436 A CN 115292436A
- Authority
- CN
- China
- Prior art keywords
- item
- article
- carbon emission
- vector
- identifier
- 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
Links
- 229910052799 carbon Inorganic materials 0.000 title claims abstract description 369
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 title claims abstract description 368
- 238000000034 method Methods 0.000 title claims abstract description 65
- 239000013598 vector Substances 0.000 claims abstract description 395
- 230000004044 response Effects 0.000 claims description 32
- 238000004140 cleaning Methods 0.000 claims description 24
- 238000004590 computer program Methods 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 13
- 230000015654 memory Effects 0.000 claims description 8
- 239000007787 solid Substances 0.000 claims 2
- 238000006386 neutralization reaction Methods 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 11
- 238000004364 calculation method Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 4
- 230000008520 organization Effects 0.000 description 4
- CURLTUGMZLYLDI-UHFFFAOYSA-N Carbon dioxide Chemical compound O=C=O CURLTUGMZLYLDI-UHFFFAOYSA-N 0.000 description 2
- 230000002457 bidirectional effect Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000004134 energy conservation Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 229910002092 carbon dioxide Inorganic materials 0.000 description 1
- 239000001569 carbon dioxide Substances 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 230000009193 crawling Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 238000003064 k means clustering Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000006403 short-term memory Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000002054 transplantation Methods 0.000 description 1
- 238000005406 washing Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/31—Indexing; Data structures therefor; Storage structures
- G06F16/316—Indexing structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/335—Filtering based on additional data, e.g. user or group profiles
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/26—Government or public services
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/80—Management or planning
- Y02P90/84—Greenhouse gas [GHG] management systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Tourism & Hospitality (AREA)
- Development Economics (AREA)
- Educational Administration (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Economics (AREA)
- General Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Embodiments of the present disclosure disclose a carbon emission information generation method, apparatus, electronic device, medium, and program product. One embodiment of the method comprises: inputting an article text into a preset entity recognition model to obtain an article text vector; determining similar article identifications according to the article information vector set and the article text vectors; and generating the carbon emission information of the goods according to the similar goods identification and the carbon emission database of the goods. The embodiment is related to carbon neutralization, realizes the generation of carbon emission information of the article, reduces the consumption of storage resources and computing resources, and improves the retrieval efficiency.
Description
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method, an apparatus, an electronic device, a medium, and a program product for generating carbon emission information.
Background
With the development of society, people pay more attention to energy conservation and emission reduction, and advocate low-carbon life. In order to better realize energy conservation and emission reduction, carbon neutralization is achieved, and it is one of the purposes that the carbon emission amount of an article is determined so as to quantify the carbon emission degree. The existing way of generating carbon emission of articles is as follows: and searching the carbon factors in the structured table in a mode of traversing table names, fields and the like, so as to generate the carbon emission of the article.
However, the inventors have found that when the carbon emissions of the article are generated in the above manner, there are often technical problems as follows:
in addition, the carbon factors are searched in the structured table by traversing table names, fields and the like, so that a large amount of storage resources and calculation resources are consumed, and the searching efficiency is low.
The above information disclosed in this background section is only for enhancement of understanding of the background of the inventive concept and, therefore, it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art in this country.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose a carbon emission information generation method, apparatus, electronic device, computer readable medium and program product to solve one or more of the technical problems set forth in the background section above.
In a first aspect, some embodiments of the present disclosure provide a carbon emission information generating method, including: inputting an article text into a preset entity recognition model to obtain an article text vector; determining similar article identifications according to the article information vector set and the article text vectors; and generating article carbon emission information according to the similar article identification and the article carbon emission database.
Optionally, the preset entity recognition model is a combination model, and the preset entity recognition model includes a BERT submodel, a bidirectional long-short term memory network submodel, and a conditional random field submodel.
Optionally, the article text vector includes at least one article text entity vector and at least one article text label, where an article text entity vector in the at least one article text entity vector corresponds to an article text label in the at least one article text label, and an article text label in the at least one article text label corresponds to an article label probability; and before determining similar item identifiers according to the item information vector set and the item text vectors, the method further comprises: for each item text entity vector in the at least one item text entity vector, in response to determining that the item tag probability of the item text tag corresponding to the item text entity vector is less than or equal to a preset threshold, deleting the item text tag and the item text entity vector from the item text vector.
Optionally, before generating the item carbon emission information according to the similar item identifier and the item carbon emission database, the method further includes: acquiring initial carbon emission factor data; cleaning the initial carbon emission factor data to obtain carbon emission factor data after cleaning; carrying out duplicate removal treatment on the carbon emission factor data after the cleaning treatment to obtain the carbon emission factor data after the duplicate removal treatment; adjusting the format of the carbon emission factor data subjected to the duplicate removal processing to be a preset data format; storing the carbon emission factor data adjusted to the preset data format as a carbon emission factor data file; generating a carbon emission factor side file according to the carbon emission factor data file; and importing the carbon emission factor data file and the carbon emission factor side file into an initial database to obtain an imported initial database serving as a carbon emission database.
Optionally, the article information vector set includes at least one article information vector group, an article information vector group in the at least one article information vector group includes an article information center cluster vector, and an article information vector in the article information vector group corresponds to a vector identifier; and the determining the similar article identification according to the article information vector set and the article text vector comprises: determining a target article information center cluster vector according to the article text vector and an article information center cluster vector included in an article information vector group in the at least one article information vector group; determining an article information vector group corresponding to the target article information center cluster vector as a target article information vector group; generating an article vector similarity set according to the article text vector and the target article information vector group; determining a target article information vector corresponding to the article vector similarity meeting a preset similarity condition in the article vector similarity set as a similar article information vector; and determining the vector identifier corresponding to the similar article information vector as a similar article identifier.
Optionally, at least one item data is stored in the item carbon emission database, and the item data in the at least one item data includes an item identifier and item carbon emission factor data; and generating article carbon emission information according to the similar article identifier and the article carbon emission database, wherein the generation comprises the following steps: in response to the article carbon emission database having the same article identifier as the similar article identifier, selecting article data including the same article identifier as the similar article identifier from the article carbon emission database as target article data; determining the item carbon emission factor data included in the target item data as target item carbon emission factor data; and generating the carbon emission amount of the object as the carbon emission information of the object according to the carbon emission factor data of the object.
Optionally, an article text label in the at least one article text label corresponds to a label level; and the determining a target item information center cluster vector according to the item text vector and an item information center cluster vector included in an item information vector group in the at least one item information vector group, includes: determining the object text label of which the corresponding label level in the object text vector meets a preset level condition as a target object text label; and determining a target article information center cluster vector according to the target article text label and an article information center cluster vector included in the article information vector group in the at least one article information vector group.
Optionally, the similar item identifier includes at least one similar item sub-identifier, and the at least one similar item sub-identifier is arranged in a node order; and generating article carbon emission information according to the similar article identifier and the article carbon emission database, wherein the generating comprises: determining the similar article sub-identifier positioned at the tail end in the at least one similar article sub-identifier as a target similar article sub-identifier; according to the article carbon emission database, the article text vector and the target similar article sub-identifier, executing the following generation steps: in response to that the target similar item sub-identifier is a similar item sub-identifier located at the tail of the at least one similar item sub-identifier and the same item identifier as the target similar item sub-identifier exists in the item carbon emission database, generating item carbon emission information according to the item carbon emission database and the item identifier; in response to that the target similar item sub-identifier is a similar item sub-identifier located before the tail of the at least one similar item sub-identifier and the item identifier same as the target similar item sub-identifier exists in the item carbon emission database, acquiring a related item information vector set according to a related item identifier corresponding to the item identifier; and generating article carbon emission information according to the relationship article information vector set, the article text vector and the article carbon emission database.
Optionally, the following generating step is executed according to the article carbon emission database, the article text vector and the target similar article sub-identifier, and further includes: and in response to that the article identifier which is the same as the target similar article sub-identifier does not exist in the article carbon emission database, taking the similar article sub-identifier which meets the preset node sequence condition in the at least one similar article sub-identifier as the target similar article sub-identifier, and executing the generating step again.
Optionally, the article carbon emission database, the article text vector and the target similar article sub-identifier perform the following steps, and further include: and generating unknown carbon emission information as the item carbon emission information in response to the fact that the similar item sub-identifier is the first similar item sub-identifier in the at least one similar item sub-identifier and the item identifier which is the same as the target similar item sub-identifier does not exist in the item carbon emission database.
Optionally, the method further includes: and sending the article carbon emission information to a terminal, so that the terminal displays the article carbon emission information.
In a second aspect, some embodiments of the present disclosure provide a carbon emission information generating apparatus, the apparatus including: the input unit is configured to input the article text into a preset entity recognition model to obtain an article text vector; a determining unit configured to determine similar item identifiers according to the item information vector set and the item text vectors; and the generating unit is configured to generate the commodity carbon emission information according to the similar commodity identification and the commodity carbon emission database.
Optionally, the article text vector includes at least one article text entity vector and at least one article text label, where an article text entity vector in the at least one article text entity vector corresponds to an article text label in the at least one article text label, and an article text label in the at least one article text label corresponds to an article label probability; and the determining unit is further configured to: for each item text entity vector in the at least one item text entity vector, in response to determining that the item tag probability of the item text tag corresponding to the item text entity vector is less than or equal to a preset threshold, deleting the item text tag and the item text entity vector from the item text vector.
Optionally, before the generating unit, the apparatus further includes an acquiring unit, a cleaning unit, a deduplication unit, an adjusting unit, a storage unit, a first generating unit, and an importing unit, wherein the acquiring unit is configured to: acquiring initial carbon emission factor data; the above-mentioned cleaning unit is configured to: cleaning the initial carbon emission factor data to obtain carbon emission factor data after cleaning; the deduplication unit is configured to: carrying out duplicate removal treatment on the carbon emission factor data after the cleaning treatment to obtain the carbon emission factor data after the duplicate removal treatment; the above-mentioned adjusting unit is configured to: adjusting the format of the carbon emission factor data subjected to the duplicate removal processing to be a preset data format; the storage unit is configured to: storing the carbon emission factor data adjusted to the preset data format as a carbon emission factor data file; the first generation unit is configured to: generating a carbon emission factor side file according to the carbon emission factor data file; the importing unit is configured to: and importing the carbon emission factor data file and the carbon emission factor side file into an initial database, and taking the imported initial database as a carbon emission database.
Optionally, the article information vector set includes at least one article information vector group, an article information vector group in the at least one article information vector group includes an article information center cluster vector, and an article information vector in the article information vector group corresponds to a vector identifier; and the determining unit is further configured to: determining a target article information center cluster vector according to the article text vector and an article information center cluster vector included in an article information vector group in the at least one article information vector group; determining an article information vector group corresponding to the target article information center cluster vector as a target article information vector group; generating an article vector similarity set according to the article text vector and the target article information vector group; determining a target article information vector corresponding to the article vector similarity meeting a preset similarity condition in the article vector similarity set as a similar article information vector; and determining the vector identifier corresponding to the similar article information vector as the similar article identifier.
Optionally, at least one item data is stored in the item carbon emission database, and the item data in the at least one item data includes an item identifier and item carbon emission factor data; and the generating unit is further configured to: in response to the article carbon emission database having the same article identifier as the similar article identifier, selecting article data including the same article identifier as the similar article identifier from the article carbon emission database as target article data; determining the item carbon emission factor data included in the target item data as target item carbon emission factor data; and generating the carbon emission amount of the object as the carbon emission information of the object according to the carbon emission factor data of the object.
Optionally, an article text label in the at least one article text label corresponds to a label level; and the determining unit is further configured to: determining the object text label of which the corresponding label level in the object text vector meets a preset level condition as a target object text label; and determining a target article information center cluster vector according to the target article text label and an article information center cluster vector included in the article information vector group in the at least one article information vector group.
Optionally, the similar item identifier includes at least one similar item sub-identifier, and the at least one similar item sub-identifier is arranged in a node order; and the generating unit is further configured to: determining the similar article sub-identifier positioned at the tail end in the at least one similar article sub-identifier as a target similar article sub-identifier; according to the article carbon emission database, the article text vector and the target similar article sub-identifier, executing the following generation steps: in response to that the target similar item sub-identifier is a similar item sub-identifier located at the tail of the at least one similar item sub-identifier and the same item identifier as the target similar item sub-identifier exists in the item carbon emission database, generating item carbon emission information according to the item carbon emission database and the item identifier; in response to that the target similar item sub-identifier is a similar item sub-identifier located before the tail of the at least one similar item sub-identifier and the item identifier same as the target similar item sub-identifier exists in the item carbon emission database, acquiring a related item information vector set according to a related item identifier corresponding to the item identifier; and generating article carbon emission information according to the relationship article information vector set, the article text vector and the article carbon emission database.
Optionally, the generating unit is further configured to: and in response to that the article identifier which is the same as the target similar article sub-identifier does not exist in the article carbon emission database, taking the similar article sub-identifier which meets the preset node sequence condition in the at least one similar article sub-identifier as the target similar article sub-identifier, and executing the generating step again.
Optionally, the generating unit is further configured to: and generating unknown carbon emission information as the item carbon emission information in response to the fact that the similar item sub-identifier is the first similar item sub-identifier in the at least one similar item sub-identifier and the item identifier which is the same as the target similar item sub-identifier does not exist in the item carbon emission database.
Optionally, the apparatus further includes a sending unit configured to: and sending the article carbon emission information to a terminal, so that the terminal displays the article carbon emission information.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method described in any of the implementations of the first aspect.
In a fourth aspect, some embodiments of the disclosure provide a computer readable medium on which a computer program is stored, wherein the program when executed by a processor implements the method described in any implementation of the first aspect.
In a fifth aspect, some embodiments of the present disclosure provide a computer program product comprising a computer program that, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
The above embodiments of the present disclosure have the following advantages: according to the carbon emission article information generation method, article carbon emission information is generated, consumption of storage resources and calculation resources is reduced, and retrieval efficiency is improved. Specifically, the reasons why the generation of the carbon emission information of the article cannot be realized, the storage resource and the calculation resource are wasted, and the retrieval efficiency is low are that: in addition, the carbon factors are searched in the structured table by traversing table names, fields and the like, so that a large amount of storage resources and calculation resources are consumed, and the searching efficiency is low. Based on this, according to the carbon emission article information generating method of some embodiments of the present disclosure, first, an article text is input to a preset entity recognition model, and an article text vector is obtained. Thus, an item text vector characterizing the item text may be obtained. And then, determining similar item identifications according to the item information vector set and the item text vectors. Thereby, the similar article identifier of the article information vector with the largest value of the similarity representing the article text vector can be obtained. And finally, generating the carbon emission information of the article according to the similar article identification and the carbon emission database of the article. Thus, the article carbon emission information which characterizes the corresponding article text can be obtained. Because the similar article identification is determined through the article information vector set, when the carbon factor corresponding to the article text is not stored in the article carbon emission database, the similar article identification can be used for searching in the article carbon emission database, and the article carbon emission information is generated according to the searched carbon factor, so that the article carbon emission information can be generated. In addition, the article carbon emission information is generated by presetting the entity recognition model and the article carbon emission database, so that the carbon factors are prevented from being searched in a structured table in the modes of traversing table names, fields and the like, the vector obtained by entity recognition and the corresponding identification are used for searching, the consumption of storage resources and calculation resources is reduced, and the searching efficiency is improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a schematic diagram of one application scenario of a carbon emission information generation method of some embodiments of the present disclosure;
FIG. 2 is a flow diagram of some embodiments of a carbon emissions information generation method according to the present disclosure;
FIG. 3 is a flow chart of further embodiments of a carbon emissions information generation method according to the present disclosure;
FIG. 4 is a schematic block diagram of some embodiments of a carbon emissions information generating device according to the present disclosure;
FIG. 5 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In the application scenario of fig. 1, first, the computing device 101 may input an item text 102 into a preset entity recognition model 103, resulting in an item text vector 104. For example, the item text 102 may be: wireless bluetooth headset. The article text vector may be a word vector or a word vector. For example, the item text vector 104 may be represented by the character "A". Computing device 101 may then determine similar item identification 106 from item information vector set 105 and item text vector 104 described above. For example, the similar item identifier 106 may be: 107802. finally, the computing device 101 may generate the item carbon emissions information 108 based on the similar item identification 106 and the item carbon emissions database 107 described above. For example, the item carbon emission information 108 may be: "the carbon emission of the wireless Bluetooth headset is 81.09 kilogram carbon dioxide equivalent".
The computing device 101 may be hardware or software. When the computing device is hardware, it may be implemented as a distributed cluster composed of multiple servers or terminal devices, or may be implemented as a single server or a single terminal device. When the computing device is embodied as software, it may be installed in the hardware devices enumerated above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of computing devices in FIG. 1 is merely illustrative. There may be any number of computing devices, as implementation needs dictate.
With continued reference to fig. 2, a flow 200 of some embodiments of a carbon emissions information generation method according to the present disclosure is shown. The carbon emission information generation method comprises the following steps:
In some embodiments, an executing entity (e.g., the computing device 101 shown in fig. 1) of the carbon emission information generating method may input the item text into a preset entity recognition model, resulting in an item text vector. The article text may be a text related to the article, which is input in advance. As an example, the above-mentioned article text may be a text including an article name. For example, the item text may be: wireless bluetooth headset. The preset entity recognition model can be a neural network model which takes an article text as input and an article text vector as output. The predetermined Entity Recognition model may be used for Entity Recognition (NER). For example, the preset entity recognition model may be a BERT model. The predetermined entity recognition model may also be a combination model including a Bi-directional Long Short-Term Memory (Bi-LSTM) sub-model and a Conditional Random Field (CRF) sub-model. The item text vector may be a word vector or a word vector characterizing the item text. Thus, an item text vector characterizing the item text may be obtained.
Optionally, the preset entity recognition model may be a combined model. The preset entity recognition model can comprise a BERT sub model, a bidirectional long-short term memory network sub model and a conditional random field sub model. Thus, robustness of entity identification can be improved.
In some embodiments, the execution principal may determine a similar item identification from the set of item information vectors and the item text vector. The set of article information vectors may be a preset set of article information vectors. The article information vector in the article information vector set may be a vector of information characterizing an article. As an example, the above-mentioned item information vector may be a word vector or a word vector. For example, the item information vectors in the set of item information vectors described above may characterize a "wireless bluetooth headset. And the article information vectors in the article information vector set are used for determining the similarity with the article text vector. The above-mentioned item information vector set may be stored in a database in advance, such as a Faiss database or a Vearch database. The item information vectors in the item information vector set may correspond to directed quantity item identifiers. The vector item identification may uniquely identify an item information vector. In practice, first, the execution subject may determine a similarity between each item information vector in the item information vector set and the item text vector, so as to obtain a similarity set. For example, cosine similarity may be used to determine similarity. Then, the vector item identifier of the item information vector corresponding to the maximum similarity in the similarity set may be determined as a similar item identifier. Thereby, the similar article identifier of the article information vector with the largest value of the similarity representing the article text vector can be obtained.
Optionally, the item text vector may include at least one item text entity vector and at least one item text tag. The at least one item text entity vector may be a word vector or a word vector. And the article text label in the at least one article text label represents a label of the corresponding article text entity vector. By way of example, the item text label may include, but is not limited to, any of the following: PER (name of person), ORG (organization), LOC (place name), OBJ (product). An item text entity vector of the at least one item text entity vector may correspond to an item text label of the at least one item text label. The text entity vector of the at least one item text entity vector may correspond to a text label of an item in the at least one text label of the item one to one. An item text label of the at least one item text label may correspond to an item label probability. The article label probability is the probability of representing that the article text entity vector belongs to the category represented by the article text label. For example, the above-mentioned item text entity vector may represent "earphone", the item text tag corresponding to the item text entity vector may be OBJ, and the probability that the item text tag corresponds to the item tag may be 0.7, which means that the probability that "earphone" belongs to OBJ is 0.7.
Optionally, for each item text entity vector in the at least one item text entity vector, in response to determining that an item tag probability of an item text tag corresponding to the item text entity vector is less than or equal to a preset threshold, the executing entity may delete the item text tag and the item text entity vector from the item text vector. The preset threshold may be a preset threshold. Therefore, the object text entity vectors included in the object text vectors can be screened according to the preset threshold value, and the object text entity vectors representing poor object texts are deleted.
In some optional implementations of some embodiments, the set of item information vectors may include at least one item information vector group. The at least one item information vector group may be obtained by clustering the item information vectors in the item information vector set according to a clustering algorithm. For example, the clustering algorithm described above may be k-means clustering. It is to be understood that the item information vector group in the at least one item information vector group may be a clustered item information vector obtained after clustering. The item information vector group of the at least one item information vector group may include an item information center cluster vector. The article information center cluster vector may be a vector characterizing a cluster center of the article information vector group. The article information vectors in the article information vector group may correspond to vector identifiers. The vector identifier may uniquely identify the item information vectors in the set of item information vectors.
In some optional implementation manners of some embodiments, first, the executing body may determine a target item information center cluster vector according to the item text vector and an item information center cluster vector included in an item information vector group in the at least one item information vector group. In practice, for each item information center cluster vector, the similarity between the item text vector and the item information center cluster vector can be determined, and the item information center cluster vector corresponding to the maximum similarity among the obtained similarities is determined as the target item information center cluster vector. For example, the similarity may be determined by a cosine similarity method. The similarity can also be determined by euclidean distance. Next, the execution body may determine an article information vector group corresponding to the target article information center cluster vector as a target article information vector group. The article information vector group corresponding to the target article information center cluster vector may be an article information vector group to which the target article information center cluster vector belongs. Then, the execution body may generate an item vector similarity set according to the item text vector and the target item information vector group. In practice, for each target item information vector in the target item information vector group, the similarity between the target item information vector and the item text vector may be determined as an item vector similarity. Then, the executing body may determine, as a similar item information vector, a target item information vector corresponding to the item vector similarity satisfying the preset similarity condition in the item vector similarity set. The preset similarity condition may be: the item vector similarity is the item vector similarity with the largest value in the item vector similarity set. Finally, the execution subject may determine a vector identifier corresponding to the similar item information vector as a similar item identifier. Therefore, similar article information vectors can be determined by determining the target article information center cluster vectors, so that the calculation similarity of each article information vector in the article text vector and article information vector set is avoided, the consumption of calculation resources is reduced, the time for obtaining similar article identifiers is shortened, and the operation efficiency is improved.
Optionally, an item text label of the at least one item text label may correspond to a label rank. The label rank may be a rank that characterizes the rank of text labels of different items. The above tag level may be preset. As an example, the item text label "PER" may correspond to one level. The item text label "ORG" may correspond to a secondary level.
In some optional implementation manners of some embodiments, first, the executing body may determine, as the target item text label, an item text label in the item text vector, where a label level corresponding to the item text vector satisfies a preset level condition. The preset level condition may be an article text label with the highest label level in the article text vector. Wherein, the label level can be preset. For example, the higher the preset label level is, the larger the number corresponding to the label level is. The target item text label in the above example is "ORG". Then, a target item information center cluster vector may be determined according to the target item text label and an item information center cluster vector included in an item information vector group in the at least one item information vector group. In practice, in the first step, the item text entity vector corresponding to the target item text label may be determined as the target entity vector. And secondly, for each item information center cluster vector, determining the similarity between the target entity vector and the item information center cluster vector. And thirdly, determining the item information center cluster vector with the maximum corresponding similarity value in the determined similarities as the target item information center cluster vector. Therefore, the target article information center cluster vector can be determined according to the label level, and the label level is preset, so that the obtained target article information center cluster vector is more expected.
And step 203, generating article carbon emission information according to the similar article identification and the article carbon emission database.
In some embodiments, the execution subject may generate commodity carbon emission information based on the similar commodity identification and the commodity carbon emission database. The above-mentioned article carbon emission database may be a database created in advance and including article identification and article carbon emission factor data. The item identifier may uniquely characterize the item. The item carbon emission factor data may characterize a carbon emission factor of the corresponding item. In practice, in response to the article carbon emission database having an article identifier that is the same as the similar article identifier, the article carbon emission amount may be generated by using a preset carbon emission amount determining method according to the article carbon emission factor data corresponding to the article identifier, and the article carbon emission amount and the preset corpus may be combined into the article carbon emission information. The preset carbon emission determination method may be a preset formula for generating the carbon emission of the goods according to the carbon emission factor data of the goods. The above formula is different for different fields, such as chemical field, land transportation field. The preset corpus may be a preset corpus. For example, the preset corpus may be: "carbon emissions are as follows: ". And combining the carbon emission of the articles and the preset corpora in a splicing mode. Thus, the article carbon emission information which characterizes the corresponding article text can be obtained.
Optionally, at least one item data may be stored in the item carbon emission database. The item data may be data characterizing an item. The item data of the at least one item data may include an item identification and item carbon emission factor data.
In some optional implementations of some embodiments, first, in response to the existence of the same item identifier as the similar item identifier in the item carbon emission database, the executing subject may select, as the target item data, item data including the same item identifier as the similar item identifier from the item carbon emission database. Then, the item carbon emission factor data included in the above target item data may be determined as the target item carbon emission factor data. Finally, the carbon emission of the object can be generated as the carbon emission information of the object according to the carbon emission factor data of the object. In practice, the carbon emission of the object can be generated as the carbon emission information of the object by adopting a preset carbon emission determination method according to the carbon emission factor data of the object. Thus, commodity carbon emission information representing the carbon emission of the commodity can be obtained.
In some optional implementations of some embodiments, the similar item identifier may include at least one similar item sub-identifier. As an example, the similar item identifier may be: [107082-198883-1]. The similar item sub-identifier in the at least one similar item sub-identifier may be: [107082], [198883], [1]. The at least one similar item sub-identifier may be arranged in a node order. The node order may be an order in which the nodes are stored in the commodity carbon emission database.
In some optional implementations of some embodiments, first, the executing body may determine, as the target similar item sub-identifier, a last similar item sub-identifier of the at least one similar item sub-identifier. For example, [1] in the above example may be determined as the target similar item sub-identity. Then, according to the item carbon emission database, the item text vector and the target similar item sub-identifier, the following generation steps may be performed:
and a first step of generating article carbon emission information according to the article carbon emission database and the article identifier in response to that the target similar article sub-identifier is a similar article sub-identifier positioned at the tail of the at least one similar article sub-identifier and the article identifier identical to the target similar article sub-identifier exists in the article carbon emission database. In practice, in response to that the target similar item sub-identifier is the last similar item sub-identifier of the at least one similar item sub-identifier and the item identifier identical to the target similar item sub-identifier exists in the item carbon emission database, the item carbon emission factor data corresponding to the item identifier in the item carbon emission database may be determined as target item carbon emission factor data, and a preset carbon emission determination method is adopted according to the target item carbon emission factor data to generate the item carbon emission as item carbon emission information.
And secondly, in response to that the target similar article sub-identifier is a similar article sub-identifier positioned before the tail in the at least one similar article sub-identifier and that the article identifier same as the target similar article sub-identifier exists in the article carbon emission database, acquiring a related article information vector set according to a related article identifier corresponding to the article identifier. The relationship item identifier may be an item identifier included in a node connected to a node (relationship) storing the item identifier. In practice, in the first substep, each similar article sub-identifier located before the target similar article sub-identifier in the similar article identifiers is spliced with the relationship article identifier to obtain a vector acquisition identifier. And the similar article sub-identifications used for splicing the vector acquisition identification are still arranged in sequence in the vector acquisition identification. And secondly, acquiring corresponding article information vectors with the vector article identification being the same as the vector acquisition identification from the article information vector set to serve as relational article information vectors, and acquiring a relational article information vector set.
And thirdly, generating article carbon emission information according to the relationship article information vector set, the article text vector and the article carbon emission database. In practice, in the first substep, for each relational item information vector in the set of relational item information vectors, the similarity between the relational item information vector and the item text vector is determined, and the relational item information vector with the largest value of the corresponding similarity is determined as the target relational item information vector. And a second substep, determining the vector article identifier corresponding to the target relationship article information vector as a target relationship article identifier. And a third substep, determining the article data corresponding to the article identifier which is the same as the target related article identifier in the article carbon emission database as target article data. A fourth substep of determining the item carbon emission factor data comprised by the target item data as target item carbon emission factor data. The fifth sub-step may generate the carbon emission amount of the article as the carbon emission information of the article based on the target carbon emission factor data of the article. Therefore, when the article carbon emission factor data corresponding to the similar article identification does not exist in the article carbon emission database, the node with the maximum corresponding similarity value is selected from the article carbon emission database to generate the article carbon emission information, and the problem that the article carbon emission information cannot be generated due to the node loss of the database is solved.
Optionally, the executing the following generating step may further include: in response to that there is no item identifier identical to the target similar item sub-identifier in the item carbon emission database, the executing body may perform the generating step again with a similar item sub-identifier satisfying a preset node order condition in the at least one similar item sub-identifier as a target similar item sub-identifier. The preset node order condition may be a previous similar item sub-identifier located in the identifier corresponding to the target similar item sub-identifier in the at least one similar item sub-identifier. Therefore, when the article identifier which is the same as the target similar article sub-identifier does not exist in the article carbon emission database, the node with the edge relation can be continuously searched, and more article data are provided for generating the article carbon emission information.
Optionally, the executing the following generating step may further include: in response to the similar item sub-identifier being the first similar item sub-identifier of the at least one similar item sub-identifier and the same item identifier as the target similar item sub-identifier does not exist in the item carbon emission database, the execution subject may generate unknown carbon emission information as item carbon emission information. In practice, the article text and the preset unknown corpus of carbon emissions may be combined into unknown information of carbon emissions. For example, the unknown corpus of preset carbon emissions may be: the carbon emission amount of "[ article text ] is unknown. ". Therefore, when the nodes and each node with the edge relationship cannot be used for generating the commodity carbon emission amount as the commodity carbon emission information, the commodity carbon emission information for representing the unknown carbon emission amount can be generated to prompt the user that the carbon emission amount is unknown.
Optionally, the execution body may send the article carbon emission information to a terminal, so that the terminal displays the article carbon emission information. The terminal may be a terminal communicatively connected to the execution main body. In practice, the execution main body may send the article carbon emission information to a terminal in a wired connection manner or a wireless connection manner, so that the terminal displays the article carbon emission information. Therefore, the carbon emission information of the goods can be displayed to the user. It is noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a UWB (ultra wideband) connection, and other wireless connection means now known or developed in the future.
The above embodiments of the present disclosure have the following advantages: according to the carbon emission article information generation method disclosed by some embodiments of the disclosure, the article carbon emission information is generated, the consumption of storage resources and calculation resources is reduced, and the retrieval efficiency is improved. Specifically, the reasons why the generation of the carbon emission information of the article cannot be realized, the waste of storage resources and computing resources and the low retrieval efficiency are caused are that: in addition, the carbon factors are searched in the structured table by traversing table names, fields and the like, so that a large amount of storage resources and calculation resources are consumed, and the searching efficiency is low. Based on this, according to the carbon emission article information generating method of some embodiments of the present disclosure, first, an article text is input to a preset entity recognition model, and an article text vector is obtained. Thus, an item text vector characterizing the item text may be obtained. And then, determining similar item identifications according to the item information vector set and the item text vectors. Therefore, the similar article identification of the article information vector with the maximum similarity value representing the article text vector can be obtained. And finally, generating article carbon emission information according to the similar article identification and the article carbon emission database. Thus, the article carbon emission information which characterizes the corresponding article text can be obtained. Because the similar article identifier is determined through the article information vector set, when the carbon factor corresponding to the article text is not stored in the article carbon emission database, the similar article identifier can be used for searching in the article carbon emission database, and the article carbon emission information is generated according to the searched carbon factor, so that the article carbon emission information can be generated. In addition, the article carbon emission information is generated by presetting the entity recognition model and the article carbon emission database, so that the carbon factors are prevented from being searched in a structured table in the modes of traversing table names, fields and the like, the vector obtained by entity recognition and the corresponding identification are used for searching, the consumption of storage resources and calculation resources is reduced, and the searching efficiency is improved.
Referring further to fig. 3, a flow 300 of further embodiments of a carbon emissions information generation method is shown. The process 300 of the carbon emission information generating method includes the following steps:
In some embodiments, specific implementations of steps 301 to 302 and technical effects brought by the same may refer to steps 201 to 202 in those embodiments corresponding to fig. 2, and are not described herein again.
In some embodiments, the performing agent may obtain initial carbon emission factor data. In practice, the execution subject may obtain the initial carbon emission factor data by public data crawling, IPCC default factor, software database transplantation, and the like.
And 304, cleaning the initial carbon emission factor data to obtain the carbon emission factor data after cleaning.
In some embodiments, the execution body may perform a cleaning process on the initial carbon emission factor data to obtain carbon emission factor data after the cleaning process. The cleaning process may be data cleaning. For example, the data cleansing may be to delete an erroneous initial carbon emission factor in the initial carbon emission factor data. Thus, carbon emission factor data may be reviewed and verified.
And 305, performing deduplication processing on the carbon emission factor data after the cleaning processing to obtain carbon emission factor data after the deduplication processing.
In some embodiments, the execution body may perform a deduplication process on the carbon emission factor data after the cleaning process, so as to obtain carbon emission factor data after the deduplication process. In practice, the repeated carbon emission factor data in the carbon emission factor data after the cleaning process may be deleted, so that the repeated carbon emission factor data is not included in the carbon emission factor data after the de-duplication process. Thus, the carbon emission factor data may be further reviewed and verified.
And step 306, adjusting the format of the carbon emission factor data after the deduplication processing to a preset data format.
In some embodiments, the executing body may adjust a format of the carbon emission factor data after the deduplication processing to a preset data format. The preset data format may be a preset node data format for importing a graph database. Thereby, carbon emission factor data of a preset data format for importing the graph database can be obtained.
In some embodiments, the execution body may store the carbon emission factor data adjusted to the preset data format as a carbon emission factor data file.
And 308, generating a carbon emission factor side file according to the carbon emission factor data file.
In some embodiments, the execution body may generate a carbon emission factor side file according to the carbon emission factor data file. In practice, the executing entity may establish an edge relationship between each node represented by the carbon emission factor data file and each node in the initial database, so as to obtain a carbon emission factor edge file representing the edge relationship between the nodes. The initial database may be a database for importing related files. Thus, a carbon emission factor side file corresponding to the carbon emission factor data file can be obtained.
And 309, importing the carbon emission factor data file and the carbon emission factor side file into an initial database, and taking the imported initial database as a carbon emission database.
In some embodiments, the execution subject may import the carbon emission factor data file and the carbon emission factor side file into an initial database, and obtain the imported initial database as a carbon emission database. Thereby, the establishment of the carbon emission database is completed.
And step 310, generating the article carbon emission information according to the similar article identification and the article carbon emission database.
In some embodiments, the specific implementation of step 310 and the technical effect thereof may refer to step 203 in those embodiments corresponding to fig. 2, and are not described herein again.
As can be seen from fig. 3, compared with the description of some embodiments corresponding to fig. 2, the flow 300 of the carbon emission information generation method in some embodiments corresponding to fig. 3 represents the step of expanding the carbon emission database. Therefore, the scheme described in the embodiments can complete the establishment of the commodity carbon emission database, and the commodity carbon emission information can be generated based on the pre-established commodity carbon emission database, so that the retrieval efficiency is improved.
With further reference to fig. 4, as an implementation of the methods illustrated in the above figures, the present disclosure provides some embodiments of a carbon emission information generating apparatus, which correspond to those illustrated in fig. 2, and which may be particularly applicable in various electronic devices.
As shown in fig. 4, the carbon emission information generating apparatus 400 of some embodiments includes: an input unit 401, a determination unit 402, and a generation unit 403. Wherein the input unit 401 is configured to input the item text into a preset entity recognition model, resulting in an item text vector; the determining unit 402 is configured to determine similar item identifiers according to the item information vector set and the item text vectors; the generating unit 403 is configured to generate item carbon emission information based on the similar item identification and the item carbon emission database.
Optionally, the article text vector includes at least one article text entity vector and at least one article text label, where an article text entity vector in the at least one article text entity vector corresponds to an article text label in the at least one article text label, and an article text label in the at least one article text label corresponds to an article label probability; and the determining unit may be further configured to: for each item text entity vector in the at least one item text entity vector, in response to determining that the item tag probability of the item text tag corresponding to the item text entity vector is less than or equal to a preset threshold, deleting the item text tag and the item text entity vector from the item text vector.
Optionally, before the generating unit, the apparatus further includes an acquiring unit, a cleaning unit, a deduplication unit, an adjusting unit, a storage unit, a first generating unit, and an importing unit (not shown in the figure). Wherein the obtaining unit may be configured to: acquiring initial carbon emission factor data; the above-mentioned washing unit may be configured to: cleaning the initial carbon emission factor data to obtain carbon emission factor data after cleaning; the deduplication unit may be configured to: carrying out duplicate removal treatment on the carbon emission factor data after the cleaning treatment to obtain the carbon emission factor data after the duplicate removal treatment; the above-mentioned adjusting unit may be configured to: adjusting the format of the carbon emission factor data subjected to the duplicate removal processing to be a preset data format; the storage unit may be configured to: storing the carbon emission factor data adjusted to the preset data format as a carbon emission factor data file; the first generation unit may be configured to: generating a carbon emission factor side file according to the carbon emission factor data file; the above-mentioned importing unit may be configured to: and importing the carbon emission factor data file and the carbon emission factor side file into an initial database to obtain an imported initial database serving as a carbon emission database.
Optionally, the article information vector set includes at least one article information vector group, an article information vector group in the at least one article information vector group includes an article information center cluster vector, and an article information vector in the article information vector group corresponds to a vector identifier; and the determining unit may be further configured to: determining a target article information center cluster vector according to the article text vector and an article information center cluster vector included in an article information vector group in the at least one article information vector group; determining an article information vector group corresponding to the target article information center cluster vector as a target article information vector group; generating an article vector similarity set according to the article text vector and the target article information vector group; determining a target article information vector corresponding to the article vector similarity meeting a preset similarity condition in the article vector similarity set as a similar article information vector; and determining the vector identifier corresponding to the similar article information vector as a similar article identifier.
Optionally, at least one item data is stored in the item carbon emission database, and the item data in the at least one item data includes an item identifier and item carbon emission factor data; and the generating unit may be further configured to: in response to the article carbon emission database having the same article identifier as the similar article identifier, selecting article data including the same article identifier as the similar article identifier from the article carbon emission database as target article data; determining the object carbon emission factor data included in the object data as object carbon emission factor data; and generating the carbon emission amount of the object as the carbon emission information of the object according to the carbon emission factor data of the object.
Optionally, an article text label in the at least one article text label corresponds to a label level; and the determining unit may be further configured to: determining the article text label of which the corresponding label level in the article text vector meets a preset level condition as a target article text label; and determining a target article information center cluster vector according to the target article text label and an article information center cluster vector included in the article information vector group in the at least one article information vector group.
Optionally, the similar item identifier includes at least one similar item sub-identifier, and the at least one similar item sub-identifier is arranged in a node order; and the generating unit may be further configured to: determining the similar article sub-identifier positioned at the tail end in the at least one similar article sub-identifier as a target similar article sub-identifier; according to the article carbon emission database, the article text vector and the target similar article sub-identifier, executing the following generation steps: in response to that the target similar item sub-identifier is a similar item sub-identifier located at the tail of the at least one similar item sub-identifier and the same item identifier as the target similar item sub-identifier exists in the item carbon emission database, generating item carbon emission information according to the item carbon emission database and the item identifier; in response to that the target similar item sub-identifier is a similar item sub-identifier located before the tail of the at least one similar item sub-identifier and the item identifier same as the target similar item sub-identifier exists in the item carbon emission database, acquiring a related item information vector set according to a related item identifier corresponding to the item identifier; and generating article carbon emission information according to the relationship article information vector set, the article text vector and the article carbon emission database.
Optionally, the generating unit may be further configured to: and in response to the fact that the article identifier which is the same as the target similar article identifier does not exist in the article carbon emission database, taking the similar article identifier which meets the preset node sequence condition in the at least one similar article identifier as the target similar article identifier, and executing the generating step again.
Optionally, the generating unit may be further configured to: and generating unknown carbon emission information as the item carbon emission information in response to the fact that the similar item sub-identifier is the first similar item sub-identifier in the at least one similar item sub-identifier and the item identifier which is the same as the target similar item sub-identifier does not exist in the item carbon emission database.
Optionally, the apparatus further comprises a sending unit (not shown in the figure) configured to: and sending the article carbon emission information to a terminal, so that the terminal displays the article carbon emission information.
It will be understood that the units described in the apparatus 400 correspond to the various steps in the method described with reference to fig. 2. Thus, the operations, features and advantages described above with respect to the method are also applicable to the apparatus 400 and the units included therein, and are not described herein again.
Referring now to FIG. 5, a block diagram of an electronic device (such as computing device 101 shown in FIG. 1) 500 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be alternatively implemented or provided. Each block shown in fig. 5 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network via the communication device 509, or installed from the storage device 508, or installed from the ROM 502. The computer program, when executed by the processing device 501, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: inputting an article text into a preset entity recognition model to obtain an article text vector; determining similar article identifications according to the article information vector set and the article text vectors; and generating the carbon emission information of the goods according to the similar goods identification and the carbon emission database of the goods.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, which may be described as: a processor includes an input unit, a determination unit, and a generation unit. The names of the units do not form a limitation to the units themselves in some cases, for example, the input unit may also be described as a unit for inputting the item text into a preset entity recognition model to obtain the item text vector.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.
Claims (15)
1. A carbon emission information generation method, comprising:
inputting an article text into a preset entity recognition model to obtain an article text vector;
determining similar article identifications according to the article information vector set and the article text vectors;
and generating article carbon emission information according to the similar article identification and the article carbon emission database.
2. The method of claim 1, wherein the pre-set solid recognition model is a combinatorial model, the pre-set solid recognition model comprising a BERT submodel, a two-way long-short term memory network submodel, and a conditional random field submodel.
3. The method of claim 1, wherein the item text vector comprises at least one item text entity vector and at least one item text label, an item text entity vector of the at least one item text entity vector corresponding to an item text label of the at least one item text label, an item text label of the at least one item text label corresponding to an item label probability; and
before determining similar item identifications according to the set of item information vectors and the item text vector, the method further includes:
for each item text entity vector in the at least one item text entity vector, in response to determining that an item tag probability of an item text tag corresponding to the item text entity vector is less than or equal to a preset threshold, deleting the item text tag and the item text entity vector from the item text vector.
4. The method of claim 1, wherein prior to said generating commodity carbon emission information from said similar commodity identification and commodity carbon emission database, said method further comprises:
acquiring initial carbon emission factor data;
cleaning the initial carbon emission factor data to obtain carbon emission factor data after cleaning;
carrying out duplicate removal treatment on the carbon emission factor data after the cleaning treatment to obtain the carbon emission factor data after the duplicate removal treatment;
adjusting the format of the carbon emission factor data subjected to the duplicate removal processing into a preset data format;
storing the carbon emission factor data adjusted to the preset data format as a carbon emission factor data file;
generating a carbon emission factor side file according to the carbon emission factor data file;
and importing the carbon emission factor data file and the carbon emission factor side file into an initial database to obtain an imported initial database serving as a carbon emission database.
5. The method of claim 1, wherein the set of item information vectors comprises at least one item information vector group, an item information vector group of the at least one item information vector group comprising an item information center cluster vector, an item information vector of the item information vector group corresponding to a vector identification; and
the determining similar article identification according to the article information vector set and the article text vector comprises:
determining a target item information center cluster vector according to the item text vector and an item information center cluster vector included in an item information vector group in the at least one item information vector group;
determining an article information vector group corresponding to the target article information center cluster vector as a target article information vector group;
generating an article vector similarity set according to the article text vector and the target article information vector group;
determining a target article information vector corresponding to the article vector similarity meeting a preset similarity condition in the article vector similarity set as a similar article information vector;
and determining the vector identifier corresponding to the similar article information vector as a similar article identifier.
6. The method of claim 1, wherein the commodity carbon emission database has stored therein at least one commodity data, a commodity data of the at least one commodity data comprising a commodity identification and a commodity carbon emission factor data; and
generating article carbon emission information according to the similar article identifier and the article carbon emission database, wherein the generating comprises the following steps:
in response to the existence of the same item identifier as the similar item identifier in the item carbon emission database, selecting item data comprising the same item identifier as the similar item identifier from the item carbon emission database as target item data;
determining the item carbon emission factor data included in the target item data as target item carbon emission factor data;
and generating the carbon emission of the object as the carbon emission information of the object according to the carbon emission factor data of the object.
7. The method of any of claims 1-6, wherein an item text label of the at least one item text label corresponds to a label level; and
the determining a target item information center cluster vector according to the item text vector and an item information center cluster vector included in an item information vector group in the at least one item information vector group includes:
determining the article text label of which the corresponding label level in the article text vector meets a preset level condition as a target article text label;
and determining a target article information center cluster vector according to the target article text label and an article information center cluster vector included in an article information vector group in the at least one article information vector group.
8. The method of claim 1, wherein the similar item identification comprises at least one similar item sub-identification, the at least one similar item sub-identification being arranged in a node order; and
generating article carbon emission information according to the similar article identifier and the article carbon emission database, wherein the generating comprises the following steps:
determining a similar item sub-identifier positioned at the tail end in the at least one similar item sub-identifier as a target similar item sub-identifier;
according to the article carbon emission database, the article text vector and the target similar article sub-identifier, executing the following generation steps:
in response to that the target similar item sub-identifier is a similar item sub-identifier located at the tail of the at least one similar item sub-identifier and the item identifier same as the target similar item sub-identifier exists in the item carbon emission database, generating item carbon emission information according to the item carbon emission database and the item identifier;
in response to that the target similar item sub-identifier is a similar item sub-identifier located before the tail of the at least one similar item sub-identifier and an item identifier identical to the target similar item sub-identifier exists in the item carbon emission database, acquiring a related item information vector set according to a related item identifier corresponding to the item identifier;
and generating article carbon emission information according to the relationship article information vector set, the article text vector and the article carbon emission database.
9. The method of claim 8, wherein said generating, from said item carbon emissions database, said item text vector, and a target similar item sub-identity, further comprises:
and in response to that the article identifier which is the same as the target similar article sub-identifier does not exist in the article carbon emission database, taking the similar article sub-identifier which meets the preset node sequence condition in the at least one similar article sub-identifier as the target similar article sub-identifier, and executing the generating step again.
10. The method of claim 9, wherein said generating, from said item carbon emissions database, said item text vector, and a target similar item sub-identity, further comprises:
and generating unknown carbon emission information as the item carbon emission information in response to the similar item sub-identifier being the first similar item sub-identifier in the at least one similar item sub-identifier and the item identifier identical to the target similar item sub-identifier not existing in the item carbon emission database.
11. The method of claim 1, wherein the method further comprises:
and sending the article carbon emission information to a terminal, so that the terminal displays the article carbon emission information.
12. A carbon emission information generating apparatus comprising:
the input unit is configured to input the article text into a preset entity recognition model to obtain an article text vector;
a determination unit configured to determine similar item identifications according to the item information vector set and the item text vector;
a generating unit configured to generate commodity carbon emission information based on the similar commodity identification and a commodity carbon emission database.
13. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-11.
14. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-11.
15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210739115.7A CN115292436A (en) | 2022-06-28 | 2022-06-28 | Carbon emission information generation method, apparatus, electronic device, medium, and program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210739115.7A CN115292436A (en) | 2022-06-28 | 2022-06-28 | Carbon emission information generation method, apparatus, electronic device, medium, and program product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115292436A true CN115292436A (en) | 2022-11-04 |
Family
ID=83819902
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210739115.7A Pending CN115292436A (en) | 2022-06-28 | 2022-06-28 | Carbon emission information generation method, apparatus, electronic device, medium, and program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115292436A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116542380A (en) * | 2023-05-09 | 2023-08-04 | 武汉智网兴电科技开发有限公司 | Power plant supply chain carbon footprint optimization method and device based on natural language |
-
2022
- 2022-06-28 CN CN202210739115.7A patent/CN115292436A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116542380A (en) * | 2023-05-09 | 2023-08-04 | 武汉智网兴电科技开发有限公司 | Power plant supply chain carbon footprint optimization method and device based on natural language |
CN116542380B (en) * | 2023-05-09 | 2023-11-14 | 武汉智网兴电科技开发有限公司 | Power plant supply chain carbon footprint optimization method and device based on natural language |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111858518B (en) | Method and device for updating reference document, electronic equipment and storage medium | |
CN111522927B (en) | Entity query method and device based on knowledge graph | |
CN115757400B (en) | Data table processing method, device, electronic equipment and computer readable medium | |
CN111800513A (en) | Method and device for pushing information and computer readable medium of electronic equipment | |
CN112650841A (en) | Information processing method and device and electronic equipment | |
CN113779316A (en) | Information generation method and device, electronic equipment and computer readable medium | |
CN114297278A (en) | Method, system and device for quickly writing batch data | |
CN115292436A (en) | Carbon emission information generation method, apparatus, electronic device, medium, and program product | |
CN111008213A (en) | Method and apparatus for generating language conversion model | |
CN110852720A (en) | Document processing method, device, equipment and storage medium | |
CN117131208B (en) | Industrial science and technology text data pushing method, device, equipment and medium | |
CN113987118A (en) | Corpus acquisition method, apparatus, device and storage medium | |
CN107291923B (en) | Information processing method and device | |
CN116662672B (en) | Value object information transmitting method, device, equipment and computer readable medium | |
CN116629984A (en) | Product information recommendation method, device, equipment and medium based on embedded model | |
CN112419312A (en) | Similar house source information detection method and device, electronic equipment and readable medium | |
CN116433388A (en) | Data storage resource partitioning method, device, electronic equipment and computer medium | |
CN111597439A (en) | Information processing method and device and electronic equipment | |
CN112035581B (en) | Model-based task processing method, device, equipment and medium | |
CN113742321B (en) | Data updating method and device | |
CN113393288A (en) | Order processing information generation method, device, equipment and computer readable medium | |
CN112100205A (en) | Data processing method, device, equipment and computer readable medium | |
CN113064704A (en) | Task processing method and device, electronic equipment and computer readable medium | |
CN113760240A (en) | Method and device for generating data model | |
CN114040014B (en) | Content pushing method, device, electronic equipment and computer 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 |