Detailed Description
At present, in an information demand platform, if a plurality of users query information at the same time, the information demand platform needs to send a plurality of information query requests to an information providing platform, especially, in a certain time period, the user access amount of the information demand platform increases suddenly, and at the same time, the number of information query requests sent by the information demand platform to the information providing platform by the information demand platform also increases suddenly, because the information is transmitted between the information providing platform and the information demand platform by using a dedicated line or an optical fiber, as shown in fig. 1, the transmission rate between the information providing platform and the information demand platform by using the dedicated line or the optical fiber is limited, for example, the transmission pressure that the dedicated line can carry is 100 information query requests that are sent at each second simultaneously, but at a certain time, the information demand platform needs to send 100 information query requests to the information providing platform by the same time, which exceeds the transmission pressure that the dedicated line or the optical fiber can carry, only current limiting measures can be taken, so that some information query requests cannot be sent to the information providing platform in time, and the information query of a user fails.
In order to solve the above problems, the present specification provides a technical solution, where a first process and a second process that work independently from each other are preconfigured in an information demand platform, the first process synchronizes information of the information supply platform to a local storage database of the information demand platform, the second process determines information to be queried by a user, and queries the determined information in the information stored in the local storage database of the information demand platform and displays the information to the user. Under the condition that the capacity expansion is not carried out on a special line or an optical fiber between the information providing platform and the information demand platform, the information demand platform can deal with the condition that the concurrent access volume of the user is high, and can also provide information inquiry service for the user quickly and efficiently.
Specifically, the technical scheme provided by the specification is as follows:
a first process determines information to be synchronized; according to the information to be synchronized, sending an information synchronization request to an information providing platform according to a preset request sending rule; receiving information returned by the information providing platform according to the information synchronization request, and synchronizing the information to a local storage database of the information demand platform for storage; the second process determines the information to be inquired by the user; and the second process inquires the determined information in the information stored in the local storage database of the information demand platform and displays the information to the user.
In order to better explain the technical scheme provided by the description, in an information query scene, an information demand platform is taken as an e-commerce platform, an information providing platform is taken as an external banking institution as an example, information is taken as commodity information as an example, and an information synchronization request is taken as a commodity information synchronization request as an example. It should be noted that the present specification is only to describe the technical solution provided in the present specification with reference to a specific application scenario, and does not limit the specific application scenario of the present application.
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present specification, the technical solutions in the embodiments of the present specification will be described in detail below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of protection.
As shown in fig. 2, a flow diagram of an information query method provided in this specification is provided, where a first process and a second process work independently of each other, and steps executed by the first process and steps executed by the second process do not limit execution order, and specifically may include the following steps:
s201, a first process determines information to be synchronized;
in the application, the commodity information to be synchronized is determined first, wherein the commodity information to be synchronized can be determined in the following manner:
mode 1: the first process counts the historical query times of the user on each piece of commodity information, selects the commodity information of which the historical query times meet the preset requirement, and determines the selected commodity information as the commodity information to be synchronized. The commodity information whose selection history query frequency meets the preset requirement may be commodity information whose selection history query frequency exceeds a preset threshold, for example, commodity information whose selection history query frequency exceeds 1000. The commodity information whose selection historical query times meet the preset requirement may also be commodity information whose selection historical query times rank top, for example, commodity information whose selection historical query times rank top 100.
For example, currently, there are 100 pieces of commodity information, each piece of commodity information corresponds to respective historical query times, the historical query time corresponding to the commodity information 1 is 1010, the historical query time corresponding to the commodity information 2 is 1100 … …, commodity information with the historical query times exceeding 1000 times is selected, the historical query times of 58 pieces of commodity information exceeds 1000 times, and the 58 pieces of commodity information are determined to be the commodity information to be synchronized.
Mode 2: the first process calculates the historical query frequency of the user on each piece of commodity information, selects the commodity information with the historical query frequency meeting the preset requirement, and determines the selected commodity information as the commodity information to be synchronized. The commodity information whose selection history query frequency meets the preset requirement may be commodity information whose selection history query frequency exceeds a preset threshold, for example, commodity information whose selection history query frequency exceeds 100 times per hour. The commodity information whose selection historical query frequency meets the preset requirement may also be commodity information whose selection historical query frequency ranks top, for example, commodity information whose selection historical query frequency ranks top 100.
For example, 100 pieces of commodity information are currently available, each piece of commodity information corresponds to respective historical query frequency, the historical query frequency corresponding to the commodity information 1 is 110 times per hour, the historical query frequency corresponding to the commodity information 2 is 100 times per hour, the commodity information with the historical query frequency exceeding 100 times per hour is selected, the historical query frequency of 40 pieces of commodity information exceeds 100 times per hour, and the 40 pieces of commodity information are determined to be the commodity information to be synchronized.
Mode 3: the first process determines commodity information inquired by a user in history, randomly selects commodity information from the commodity information inquired by the user in history, and determines the selected commodity information as the commodity information to be synchronized. Wherein part of the commodity information can be randomly selected from the commodity information which is inquired by the user in history.
For example, the first process determines that 100 items of commodity information have been inquired by the user historically, randomly selects 50 items of commodity information from the 100 items of commodity information inquired by the user historically, and determines that the 50 selected items of commodity information are to-be-synchronized commodity information.
The above-mentioned historical query frequency, and query history of the product information in the user history may be user behaviors within a certain time window, for example, user behaviors in the last year.
S202, according to the information to be synchronized, sending an information synchronization request to an information providing platform according to a preset request sending rule;
in this embodiment of the present specification, according to the commodity information to be synchronized, the first process may send a commodity information synchronization request to an external banking institution according to a preset request sending rule by means of a timing task, event triggering, or receiving an information synchronization instruction.
The timing task executes the same operation at fixed time intervals, namely, executes the same operation at periodic timing. And periodically sending a commodity information synchronization request to an external banking institution according to the commodity information to be synchronized and a preset request sending rule. For example, a commodity information synchronization request is sent to an external banking institution according to a preset request sending rule at 1 point every morning in a period of 12 hours.
And triggering an event, namely triggering the event by executing a certain operation by a user, for example, triggering a button event by clicking a certain button by the user, and sending a commodity information synchronization request to an external banking institution according to a preset request sending rule according to the commodity information to be synchronized after the button event is triggered.
The information synchronization command is received, and the information synchronization command may be input by a user or sent by a certain server, and the source of the information synchronization command is not limited in this specification. And after receiving the information synchronization instruction, sending a commodity information synchronization request to an external banking institution according to the commodity information to be synchronized and a preset request sending rule.
By the mode, the commodity information synchronization request can be sent to an external banking institution according to the commodity information to be synchronized and the preset request sending rule. The preset request sending rule may be, for example, sending one commodity information synchronization request every second, or sending 10 commodity information synchronization requests every second.
S203, receiving information returned by the information providing platform according to the information synchronization request, and synchronizing the information to a local storage database of the information demand platform for storage;
the electronic commerce platform sends a commodity information synchronization request to an external banking institution, the external banking institution inquires the commodity information stored in the local storage database according to the commodity information synchronization request after receiving the commodity information synchronization request, and returns the inquired commodity information to the electronic commerce platform, wherein how to inquire the commodity information corresponding to the commodity synchronization request at the external banking institution side and how to return the inquired commodity information are not described in detail herein.
And the first process receives the commodity information returned by the external banking institution according to the commodity synchronous request and synchronizes the commodity information to the local storage database of the electronic commerce platform for storage.
Before synchronizing the commodity information returned by the external banking institution to the local storage database of the e-commerce platform for storage, the following processing can be adopted: aiming at the commodity information returned by the external bank mechanism, a first process in the electronic commerce platform receives the commodity information returned by the external bank mechanism, classifies and arranges the returned commodity information, and arranges the same type of commodity information together. For example, the returned commodity information is sorted and sorted, and the returned commodity information is classified into A, B, C, D, E5 categories.
After the returned commodity information is classified and sorted, the commodity information is synchronized to a local storage database of the electronic commerce platform according to the categories for storage. For example, the A, B, C, D, E5-type commodity information is synchronized to the local storage database of the e-commerce platform for storage.
The above description is how the first process synchronizes the commodity information of the external banking institution to the local storage database of the e-commerce platform for storage, and the following description is how the second process queries the commodity information to be queried by the user.
S204, the second process determines the information to be inquired by the user;
when a user logs in the e-commerce platform and browses commodities displayed in the e-commerce platform, the user can query commodity information corresponding to the commodities in a clicking mode on a query page, and when the clicking operation of the user is triggered, the second process can determine the commodity information to be queried by the user. For example, when a user clicks a gold jewelry on a query page and wants to query the commodity details of the gold jewelry, when the clicking operation of the user is triggered, the second process determines the commodity details to be queried by the user.
S205, the second process inquires the determined information in the information stored in the local storage database of the information demand platform and displays the information to the user.
For the commodity information determined in S205, the second process queries the determined commodity information from the commodity information stored in the local storage database of the e-commerce platform and displays the queried commodity information to the user. There are many implementation manners of querying the determined commodity information, and one of them is exemplified in the embodiment of the present specification, and it should be noted that the embodiment of the present specification defines how to query the determined commodity information.
The implementation mode of inquiring the determined commodity information is as follows: and classifying and sorting the returned commodity information according to the first process, synchronizing the returned commodity information to a local storage database of the e-commerce platform according to the categories, determining the category of the determined commodity information, and inquiring the determined commodity information in the category commodity information stored in the local storage database of the e-commerce platform. For example, if it is determined that the determined commodity information belongs to the class a commodity information, the determined commodity information may be queried in the class a commodity information stored in the local storage database of the e-commerce platform.
In addition, when the second process does not inquire the determined commodity information in the commodity information stored in the local storage database of the electronic commerce platform, the second process informs the first process so that the first process preferentially synchronizes the determined commodity information to the local storage database of the electronic commerce platform for storage. The subsequent second process can inquire the commodity information stored by the electronic commerce platform again and display the commodity information to the user.
According to the technical scheme provided by the specification, the first process and the second process which work independently are configured in the information demand platform in advance, the first process synchronizes the information of the information supply platform to the local storage database of the information demand platform, the second process determines the information to be inquired by the user, and the information determined by inquiring in the information stored in the local storage database of the information demand platform is displayed to the user. Under the condition that the capacity expansion is not carried out on a special line or an optical fiber between the information providing platform and the information demand platform, the information demand platform can deal with the condition that the concurrent access volume of the user is high, and can also provide information inquiry service for the user quickly and efficiently.
With respect to the above method embodiment, an embodiment of the present specification further provides an information query apparatus, which is applied to an information requirement platform, and as shown in fig. 3, the information query apparatus may include: the system comprises an information to be synchronized determining module 310, a request sending module 320, an information storing module 330, an information determining module 340 and an information inquiring module 350.
A to-be-synchronized information determining module 310, configured to determine, by a first process, information to be synchronized;
a request sending module 320, configured to send an information synchronization request to an information providing platform according to a preset request sending rule according to the information to be synchronized;
the information storage module 330 is configured to receive information returned by the information providing platform according to the information synchronization request, and synchronize the information to a local storage database of the information requiring platform for storage;
the information determining module 340 is configured to determine, by the second process, information to be queried by the user;
and the information query module 350 is configured to query the determined information in the information stored in the local storage database of the information requirement platform by the second process, and display the information to the user.
According to a specific embodiment provided in this specification, the to-be-synchronized information determining module 310 is specifically configured to:
the first process counts the historical query times of the user to each piece of information;
selecting information with historical query times meeting preset requirements;
and determining the selected information as the information to be synchronized.
According to a specific embodiment provided in this specification, the to-be-synchronized information determining module 310 is specifically configured to:
the first process calculates the historical query frequency of each piece of information of the user;
selecting information with historical query frequency meeting preset requirements;
and determining the selected information as the information to be synchronized.
According to a specific embodiment provided in this specification, the to-be-synchronized information determining module 310 is specifically configured to:
determining information which is inquired by a user in history;
randomly selecting information from information which is inquired in history of a user;
and determining the selected information as the information to be synchronized.
According to a specific implementation manner provided in this specification, the request sending module 320 is specifically configured to:
and sending an information synchronization request to an information providing platform according to a preset request sending rule by a timing task, event triggering or a mode of receiving an information synchronization instruction according to the information to be synchronized.
According to a specific embodiment provided in this specification, the apparatus further includes:
the notifying module 360 is configured to notify the first process by the second process when the second process does not query the determined information in the information stored in the local storage database of the information requirement platform, so that the first process preferentially synchronizes the determined information to the local storage database of the information requirement platform for storage.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
According to the technical scheme provided by the specification, the first process and the second process which work independently are configured in the information demand platform in advance, the first process synchronizes the information of the information supply platform to the local storage database of the information demand platform, the second process determines the information to be inquired by the user, and the information determined by inquiring in the information stored in the local storage database of the information demand platform is displayed to the user. Under the condition that the capacity expansion is not carried out on a special line or an optical fiber between the information providing platform and the information demand platform, the information demand platform can deal with the condition that the concurrent access volume of the user is high, and can also provide information inquiry service for the user quickly and efficiently.
Embodiments of the present specification further provide a computer device, as shown in fig. 4, the computer device may include: a processor 410, a memory 420, an input/output interface 430, a communication interface 440, and a bus 450. Wherein processor 410, memory 420, input/output interface 430, and communication interface 440 are communicatively coupled to each other within the device via bus 450.
The processor 410 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The Memory 420 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 420 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 420 and called to be executed by the processor 410.
The input/output interface 430 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 440 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 450 includes a pathway to transfer information between various components of the device, such as processor 410, memory 420, input/output interface 430, and communication interface 440.
It should be noted that although the above-mentioned device only shows the processor 410, the memory 420, the input/output interface 430, the communication interface 440 and the bus 450, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Embodiments of the present specification also provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the aforementioned information query method. The method at least comprises the following steps:
an information query method is applied to an information demand platform, a first process and a second process which work independently are configured in the information demand platform in advance, and the method comprises the following steps:
a first process determines information to be synchronized;
according to the information to be synchronized, sending an information synchronization request to an information providing platform according to a preset request sending rule;
receiving information returned by the information providing platform according to the information synchronization request, and synchronizing the information to a local storage database of the information demand platform for storage;
the second process determines the information to be inquired by the user;
and the second process inquires the determined information in the information stored in the local storage database of the information demand platform and displays the information to the user.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
From the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present disclosure can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, and the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in one or more software and/or hardware when implementing the embodiments of the present disclosure. And part or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is only a specific embodiment of the embodiments of the present disclosure, and it should be noted that, for those skilled in the art, a plurality of modifications and decorations can be made without departing from the principle of the embodiments of the present disclosure, and these modifications and decorations should also be regarded as the protection scope of the embodiments of the present disclosure.