CN115237960A - Information pushing method and device, storage medium and electronic equipment - Google Patents

Information pushing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115237960A
CN115237960A CN202210956293.5A CN202210956293A CN115237960A CN 115237960 A CN115237960 A CN 115237960A CN 202210956293 A CN202210956293 A CN 202210956293A CN 115237960 A CN115237960 A CN 115237960A
Authority
CN
China
Prior art keywords
server
information
attribute information
request
objects
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
CN202210956293.5A
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.)
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
ICBC 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 Industrial and Commercial Bank of China Ltd ICBC, ICBC Technology Co Ltd filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210956293.5A priority Critical patent/CN115237960A/en
Publication of CN115237960A publication Critical patent/CN115237960A/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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses an information pushing method, an information pushing device, a storage medium and electronic equipment, and relates to the field of big data, wherein the method comprises the following steps: receiving a user request through a host, and analyzing request information of the user request; respectively determining a server for querying the request object under each attribute information to obtain a plurality of servers, and sending the request object, the preset number and each attribute information to the corresponding server; receiving a candidate object set fed back by each server based on the attribute information; the method comprises the steps of obtaining objects in all candidate object sets through a host to obtain a plurality of candidate objects, screening a preset number of objects from the candidate objects to obtain target objects, and sending the preset number of target objects to a user. By the method and the device, the problem that the software service with a single function in the related technology cannot provide stable service in a single machine room mode is solved.

Description

