CN113760977A - Information query method, device, equipment and storage medium - Google Patents

Information query method, device, equipment and storage medium Download PDF

Info

Publication number
CN113760977A
CN113760977A CN202011045523.XA CN202011045523A CN113760977A CN 113760977 A CN113760977 A CN 113760977A CN 202011045523 A CN202011045523 A CN 202011045523A CN 113760977 A CN113760977 A CN 113760977A
Authority
CN
China
Prior art keywords
query
information
target
cache
dimension parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011045523.XA
Other languages
Chinese (zh)
Inventor
宋振亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Tuoxian Technology Co Ltd
Original Assignee
Beijing Jingdong Tuoxian 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 Jingdong Tuoxian Technology Co Ltd filed Critical Beijing Jingdong Tuoxian Technology Co Ltd
Priority to CN202011045523.XA priority Critical patent/CN113760977A/en
Publication of CN113760977A publication Critical patent/CN113760977A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses an information query method, an information query device, information query equipment and a storage medium, wherein the method comprises the following steps: responding to the detected information query request, and acquiring a query identifier of the information query request; acquiring target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism; and generating response information of the information query request based on the target query information for responding. According to the method provided by the embodiment of the invention, the information query request is responded by combining the master-slave query and the query dimension parameter, so that the real-time performance and the accuracy of the dynamic hot data in the response information are improved, and the user experience is improved.

Description

