CN110321544B - Method and device for generating information - Google Patents

Method and device for generating information Download PDF

Info

Publication number
CN110321544B
CN110321544B CN201910609319.7A CN201910609319A CN110321544B CN 110321544 B CN110321544 B CN 110321544B CN 201910609319 A CN201910609319 A CN 201910609319A CN 110321544 B CN110321544 B CN 110321544B
Authority
CN
China
Prior art keywords
tag
information
configuration file
meta information
target
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.)
Active
Application number
CN201910609319.7A
Other languages
Chinese (zh)
Other versions
CN110321544A (en
Inventor
王志清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910609319.7A priority Critical patent/CN110321544B/en
Publication of CN110321544A publication Critical patent/CN110321544A/en
Application granted granted Critical
Publication of CN110321544B publication Critical patent/CN110321544B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/183Tabulation, i.e. one-dimensional positioning

Abstract

The embodiment of the disclosure discloses a method and a device for generating information. One embodiment of the method comprises the following steps: extracting a label template from a label template library according to the acquired input information of the user; extracting keywords from input information of a user; determining target meta information matched with the keyword from a meta information base; and generating a target tag configuration file and a predicted tag matched with the input information of the user based on the tag template, the preset tag configuration file and the target meta information, wherein the tag template library is matched with the meta information library and the preset tag configuration file. The embodiment realizes the reduction of the complexity of the label configuration and saves the time of the label configuration.

Description

Method and device for generating information
Technical Field
Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a method and apparatus for generating information.
Background
The goal of the tag engine is to enable the separation of business decisions from the application code and to write the business decisions using predefined semantic modules.
The existing label engine is usually a specific solidified label, namely, the label to be done is completely solidified into an internet system, a user can generate a corresponding label only by clicking, and the configuration files behind the label are in one-to-one correspondence with the label.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for generating information.
In a first aspect, embodiments of the present disclosure provide a method for generating information, comprising: extracting a label template from a label template library according to the acquired input information of the user; extracting keywords from input information of a user; determining target meta information matched with the keywords from a meta information base; and generating a target tag configuration file and a predicted tag matched with the input information of the user based on the tag template, the preset tag configuration file and the target meta information, wherein the tag template library is matched with the meta information library and the preset tag configuration file.
In some embodiments, the method further comprises: and taking the keywords as input, and running the target tag configuration file to obtain query result information matched with the input information of the user.
In some embodiments, generating a target tag profile and a predictive tag that match input information of a user based on a tag template, a preset tag profile, and target meta information includes: substituting the keywords into a label template to generate a prediction label matched with the input information of the user; searching a preset tag configuration file matched with the tag template from a preset tag configuration file library; judging whether the target meta information is consistent with the actual meta information in the preset tag configuration file; and in response to the inconsistency, replacing the actual meta information in the preset tag configuration file with the target meta information to obtain the target tag configuration file.
In some embodiments, extracting keywords from input information of a user includes: keywords in the input information of the user are determined by using a natural language processing method.
In some embodiments, the preset tag profile is determined by: extracting a tag template from a plurality of actual tags to obtain a tag template library; extracting actual keywords from a plurality of actual tags; converting the actual keywords into actual meta information to obtain a meta information base; and calling a label inquiry service corresponding to the label template based on the actual meta information to obtain a preset label configuration file.
In a second aspect, embodiments of the present disclosure provide an apparatus for generating information, comprising: a label template extraction unit configured to extract a label template from a label template library according to the acquired input information of the user; a keyword extraction unit configured to extract keywords from input information of a user; a target meta information acquisition unit configured to determine target meta information matching the keyword from a meta information base; the information generating unit is configured to generate a target tag configuration file and a predicted tag matched with input information of a user based on the tag template, a preset tag configuration file and target meta information, wherein the tag template library is matched with the meta information library and the preset tag configuration file.
In some embodiments, the apparatus further comprises: and the query unit is configured to take the keywords as input, run the target tag configuration file and obtain query result information matched with the input information of the user.
In some embodiments, the information generating unit includes: the predictive label generating module is configured to substitute the keywords into the label template to generate a predictive label matched with the input information of the user; the searching module is configured to search a preset tag configuration file matched with the tag template from a preset tag configuration file library; the judging module is configured to judge whether the target meta information is consistent with the actual meta information in the preset tag configuration file; the target tag configuration file acquisition module is configured to replace actual meta information in the preset tag configuration file with target meta information to obtain a target tag configuration file in response to the fact that the target tag configuration file is inconsistent.
In some embodiments, the preset tag profile is obtained by: the label template library acquisition unit is configured to extract label templates from a plurality of actual labels to obtain a label template library; an actual keyword extraction unit configured to extract actual keywords from the plurality of actual tags; the meta information base acquisition unit is configured to convert the actual keywords into actual meta information to obtain a meta information base; and the processing unit is configured to call the label inquiry service corresponding to the label template based on the actual meta information to obtain a preset label configuration file.
In a third aspect, embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as in any of the implementations of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements a method as in any of the implementations of the first aspect.
According to the scheme for generating information, firstly, a tag template is extracted from a tag template library according to acquired input information of a user, then, a keyword is extracted from the input information of the user, then, target meta information matched with the keyword is determined from a meta information library, and then, a target tag configuration file and a predicted tag matched with the input information are generated based on the tag template, a preset tag configuration file and the target meta information. In this embodiment, the tag template is determined according to the input information of the user, then the target meta information matched with the keyword of the input information is determined from the meta information library, and the target tag configuration file and the predictive tag are regenerated, so that the tag configuration file matched with the target tag configuration file can be generated according to the information actually input by the user, even if the finally obtained tag configuration file needs to be changed, only the meta information in the preset meta information library needs to be changed, the complexity of tag configuration is reduced, and the time of tag configuration is saved.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a method for generating information according to the present disclosure;
FIG. 3 is a schematic illustration of an application scenario of a method for generating information according to an embodiment of the present disclosure;
FIG. 4 is a flow chart of another embodiment of a method for generating information according to the present disclosure;
FIG. 5 is a schematic structural diagram of an embodiment of an apparatus for generating information according to the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary architecture 100 to which embodiments of the methods of the present disclosure for generating information may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications, such as a web browser application, a video-type application, an instant messaging tool, a mailbox client, a traffic information-type application, a reading-type application, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting communication with a server, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic video expert compression standard audio plane 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
The server 105 may be a server providing various services, for example, a background server that can acquire input information of a user from the terminal devices 101, 102, 103. The background server can analyze and process the acquired input information and feed back the information processing result to the terminal equipment.
The server may be hardware or software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (e.g., software or software modules for providing distributed services), or as a single software or software module. The present invention is not particularly limited herein.
It should be noted that, the method for generating information provided by the embodiments of the present disclosure is generally performed by a server, and accordingly, the apparatus for generating information is generally disposed in the server.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method for generating information according to the present disclosure is shown. The method for generating information is applied to a server, and comprises the following steps of:
and step 201, extracting the label template from the label template library according to the acquired input information of the user.
In the present embodiment, an execution subject of the method for generating information (e.g., the server 105 shown in fig. 1) may extract a tag template from a tag template library according to the acquired input information of the user.
The executing body may acquire the input information of the user from the third party device through a wired or wireless connection manner, or may directly acquire the input information of the user, which is not limited in this embodiment.
The label template library comprises a plurality of label templates. The server may perform semantic analysis on a plurality of labels, and extract templates from the labels to form a label template. There may be many tag templates that are stored to form a library of tag templates.
The execution body may perform semantic analysis on the input information of the user after acquiring the input information of the user. For example, the server may extract a subject, a predicate, or the like from the input information of the user, and then query from the tag template library whether there is a tag template matching the extracted subject, predicate, or not, and if there is, the tag template is the required tag template.
Step 202, extracting keywords from input information of a user.
In this embodiment, the execution body may extract keywords from input information of the user. It should be noted that, step 202 may be performed before step 201 or after step 201, which is not limited in this embodiment.
In this embodiment, the execution body may extract the keywords from the input information of the user by using a method for extracting keywords in the prior art or a technology developed in the future, which is not limited in this disclosure. For example, TF-IDF, topic-model, PAKE, etc. may be used to extract keywords from the user's input information.
In some optional implementations of this embodiment, the executing entity may extract the keywords from the input information of the user through a natural semantic processing method (NLP). For example, words representing "time" and "place" in the input information of the user may be extracted as keywords.
For example, for the user's input information "user of the latest 7-day resident", the server may extract time and place information as keywords, i.e., "7", "resident" as keywords.
And 203, determining target meta information matched with the keyword from a meta information base.
In this embodiment, after determining the keyword, the executing body may determine the target meta information matching with the keyword from a preset meta information base.
Meta information generally refers to information of information for describing the structure, semantics, usage, and the like of information. Meta information meta of the hypertext markup language HTML, for example, may contain contents or keywords of the document, etc.
In the present embodiment, a meta information base is set in advance. The meta information base includes a plurality of actual meta information. The actual meta-information here matches the tag template. If the keyword of the input information of the user is determined, the execution subject may query the meta information library for the target meta information matching with the keyword, and extract the target meta information.
And 204, generating a target tag configuration file and a predicted tag matched with the input information of the user based on the tag template, the preset tag configuration file and the target meta information.
In this embodiment, after the tag template and the target meta information are obtained, the execution body may combine the tag template, the preset tag configuration file and the target meta information to generate the target tag configuration file and the predicted tag matched with the input information. The tag template library is matched with the meta information library and a preset tag configuration file.
The preset tag profile may be a profile preset by a user and stored in the server. The configuration file may correspond to a configuration template including fields that may be replaced. The configuration file may be used to represent the flow of executing the tag query data.
After the server obtains the tag template, the preset tag configuration file and the target meta information, the preset tag configuration file can be determined according to the tag template, and then the target tag configuration file matched with the input information is generated by combining the preset tag configuration file and the target meta information.
For example, if a user needs a new tag, only the actual meta information in the meta information library needs to be updated, i.e., the actual meta information is updated to be new actual meta information. The server may then analyze the target vocabulary that the new actual meta-information may correspond to, and add the target vocabulary to the replaceable fields in the tag template, thereby generating a predictive tag that matches the user's input information. Then, the server combines the new meta information and the preset tag configuration file, so that the tag configuration file for executing the data query flow of the new tag can be generated, and the configuration file does not need to be set for each tag.
In some optional implementations of this embodiment, after generating the target tag configuration file that matches the input information, the execution body may use a keyword extracted from the input information of the user as input, and operate the target tag configuration file to obtain query result information that matches the input information of the user.
Because the target tag configuration file represents a process of executing tag query data, if the target tag configuration file matching with the input information of the user is obtained, the server may run the target tag configuration file, which is equivalent to querying information corresponding to the tag matching with the input information.
As an example, for example, the information input by the user is "the proportion of men and women in the resident population of the resident shop". The label template extracted from the label template library by the server according to the input information is "the ratio of male and female in YY of XX". Then, the keywords determined by the server from the input information are "resident shop", "resident population".
Then, the server determines, from the meta information library, target meta information "is_hotel= true" matching the keyword "resident" and target meta information "resident=table a" matching the keyword "resident". According to the ratio of men and women in YY of the tag template "XX", the server can find a preset tag configuration file matched with the tag template, where the tag configuration file represents a data query flow for querying the number of men and women in YY of XX. The server then replaces the meta information in the tag profile with meta information "is_hotel= true" and "resident = table a", and executes the tag profile. The number of men and women in the resident population of the resident store is thus queried and stored separately in table a in order to calculate the statistical male-female ratio.
According to the implementation mode, the server can inquire the information of the query result required by the user according to the obtained tag configuration file matched with the input information of the user, and great convenience is provided for the user to inquire.
With continued reference to fig. 3, fig. 3 is a schematic illustration of an application scenario of a method for generating information according to an embodiment of the present disclosure. In the application scenario of fig. 3, the terminal device 301 sends input information 303 of the user to the server 302. After the server 302 receives the user's input information 303, a label template 305 is extracted from a label template library 304.
The server 302 may then extract keywords 306 from the user's input information 303. The server 302 then determines meta information 308 from the meta information repository 307 that matches the keyword 306.
Finally, based on the tag template 305, the preset tag profile 309, and the meta information 308, a target tag profile 310 and a predicted tag 311 are generated that match the user's input information 303.
Currently, one of the existing technologies is to set a tag, and then select the tag by a user, where a configuration file behind the tag is in a one-to-one correspondence with the tag, so that if the user needs a new tag, the configuration file matched with the tag needs to be reconfigured, which consumes a lot of time and complicates the operation and maintenance of the tag. The method provided by the embodiment of the disclosure may extract a tag template from a tag template library according to the obtained input information of the user, then extract a keyword from the input information of the user, determine target meta information matched with the keyword from a meta information library, and finally, combine the tag template, a preset tag configuration file and the target meta information to generate a target tag configuration file and a predicted tag matched with the input information. Therefore, the tag configuration file matched with the tag configuration file can be generated according to the information actually input by the user, and even if the finally obtained tag configuration file needs to be changed, only the meta information in the preset meta information library needs to be changed, so that the complexity of tag configuration is reduced, and the time of tag configuration is saved.
With further reference to fig. 4, a flow 400 of another embodiment of a method for generating information is shown. The flow 400 of the method for generating information is applied to a server, and includes the following steps:
and step 401, extracting the label template from the label template library according to the acquired input information of the user.
Step 402, extracting keywords from the user's input information determination.
In step 403, the target meta information matching the keyword is determined from the meta information library.
In this embodiment, the steps 401, 402 and 403 may be performed in a similar manner to the steps 201, 202 and 203 in the foregoing embodiments, and the descriptions of the steps 201, 202 and 203 are also applicable to the steps 401, 402 and 403, which are not repeated herein.
And step 404, substituting the keywords into a label template to generate a predictive label matched with the input information of the user.
In this embodiment, if a tag template and a keyword are obtained, the execution subject of the method for generating information (such as the server 105 shown in fig. 1) may combine the tag template and the keyword to generate a tag matching the input information.
For example, the information input by the user is "how many users please ask the store for the last 7 days? ". Keywords are "7", "resident". The label template is "user of XX day YY". The resulting tag may be "7 day store user" after fusing the keyword with the tag template.
Step 405, searching a preset tag configuration file matched with the tag template from a preset tag configuration file library.
In this embodiment, the server may further search a preset tag configuration file matching the tag template from a preset tag configuration file library. Because each tag template and the tag configuration files matched with each tag template are prestored in the server, the preset tag configuration files form a preset tag configuration file library. Therefore, if the tag template is obtained, the server may query the preset tag configuration file matched with the tag template from the preset tag configuration file library.
Step 406, determining whether the target meta-information is consistent with the actual meta-information in the preset tag configuration file.
In this embodiment, after obtaining the preset tag configuration file and the target meta information matched with the keyword, the executing body may query the actual meta information in the preset tag configuration file. Then, the server compares the actual meta information with the target meta information matched with the keywords, and judges whether the two are consistent.
In step 407, in response to determining that the target tag configuration file is inconsistent, replacing the actual meta information in the preset tag configuration file with the target meta information to obtain the target tag configuration file.
In this embodiment, if the server finds that the actual meta information is inconsistent with the target meta information matched with the keyword after comparison, the server may replace the actual meta information in the preset tag configuration file with the target meta information, and the obtained tag configuration file is the target tag configuration file.
In some optional implementations of this embodiment, the preset tag configuration file is obtained by:
first, extracting a label template from a plurality of actual labels to obtain a label template library.
In this implementation manner, the execution body may acquire a plurality of actual tags in advance. And then, according to the obtained actual labels, summarizing and unifying the label templates. And storing the obtained label template to form a label template library.
For example, the pre-acquired actual tags include "user of the latest 7-day resident store", "user of the latest 10-day internet surfing", and these two actual tags can be generalized and unified into one tag template "user of the latest XX-day YY". The actual labels "the ratio of men and women in the resident population of the resident store" and "the ratio of men and women in the temporary population of the online" can be generalized and unified into one label template "the ratio of men and women in YY of XX".
Second, extracting actual keywords from the plurality of actual tags.
In this implementation manner, the execution body may extract the actual keywords from the plurality of actual tags.
For example, for the actual tag "user of the latest 7-day resident", "user of the latest 10-day internet surfing", the server may acquire the actual keywords from the two actual tags including "time (number)", "resident", "internet surfing". For the actual labels "resident in resident population of resident" and "resident in temporary population of online" the server may obtain the actual keywords from both actual labels including "resident", "online", "temporary population" and "resident population". From the above analysis, it can be found that, among the four actual tags, the actual keywords may be unified as "time (number)", "resident", "surfing", "tentative population", and "resident population".
And thirdly, converting the actual keywords into actual meta information to obtain a meta information base.
In this implementation manner, if an actual keyword is obtained, the execution body may convert the actual keyword into actual meta information.
In particular, the server may replace the actual keyword with a computer language that the computer is able to recognize. For example, the server may replace the keyword "resident" with a string of characters, replaced with: is_hot= true.
The server may then store all of the actual meta information obtained to form a meta information library.
And step four, calling a label inquiry service corresponding to the label template based on the actual meta information to obtain a preset label configuration file.
In this embodiment, the executing body may obtain, from a third party device or locally, a tag query service corresponding to the tag template.
The tag query service is typically program information written by a tag operation and maintenance engineer to represent the flow of the tag query. The tag query service typically includes fields that can be replaced with meta-information.
In this implementation manner, after obtaining the actual meta information and the tag query service corresponding to the tag template, the executing body may replace a field in the tag query service, where the field may be replaced by the meta information, so as to obtain a preset tag configuration file. The server can store a large number of tag configuration files matched with the actual tags to form a preset tag configuration file library.
According to the implementation mode, the meta information base can be uniformly arranged on the actual tag, if the tag needs to be changed, only the actual meta information in the meta information base is needed to be replaced, and the tag configuration file can be obtained by replacing the actual meta information, so that the tag and the tag configuration file can be conveniently generated, and the expandability of tag maintenance is improved.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for generating information in this embodiment shows the steps of substituting keywords into a tag template, generating a predicted tag matching with user input information, searching a preset tag configuration file matching with the tag template from a preset tag configuration file library, judging whether the target meta information is consistent with actual meta information in the preset tag configuration file, and replacing the actual meta information in the preset tag configuration file with the target meta information in response to the inconsistency, so as to obtain a target tag configuration file. Therefore, the scheme described in the embodiment can generate a new label according to the keyword of the input information of the user and the label template, and obtain the target label configuration file according to the preset label configuration file and the target meta information matched with the keyword, so that the label generation process is simplified, and meanwhile, the label configuration file can be flexibly matched according to the input information of the user in time.
With further reference to fig. 5, as an implementation of the method shown in the above figures, the present disclosure provides an embodiment of an apparatus for generating information, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable in a server.
As shown in fig. 5, the apparatus 500 for generating information provided in the present embodiment includes a tag template extraction unit 501, a keyword extraction unit 502, a target meta information acquisition unit 503, and an information generation unit 504. Wherein the tag template extraction unit 501 is configured to extract a tag template from a tag template library according to the acquired input information of the user; the keyword extraction unit 502 is configured to extract keywords from input information of a user; the target meta information obtaining unit 503 is configured to determine target meta information matching the keyword from the meta information library; the information generating unit 504 is configured to generate a target tag profile and a predicted tag that match with input information of a user based on the tag template, a preset tag profile, and target meta information, wherein the tag template library matches with the meta information library and the preset tag profile.
In the present embodiment, in the apparatus 500 for generating information: specific processes of the tag template extracting unit 501, the keyword extracting unit 502, the target meta information obtaining unit 503 and the information generating unit 504 and technical effects thereof may refer to the relevant descriptions of step 201, step 202, step 203 and step 204 in the corresponding embodiment of fig. 2, and are not repeated herein.
In some alternative implementations of the present embodiment, the apparatus 500 for generating information may further include a query unit (not shown in the figure). The query unit may be configured to use the keyword as input, and run the target tag configuration file to obtain query result information matched with input information of the user.
In some optional implementations of the present embodiment, the information generating unit may include: the system comprises a predictive tag generation module, a search module, a judgment module and a target tag configuration file acquisition module (not shown in the figure). Wherein the predictive label generation module may be configured to substitute keywords into the label template to generate predictive labels that match the user's input information; the searching module may be configured to search a preset tag configuration file matched with the tag template from a preset tag configuration file library; the judging module may be configured to judge whether the target meta information is consistent with the actual meta information in the preset tag configuration file; the target tag profile obtaining module may be configured to replace actual meta-information in the preset tag profile with target meta-information in response to determining the inconsistency, resulting in a target tag profile.
In some optional implementations of this embodiment, the preset tag configuration file may be obtained by: a tag template library acquiring unit, an actual keyword extracting unit, a meta information library acquiring unit, an execution flow information acquiring unit, and a processing unit (not shown in the figure). The tag template library obtaining unit may be configured to extract tag templates from a plurality of actual tags, to obtain a tag template library; the actual keyword extraction unit may be configured to extract the actual keywords from the plurality of actual tags; the meta information base obtaining unit may be configured to convert the actual keyword into actual meta information to obtain a meta information base; and calling a label inquiry service corresponding to the label template based on the actual meta information to obtain a preset label configuration file.
The apparatus for generating information according to the above-described embodiment of the present disclosure, a server extracts a tag template from a tag template library according to acquired input information of a user through a tag template extraction unit 501, extracts a keyword from the input information of the user through a keyword extraction unit 502, and determines target meta information matching the keyword from a meta information library through a target meta information acquisition unit 503; the target tag profile and the predicted tag that match the input information of the user are generated by the information generating unit 504 based on the tag template, the preset tag profile, and the target meta information. Therefore, the tag configuration file matched with the tag configuration file can be generated according to the information actually input by the user, and even if the finally obtained tag configuration file needs to be changed, only the meta information in the preset meta information library needs to be changed, so that the complexity of tag configuration is reduced, and the time of tag configuration is saved.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., server in fig. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 6 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a liquid crystal display (LCD, liquid Crystal Display), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 6 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, 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 shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing means 601.
It should be noted that, the computer readable medium according to the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 an embodiment of the present 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. Whereas in embodiments of the present disclosure, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also 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, fiber optic cables, RF (Radio Frequency), and the like, or any suitable combination thereof.
The computer readable medium may be contained in the electronic device; or may exist alone without being assembled into the server. The computer readable medium carries one or more programs which, when executed by the server, cause the server to: extracting a label template from a label template library according to the acquired input information of the user; extracting keywords from input information of a user; determining target meta information matched with the keyword from a meta information base; and generating a target tag configuration file and a predicted tag matched with the input information of the user based on the tag template, the preset tag configuration file and the target meta information, wherein the tag template library is matched with the meta information library and the preset tag configuration file.
Computer program code for carrying out operations of embodiments of the present disclosure may be written in 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being 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 technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (9)

1. A method for generating information, comprising:
extracting a label template from a label template library according to the acquired input information of the user;
extracting keywords from the input information of the user;
determining target meta information matched with the keywords from a meta information base;
generating a target tag configuration file and a predicted tag matched with the input information of the user based on the tag template, a preset tag configuration file and the target meta information, wherein the tag template library is matched with the meta information library and the preset tag configuration file, and the tag configuration file comprises replaceable fields;
and taking the keywords as input, and operating the target tag configuration file to obtain query result information matched with the input information of the user.
2. The method of claim 1, wherein the generating a target tag profile and a predictive tag that match the user's input information based on the tag template, a preset tag profile, and the target meta information comprises:
substituting the keywords into the label template to generate a prediction label matched with the input information of the user;
searching a preset tag configuration file matched with the tag template from a preset tag configuration file library;
judging whether the target meta information is consistent with the actual meta information in the preset tag configuration file;
and in response to the inconsistency, replacing the actual meta information in the preset tag configuration file with the target meta information to obtain a target tag configuration file.
3. The method of claim 1, wherein the extracting keywords from the user's input information comprises:
and determining keywords in the input information of the user by using a natural language processing method.
4. The method of claim 1, wherein the preset tag profile is determined by:
extracting a tag template from a plurality of actual tags to obtain a tag template library;
extracting actual keywords from the plurality of actual tags;
converting the actual keywords into actual meta information to obtain a meta information library;
and calling a label inquiry service corresponding to the label template based on the actual meta information to obtain a preset label configuration file.
5. An apparatus for generating information, comprising:
a label template extraction unit configured to extract a label template from a label template library according to the acquired input information of the user;
a keyword extraction unit configured to extract keywords from input information of the user;
a target meta information acquisition unit configured to determine target meta information matching the keyword from a meta information library;
an information generating unit configured to generate a target tag profile and a predicted tag that match with input information of the user based on the tag template, a preset tag profile, and the target meta information, wherein the tag template library matches with the meta information library and the preset tag profile, the tag profile including replaceable fields;
and the query unit is configured to take the keywords as input, run the target tag configuration file and obtain query result information matched with the input information of the user.
6. The apparatus of claim 5, wherein the information generating unit comprises:
a predictive label generation module configured to substitute the keyword into the label template to generate a predictive label matching with the input information of the user;
the searching module is configured to search a preset tag configuration file matched with the tag template from a preset tag configuration file library;
the judging module is configured to judge whether the target meta information is consistent with the actual meta information in the preset tag configuration file;
and the target tag configuration file acquisition module is configured to replace actual meta information in the preset tag configuration file with the target meta information to obtain a target tag configuration file in response to the fact that the target tag configuration file is inconsistent.
7. The apparatus of claim 5, wherein the preset tag profile is obtained by:
the label template library acquisition unit is configured to extract label templates from a plurality of actual labels to obtain a label template library;
an actual keyword extraction unit configured to extract actual keywords from the plurality of actual tags;
a meta information base obtaining unit configured to convert the actual keyword into actual meta information to obtain the meta information base;
and the processing unit is configured to call a label inquiry service corresponding to the label template based on the actual meta information to obtain a preset label configuration file.
8. 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, causes the one or more processors to implement the method of any of claims 1-4.
9. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1-4.
CN201910609319.7A 2019-07-08 2019-07-08 Method and device for generating information Active CN110321544B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910609319.7A CN110321544B (en) 2019-07-08 2019-07-08 Method and device for generating information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910609319.7A CN110321544B (en) 2019-07-08 2019-07-08 Method and device for generating information

Publications (2)

Publication Number Publication Date
CN110321544A CN110321544A (en) 2019-10-11
CN110321544B true CN110321544B (en) 2023-07-25

Family

ID=68121436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910609319.7A Active CN110321544B (en) 2019-07-08 2019-07-08 Method and device for generating information

Country Status (1)

Country Link
CN (1) CN110321544B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597301B (en) * 2020-04-24 2023-06-09 北京百度网讯科技有限公司 Text prediction method and device and electronic equipment
CN111651696B (en) * 2020-05-29 2023-06-02 泰康保险集团股份有限公司 Product label customizing method and device, computer storage medium and electronic equipment
CN112329416A (en) * 2020-10-27 2021-02-05 维沃移动通信有限公司 Message generation method and device and electronic equipment
CN113486224A (en) * 2021-06-30 2021-10-08 中国民航信息网络股份有限公司 Method and device for creating monitoring instrument panel, storage medium and electronic equipment
CN114239783A (en) * 2021-12-27 2022-03-25 中国建设银行股份有限公司 Label generation method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023854A (en) * 2009-09-18 2011-04-20 上海智问软件技术有限公司 Template-based semantic variable extraction method
CN103577489A (en) * 2012-08-08 2014-02-12 百度在线网络技术(北京)有限公司 Method and device of searching web browsing history
CN105701253A (en) * 2016-03-04 2016-06-22 南京大学 Chinese natural language interrogative sentence semantization knowledge base automatic question-answering method
KR20190005034A (en) * 2017-07-05 2019-01-15 서울대학교산학협력단 Apparatus and method for quantification analysis of sample using liquid chromatograph-mass spectrometry
CN109388753A (en) * 2018-10-31 2019-02-26 北京字节跳动网络技术有限公司 Method and apparatus for handling information
CN109446412A (en) * 2018-09-25 2019-03-08 中国平安人寿保险股份有限公司 Product data method for pushing, device, equipment and medium based on web page tag

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092942B (en) * 2013-01-10 2016-08-24 北京奇虎科技有限公司 Query Information obtains and the client of displaying, method and system
CN104765791A (en) * 2015-03-24 2015-07-08 北京搜狗科技发展有限公司 Information inputting method and device
CN106919711B (en) * 2017-03-13 2020-10-02 北京百度网讯科技有限公司 Method and device for labeling information based on artificial intelligence
CN106960030B (en) * 2017-03-21 2020-11-10 北京百度网讯科技有限公司 Information pushing method and device based on artificial intelligence
CN108694172B (en) * 2017-04-05 2021-12-31 北京京东尚科信息技术有限公司 Information output method and device
CN107943775A (en) * 2017-11-24 2018-04-20 泰康保险集团股份有限公司 Method, apparatus, storage medium and the electronic equipment of message push
CN108280200B (en) * 2018-01-29 2021-11-09 百度在线网络技术(北京)有限公司 Method and device for pushing information
CN108920497B (en) * 2018-05-23 2021-10-15 北京奇艺世纪科技有限公司 Man-machine interaction method and device
CN109002516A (en) * 2018-07-06 2018-12-14 国网电子商务有限公司 A kind of searching method and device
CN109710634B (en) * 2018-12-28 2021-04-30 北京百度网讯科技有限公司 Method and device for generating information

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023854A (en) * 2009-09-18 2011-04-20 上海智问软件技术有限公司 Template-based semantic variable extraction method
CN103577489A (en) * 2012-08-08 2014-02-12 百度在线网络技术(北京)有限公司 Method and device of searching web browsing history
CN105701253A (en) * 2016-03-04 2016-06-22 南京大学 Chinese natural language interrogative sentence semantization knowledge base automatic question-answering method
KR20190005034A (en) * 2017-07-05 2019-01-15 서울대학교산학협력단 Apparatus and method for quantification analysis of sample using liquid chromatograph-mass spectrometry
CN109446412A (en) * 2018-09-25 2019-03-08 中国平安人寿保险股份有限公司 Product data method for pushing, device, equipment and medium based on web page tag
CN109388753A (en) * 2018-10-31 2019-02-26 北京字节跳动网络技术有限公司 Method and apparatus for handling information

Also Published As

Publication number Publication date
CN110321544A (en) 2019-10-11

Similar Documents

Publication Publication Date Title
CN110321544B (en) Method and device for generating information
CN110019350B (en) Data query method and device based on configuration information
US20160292591A1 (en) Streamlined analytic model training and scoring system
CN108090351B (en) Method and apparatus for processing request message
CN109359194B (en) Method and apparatus for predicting information categories
CN109036425A (en) Method and apparatus for operating intelligent terminal
CN109858045B (en) Machine translation method and device
US11800201B2 (en) Method and apparatus for outputting information
US20200285636A1 (en) Context-sensitive cross-lingual searches
CN110737824B (en) Content query method and device
WO2021203918A1 (en) Method for processing model parameters, and apparatus
CN112861529A (en) Method and device for managing error codes
CN108038172B (en) Search method and device based on artificial intelligence
CN110245334B (en) Method and device for outputting information
CN110188113B (en) Method, device and storage medium for comparing data by using complex expression
CN112182255A (en) Method and apparatus for storing media files and for retrieving media files
CN113590756A (en) Information sequence generation method and device, terminal equipment and computer readable medium
CN105653360A (en) Method and system for cross-app function acquisition
CN111488386A (en) Data query method and device
CN116450723A (en) Data extraction method, device, computer equipment and storage medium
US20220164377A1 (en) Method and apparatus for distributing content across platforms, device and storage medium
CN110895587A (en) Method and device for determining target user
CN115495658A (en) Data processing method and device
CN110472055B (en) Method and device for marking data
CN109299223B (en) Method and device for inquiring instruction

Legal Events

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