Information pushing method and device, storage medium and electronic equipment
Technical Field
The application relates to the field of big data, in particular to an information pushing method, an information pushing device, a storage medium and electronic equipment.
Background
The micro-service is a software architecture style, which is based on small functional blocks dedicated to a single responsibility for function, and combines complex large-scale application programs in a modularization way, and each functional module uses an API irrelevant to a programming language to communicate, so that the same task request is completed through a plurality of micro-services. In the existing micro-service deployment architecture, there are two dimensions, one is a physical machine room for deployment: the service can be deployed in a central machine room (single machine room) or in a plurality of machine rooms; and one or more software services with the same function can be deployed in different machine rooms, and the software deployment depends on the architecture of the machine rooms. Multiple copies of the same functional service can satisfy the high availability of the service.
The micro-service deployment mode can include a multi-machine-room multi-service mode, a single-machine-room multi-service mode, a multi-machine-room single-service mode and a single-machine-room single-service mode. In the case of using a single-room single-service mode, each room only includes one service, and each service only exists in one room, so when a user sends a certain request, the request needs to be processed jointly through micro-services among multiple rooms. However, when a certain machine room or a certain micro service is abnormal, the information returned by the micro service cannot be acquired, so that the request result returned to the user is abnormal due to the fact that the stable micro service cannot be provided, and the use experience of the user is affected.
Aiming at the problem that the software service with single function in the related technology can not provide stable service in a single machine room mode, an effective solution is not provided at present.
Disclosure of Invention
The application provides an information pushing method, an information pushing device, a storage medium and electronic equipment, and aims to solve the problem that a software service with a single function in the related art cannot provide stable service in a single-computer-room mode.
According to one aspect of the application, an information pushing method is provided. The method comprises the following steps: receiving a user request through a host, and analyzing request information of the user request, wherein the request information comprises a request object, attribute information of the request object and a preset number of the request object; respectively determining a server for querying the request object under each attribute information to obtain a plurality of servers, and sending the request object, the preset number and each attribute information to the corresponding server; receiving candidate object sets fed back by each server based on the attribute information, wherein each candidate object set comprises a preset number of objects; and acquiring objects in all the candidate object sets through the host to obtain a plurality of candidate objects, screening a preset number of objects from the plurality of candidate objects to obtain target objects, and sending the preset number of target objects to a user.
Optionally, the storage system of each server includes an internal cache, an external cache, and a distributed storage system, and receiving the candidate object set fed back by each server based on the attribute information includes: under the condition that a candidate object set under corresponding attribute information exists in an internal cache of a server, receiving a candidate object set acquired by the server from the internal cache; under the condition that the candidate object set does not exist in the internal cache and the candidate object set exists in the external cache of the server, receiving the candidate object set acquired by the server from the external cache; under the condition that the candidate object set does not exist in the internal cache and the external cache and the candidate object set exists in the distributed storage system of the server, receiving the candidate object set acquired by the server from the distributed storage system; and under the condition that no candidate object set exists in the internal cache, the external cache and the distributed storage system, receiving abnormal information returned by the server, wherein the abnormal information represents that no candidate object set exists in the storage system of the server.
Optionally, after sending each attribute information to the corresponding server, the method further includes: determining attribute information corresponding to a server which feeds back abnormal information under the condition that a host receives the abnormal information fed back by any server to obtain target attribute information, wherein the abnormal information represents that a candidate object set under the corresponding attribute information does not exist in a storage system of the server; sending the target attribute information to other servers, wherein the other servers are servers except the server feeding back the abnormal information; and acquiring candidate objects under the target attribute information of a preset number from other servers.
Optionally, after sending each attribute information to the corresponding server, the method further includes: under the condition that the host receives abnormal information fed back by any server, acquiring a server with the highest similarity with the server fed back the abnormal information from other servers to obtain a target server, wherein the abnormal information represents that a candidate object set under the corresponding attribute information does not exist in a storage system of the server, and the other servers are servers except the server fed back the abnormal information; and acquiring a preset number of candidate objects from the target server.
Optionally, after receiving the candidate object set fed back by each server based on the attribute information, the method further includes: under the condition that the host receives the abnormal information fed back by the server, counting the quantity of the abnormal information, and judging whether the quantity of the abnormal information is equal to the quantity of the attribute information or not; and under the condition that the quantity of the abnormal information is equal to that of the attribute information, sending the preset object associated with the request information to the user through the host.
Optionally, the screening a preset number of objects from the plurality of candidate objects to obtain the target object includes: determining attribute information corresponding to each candidate object to obtain multiple groups of attribute information; calculating the target weight of the corresponding candidate object according to the weight of each attribute information in each group of attribute information to obtain a plurality of target weights; and selecting a preset number of objects from the candidate objects according to the sequence of the target weight values from large to small to obtain the target object.
Optionally, after receiving the user request through the host and parsing request information of the user request, the method further includes: judging whether a history target object corresponding to the user request exists in a cache of the host; and in the case that the history target object exists in the cache of the host, sending the history target object to the user.
According to another aspect of the present application, an information pushing apparatus is provided. The device includes: the analysis unit is used for receiving a user request through the host and analyzing request information of the user request, wherein the request information comprises a request object, attribute information of the request object and the preset number of the request objects; the first determining unit is used for respectively determining a server for querying the request object under each attribute information to obtain a plurality of servers, and sending the request object, the preset number and each attribute information to the corresponding server; the receiving unit is used for receiving candidate object sets fed back by all the servers based on the attribute information, wherein each candidate object set comprises a preset number of objects; the first obtaining unit is used for obtaining the objects in all the candidate object sets through the host to obtain a plurality of candidate objects, screening a preset number of objects from the candidate objects to obtain target objects, and sending the preset number of target objects to the user.
According to another aspect of the embodiments of the present invention, there is also provided a computer storage medium for storing a program, where the program controls a device in which the computer storage medium is located to execute an information push method when the program runs.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory; the memory has computer readable instructions stored therein, and the processor is configured to execute the computer readable instructions, wherein the computer readable instructions execute the computer readable instructions to perform an information pushing method.
By the application, the following steps are adopted: receiving a user request through a host, and analyzing request information of the user request, wherein the request information comprises a request object, attribute information of the request object and a preset number of the request objects; respectively determining a server for querying the request object under each attribute information to obtain a plurality of servers, and sending the request object, the preset number and each attribute information to the corresponding server; receiving candidate object sets fed back by each server based on the attribute information, wherein each candidate object set comprises a preset number of objects; the method comprises the steps of obtaining objects in all candidate object sets through a host to obtain a plurality of candidate objects, screening a preset number of objects from the candidate objects to obtain target objects, and sending the preset number of target objects to a user. The problem that software service with single function in the related technology can not provide stable service in a single machine room mode is solved. By receiving the candidate objects returned by each server, selecting the most suitable candidate object from the candidate objects as the request result requested by the user, and acquiring the candidate objects from other servers under the condition that part of hosts or servers are abnormal, the effect of stably feeding back the request result to the user under the condition that part of micro-services are abnormal is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, are included to provide a further understanding of the application, and the description of the exemplary embodiments of the application are intended to be illustrative of the application and are not intended to limit the application. In the drawings:
fig. 1 is a flowchart of an information pushing method provided according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an information pushing apparatus provided according to an embodiment of the application;
fig. 3 is a schematic view of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances in order to facilitate the description of the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are information and data authorized by the user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or organization, before obtaining the relevant information, an obtaining request needs to be sent to the user or organization through the interface, and after receiving the consent information fed back by the user or organization, the relevant information is obtained.
It should be noted that the information pushing method, the information pushing device, the storage medium, and the electronic device determined in the present disclosure may be used in the field of big data, and may also be used in any field other than the field of big data.
According to an embodiment of the present application, there is provided an information push method.
Fig. 1 is a flowchart of an information push method provided according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, receiving a user request through a host, and analyzing request information of the user request, wherein the request information includes a request object, attribute information of the request object, and a preset number of the request objects.
Specifically, the host may be a computer that receives a user request from a certain central computer room (single computer room) in which the microservice server is located. When a user sends a request, the user needs to receive the request through the computer device corresponding to the user, and perform data interaction and data summarization with the servers of the microservices in other machine rooms through the computer device to obtain a request result, so that the request result is fed back to a user side through the computer device.
After receiving the user request, the user request needs to be analyzed, so as to obtain the request information of the user, wherein after analyzing the request information, the request object requested this time, the attribute information of the request object, and the preset number of the request objects can be obtained.
For example, the request object in the request information may be restaurant information, and the attribute information may include: distance information, price information and restaurant types, and the preset number may be 20, that is, 20 restaurants need to be pushed.
Step S102, respectively determining a server for querying the request object under each attribute information, obtaining a plurality of servers, and sending the request object, the preset number and each attribute information to the corresponding server.
Specifically, each microserver can only solve the problem corresponding to the microserver because the microserver is based on a small functional block dedicated to a single responsibility for a function and combines a complex large application program in a modular manner. For example, the server of the a micro service can only obtain 20 restaurants with a short distance, and the server of the B micro service can only obtain 20 restaurants with a low price.
Therefore, after determining the attribute information, the request object, the corresponding attribute information and the preset number can be sent to each micro server, so that the corresponding candidate result can be obtained from the server of the micro server.
Step S103, receiving candidate object sets fed back by the servers based on the attribute information, where each candidate object set includes a preset number of objects.
Specifically, when each server obtains a request result corresponding to the request information, that is, a candidate object set, the host may receive the candidate object set returned by each server, so that the request result information finally fed back to the user side may be determined from a plurality of candidate object sets.
And step S104, acquiring the objects in all the candidate object sets through the host to obtain a plurality of candidate objects, screening a preset number of objects from the plurality of candidate objects to obtain target objects, and sending the preset number of target objects to a user.
Specifically, the host obtains objects in the multiple candidate object sets to obtain multiple candidate objects, and further performs screening according to the weight of each candidate object or the number of attribute information included in the candidate object, so as to obtain a target object from the multiple candidate objects, and sends the target object as a return result of the request information to the user side.
For example, if the candidate object set returned by the server a includes the candidate object a, the candidate object B, and the candidate object C, and the candidate object set returned by the server B includes the candidate object C, the candidate object D, and the candidate object E, the candidate object C may be sent to the user side as the target object.
The information pushing method provided by the embodiment of the application receives a user request through a host and analyzes request information of the user request, wherein the request information comprises a request object, attribute information of the request object and a preset number of the request objects; respectively determining a server for querying the request object under each attribute information to obtain a plurality of servers, and sending the request object, the preset number and each attribute information to the corresponding server; receiving candidate object sets fed back by each server based on the attribute information, wherein each candidate object set comprises a preset number of objects; the method comprises the steps of obtaining objects in all candidate object sets through a host to obtain a plurality of candidate objects, screening a preset number of objects from the candidate objects to obtain target objects, and sending the preset number of target objects to a user. The problem that software service with single function in the related technology can not provide stable service in a single machine room mode is solved. By receiving the candidate objects returned by each server, selecting the most suitable candidate object from the candidate objects as the request result requested by the user, and acquiring the candidate objects from other servers under the condition that part of hosts or servers are abnormal, the effect of stably feeding back the request result to the user under the condition that part of micro-services are abnormal is achieved.
In order to successfully acquire a candidate object corresponding to each attribute information from a server, optionally, in the information pushing method provided in the embodiment of the present application, a storage system of each server includes an internal cache, an external cache, and a distributed storage system, and receiving a candidate object set fed back by each server based on the attribute information includes: under the condition that a candidate object set under corresponding attribute information exists in an internal cache of a server, receiving a candidate object set acquired by the server from the internal cache; under the condition that the candidate object set does not exist in the internal cache and the candidate object set exists in the external cache of the server, receiving the candidate object set acquired by the server from the external cache; under the condition that the candidate object set does not exist in the internal cache and the external cache and the candidate object set exists in the distributed storage system of the server, receiving the candidate object set acquired by the server from the distributed storage system; and under the condition that no candidate object set exists in the internal cache, the external cache and the distributed storage system, receiving abnormal information returned by the server, wherein the abnormal information represents that no candidate object set exists in the storage system of the server.
Specifically, the storage system corresponding to each server may use a three-layer cache structure for data storage, where the first layer may be a local cache local to the server, that is, an internal cache, and the second layer may be an external cache, for example, a non-relational key-Value cache system, for example: mongoDB, the third tier may be a distributed storage system for caching data over a long period of time through the distributed system. After the server receives the request object, the preset number and the attribute information, it may obtain a corresponding candidate object in the internal cache according to the request object, the preset number and the attribute information, and prove that, in a case that the candidate object cannot be obtained in the internal cache, the storage information in the internal cache has been deleted overtime, so that it is necessary to perform query on the candidate object in the external cache of the second layer.
Further, when the request objects, the preset number and the candidate objects corresponding to the attribute information cannot be acquired in all the three-layer caches, it is indicated that no corresponding candidate object exists in the caches of the server, or the server is abnormal and cannot acquire the candidate object, at this time, the server sends abnormal information to the host to indicate that the server cannot acquire the corresponding candidate object.
It should be noted that, since other servers may also be damaged, and other abnormalities may occur, after the host sends out the information, the server may not receive the information at all due to the damage, and similarly, the result may not be returned. Therefore, the host computer can also set a timeout time, and when the candidate object returned by the server is not received after the timeout time is exceeded, the server is determined to be in a damaged state, and at this time, the server is considered to return the abnormal information.
In order to still return information to the user when the server is abnormal or the server cannot obtain the candidate object, optionally, in the information pushing method provided in the embodiment of the present application, after sending each piece of attribute information to the corresponding server, the method further includes: determining attribute information corresponding to a server which feeds back abnormal information under the condition that a host receives the abnormal information fed back by any server to obtain target attribute information, wherein the abnormal information represents that a candidate object set under the corresponding attribute information does not exist in a storage system of the server; sending the target attribute information to other servers, wherein the other servers are servers except the server feeding back the abnormal information; and acquiring candidate objects under the target attribute information of a preset number from other servers.
Specifically, when a certain server returns abnormal information, the server is abnormal and cannot feed back a corresponding candidate object, and in order to avoid that the candidate object corresponding to the request information cannot be returned to the user due to the fact that part of component content is lacked because part of the servers do not feed back, when the certain server is abnormal, data to be acquired in the abnormal server needs to be acquired in the rest servers, so that the candidate object can be acquired from each server.
For example, after the a attribute information is sent to the a server, the candidate object set returned by the a server is not received when the timeout time is reached, and at this time, it is determined that the a server is abnormal, the a attribute information is sent to the remaining servers, and since the request objects and the preset number have been acquired in the remaining servers, the candidate objects corresponding to the a attribute information may also be returned to the host when the candidate objects corresponding to the a attribute information exist in the remaining servers. For example, if the preset number is 20, 10 candidate objects corresponding to the a attribute information exist in the B server, and 10 candidate objects corresponding to the a attribute information exist in the C server, the 20 candidate objects may be determined as 20 candidate objects corresponding to the a attribute information, and the 20 candidate objects are sent to the host through the B server and the C server, so that the host can obtain a candidate object set corresponding to the a attribute information.
In order to still return information to the user when the server is abnormal or the server cannot acquire the candidate object, optionally, in the information push method provided in the embodiment of the present application, after sending each piece of attribute information to the corresponding server, the method further includes: under the condition that the host receives abnormal information fed back by any server, acquiring a server with the highest similarity with the server fed back the abnormal information from other servers to obtain a target server, wherein the abnormal information represents that a candidate object set under the corresponding attribute information does not exist in a storage system of the server, and the other servers are servers except the server fed back the abnormal information; and acquiring a preset number of candidate objects from the target server.
Specifically, when a certain server returns abnormal information, the server is abnormal and cannot feed back a corresponding candidate object, and in order to avoid that a candidate object corresponding to the request information cannot be returned to the user due to the fact that part of component contents are lacked because part of the components are not fed back, the server most similar to the abnormal server can be obtained when the certain server is abnormal, and a corresponding candidate object set is obtained from the similar server.
For example, if the attribute information of the server a is japanese restaurant, the attribute information of the server B is near, and the attribute information of the server C is cheap, if the server a is abnormal, a server closest to the attribute information of the server a may be obtained from any other server, and if the attribute information of the server D is korean restaurant, for example, a predetermined number of candidate objects may be specified in the server D, and the candidate objects may be sent to the host computer.
In order to still return information to the user when the server is abnormal or the server cannot obtain the candidate object, optionally, in the information pushing method provided in the embodiment of the present application, after receiving a candidate object set fed back by each server based on the attribute information, the method further includes: under the condition that the host receives the abnormal information fed back by the server, counting the quantity of the abnormal information, and judging whether the quantity of the abnormal information is equal to the quantity of the attribute information or not; and under the condition that the quantity of the abnormal information is equal to that of the attribute information, sending the preset object associated with the request information to the user through the host.
In particular, in an extreme case, it may happen that all servers associated with the requested information are all abnormal. At this time, since blank page or blank information cannot be fed back to the user, the preset object associated with the request information and stored in the host cache can be directly acquired and sent to the user, thereby ensuring that the user side does not receive the blank page information.
For example, the request information may be for applying for acquiring a data, where the data a needs to be composed of three parts, i.e., needs to be acquired from three servers, i.e., B/C/D, but when all three servers are abnormal, a preset object with the strongest association degree with the data a is acquired in a cache of the host, and the preset object is directly sent to the user, so that the use experience of the user is ensured.
Optionally, in the information pushing method provided in the embodiment of the present application, the screening a preset number of objects from a plurality of candidate objects to obtain a target object includes: determining attribute information corresponding to each candidate object to obtain multiple groups of attribute information; calculating the target weight of the corresponding candidate object according to the weight of each attribute information in each group of attribute information to obtain a plurality of target weights; and selecting a preset number of objects from the candidate objects according to the sequence of the target weight values from large to small to obtain the target object.
It should be noted that the weight of the attribute information represents the importance degree of the attribute information, for example, the weight of the a attribute information is 10, the weight of the B attribute information is 20, which indicates that when the request result of the request information is fed back, the importance degree of the B attribute information is higher than that of the a attribute information, for example, an a candidate object exists in the candidate object set corresponding to the a attribute information and simultaneously exists in the candidate object set corresponding to the C attribute information, and a B candidate object exists in the candidate object set corresponding to the B attribute information and simultaneously exists in the candidate object set corresponding to the C attribute information, because the weight of the a attribute information is smaller than the weight of the B attribute information, the candidate object recommended to the user is the B candidate object.
Specifically, after obtaining a plurality of candidate objects, attribute information corresponding to each candidate object may be determined, and a target weight of each candidate object may be calculated according to the weight of each attribute information, so that the plurality of candidate objects are sorted according to the target weight of the candidate object, and a preset number of candidate objects ranked before are sent to the user as the target objects, so that the user may obtain an optimal request result.
For example, if the weight of the a attribute information is 1, the weight of the B attribute information is 2, the weight of the C attribute information is 3, the weight of the D attribute information is 4, the a candidate object exists in the candidate object set corresponding to the a attribute information, and exists in the candidate object set corresponding to the C attribute information at the same time, the target weight of the a candidate object may be 1+3=4, the B candidate object exists in the candidate object set corresponding to the B attribute information, and exists in the candidate object set corresponding to the D attribute information at the same time, the target weight of the B candidate object may be 2+4=6, the target weight of the a candidate object is smaller than the target weight of the B candidate object, and the B candidate object may be sent to the user under the condition that the preset number is 1, so that the user obtains a more suitable feedback result.
In order to enable faster feedback of a request result, optionally, in the information pushing method provided in this embodiment of the application, after receiving a user request through the host and parsing request information of the user request, the method further includes: judging whether a history target object corresponding to the user request exists in the cache of the host; and under the condition that the history target object exists in the cache of the host, sending the history target object to the user.
Specifically, after receiving a user request, whether a history record exists or not may be searched in a cache of the host, that is, whether the user request is a re-request or not, and if the user request is a re-request, a history target object corresponding to the history record stored in the host may be directly returned to the user, so that an effect of quickly feeding back a request result is achieved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides an information pushing apparatus, and it should be noted that the information pushing apparatus in the embodiment of the present application may be used to execute the method for pushing information provided in the embodiment of the present application. The following describes an information pushing apparatus provided in an embodiment of the present application.
Fig. 2 is a schematic diagram of an information pushing apparatus provided according to an embodiment of the present application. As shown in fig. 2, the apparatus includes: the device comprises an analysis unit 21, a first determination unit 22, a receiving unit 23 and a first acquisition unit 24.
Specifically, the parsing unit 21 is configured to receive a user request through the host, and parse request information of the user request, where the request information includes a request object, attribute information of the request object, and a preset number of the request objects.
The first determining unit 22 is configured to determine servers used for querying the request object under each attribute information, obtain a plurality of servers, and send the request object, the preset number, and each attribute information to the corresponding server.
The receiving unit 23 is configured to receive candidate object sets fed back by the servers based on the attribute information, where each candidate object set includes a preset number of objects.
The first obtaining unit 24 is configured to obtain, by the host, objects in all the candidate object sets to obtain a plurality of candidate objects, screen a preset number of objects from the plurality of candidate objects to obtain target objects, and send the preset number of target objects to the user.
The information pushing apparatus provided in the embodiment of the application receives a user request through the host by using the parsing unit 21, and parses request information of the user request, where the request information includes a request object, attribute information of the request object, and a preset number of the request objects; the first determining unit 22 determines a server for querying the request object under each attribute information, obtains a plurality of servers, and sends the request object, a preset number and each attribute information to the corresponding server; the receiving unit 23 receives candidate object sets fed back by the servers based on the attribute information, wherein each candidate object set contains a preset number of objects; the first obtaining unit 24 obtains objects in all candidate object sets through the host to obtain a plurality of candidate objects, screens a preset number of objects from the plurality of candidate objects to obtain target objects, and sends the preset number of target objects to the user. The problem that software service with single function in the related technology can not provide stable service in a single machine room mode is solved. By receiving the candidate objects returned by each server, selecting the most suitable candidate object from the candidate objects as the request result requested by the user, and acquiring the candidate objects from other servers under the condition that part of hosts or servers are abnormal, the effect of stably feeding back the request result to the user under the condition that part of micro-services are abnormal is achieved.
Optionally, in the information pushing apparatus provided in the embodiment of the present application, the storage system of each server includes an internal cache, an external cache, and a distributed storage system, and the receiving unit 23 includes: the first receiving module is used for receiving the candidate object set acquired by the server from the internal cache under the condition that the candidate object set under the corresponding attribute information exists in the internal cache of the server; the second receiving module is used for receiving the candidate object set acquired by the server from the external cache under the condition that the candidate object set does not exist in the internal cache and the candidate object set exists in the external cache of the server; the third receiving module is used for receiving the candidate object set acquired by the server from the distributed storage system under the condition that the candidate object set does not exist in the internal cache and the external cache and the candidate object set exists in the distributed storage system of the server; and the fourth receiving module is used for receiving the abnormal information returned by the server under the condition that the candidate object set does not exist in the internal cache, the external cache and the distributed storage system, wherein the abnormal information represents that the candidate object set does not exist in the storage system of the server.
Optionally, in the information pushing apparatus provided in the embodiment of the present application, the apparatus further includes: the second determining unit is used for determining attribute information corresponding to the server which feeds back the abnormal information under the condition that the host receives the abnormal information fed back by any server to obtain target attribute information, wherein the abnormal information represents that a candidate object set under the corresponding attribute information does not exist in a storage system of the server; the first sending unit is used for sending the target attribute information to other servers, wherein the other servers are servers except the server which feeds back the abnormal information; and the second acquisition unit is used for acquiring the candidate objects under the target attribute information in a preset number from other servers.
Optionally, in the information push apparatus provided in the embodiment of the present application, the apparatus further includes: a third obtaining unit, configured to, when the host receives abnormal information fed back by any server, obtain, from another server, a server with the highest similarity to the server fed back the abnormal information, to obtain a target server, where the abnormal information indicates that a candidate object set does not exist in a storage system of the server under the corresponding attribute information, and the other server is a server other than the server fed back the abnormal information; and the fourth acquisition unit is used for acquiring a preset number of candidate objects from the target server.
Optionally, in the information pushing apparatus provided in the embodiment of the present application, the apparatus further includes: the statistical unit is used for counting the quantity of the abnormal information under the condition that the host receives the abnormal information fed back by the server and judging whether the quantity of the abnormal information is equal to the quantity of the attribute information or not; and the second sending unit is used for sending the preset object associated with the request information to the user through the host under the condition that the number of the abnormal information is equal to that of the attribute information.
Optionally, in the information pushing apparatus provided in the embodiment of the present application, the first obtaining unit 24 includes: the determining module is used for determining the attribute information corresponding to each candidate object to obtain a plurality of groups of attribute information; the calculating module is used for calculating the target weight of the corresponding candidate object according to the weight of each attribute information in each group of attribute information to obtain a plurality of target weights; and the selection module is used for selecting a preset number of objects from the plurality of candidate objects according to the sequence of the target weight values from large to small to obtain the target object.
Optionally, in the information pushing apparatus provided in the embodiment of the present application, the apparatus further includes: the judging unit is used for judging whether a history target object corresponding to the user request exists in the cache of the host; and a third sending unit, configured to send the history target object to the user if the history target object exists in the cache of the host.
The information pushing device comprises a processor and a memory, the analyzing unit 21, the first determining unit 22, the receiving unit 23, the first obtaining unit 24, and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problem that software service with single function in the related technology cannot provide stable service in a single machine room mode is solved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium, on which a program is stored, which, when executed by a processor, implements the information push method.
The embodiment of the invention provides a processor, which is used for running a program, wherein the information pushing method is executed when the program runs.
As shown in fig. 3, an embodiment of the present invention provides an electronic device, where the electronic device 30 includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor executes the program to implement the following steps: receiving a user request through a host, and analyzing request information of the user request, wherein the request information comprises a request object, attribute information of the request object and a preset number of the request object; respectively determining a server for querying the request object under each attribute information to obtain a plurality of servers, and sending the request object, the preset number and each attribute information to the corresponding server; receiving candidate object sets fed back by each server based on the attribute information, wherein each candidate object set comprises a preset number of objects; the method comprises the steps of obtaining objects in all candidate object sets through a host to obtain a plurality of candidate objects, screening a preset number of objects from the candidate objects to obtain target objects, and sending the preset number of target objects to a user. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: receiving a user request through a host, and analyzing request information of the user request, wherein the request information comprises a request object, attribute information of the request object and a preset number of the request objects; respectively determining a server for querying the request object under each attribute information to obtain a plurality of servers, and sending the request object, the preset number and each attribute information to the corresponding server; receiving candidate object sets fed back by each server based on the attribute information, wherein each candidate object set comprises a preset number of objects; and acquiring objects in all the candidate object sets through the host to obtain a plurality of candidate objects, screening a preset number of objects from the plurality of candidate objects to obtain target objects, and sending the preset number of target objects to a user.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
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 Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which 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.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. An information pushing method, comprising:
receiving a user request through a host, and analyzing request information of the user request, wherein the request information comprises a request object, attribute information of the request object and a preset number of the request object;
respectively determining a server for querying the request object under each attribute information to obtain a plurality of servers, and sending the request object, the preset number and each attribute information to the corresponding server;
receiving candidate object sets fed back by each server based on attribute information, wherein each candidate object set comprises the preset number of objects;
and acquiring objects in all the candidate object sets through the host to obtain a plurality of candidate objects, screening the preset number of objects from the plurality of candidate objects to obtain target objects, and sending the preset number of target objects to a user.
2. The method of claim 1, wherein the storage system of each server comprises an internal cache, an external cache and a distributed storage system, and wherein receiving the candidate object set fed back by each server based on the attribute information comprises:
under the condition that a candidate object set under corresponding attribute information exists in an internal cache of the server, receiving the candidate object set acquired by the server from the internal cache;
receiving the candidate object set acquired by the server from the external cache under the condition that the candidate object set does not exist in the internal cache and the candidate object set exists in the external cache of the server;
receiving the candidate object set acquired by the server from a distributed storage system of the server under the condition that the candidate object set does not exist in the internal cache and the external cache and the candidate object set exists in the distributed storage system of the server;
and under the condition that the candidate object set does not exist in the internal cache, the external cache and the distributed storage system, receiving abnormal information returned by the server, wherein the abnormal information represents that the candidate object set does not exist in the storage system of the server.
3. The method of claim 1, wherein after sending each of the attribute information to the corresponding server, the method further comprises:
determining attribute information corresponding to a server which feeds back the abnormal information under the condition that the host receives the abnormal information fed back by any server to obtain target attribute information, wherein the abnormal information represents that a candidate object set under the corresponding attribute information does not exist in a storage system of the server;
sending the target attribute information to other servers, wherein the other servers are servers except the server which feeds back the abnormal information;
and acquiring the candidate objects under the target attribute information in the preset number from other servers.
4. The method of claim 1, wherein after sending each of the attribute information to the corresponding server, the method further comprises:
under the condition that the host receives abnormal information fed back by any server, acquiring a server with the highest similarity to the server feeding back the abnormal information from other servers to obtain a target server, wherein the abnormal information represents that a candidate object set under corresponding attribute information does not exist in a storage system of the server, and the other servers are servers except the server feeding back the abnormal information;
and acquiring the preset number of candidate objects from the target server.
5. The method of claim 1, wherein after receiving the candidate object set fed back by each server based on the attribute information, the method further comprises:
under the condition that the host receives abnormal information fed back by a server, counting the quantity of the abnormal information, and judging whether the quantity of the abnormal information is equal to the quantity of the attribute information or not;
and sending the preset object associated with the request information to the user through the host under the condition that the quantity of the abnormal information is equal to that of the attribute information.
6. The method of claim 1, wherein the step of screening the preset number of objects from the plurality of candidate objects to obtain a target object comprises:
determining attribute information corresponding to each candidate object to obtain multiple groups of attribute information;
calculating the target weight of the corresponding candidate object according to the weight of each attribute information in each group of attribute information to obtain a plurality of target weights;
and selecting the preset number of objects from the candidate objects according to the sequence of the target weight values from large to small to obtain the target object.
7. The method of claim 1, wherein after receiving a user request through a host and parsing request information of the user request, the method further comprises:
judging whether a history target object corresponding to the user request exists in a cache of the host;
and under the condition that the history target object exists in the cache of the host, sending the history target object to the user.
8. An information pushing apparatus, comprising:
the system comprises an analysis unit and a processing unit, wherein the analysis unit is used for receiving a user request through a host and analyzing request information of the user request, and the request information comprises a request object, attribute information of the request object and a preset number of the request object;
the first determining unit is used for respectively determining a server for querying the request object under each attribute information to obtain a plurality of servers, and sending the request object, the preset number and each attribute information to the corresponding server;
a receiving unit, configured to receive candidate object sets fed back by the servers based on the attribute information, where each of the candidate object sets includes the preset number of objects;
the first obtaining unit is configured to obtain, by the host, objects in all the candidate object sets to obtain a plurality of candidate objects, screen the preset number of objects from the plurality of candidate objects to obtain target objects, and send the preset number of target objects to a user.
9. A computer storage medium, characterized in that the computer storage medium is used for storing a program, wherein the program controls a device in which the computer storage medium is located to execute the information pushing method according to any one of claims 1 to 7 when the program runs.
10. An electronic device comprising one or more processors and memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the information push method of any one of claims 1 to 7.
CN202210956293.5A 2022-08-10 2022-08-10 Information pushing method and device, storage medium and electronic equipment Pending CN115237960A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210956293.5A CN115237960A (en) 2022-08-10 2022-08-10 Information pushing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210956293.5A CN115237960A (en) 2022-08-10 2022-08-10 Information pushing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115237960A true CN115237960A (en) 2022-10-25