Information query method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to an information query method, an information query device, information query equipment, a storage medium and an information query system.
Background
With the development of computer networks, more and more users deal with daily demands such as purchasing daily necessities, train tickets, airline tickets, movie tickets and the like through an electronic commerce platform. General large-scale e-commerce websites usually store tens of millions of user, commodity, ordering data and the like, and it can be concluded according to the generally accepted twenty-eight law that only 20% of hot spot data are accessed and operated by a large number of users, and 80% of data are zombie data and are rarely operated. The hotspot data is data corresponding to a hotspot request of a user and can be divided into static hotspot data and dynamic hotspot data. Static hotspot data may be understood as hotspot data that can be predicted in advance. If the hot spot data is screened out in advance in a buyer registration reservation mode, the predicted hot spot data is marked in advance. In addition, hot commodities can be found in advance through big data analysis so as to analyze hot data. However, the dynamic hot spot data cannot be predicted in advance and is a hot spot temporarily generated in the operation process of the system. Merchants have passed various modes of publicity or some unpredictable situation (e.g., new crown pneumonia causes a sudden increase in mask search volume) that causes it to become hot data in a short period of time.
In the process of implementing the invention, the inventor finds that at least the following technical problems exist in the prior art: the dynamic hotspot data is based on temporarily generated hotspots, so that more intervention cannot be performed on the hotspots. Therefore, how to ensure the real-time performance and accuracy of dynamic hot spot data retrieval is a technical problem to be solved urgently.
Disclosure of Invention
The embodiment of the invention provides an information query method, an information query device, information query equipment and a storage medium, and aims to improve the real-time performance and accuracy of dynamic hot data in response information.
In a first aspect, an embodiment of the present invention provides an information query method, including:
responding to the detected information query request, and acquiring a query identifier of the information query request;
acquiring target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism;
and generating response information of the information query request based on the target query information for responding.
In a second aspect, an embodiment of the present invention further provides an information query apparatus, including:
the query identifier acquisition module is used for responding to the detected information query request and acquiring a query identifier of the information query request;
the target information acquisition module is used for acquiring target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism;
and the response information generating module is used for generating response information of the information inquiry request based on the target inquiry information and responding.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the information query method as provided by any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the information query method provided in any embodiment of the present invention.
The embodiment of the invention responds to the detected information query request to obtain the query identifier of the information query request; acquiring target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism; and generating response information of the information query request based on the target query information for responding, and responding the information query request by combining master-slave query and query dimension parameters, so that the real-time performance and the accuracy of hot point data in the response information are improved, and the user experience is improved.
Drawings
Fig. 1 is a flowchart of an information query method according to an embodiment of the present invention;
fig. 2 is a flowchart of an information query method according to a second embodiment of the present invention;
fig. 3 is a flowchart of an information query method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an information query apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying 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 further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of an information query method according to an embodiment of the present invention. The embodiment is applicable to the situation when responding to the information inquiry request initiated by the user. The method may be performed by an information query apparatus, which may be implemented in software and/or hardware, for example, the information query apparatus may be configured in a computer device. As shown in fig. 1, the method includes:
s110, responding to the detected information inquiry request, and acquiring an inquiry identifier of the information inquiry request.
In this embodiment, the information query request may be a request initiated by a user through a user side and used for querying the target query information. The query identifier may be obtained by parsing the information query request. It is understood that the query identifier may be determined based on a query keyword input by a user, which may be an item identifier of a target query item associated with the information query request, or an information identifier of target query information associated with the information query request. Illustratively, when a user needs to purchase a mask, an information query request for querying relevant information of the mask is triggered by clicking a query control after inputting the mask on a user terminal, the user terminal generates the information query request based on the mask input by the user and sends the information query request to a server terminal, and the server terminal analyzes the information query request and obtains the mask carried in the information query request as a query identifier.
And S120, acquiring target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism.
Generally, most of the data stored in the cache is static hotspot data which can be predicted in advance. Therefore, when a certain type of data is suddenly changed into dynamic hot spot data, the data in the cache cannot meet the query requirements (such as the requirements on the information quantity, the information accuracy and the like) of the dynamic hot spot data, that is, the real-time performance and the accuracy of the dynamic hot spot data in the information queried from the cache are poor. In order to solve the technical problem that the real-time performance and the accuracy of dynamic hot data are poor and improve the query performance of a foreground list, in the embodiment, a master-slave query mode is adopted, query dimension parameters are set at the same time, and target query information corresponding to a query identifier is obtained by combining a master-slave query mechanism and the query dimension parameters, so that the real-time performance and the accuracy of the dynamic hot data in the target query information are improved. In general, when an information query request initiated by a user is received, an application server firstly queries a cache, and when data in the cache, which accord with the information query request, does not reach a set dimension parameter, a secondary query operation is triggered, and the data which accord with the information query request are obtained from a database so as to improve the real-time performance and the accuracy of dynamic hot data in target query information. In the above process, two query dimension parameters may be included: a master query dimension parameter and a slave query dimension parameter. Optionally, whether the slave query operation needs to be started or not may be determined based on the master query dimension parameter, and the slave query operation may be executed based on the slave query dimension parameter. It can be understood that the master query dimension parameter and the slave query dimension parameter can be set according to actual requirements.
And S130, generating response information of the information inquiry request based on the target inquiry information and responding.
In this embodiment, after the target query information is obtained, the target query information may be directly sent to the user side as response information of the information query request for response, or the target query information may be combined with other information to generate response information of the information query request, and the response information is sent to the user side for response.
The embodiment of the invention responds to the detected information query request to obtain the query identifier of the information query request; acquiring target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism; and generating response information of the information query request based on the target query information for responding, and responding the information query request by combining master-slave query and query dimension parameters, so that the real-time performance and the accuracy of hot point data in the response information are improved, and the user experience is improved.
Example two
Fig. 2 is a flowchart of an information query method according to a second embodiment of the present invention. The embodiment is further optimized on the basis of the scheme. As shown in fig. 2, the method includes:
s210, responding to the detected information inquiry request, and acquiring an inquiry identifier of the information inquiry request.
S220, obtaining target cache information corresponding to the query identifier from the data cache cluster, and judging whether the target cache information meets a main query dimension parameter associated with a main query operation.
In this embodiment, the primary query dimension parameter is used to determine whether the target cache information obtained by the primary query operation meets the query requirement. Optionally, the main query operation may be understood as pulling target cache information associated with the query identifier from the data cache cluster, and after the main query operation is performed to obtain the target cache information, determining whether the pulled target cache information meets a query requirement based on the main query dimension parameter.
Optionally, in order to improve the user experience, the main query dimension parameter may be set as a main number dimension parameter, that is, the lowest number of pieces of target cache information that is pulled, so that when the number of pieces of target cache information is smaller than the set lowest number, more information is obtained from the query operation, and the display effect of the target query information is improved. It can be understood that, when the main query dimension parameter is the lowest number of parameters, the main query dimension parameter for determining whether the target cache information satisfies the main query operation association may be: and judging whether the number of the target cache information is greater than the lowest number, judging that the target cache information meets the main query dimension parameter when the number of the target cache information is greater than the lowest number, and judging that the target cache information does not meet the main query dimension parameter when the number of the target cache information is not greater than the lowest number.
And S230, when the target cache information meets the main query dimension parameter, responding by taking the target cache information as the target query information.
When the target cache information meets the main query dimension parameter, the target cache information can meet the query requirement of a user, and the target cache information is directly used as the target query information to respond.
And S240, when the target cache information does not meet the main query dimension parameter, calling a middle station interface to acquire target updating information associated with the query identifier.
And when the target cache information does not meet the main query dimension parameter, the target cache information is represented as incapable of meeting the query requirement of the user, a slave query operation is triggered, and a middle station interface is called to obtain target update information associated with the query identifier. Optionally, the querying the dimension parameter further includes calling a middlebox interface to obtain target update information associated with the query identifier from the querying dimension parameter, including: and asynchronously initiating a middle platform interface call through the custom thread pool, and acquiring target updating information based on the query dimension parameters. Optionally, the user-defined thread pool may be used to asynchronously initiate a middle platform interface call to initiate multiple slave queries, so as to accelerate the acquisition speed of the target update information. The secondary query dimension parameters can be set according to actual requirements, the number of the secondary query dimension parameters can be one or more, and the secondary query dimension parameters can be the intersection or union of different dimension parameters. And when the slave query operation meets the preset slave query dimension parameter, using the target updating information acquired from the query operation as the supplementary information of the target cache information. In one embodiment, the secondary query dimension parameters include a query duration dimension parameter and/or a secondary number dimension parameter. The query duration dimension parameter and the slave number dimension parameter may be set at different levels, that is, the slave query dimension parameter may be an intersection or a union of the query duration dimension parameter at different levels and the slave number dimension parameter at different levels. When the slave query dimension parameter is the intersection of the query duration dimension parameter and the slave number dimension parameter, the target update information can stop the slave query operation only when the duration dimension parameter and the slave number dimension parameter are simultaneously satisfied; when the slave query dimension parameter is the union of the query duration dimension parameter and the slave number dimension parameter, the target update information can stop the slave query operation only by meeting any one of the duration dimension parameter and the slave number dimension parameter.
And S250, generating target query information based on the target cache information and the target updating information for responding, and caching the target updating information into the data cache cluster.
In this embodiment, after the target update information is obtained, the target cache information and the target update information may be summarized as the target query information to be responded. The target cache information can also be returned to the user side for displaying, so that the situation that the user waits for a long time or an empty list appears is avoided, and the target update information is returned to the user side for displaying after the target update information is obtained from the query operation, so that the information display effect and the user experience are improved.
In order to improve the real-time performance and accuracy of the dynamic hotspot data in the cache, after the target update information is obtained, the target update information needs to be stored in the cache, that is, the target update information is cached in the data cache cluster. In one embodiment of the present invention, caching target update information in a data cache cluster includes: acquiring information change parameters of a supplementary information identifier of the supplementary information to be inquired in the data cache cluster; and determining the cache target time length of the query supplementary information according to the information change parameters, and caching the query supplementary information into the data cache cluster based on the cache target time length. Optionally, in order to avoid avalanche caused by cache penetration due to improper data cache duration, in this embodiment, the cache target duration of the target update information is reasonably determined based on the update frequency of the target update information. The information change parameter of the supplementary information identifier can be understood as the change frequency of the history information of the target update information supplementary information identifier in the cache. The cache is carried out by adopting a simple cache cluster and a determination mode of cache target duration, so that the original data structure is hardly changed during data cache, the technical problems of high delay, inaccuracy and the like caused by data synchronization by adopting a data synchronization mechanism of middleware such as mq, zookeeper and the like or a database binlog log monitoring synchronization mechanism are solved, and the complexity of the sniffing mechanism and the data compensation mechanism scheme is reduced.
For example, assuming that the information identifier of the target update information is "1", historical information content corresponding to the information identifier "1" in the cache within a certain period of time is acquired, an information change parameter of the information identifier "1" is determined based on the historical information content, and a cache target duration of the target update information is determined according to the information change parameter of the information identifier "1". It can be understood that, when the change frequency of the information is higher, it indicates that the number of times the information is queried is higher, that is, the data is frequently changed, and in order to ensure the real-time performance and accuracy of the data, the cache target duration of the information needs to be set shorter; when the change frequency of the information is smaller, it indicates that the number of times the information is queried is smaller, that is, the data is not frequently changed, and the cache target duration of the information may be set longer.
In one embodiment, the determining, by the information change parameter, a cache target duration for querying the supplemental information according to the information change parameter includes: and carrying out weighted summation on the information change time and the basic cache time to obtain the cache target time. The information change time may be understood as a time difference between the latest change time of the information content identified by the supplemental information and the current time. The longer the time difference between the change time and the current time is, the data is changed less, and the cache target duration of the data can be set longer; the smaller the time difference between the change time and the current time is, the data is frequently changed, the shorter the cache target time of the data needs to be set, and the latest data can be obtained in time conveniently. On the basis, the weights of the information change time and the basic cache duration can be set, and the information change time and the basic cache duration are weighted and summed to obtain the cache target duration. For example, the cache target duration of the query supplemental information may be calculated by f (n) ═ ax + b. Wherein, f (n) is the cache target duration for inquiring the supplementary information; a is a coefficient which can be set according to actual requirements; x is the information change time of the supplementary information identifier of the query supplementary information, and b is the basic cache duration. By the method, the effective cache duration of the hot spot data can be accurately set, so that the effective durations of all the hot spot cache data are dynamically and randomly tiled according to the time dimension, large-area cache invalidation can not occur, and system avalanche caused by cache penetration is avoided. The basic caching duration can be set according to the type of the supplementary information identifier. When the type to which the supplementary information identifier belongs is the type with higher change frequency, the basic cache duration can be set to a smaller value so as to ensure the real-time performance and accuracy of the data, and when the type to which the supplementary information identifier belongs is the type with lower change frequency, the basic cache duration can be set to a larger value so as to reduce the resource waste caused by frequently calling the data from the middle interface.
On the basis of the embodiment, the target query information corresponding to the query identifier is obtained according to the preset query dimension parameter based on the preset master-slave query mechanism, whether the slave query operation is triggered is judged according to the master dimension parameter, and the target update information is obtained through the slave dimension parameter when the slave query operation is triggered so as to supplement the target cache information, so that the dynamic hot data in the target query information is real-time and accurate data, and the user experience is improved. In addition, by reasonably determining the cache target duration of the target update information in the cache, the avalanche caused by cache penetration is avoided: the complexity of the sniffing mechanism and the data compensation mechanism scheme is reduced.
EXAMPLE III
The present embodiment provides a preferred embodiment based on the above-described embodiments. In the embodiment, characteristics and requirements of the dynamic hot spot data are combined, and a technical scheme for improving real-time performance and accuracy of the dynamic hot spot data is provided. The features of the dynamic hot spot data can be summarized as follows: the total data volume is not large, but the data has great importance and great influence on the service; data is frequently retrieved, the overall dynamic change is not large, only local attributes are updated, and once the local attributes are updated, the local attributes are presented immediately (the time for data inconsistency is shortened as much as possible); the retrieval performance of hot spot data must be considered, and the consistency and real-time performance of the data are ensured; high availability and horizontal capacity expansion of dynamic hotspot data are ensured; zombie data revived and the acuity when programming hot spot data was lower.
Fig. 3 is a flowchart illustrating an information query method according to a third embodiment of the present invention. As shown in fig. 3, in order to improve the foreground list query performance, a design scheme of master-slave query (AB query for short) is adopted in the query process; meanwhile, query dimensions, such as a query duration dimension or a minimum number dimension, are set (the query dimensions can be customized according to business requirements, and the dimensions can be union or intersection), so that the real-time performance and accuracy of the hot data are improved, and the user experience is improved. Specifically, the application service queries the cache cluster first, and if the data in the cache reaches one or more set dimensions, one-time query completion is indicated (at this time, only the main query is triggered to meet the requirement); if the set dimensionality is not met in the cache cluster, the triggering of the primary query cannot meet the requirement, the data captured by the primary query from the cache is returned to the front end, and the condition that a user waits for a long time and finally generates an empty list is avoided; and then, asynchronously initiating a middle platform interface call by using a self-defined thread pool, initiating multiple times of secondary queries at the moment, continuously querying the cache cluster according to a defined interval from the secondary queries, returning data as long as any query dimension is met, and continuously supplementing and updating the data list of the user.
When the data acquired from the query is cached in the data cache cluster, the effective duration of the cached data can be reasonably determined through the change frequency of the data, and avalanche caused by cache penetration is avoided. On the other hand, the effective duration of the cache data can be flexibly adjusted, the data in the DB can be timely written back to the cache after being updated, and the real-time performance of the cache data is improved. When the time consumption of data synchronization is compressed as much as possible, the simplest data synchronization mode is used, the complexity of data compensation is reduced, and cache data dirty reading caused by inaccurate data is avoided. For a specific determination manner of the valid duration of the cache data, reference may be made to the above embodiments, and details are not described herein again.
In summary, in this embodiment, a data synchronization mechanism of middleware such as mq and zookeeper is not adopted during data caching, and a database binlog log monitoring synchronization mechanism is not used; but adopts a simple cache cluster combined with a design on business, naturally supports a distributed environment, and hardly changes the original data structure. The technical problems that failure and heavy consumption prevention are inevitably considered when mq is used are solved, the technical problems that log analysis sequence and analysis failure are inevitably considered when binlog is used are solved, and the technical problem that the complexity of projects introduced by using zookeeper as a third party for monitoring is solved. In addition, the technical problem that data must be synchronized for multiple times in other compensation modes when data synchronization fails in the synchronization mechanism is also avoided, for example, the binlog analysis of a database fails, and manual intervention compensation is necessary, which easily causes the occurrence of data sequentiality and ABA problems; with mq asynchronous consumption, problems of consumption exception, repeated consumption, how to compensate after consumption failure and the like must be considered.
According to the embodiment, the validity period of the cache data is reasonably determined, so that the real-time performance and the accuracy of the dynamic hot data are improved, and avalanche caused by cache penetration is avoided; the complexity of a sniffing mechanism and a data compensation mechanism scheme is reduced by combining the cache cluster to cache data; the real-time performance and accuracy of the hot data are improved by combining a master-slave query mechanism and a query dimension, and the user experience is improved.
Example four
Fig. 4 is a schematic structural diagram of an information query apparatus according to a fourth embodiment of the present invention. The information inquiry apparatus can be implemented in software and/or hardware, for example, the information inquiry apparatus can be configured in a computer device. As shown in fig. 4, the apparatus includes a query identifier obtaining module 410, a target information obtaining module 420, and a response information generating module 430, wherein:
a query identifier obtaining module 410, configured to, in response to the detected information query request, obtain a query identifier of the information query request;
a target information obtaining module 420, configured to obtain target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism;
and a response information generating module 430, configured to generate response information of the information query request based on the target query information for responding.
The embodiment of the invention responds to the detected information query request through the query identifier acquisition module to acquire the query identifier of the information query request; the target information acquisition module acquires target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism; the response information generation module generates response information of the information query request based on the target query information to respond, and the response of the information query request is carried out by combining master-slave query and query dimension parameters, so that the real-time performance and the accuracy of hot spot data in the response information are improved, and the user experience is improved.
Optionally, on the basis of the foregoing scheme, the query dimension parameter includes a main query dimension parameter, and the target information obtaining module 420 includes:
the main query unit is used for acquiring target cache information corresponding to the query identifier from the data cache cluster and judging whether the target cache information meets a main query dimension parameter associated with a main query operation;
and the target information determining unit is used for taking the target cache information as the target query information when the target cache information meets the query dimension parameter.
Optionally, on the basis of the foregoing scheme, the target information obtaining module 420 further includes:
the slave query unit is used for calling a middle station interface to acquire target update information associated with the query identifier when the target cache information does not meet the main query dimension parameter;
correspondingly, the target information determining unit is used for generating target query information based on the target cache information and the target update information, and caching the target update information into the data cache cluster.
Optionally, on the basis of the above scheme, the query dimension parameter further includes a slave query dimension parameter, and the slave query unit is specifically configured to:
and asynchronously initiating a middle platform interface call through the custom thread pool, and acquiring target updating information based on the query dimension parameters.
Optionally, on the basis of the above scheme, the query dimension parameter includes a query duration dimension parameter and/or a number dimension parameter.
Optionally, on the basis of the above scheme, the target information determining unit is specifically configured to:
acquiring information change parameters of a supplementary information identifier of the supplementary information to be inquired in the data cache cluster;
and determining the cache target time length of the query supplementary information according to the information change parameters, and caching the query supplementary information into the data cache cluster based on the cache target time length.
Optionally, on the basis of the above scheme, the target information determining unit is specifically configured to:
and carrying out weighted summation on the information change time and the basic cache time to obtain the cache target time.
The information inquiry device provided by the embodiment of the invention can execute the information inquiry method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary computer device 512 suitable for use in implementing embodiments of the present invention. The computer device 512 shown in FIG. 5 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 5, computer device 512 is in the form of a general purpose computing device. Components of computer device 512 may include, but are not limited to: one or more processors 516, a system memory 528, and a bus 518 that couples the various system components including the system memory 528 and the processors 516.
Bus 518 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and processor 516, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 512 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 512 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 528 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)530 and/or cache memory 532. The computer device 512 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage 534 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 518 through one or more data media interfaces. Memory 528 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 540 having a set (at least one) of program modules 542, including but not limited to an operating system, one or more application programs, other program modules, and program data, may be stored in, for example, the memory 528, each of which examples or some combination may include an implementation of a network environment. The program modules 542 generally perform the functions and/or methods of the described embodiments of the invention.
The computer device 512 may also communicate with one or more external devices 514 (e.g., keyboard, pointing device, display 524, etc.), with one or more devices that enable a user to interact with the computer device 512, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 512 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 522. Also, computer device 512 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 520. As shown, the network adapter 520 communicates with the other modules of the computer device 512 via the bus 518. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the computer device 512, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 516 executes various functional applications and data processing by running programs stored in the system memory 528, for example, implementing an information query method provided by an embodiment of the present invention, the method includes:
responding to the detected information query request, and acquiring a query identifier of the information query request;
acquiring target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism;
and generating response information of the information query request based on the target query information for responding.
Of course, those skilled in the art can understand that the processor can also implement the technical solution of the information query method provided by any embodiment of the present invention.
EXAMPLE six
The sixth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the information query method provided in the sixth embodiment of the present invention, and the method includes:
responding to the detected information query request, and acquiring a query identifier of the information query request;
acquiring target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism;
and generating response information of the information query request based on the target query information for responding.
Of course, the computer program stored on the computer-readable storage medium provided by the embodiments of the present invention is not limited to the above method operations, and may also perform related operations of the information query method provided by any embodiments of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: 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 the context of this document, 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.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may 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 wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments illustrated herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An information query method, comprising:
responding to the detected information query request, and acquiring a query identifier of the information query request;
acquiring target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism;
and generating response information of the information query request based on the target query information for responding.
2. The method according to claim 1, wherein the query dimension parameter includes a main query dimension parameter, and the obtaining target query information corresponding to the query identifier according to the query dimension parameter based on a preset main-slave query mechanism includes:
acquiring target cache information corresponding to the query identifier from a data cache cluster, and judging whether the target cache information meets a main query dimension parameter associated with a main query operation;
and when the target cache information meets the main query dimension parameter, taking the target cache information as the target query information.
3. The method of claim 2, further comprising:
when the target cache information does not meet the main query dimension parameter, calling a middle station interface to acquire target updating information associated with the query identifier;
and generating the target query information based on the target caching information and the target updating information, and caching the target updating information into the data caching cluster.
4. The method of claim 3, wherein the query dimension parameter further comprises a query dimension parameter, and wherein the invoking the staging interface obtains target update information associated with the query identifier, comprising:
and asynchronously initiating a middle platform interface call through a custom thread pool, and acquiring the target updating information based on the query dimension parameters.
5. The method of claim 4, wherein the slave query dimension parameters comprise a query duration dimension parameter and/or a number dimension parameter.
6. The method of claim 3, wherein caching the target update information into the data cache cluster comprises:
acquiring information change parameters of the supplementary information identifier of the query supplementary information in the data cache cluster;
and determining the cache target time length of the query supplementary information according to the information change parameters, and caching the query supplementary information into the data cache cluster based on the cache target time length.
7. The method of claim 6, wherein the information change parameter is an information change time identified by the supplemental information, and the determining the cache target duration of the query supplemental information according to the information change parameter comprises:
and weighting and summing the information change time and the basic caching duration to obtain the caching target duration.
8. An information inquiry apparatus, comprising:
the query identifier acquisition module is used for responding to the detected information query request and acquiring a query identifier of the information query request;
the target information acquisition module is used for acquiring target query information corresponding to the query identifier according to the query dimension parameter based on a preset master-slave query mechanism;
and the response information generating module is used for generating response information of the information inquiry request based on the target inquiry information and responding.
9. A computer device, the device comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the information query method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the information query method according to any one of claims 1 to 7.
CN202011045523.XA 2020-09-28 2020-09-28 Information query method, device, equipment and storage medium Pending CN113760977A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011045523.XA CN113760977A (en) 2020-09-28 2020-09-28 Information query method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011045523.XA CN113760977A (en) 2020-09-28 2020-09-28 Information query method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113760977A true CN113760977A (en) 2021-12-07

