Methods and related devices for querying public opinion data
By storing the main text files of public opinion data on a file server and combining database and search engine query optimization, the problem of low query efficiency for enterprise public opinion data has been solved, achieving an efficient and low-cost query solution.
Patent Information
- Application Number
- CN202111674018.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In existing technologies, the query efficiency of enterprise public opinion data is low, resulting in poor query performance and affecting system stability. Furthermore, the database sharding and table partitioning method increases resource costs and computational complexity.
The main text of public opinion data is stored on a file server, and summary information is stored in a database. The summary information and the main text are retrieved from the database and the file server by querying the conditions. The query is then performed in conjunction with a search engine to optimize the query process and improve efficiency.
It improves the efficiency of public opinion data query, reduces resource costs and computational complexity, and ensures system stability and query performance.
Smart Images

Figure CN114356930B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method and related apparatus for querying public opinion data. Background Technology
[0002] Corporate public opinion information typically originates from unstructured data on the internet. However, the public opinion data used internally by enterprises is usually structured data purchased externally and collected and processed by third-party organizations, including fields such as title, body text, source, and sentiment assessment. Corporate public opinion data is characterized by its large volume and the large storage space required for each data point.
[0003] For information query systems of small and medium-sized enterprises, relational databases (MySQL) are typically used to perform online queries on enterprise public opinion data. However, MySQL databases usually have capacity limitations for a single database and a single table. Exceeding these limits will lead to a sharp decline in database concurrency performance. Public opinion data typically contains large amounts of information such as text and titles. Directly performing online queries on large data tables in MySQL not only results in poor query performance but may also affect the overall stability of the system, causing other functions to malfunction.
[0004] Currently, when enterprise information query systems perform queries on enterprise public opinion data, they primarily distribute the system's performance load through reasonable database sharding and table partitioning. For example, large data tables are relatively evenly split into multiple database tables across multiple databases according to preset rules, such as splitting by the last digit of the date the enterprise public opinion data was acquired. Multiple data sources are configured for the front-end application devices, corresponding to the multiple split databases and tables. Based on the received query conditions, data is retrieved from different databases and tables. The front-end application devices then concatenate the retrieved data to obtain the query result set and display it. However, splitting databases or tables increases the resource cost of the database server, increases the time complexity of batch processing, and consumes a significant amount of computing resources and memory when concatenating the result set.
[0005] Therefore, improving the efficiency of querying corporate public opinion data and reducing query costs has become an urgent problem to be solved. Summary of the Invention
[0006] This application provides a method and related apparatus for querying public opinion data, which improves the efficiency of querying public opinion data and reduces the cost of querying public opinion data.
[0007] Firstly, this application provides a method for querying public opinion data, which is executed by a public opinion data query system. The method includes: receiving query condition information, the query condition information being used to query target public opinion data; querying summary information of the target public opinion data in a database based on the query condition information, the summary information including data information other than the main text file of the target public opinion data; querying the main text file of the target public opinion data from a file server; and displaying the query results of the target public opinion data, the query results including the summary information and the main text file of the target public opinion data.
[0008] In this method, the public opinion data query system retrieves summary information of the target public opinion data from the database and the full text file of the target public opinion data from the file server based on the received query conditions. The retrieved summary information and full text file are then used as the query results for the target public opinion data. Compared to querying data from multiple different databases and tables, then concatenating the retrieved data to obtain a query result set and displaying it, this method saves database server resource costs, reduces the time complexity of batch processing, improves the efficiency of public opinion data querying, and reduces query costs.
[0009] In one possible implementation, the method further includes: exporting the main text file of the public opinion data; saving the main text file of the public opinion data to the file server; generating a public opinion main text file lookup table, wherein the public opinion main text file lookup table includes the main text file identifier and the main text file path of the public opinion data.
[0010] In this implementation, the main text file of the public opinion data is exported and saved to a file server. The file server then generates a table mapping the main text files of the public opinion data, using the file server's returned file identifiers and paths. This allows for subsequent retrieval of the target public opinion data's main text file based on received query conditions, fully leveraging the file server's indexing capabilities. Furthermore, storing structured, lightweight data such as summary information of the public opinion data in a database saves database space, maximizes the utilization of valuable online resources, avoids increased processing complexity and performance degradation caused by multi-database interactions, and conserves resource costs.
[0011] In one possible implementation, querying the text file of the target public opinion data from the file server includes: querying the text file of the target public opinion data from the file server based on the text file identifier and text file path of the target public opinion data.
[0012] In this implementation, the text file of the target public opinion data is queried from the file server based on the text file identifier and text file path of the target public opinion data, which improves the query efficiency of the text file of the target public opinion data.
[0013] In one possible implementation, the method further includes: determining whether a search engine service is available; and if the search engine service is available, querying the target public opinion data through the search engine to obtain the query results of the target public opinion data.
[0014] In this implementation, the availability of the search engine service is determined. If the search engine is unavailable, a relatively simple local query for information such as title, summary, and keywords is performed through the database. If the search engine service is available, a full-text search for information such as body text and title is performed through the search engine, flexibly meeting user needs.
[0015] In one possible implementation, the method further includes: generating a search engine index source file for the public opinion data; creating a search index for the public opinion data using the search engine based on the search engine index source file; and querying the target public opinion data using the search engine based on the search index to obtain query results for the target public opinion data.
[0016] In this implementation, a search index for public opinion data is created by the search engine based on the source files of the search engine index, and the target public opinion data is queried based on the search index to obtain the query results of the target public opinion data, thereby improving the query efficiency of querying target public opinion data through the search engine.
[0017] In one possible implementation, the database is a relational database.
[0018] Secondly, this application provides a device for querying public opinion data. The device includes: a receiving module for receiving query condition information, the query condition information being used to query target public opinion data; a query module for querying summary information of the target public opinion data in a database based on the query condition information, the summary information including data information other than the main text file of the target public opinion data; the query module is also used to query the main text file of the target public opinion data from a file server; and a display module for displaying the query results of the target public opinion data, the query results including the summary information and the main text file of the target public opinion data.
[0019] In one possible implementation, the device further includes an export module, a save module, and a generation module; the export module is used to export the main text file of the public opinion data; the save module is used to save the main text file of the public opinion data to the file server; the generation module is used to generate a public opinion main text file lookup table, the public opinion main text file lookup table including the main text file identifier and the main text file path of the public opinion data.
[0020] In one possible implementation, the query module is specifically used to: query the text file of the target public opinion data from the file server based on the text file identifier and text file path of the target public opinion data.
[0021] In one possible implementation, the device further includes a judgment module; the judgment module is used to determine whether the search engine service is available; the query module is further used to query the target public opinion data through the search engine when the search engine service is available, and obtain the query results of the target public opinion data.
[0022] In one possible implementation, the apparatus further includes a generation module and a creation module; the generation module is used to generate a search engine index source file for the public opinion data; the creation module is used to create a search index for the public opinion data using the search engine based on the search engine index source file; the query module is further used to query the target public opinion data using the search engine based on the search index to obtain query results for the target public opinion data.
[0023] In one possible implementation, the database is a relational database.
[0024] For the beneficial effects of the second aspect and its various possible implementations, please refer to the first aspect and its various possible implementations; they will not be repeated here.
[0025] Thirdly, this application provides a device for querying public opinion data. The device may include a processor coupled to a memory. The memory stores program code, and the processor executes the program code in the memory to implement the method in the first aspect or any of its implementations.
[0026] Optionally, the device may also include the memory.
[0027] Fourthly, this application provides a chip including at least one processor and a communication interface, the communication interface and the at least one processor being interconnected via a line, the at least one processor being configured to run a computer program or instructions to perform the method as described in the first aspect or any of the possible implementations thereof.
[0028] Fifthly, this application provides a computer-readable medium storing program code for execution by a device, the program code including methods for performing the methods described in the first aspect or any of the possible implementations thereof.
[0029] In a sixth aspect, this application provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the method as described in the first aspect or any of the possible implementations thereof.
[0030] In a seventh aspect, this application provides a computing device including at least one processor and a communication interface, the communication interface and the at least one processor being interconnected via a line, the communication interface communicating with a target system, and the at least one processor being configured to run computer programs or instructions to perform the method as described in the first aspect or any of the possible implementations thereof.
[0031] Eighthly, this application provides a computing system including at least one processor and a communication interface, the communication interface and the at least one processor being interconnected via a line, the communication interface communicating with a target system, and the at least one processor being configured to run computer programs or instructions to perform the method as described in the first aspect or any of the possible implementations thereof. Attached Figure Description
[0032] Figure 1 This is a schematic diagram of a system architecture according to an embodiment of this application;
[0033] Figure 2 This is a flowchart illustrating a method for querying public opinion data.
[0034] Figure 3 This is a flowchart illustrating a method for querying public opinion data according to an embodiment of this application;
[0035] Figure 4 This is a flowchart illustrating a method for creating a search index according to one embodiment of this application;
[0036] Figure 5 This is a flowchart illustrating a method for querying public opinion data according to an embodiment of this application;
[0037] Figure 6 This is a schematic structural diagram of a public opinion data query device according to an embodiment of this application;
[0038] Figure 7 This is a schematic diagram of the structure of a public opinion data query device provided in one embodiment of this application. Detailed Implementation
[0039] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0040] To facilitate understanding, some concepts involved in the embodiments of this application will be explained first.
[0041] Enterprise information query system: refers to a system used to provide enterprise information query to the public. The enterprise information may include information such as the enterprise's business registration, legal status, public opinion, relationships, and risks.
[0042] Corporate public opinion data refers to public opinion information related to a company that is purchased from external sources. Corporate public opinion data can be divided into structured corporate public opinion data and unstructured corporate public opinion data.
[0043] Figure 1 This is a schematic diagram of a system architecture according to an embodiment of this application. Figure 1 As shown, the public opinion data query system 100 includes a database server 110, a file server 120, a search engine 130, and a front-end application device 140.
[0044] Database server 110 is used to store summary information of public opinion data and to query summary information of target public opinion data from the local database according to query conditions. The summary information of public opinion data may include lightweight data such as the author, title, and summary of the public opinion data.
[0045] As an example, the database in database server 110 can be a MySQL database.
[0046] File server 120 is used to store the text files of public opinion data, generate the text file identifier and text file path of public opinion data, and query the text file of the target public opinion data according to the query conditions.
[0047] Search engine 130 is used to generate a search index and to perform advanced retrieval of target public opinion data based on the generated search index, thereby obtaining query results or retrieval results of the target public opinion data.
[0048] The front-end application device 140 is used to display the query results of the target public opinion data. The query results include summary information and text files of the target public opinion data.
[0049] As an example, the public opinion data query system 100 can be an enterprise information query system, and the public opinion data can include enterprise public opinion data.
[0050] Understandable Figure 1 The system architecture shown is merely an example of the public opinion data query system provided in this application. In other embodiments of this application, the public opinion data query system 100 may include more or fewer components than those shown, or combine some components, or split some components, or have different component arrangements. For example, the public opinion data query system may also include a batch server. The components shown may be implemented in hardware, software, or a combination of software and hardware, and this application does not limit their implementation.
[0051] Figure 2 This is a flowchart illustrating a method for querying public opinion data. For example... Figure 2 As shown, the method includes at least S201 to S206.
[0052] S201 splits a large volume of public opinion data table into multiple public opinion data tables according to preset rules.
[0053] As an example, a large amount of public opinion data table can be split into multiple public opinion data tables according to the last digit of the date on which the public opinion data was obtained.
[0054] S202, the split public opinion data tables are stored in multiple databases respectively, and each public opinion data table is stored in only one database.
[0055] S203 configures multiple data sources for front-end application devices.
[0056] As an example, these multiple data sources correspond to multiple databases after being split.
[0057] As another example, these multiple data sources correspond to multiple split public opinion data tables.
[0058] S204. Based on the received query conditions, perform queries from multiple public opinion data tables in the split databases to obtain query results.
[0059] S205: The query results are concatenated by the front-end application device to obtain the query result set.
[0060] S206 displays the query result set through the front-end application device.
[0061] Figure 2The method for querying public opinion data shown has the following drawbacks: First, it requires the use of multiple databases, increasing the resource cost of the database server; second, splitting data tables is costly and increases the time complexity of batch processing; third, querying public opinion data requires concatenating the query results through application devices to obtain a query result set, which consumes a lot of computing resources and memory, and if the query result set is large, it will increase the risk of memory overflow; in addition, concatenating data through application devices is far less efficient than using a database.
[0062] To solve Figure 2 To address the problems with the existing methods for querying public opinion data, this application proposes a new method for querying public opinion data, which will be described below through specific embodiments.
[0063] Figure 3 This is a flowchart illustrating a method for querying public opinion data according to an embodiment of this application. Figure 3 As shown, the method includes at least S301 to S304. The method can be derived from... Figure 1 The public opinion data query system in China is running at 100%.
[0064] S301, Receive query condition information, which is used to query target public opinion data.
[0065] As an example, query criteria may include one or more of the following: identifiers, authors, titles, keywords, and summaries of the target public opinion data.
[0066] S302, based on the query conditions, query the database for summary information of the target public opinion data. The summary information includes data information other than the main text file of the target public opinion data.
[0067] In one possible implementation, summary information of public opinion data is stored in a database, and summary information of target public opinion data is retrieved from the database based on received query conditions.
[0068] As an example, the database is a MySQL database.
[0069] As an example, summary information may include the author, title, and summary of the public opinion data.
[0070] S303, retrieve the text file containing the target public opinion data from the file server.
[0071] As an example, a file server can provide Figure 1 File server 120 in the middle.
[0072] In one possible implementation, the text file of the public opinion data is stored in a file server, and the text file of the target public opinion data is retrieved from the file server based on the received query conditions.
[0073] In one possible implementation, the database server exports the main text file of the public opinion data, saves the main text file of the public opinion data to the file server, and generates a public opinion main text file lookup table, which includes the main text file identifier and the main text file path of the public opinion data.
[0074] As an example, the database server pushes the text file of public opinion data to the file server. The file server processes the text file of public opinion data and returns the text file path and text file identifier, which are then written back to the public opinion text file lookup table.
[0075] As an example, a mapping relationship is established between the summary information of public opinion data and the corresponding text document of public opinion.
[0076] For example, based on the received query conditions, the database is queried for the summary information of the target public opinion data, and a mapping table of public opinion text files that has a mapping relationship with the summary information of the target public opinion data is obtained, namely, the public opinion text file mapping table of the target public opinion data. Based on the text file identifier and text file path of the target public opinion data in the public opinion text file mapping table of the target public opinion data, the text file of the target public opinion data is queried from the file server.
[0077] As an example, a database server can provide Figure 1 Database server 110 in the middle.
[0078] S304 displays the query results for the target public opinion data, including a summary of the target public opinion data and the main text file.
[0079] In one possible implementation, the query results of the target public opinion data are displayed through a front-end application device.
[0080] As an example, the front-end application device can provide Figure 1 The front-end application device is 140.
[0081] In another possible implementation, it is determined whether the search engine service is available. If the search engine service is available, the target public opinion data is queried through the search engine to obtain the query results of the target public opinion data.
[0082] As an example, methods for determining the availability of search engine services can include: setting a search degradation switch; if degradation occurs, then querying target sentiment data using a database instead of the search engine. Alternatively, if the search engine is known to be unavailable, the search degradation switch can be manually enabled.
[0083] As another example, methods for determining whether a search engine service is available may include: setting a timeout period for the search engine to return a response; if the search engine returns a timeout, then using the database to query the target public opinion data; otherwise, not using the search engine to query the target public opinion data.
[0084] In one possible implementation, when the search engine service is available, the database server generates a search engine index source file for the public opinion data and sends the generated public opinion data search engine index source file to the search engine; the search engine creates a search index for the public opinion data based on the search engine index source file, and the search engine queries the target public opinion data based on the search index to obtain the query results for the target public opinion data.
[0085] As an example, the database server generates a search engine index source file for public opinion data and sends the generated search engine source file to the search engine. The generated search engine index source file may include multiple fields such as the identifier of the public opinion data, the path of the main text file, the author, the title, and the source. It can also specify the range of index fields and set word segmentation search fields according to actual needs.
[0086] As an example, a search engine creates a search index based on the search engine index source file, where the text index is created after obtaining the text file by accessing a file server.
[0087] As an example, by calling a search engine, queries can be performed based on content items set as index fields such as body text and title, and different query strategies can be adopted depending on whether word segmentation is used.
[0088] As an example, a search engine can provide Figure 1 Search engine 130 in China.
[0089] The technical solution provided in this application is that the public opinion data query system queries the summary information of the target public opinion data from the database and the text file of the target public opinion data from the file server according to the received query conditions information, and uses the queried summary information and text file as the query results of the target public opinion data. This saves the resource cost of the database server, reduces the time complexity of batch programs, improves the query efficiency of public opinion data, and reduces the query cost.
[0090] Figure 4This is a flowchart illustrating a method for creating a search index according to one embodiment of this application. Figure 4 As shown, the method includes at least S401 to S407. The method can be derived from... Figure 1 The public opinion data query system in China is running at 100%.
[0091] S401 processes public opinion data through a database server to obtain the main text file of the public opinion data.
[0092] As an example, a database server can provide Figure 1 Database server 110 in the middle.
[0093] As an example, a single piece of public opinion data generates a text file.
[0094] S402, send the text file of the public opinion data to the file server.
[0095] As an example, a file server can provide Figure 1 File server 120 in the middle.
[0096] S403 processes the text file of the public opinion data through the file server to obtain the text file identifier and text file path of the public opinion data.
[0097] S404 returns the text file identifier and text file path of the public opinion data to the database server.
[0098] As an example, the database server updates the text file identifier and text file path of the public opinion data to the public opinion text file lookup table, and establishes a mapping relationship between the public opinion text file lookup table and the summary information of the public opinion data.
[0099] S405 creates search engine index source files through a database server.
[0100] As an example, the source files of a search engine index created through a database server can include multiple fields such as identifiers of public opinion data, path of the main text file, author, title, and source. Furthermore, operations such as specifying the range of index fields and setting word segmentation search fields can be performed according to actual needs.
[0101] S406 sends the search engine index source file to the search engine.
[0102] S407, creates a search engine based on the search engine's index source files.
[0103] As an example, a search index is created by a search engine based on the search engine's index source files, where the text index can be created by obtaining the text files after accessing a file server.
[0104] As an example, a search engine can provide Figure 1 Search engine 130 in China.
[0105] The technical solution provided in this application separates the main text files from the public opinion data and stores them on a file server, giving full play to the indexing advantages of the file server. The database stores structured lightweight data such as titles, authors, and article sources, saving database space and maximizing the use of valuable online resources. It avoids the problems of increased processing complexity and performance loss caused by multi-database interaction, thus saving resource costs.
[0106] Figure 5 This is a flowchart illustrating a method for querying public opinion data according to an embodiment of this application. Figure 5 As shown, the method includes at least S501 to S507. The method can be derived from... Figure 1 The public opinion data query system in China is running at 100%.
[0107] S501 receives query condition information, which is used to query target public opinion data.
[0108] It should be noted that S501 can be referenced from S301, and will not be elaborated on here.
[0109] S502, determine if the search engine service is available.
[0110] As an example, methods for determining the availability of search engine services can include: setting a search degradation switch; if degradation occurs, then querying target sentiment data using a database instead of the search engine. Alternatively, if the search engine is known to be unavailable, the search degradation switch can be manually enabled.
[0111] As another example, methods for determining whether a search engine service is available may include: setting a timeout period for the search engine to return a response; if the search engine returns a timeout, then using the database to query the target public opinion data; otherwise, not using the search engine to query the target public opinion data.
[0112] If not, then execute S503 to S505;
[0113] If so, then execute S506.
[0114] S503 retrieves summary information of target public opinion data from the local database based on query conditions via the database server.
[0115] As an example, a database server can provide Figure 1 Database server 110 in the middle.
[0116] It should be noted that S503 can be referenced from S302, and will not be elaborated on here.
[0117] S504, obtain a table of public opinion text documents that has a mapping relationship with the summary information of the target public opinion data, and obtain the table of public opinion text documents of the target public opinion data.
[0118] In one possible implementation, the database server stores a mapping relationship between summary information of public opinion data and a table of correspondence between public opinion data and the main text of the public opinion data. Based on the summary information of the target public opinion data that is queried, the table of correspondence between the target public opinion data and the summary information of the target public opinion data is obtained, which is the table of correspondence between the target public opinion data and the main text of the public opinion data.
[0119] S505: Through the database server, query the text file of the target public opinion data from the file server according to the public opinion text file comparison table of the target public opinion data.
[0120] As an example, a file server can provide Figure 1 File server 120 in the middle.
[0121] It should be noted that S505 can be referenced from S303, and will not be elaborated on here.
[0122] S506 uses a search engine to query target public opinion data based on query conditions and search indexes, and obtains the query results for the target public opinion data.
[0123] As an example, a search engine can provide Figure 1 Search engine 130 in China.
[0124] In one possible implementation, the public opinion data query process is triggered based on the query conditions, and the query interface of the search engine is called. The search engine returns information such as the title, client name, author, text file identifier, and text file path of the target public opinion data based on the query conditions. The file server online query interface is called based on the text file path of the target public opinion data, and the text file of the target public opinion data is queried and returned based on the text file identifier of the target public opinion data.
[0125] S507 displays the query results for the target public opinion data, including a summary of the target public opinion data and the main text file.
[0126] In one possible implementation, the query results of the target public opinion data are displayed through a front-end application device.
[0127] As an example, the front-end application device can provide Figure 1 The front-end application device is 140.
[0128] The technical solution provided in this application can perform relatively simple local queries for information such as titles, abstracts, and keywords using a database server, or it can use the advanced query services of a search engine. In addition, the automatic switching between search engines and database server searches, as well as the manual switching on and off of fallback searches, improve the robustness of the system and ensure its high availability.
[0129] Figure 6 This is a schematic structural diagram of a public opinion data query device according to an embodiment of this application. Figure 6 As shown, the device 600 may include a receiving module 601, a query module 602, and a display module 603.
[0130] In this application's embodiments, any of the receiving module, query module, and display module can be implemented entirely or partially through software and / or hardware. The software-implemented portion can run on a processor to perform its corresponding function, while the hardware-implemented portion can be a component of the processor.
[0131] Device 600 can be used to achieve Figures 3 to 5 The method shown in any of the attached figures.
[0132] Figure 7 This is a schematic diagram of the structure of a public opinion data query device provided in one embodiment of this application. Figure 7 The apparatus 700 shown can be used to perform the method described in any of the foregoing embodiments.
[0133] like Figure 7 As shown, the device 700 of this embodiment includes: a memory 701, a processor 702, a communication interface 703, and a bus 704. The memory 701, processor 702, and communication interface 703 are interconnected via the bus 704.
[0134] The memory 701 can be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 701 can store programs, and when the program stored in the memory 701 is executed by the processor 702, the processor 702 can use it to execute... Figure 3 , Figure 4 or Figure 5 The steps of the method shown.
[0135] The processor 702 may be a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, used to execute relevant programs to implement the public opinion data query method of the method embodiment of this application.
[0136] The processor 702 can also be an integrated circuit chip with signal processing capabilities. In implementation, each step of the method in the various embodiments of this application can be accomplished by the integrated logic circuitry in the hardware of the processor 702 or by instructions in software form.
[0137] The processor 702 described above can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0138] The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 701. The processor 702 reads the information in memory 701 and, in conjunction with its hardware, completes the functions required by the various methods in the embodiments of this application. For example, it can execute... Figure 3 , Figure 4 or Figure 5 The various steps / functions of the illustrated embodiment.
[0139] The communication interface 703 can use, but is not limited to, transceivers to enable communication between the device 700 and other devices or communication networks.
[0140] Bus 704 may include a pathway for transmitting information between various components of device 700 (e.g., memory 701, processor 702, communication interface 703).
[0141] It should be understood that the device 700 shown in the embodiments of this application may be an electronic device, or it may be a chip configured in an electronic device.
[0142] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0143] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0144] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0145] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0146] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for querying public opinion data, characterized in that, The method is executed by the public opinion data query system, and the method includes: Receive query condition information, which is used to query target public opinion data; Determine if the search engine service is available; If the search engine service is available, the target public opinion data is queried through the search engine to obtain the query results; if the search engine service is unavailable, the database is used to query the target public opinion data. Based on the query conditions, a summary of the target public opinion data is retrieved from the database. The summary information includes data information other than the main text file of the target public opinion data. Obtain a mapping table of public opinion text files that has a mapping relationship with the summary information of the target public opinion data, and obtain the public opinion text file mapping table of the target public opinion data; Based on the target public opinion data's text file identifier and text file path in the target public opinion data's text file lookup table, query the text file of the target public opinion data from the file server; The query results for the target public opinion data are displayed, including a summary of the target public opinion data and the main text file. The method further includes: Export the main text file of the aforementioned public opinion data; Save the main text file of the public opinion data to the file server; Generate a public opinion data document reference table, which includes the document document identifier and document document path of the public opinion data.
2. The method according to claim 1, characterized in that, The text file from which the target public opinion data is retrieved from the file server includes: Based on the file identifier and file path of the target public opinion data, query the file of the target public opinion data from the file server.
3. The method according to claim 1, characterized in that, The method further includes: Generate the search engine index source file for the aforementioned public opinion data; The search index for the public opinion data is created by the search engine based on the search engine index source file; The target public opinion data is retrieved by querying the target public opinion data using the search engine based on the search index.
4. The method according to claim 1, characterized in that, The database in question is a relational database.
5. A device for querying public opinion data, characterized in that, The apparatus includes various functional modules for implementing the method of any one of claims 1 to 4.
6. A device for querying public opinion data, characterized in that, include: Memory and processor; The memory is used to store program instructions; The processor is used to invoke program instructions in the memory to execute the method as described in any one of claims 1 to 4.
7. A computer-readable medium, characterized in that, The computer-readable medium stores program code for computer execution, the program code including instructions for performing the method as described in any one of claims 1 to 4.
8. A computer program product, characterized in that, The computer program product includes instructions that, when executed, cause a computer to perform the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Information acquisition processing and retrieval system
CN101158963A
Public opinion information query method, device and system, electronic equipment and storage medium
CN110489653A