Family

ID=83679950

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210956293.5A Pending CN115237960A (en) 2022-08-10 2022-08-10 Information pushing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115237960A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115914400A (en) * 2022-11-07 2023-04-04 中国工商银行股份有限公司 Service processing method, device, electronic equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115914400A (en) * 2022-11-07 2023-04-04 中国工商银行股份有限公司 Service processing method, device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
US9563426B1 (en) Partitioned key-value store with atomic memory operations
US8447757B1 (en) Latency reduction techniques for partitioned processing
CN106407207B (en) Real-time newly-added data updating method and device
CN110162512B (en) Log retrieval method, device and storage medium
CN110784498B (en) Personalized data disaster tolerance method and device
CN109977135A (en) A kind of data query method, apparatus and server
CN113761003A (en) User portrait data processing method and device, electronic equipment and readable storage medium
CN111382182A (en) Data processing method and device, electronic equipment and storage medium
CN108259526B (en) Data transmission method and device
CN115237960A (en) Information pushing method and device, storage medium and electronic equipment
CN107181773A (en) Data storage and data managing method, the equipment of distributed memory system
CN110740155A (en) Request processing method and device in distributed system
CN115114359A (en) User data processing method and device
US9934068B2 (en) Data analysis system
US11520794B2 (en) Data ingestion with spatial and temporal locality
US11210290B2 (en) Automated optimization of number-of-frequent-value database statistics
CN112148972A (en) Method and device for screening information to be recommended
CN108023920B (en) Data packet transmission method, equipment and application interface
CN114895851A (en) Data processing method, data processing device, storage medium and electronic equipment
CN114895852A (en) Data processing method, system, device, storage medium and electronic equipment
CN114116646A (en) Log data processing method, device, equipment and storage medium
US11330054B2 (en) System and method for load balancing in a data storage system
CN108810299B (en) Information analysis method, medium and equipment
CN111143711A (en) Object searching method and system
CN111125504A (en) Webpage data display method and device

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