Family

ID=78785814

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011045523.XA Pending CN113760977A (en) 2020-09-28 2020-09-28 Information query method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113760977A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114595245A (en) * 2022-03-18 2022-06-07 上海哔哩哔哩科技有限公司 Data processing method and device
CN116610715A (en) * 2023-07-18 2023-08-18 国网浙江省电力有限公司宁波供电公司 Multidimensional analysis method and system for multilevel storage data

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114595245A (en) * 2022-03-18 2022-06-07 上海哔哩哔哩科技有限公司 Data processing method and device
CN116610715A (en) * 2023-07-18 2023-08-18 国网浙江省电力有限公司宁波供电公司 Multidimensional analysis method and system for multilevel storage data
CN116610715B (en) * 2023-07-18 2023-11-28 国网浙江省电力有限公司宁波供电公司 Multidimensional analysis method and system for multilevel storage data

Similar Documents

Publication Publication Date Title
CN113760977A (en) Information query method, device, equipment and storage medium
US20240104088A1 (en) Real time system for ingestion, aggregation, and identity association of data from user actions performed on websites or applications
CN112612546A (en) Page loading method and device, electronic equipment and storage medium
US20230409398A1 (en) Resource pre-fetch using age threshold
CN111966887A (en) Dynamic caching method and device, electronic equipment and storage medium
CN112783887A (en) Data processing method and device based on data warehouse
CN113032702A (en) Page loading method and device
EP4080383A1 (en) Method and apparatus for presenting information, electronic device, storage medium, and program product
CN114861097A (en) Browser caching method and device, electronic equipment and storage medium
CN112214497A (en) Label processing method and device and computer system
US20210056109A1 (en) Deduplicated data transmission
CN113761051A (en) Message pushing method, data acquisition method, device, system, equipment and medium
CN114138397B (en) Page display method and device, electronic equipment and storage medium
CN113177173B (en) Data access method, device, equipment and storage medium
CN109710673B (en) Work processing method, device, equipment and medium
CN117972096B (en) Method and system for processing interaction message of social platform
CN113988893B (en) Commodity information processing method, device, equipment and storage medium
US20230359506A1 (en) Methods and apparatus for aggregating metadata of multiple cloud databases
CN115269625A (en) Data processing method, device, equipment and medium based on domain drive design
CN116776022A (en) Request response method, device, equipment and storage medium
CN114168623A (en) Method and device for acquiring information of object, electronic equipment and storage medium
CN114461950A (en) Global caching method and device, electronic equipment and storage medium
CN114036194A (en) Hotspot data processing method and device, storage medium and electronic equipment
CN117149832A (en) Hierarchical caching, data query method, apparatus, device, medium and program product
CN118093643A (en) Data blood-edge query method and device, medium and electronic equipment

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