Disclosure of Invention
In view of this, embodiments of the present application provide an information pushing method, an information pushing apparatus, a server, and a storage medium, so as to solve the problem in the related art that the efficiency of pushing information is not high enough.
A first aspect of an embodiment of the present application provides an information pushing method, including:
responding to the triggering of a preset triggering condition, determining the running state of each node in the node group, and determining available nodes and the total number of the available nodes according to the running state of each node;
acquiring a target order information set from a target database, wherein the target order information in the target order information set comprises the following data items: a business identifier and an enterprise identifier;
determining available nodes corresponding to the target order information according to the total number and data items included in the target order information;
distributing each target order information to a corresponding available node, controlling each available node to carry out information assembly processing on the distributed target order information based on the enterprise identification and the business identification in the distributed target order information, and pushing the assembled information to the terminal of the corresponding enterprise.
Further, determining an available node corresponding to each target order information according to the total number and the data item included in each target order information, including:
and performing modular operation on the order hash value and the total number of the corresponding target order information according to each target order information to obtain a modular value corresponding to the corresponding target order information, and determining an available node corresponding to the current node with the same serial number as the modular value as an available node corresponding to the corresponding target order information.
Further, distributing each target order information to a corresponding available node, comprising:
and aiming at each available node, if the fault of the corresponding available node is detected before the target order information is distributed, selecting other available nodes as substitute nodes, and distributing the target order information corresponding to the corresponding available node to the substitute nodes, wherein the other available nodes are available nodes except the corresponding available node.
Further, distributing each target order information to the corresponding available node, further comprising:
for each available node, if the fault of the corresponding available node is detected after the target order information is distributed, distributing the target order information which is not processed and corresponds to the corresponding available node to other available nodes when the target order information is distributed next time, and distributing the target order information which is not processed and is completely corresponding to the corresponding available node to other available nodes when the preset cache failure time length is arranged at intervals.
Further, the method further comprises:
when order information is generated, determining an order hash value of the order information according to an order identifier and a service identifier in the order information, and using the determined order hash value as a data item of the order information;
converting the data type of the order creating time of the order information into a numerical type, and taking the order creating time after the data type conversion as a data item of the order information;
and storing the order information comprising the data items as target order information into a target database.
Further, if the preset trigger condition is that an order query request is received and the order query request includes at least one of an order hash value, order creation time, an order identifier, a service identifier, and an enterprise identifier, acquiring a target order information set from a target database, including:
and acquiring a set of target order information adapted to the order query request from a target database, and recording the set of target order information as a target order information set.
Further, controlling each available node to perform information assembly processing on the allocated target order information based on the enterprise identifier and the service identifier in the allocated target order information, including:
controlling each available node to select an information presentation template corresponding to the enterprise identifier and the service identifier in the allocated target order information, and writing each data item in the allocated target order information into a corresponding part of the information presentation template to obtain assembly information aiming at the allocated target order information;
and controlling each available node to carry out secondary assembly on the assembly information of the target order information corresponding to the same information presentation template in the corresponding available node to obtain total assembly information under each business in each enterprise.
A second aspect of the embodiments of the present application provides an information pushing apparatus, including:
the information determining unit is used for responding to the triggering of a preset triggering condition, determining the running state of each node in the node group, and determining the available nodes and the total number of the available nodes according to the running state of each node;
the information acquisition unit is used for acquiring a target order information set from a target database, wherein the target order information in the target order information set comprises the following data items: a business identifier and an enterprise identifier;
the node determining unit is used for determining an available node corresponding to each target order information according to the total number and the data items included in each target order information;
and the node distribution unit is used for distributing each target order information to the corresponding available node, controlling each available node to carry out information assembly processing on the distributed target order information based on the enterprise identifier and the service identifier in the distributed target order information, and pushing the assembled information to the terminal of the corresponding enterprise.
Further, the node determining unit is specifically configured to:
and performing modular operation on the order hash value and the total number of the corresponding target order information according to each target order information to obtain a modular value corresponding to the corresponding target order information, and determining an available node corresponding to the current node with the same serial number as the modular value as an available node corresponding to the corresponding target order information.
Further, the node allocating unit is specifically configured to:
and aiming at each available node, if the fault of the corresponding available node is detected before the target order information is distributed, selecting other available nodes as substitute nodes, and distributing the target order information corresponding to the corresponding available node to the substitute nodes, wherein the other available nodes are available nodes except the corresponding available node.
Further, the node allocating unit is specifically further configured to:
for each available node, if the fault of the corresponding available node is detected after the target order information is distributed, distributing the target order information which is not processed and corresponds to the corresponding available node to other available nodes when the target order information is distributed next time, and distributing the target order information which is not processed and is completely corresponding to the corresponding available node to other available nodes when the preset cache failure time length is arranged at intervals.
Further, the device also comprises an information storage unit. Wherein the information storage unit is used for:
when order information is generated, determining an order hash value of the order information according to an order identifier and a service identifier in the order information, and using the determined order hash value as a data item of the order information;
converting the data type of the order creating time of the order information into a numerical type, and taking the order creating time after the data type conversion as a data item of the order information;
and storing the order information comprising the data items as target order information into a target database.
Further, if the preset trigger condition is that an order query request is received, and the order query request includes at least one of an order hash value, order creation time, an order identifier, a service identifier, and an enterprise identifier, the information obtaining unit is specifically configured to: and acquiring a set of target order information adapted to the order query request from a target database, and recording the set of target order information as a target order information set.
Further, in the node allocation unit, controlling each available node to perform information assembly processing on the allocated target order information based on the enterprise identifier and the service identifier in the allocated target order information, includes:
controlling each available node to select an information presentation template corresponding to the enterprise identifier and the service identifier in the allocated target order information, and writing each data item in the allocated target order information into a corresponding part of the information presentation template to obtain assembly information aiming at the allocated target order information;
and controlling each available node to carry out secondary assembly on the assembly information of the target order information corresponding to the same information presentation template in the corresponding available node to obtain total assembly information under each business in each enterprise.
A third aspect of embodiments of the present application provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the server, where the processor implements the steps of the information pushing method provided in the first aspect when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of the information pushing method provided in the first aspect.
The information pushing method, the information pushing device, the server and the storage medium provided by the embodiment of the application have the following beneficial effects: the order information is processed and pushed by a plurality of available nodes, so that the information pushing efficiency is improved. In addition, information assembly is carried out by taking enterprises and services as separation, so that the assembled information pushed to the enterprises is clear in classification, information pushing errors are not easy to occur, and the classified viewing of the enterprises receiving the information is facilitated. In addition, when the server is connected with a new enterprise and a new business type, only corresponding information assembly modes need to be added, expansibility is good, and development efficiency of the platform is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
In the embodiment of the application, the information is effectively pushed based on the artificial intelligence technology.
The information push method according to the embodiment of the present application may be executed by a server. When the information pushing method is executed by the server, the execution subject is the server. In practice, the server is usually a control server, and the control server can control each node in the node group to perform information processing and pushing.
It should be noted that the server may include, but is not limited to, a server, a computer, a mobile phone, a tablet, a wearable smart device, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform.
Referring to fig. 1, fig. 1 shows a flowchart of an implementation of an information pushing method provided in an embodiment of the present application, where the implementation includes:
step 101, responding to a preset trigger condition, determining an operation state of each node in a node group, and determining available nodes and a total number of the available nodes according to the operation state of each node.
The operation state comprises a normal state and an abnormal state.
The preset trigger condition is usually a preset condition. In practice, the preset trigger condition includes, but is not limited to, at least one of the following: receiving an order inquiry request, reaching a preset processing period and reaching a preset processing time point. The preset processing period may be a preset period value. E.g., 1 minute. The preset processing time point is generally a preset time point. E.g., the first 10 minutes per hour.
Here, when the preset trigger condition is triggered, the execution principal may determine an operation state of each node in a node group communicatively connected to the execution principal, so as to determine which nodes are available nodes from the node group and determine which nodes are unavailable nodes based on the operation state of each node, so that the total number of available nodes may be obtained. In practice, if the running state is a normal state, the corresponding node is an available node, and if the running state is an abnormal state, the corresponding node is an unavailable node.
For example, if there are 10 nodes in the node group, if the operating states of 3 of the nodes are normal states, and the operating states of 7 of the nodes are abnormal states, at this time, there are 3 available nodes, and the total number of the available nodes is 3.
Optionally, the determining the operating state of each node in the node group may include: and sending state inquiry information to each node, receiving response information returned by each node based on the state inquiry information, and determining the operation state of each node based on the response information. In practice, the above-mentioned status inquiry information may be preset information, such as "1".
Here, the executive owner may determine the operation state of each node by receiving response information of each node to the state inquiry information. Specifically, for each node, the execution body may send status inquiry information to the node. In this way, the node can return response information to the execution body with respect to the status inquiry information. After that, the execution body may determine the operation state of the node by using the response information. As an example, the execution subject may determine that the operation state of the node is a normal state when the response information is received, and determine that the operation state of the node is an abnormal state when the response information is not received.
Optionally, the determining the operating state of each node in the node group may further include: and determining the running state of each node by analyzing the time of sending heartbeat information of each node for the last time.
Here, each node may send heartbeat information to the execution main body according to a preset sending period, so that the execution main body may know whether the node is normal. And if a certain node does not send heartbeat information after exceeding the preset sending time length, the node is considered to be in an abnormal state. The predetermined transmission period is usually a predetermined period value, and may be 30 seconds, for example. The preset sending time period is usually a preset time period value, for example, may be 1 minute. In practice, the corresponding duration of the preset sending period is usually shorter than the preset sending period.
Step 102, a target order information set is obtained from a target database.
The target order information in the target order information set comprises the following data items: service identification and enterprise identification. In practical applications, the target order information in the target order information set further typically includes at least one of the following data items: order hash value, order creation time, order identification. The business identifier is typically an identifier indicating the business to which the order belongs. The service identifier is usually an identifier indicating a service to which the order belongs. The order identifier is typically an identifier for indicating an order, and may be an order number, for example. The order creation time is generally the time at which the order was generated. The order hash value is typically a hash value generated based on order-related information.
The target order information in the target order information set is usually the target order information satisfying the filtering condition. The screening conditions may be predetermined conditions. For example, the order information may be randomly filtered 100 entries.
Here, the execution principal may acquire the target order information set from the target database.
And 103, determining an available node corresponding to each target order information according to the total number and the data items included in each target order information.
Here, the executing agent may obtain the target order information set from the target database, and determine an available node corresponding to each target order information based on the data item in each target order information and the total number of available nodes.
In some optional implementation manners, determining an available node corresponding to each target order information according to the total number and the data item included in each target order information may include: and performing modular operation on the order hash value and the total number of the corresponding target order information according to each target order information to obtain a modular value corresponding to the corresponding target order information, and determining an available node corresponding to the current node with the same serial number as the modular value as an available node corresponding to the corresponding target order information.
Here, for each piece of target order information, the executing entity may perform modulo operation on the order hash value of the piece of target order information and the total number of available nodes to obtain a modulo value corresponding to the piece of target order information. Then, the execution subject may determine an available node corresponding to the current node serial number and the modulus value as an available node corresponding to the target order information. For example, if there are 10 pieces of target order information and 3 available nodes, and the current node serial numbers of the three available nodes are 1, 2, and 3, respectively, for any one piece of target order information in the 10 pieces of target order information, if the order hash value of the target order information and 3 are subjected to modulo operation, and the obtained value is 1, the available node corresponding to the target order information is the available node with the current node serial number of 1.
In practical application, the executing entity may determine an available node corresponding to each target order information in the following manner: firstly, performing modulus operation on the hash value corresponding to the order identification and the total number of available nodes to obtain a modulus value of the target order information. And then, determining the available node with the corresponding current node serial number equal to the modulus value as the available node corresponding to the target order information.
In practical application, the execution main body may further determine an available node corresponding to each target order information in the following manner: firstly, conducting modulus operation on the order identification and the total number of available nodes to obtain a modulus value of the target order information. And then, determining the available node with the corresponding current node serial number equal to the modulus value as the available node corresponding to the target order information.
It should be noted that, compared with the method of temporarily adopting a certain data item in the target order information to perform hash calculation and then modulus determination to determine a corresponding available node, modulus calculation is performed by using the existing order hash value and the total number in the target order information, so that the calculation speed is significantly faster, and the processing efficiency is greatly improved. In addition, since the order hash value is usually a numerical value, and other data items in the target order information are usually character strings, the modulo operation is performed by adopting the order hash value and the total number, compared with the modulo operation performed by adopting other data items and the total number, the calculation efficiency is faster, and the data processing efficiency is further improved.
And 104, distributing each target order information to a corresponding available node, controlling each available node to carry out information assembly processing on the distributed target order information based on the enterprise identification and the service identification in the distributed target order information, and pushing the assembled information to the terminal of the corresponding enterprise.
Wherein the assembly information corresponds to the enterprise identifier and the business identifier.
Here, for each piece of target order information, after determining an available node corresponding to the target order information, the executing entity may allocate the target order information to the available node corresponding to the target order information for processing. The target order information in the target order information set is simultaneously distributed to a plurality of available nodes for processing, so that the plurality of available nodes can perform parallel data processing, and the data processing efficiency is improved.
After distributing the target order information in the target order information set, for each available node, the executing entity may control the available node to perform information assembling processing on each distributed target order information based on the enterprise identifier and the service identifier in the distributed target order information, and assemble the information to obtain the assembled information for each target order information. For example, one piece of assembly information may be assembled for each piece of target order information, one piece of assembly information may be assembled for the distributed pieces of target order information corresponding to the same enterprise, and one piece of assembly information may be assembled for the distributed pieces of target order information corresponding to the same enterprise and the same service. It should be noted that, based on the enterprise identifier and the service identifier in the allocated target order information, information assembly processing is performed on each allocated target order information, so that assembly can be performed by using the enterprise and the service as assembly granularity, the assembly information is pushed to the enterprise, and enterprise personnel can conveniently sort and check the received information, which is beneficial to improving user experience.
According to the method provided by the embodiment, the order information is processed and pushed by the plurality of available nodes at the same time, so that the information pushing efficiency is improved. In addition, information assembly is carried out by taking enterprises and services as separation, so that the assembled information pushed to the enterprises is clear in classification, information pushing errors are not easy to occur, and the classified viewing of the enterprises receiving the information is facilitated. In addition, when the server is connected with a new enterprise and a new business type, only corresponding information assembly modes need to be added, expansibility is good, and development efficiency of the platform is improved.
In an optional implementation manner of each embodiment of the present application, the controlling each available node to perform information assembly processing on the allocated target order information based on the enterprise identifier and the service identifier in the allocated target order information may include the following steps 201 and 202. Fig. 2 is a flowchart of implementing information assembling processing according to an embodiment of the present disclosure.
Step 201, controlling each available node to select an information presentation template corresponding to the enterprise identifier and the service identifier in the allocated target order information, and writing each data item in the allocated target order information into a corresponding part of the information presentation template to obtain the assembly information for the allocated target order information.
The information presentation template is generally a preset template for presenting information.
Here, the available node may write, for each piece of target order information, each data item in the target order information into a corresponding position of the information presentation template under the control of the execution main body, to obtain the assembly information. For example, if the information presentation template is "enterprise: __, service: __, order generation time: __ are provided. ", at this time, the business identification data item in the target order information may be written in the first underline position, the business identification data item may be written in the second underline position, and the order creation time data item may be written in the third underline position.
And 202, controlling each available node to carry out secondary assembly on the assembly information of the target order information corresponding to the same information presentation template in the corresponding available node to obtain total assembly information under each business in each enterprise.
Here, the execution agent may control each available node, perform secondary assembly on the assembly information for each target order information assembled in the available node, and assemble the assembly information for the target order information corresponding to the same business in the available node into one total assembly information.
For example, if 10 pieces of order-placing information are allocated in the available node 1, and 4 pieces of order-placing information in the 10 pieces of order-placing information are from the a business a, 3 pieces of business a and 3 pieces of business B, the executing entity may control the available node to assemble each piece of target order information into one assembly information, and may obtain 10 assembly information. Then, the executing entity may control the available node to perform secondary assembly on the assembly information of the same business from the same enterprise, so as to obtain 3 pieces of total assembly information, specifically, obtain one piece of total assembly information for the business a of enterprise a, obtain one piece of total assembly information for the business a of enterprise B, and obtain one piece of total assembly information for the business B of enterprise B.
According to the embodiment, the target order information from the same enterprise and the same business can be assembled into the total assembly information, the total assembly information is pushed to the enterprise, the pushed content can be more convenient to check, and the user experience can be further improved. In addition, the target order information from the same enterprise and the same business is assembled into a total assembly information, the total assembly information is pushed to the enterprise, the data volume needing to be pushed is much smaller, network resources used for pushing data can be saved, and the information pushing speed can be increased.
In some optional implementation manners of this embodiment, the information pushing method may further include the following steps 301-303. Fig. 3 is a flowchart of an implementation for storing target order information according to an embodiment of the present disclosure.
Step 301, when the order information is generated, determining an order hash value of the order information according to the order identifier and the service identifier in the order information, and using the determined order hash value as a data item of the order information.
Here, when generating the order information, the execution subject may perform a hash calculation using the order identifier and the service identifier in the order information to obtain a hash value, and for convenience of description, the obtained hash value is referred to as an order hash value. Then, the execution agent may store the order hash value as a data item of the order information.
It should be noted that, since the order hash value is usually a numerical value, and other data items in the order information are usually character strings, when querying the order information, querying by using the hash value is much faster than querying by using the character strings, which is helpful to improve the data querying efficiency.
Step 302, converting the data type of the order creation time of the order information into a numerical type, and using the order creation time after the data type conversion as the data item of the order information.
Here, the execution agent may convert the order creation time of the order information into a data type, and convert the data type into a numerical type. Thereafter, the execution agent may use the order creation time of the numerical type as one data item of the order information.
It should be noted that, because the creation time of the order information is usually a character string type, the execution subject performs data type conversion on the order creation time of the order and converts the order creation time into a numerical type, so that when the order information is searched based on time or a time period in the following, the order information to be queried can be obtained only by performing numerical comparison.
Step 303, store the order information including the data item as the target order information into the target database.
Here, the execution agent may store order information including data items as object order information in the object database.
The embodiment can realize that the order information extracted from the data items is stored in the target database, so that the order information stored in the target database is more practical.
In some optional implementation manners of this embodiment, if the preset trigger condition is that an order query request is received, and the order query request includes at least one of an order hash value, an order creation time, an order identifier, a service identifier, and an enterprise identifier, the obtaining the target order information set from the target database may include: and acquiring a set of target order information adapted to the order query request from a target database, and recording the set of target order information as a target order information set.
Here, when the preset trigger condition is that an order query request is received, the execution main body may obtain target order information adapted to the order query request from a target database. As an example, if the order query request includes order creation time from 11 month 1 to 11 month 30, the execution subject may obtain target order information corresponding to the order creation time from 11 month 1 to 11 month 30 from the target database.
In an optional implementation manner of each embodiment of the present application, the allocating each target order information to a corresponding available node may include: and aiming at each available node, if the fault of the corresponding available node is detected before the target order information is distributed, selecting other available nodes as substitute nodes, and distributing the target order information corresponding to the corresponding available node to the substitute nodes. Wherein the other available nodes are available nodes other than the respective available node.
Here, for each available node, if the available node suddenly fails after determining the available node corresponding to each target order information and before the allocation is implemented, the execution main body may allocate the target order information of the node corresponding to the sudden failure, which has not been allocated, to other available nodes, for example, one available node may be randomly selected as a substitute node, or the substitute node may be selected according to a round-robin order, for example, the node No. 3 is selected last time, the node No. 4 is selected this time, and the substitute node executes the target order information of the node with the sudden failure.
In an optional implementation manner of each embodiment of the present application, the allocating each target order information to a corresponding available node further includes: for each available node, if the fault of the corresponding available node is detected after the target order information is distributed, distributing the target order information which is not processed and corresponds to the corresponding available node to other available nodes when the target order information is distributed next time, and distributing the target order information which is not processed and is completely corresponding to the corresponding available node to other available nodes when the preset cache failure time length is arranged at intervals.
The preset cache invalidation time length is generally a preset cache invalidation time length.
Here, for each available node, if the available node suddenly fails after determining the available node corresponding to each target order information and after implementing allocation, the execution main body may allocate target order information corresponding to the available node, which is not processed, to other available nodes when allocating the target order information next time, and allocate target order information corresponding to the available node, which is not processed completely, to available nodes other than the available node when the preset cache failure time length is set at intervals.
It should be noted that, when a node processes order information, the order information is usually cached in redis, and since redis does not support the same data to be executed by multiple nodes at the same time, during the process of caching the incomplete order information in redis, other nodes cannot process the order information, and after the cache of redis is invalidated, the order information can be extracted and distributed to other available nodes for processing.
According to the embodiment, the target order information corresponding to each available node can be reliably processed, and the information pushing accuracy is improved.
Referring to fig. 4, fig. 4 is a block diagram illustrating an information pushing apparatus 400 according to an embodiment of the present disclosure. The information pushing apparatus in this embodiment includes units for executing the steps in the embodiments corresponding to fig. 1 to fig. 3. Please refer to fig. 1-3 and the related descriptions of the embodiments corresponding to fig. 1-3. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 4, the information push apparatus 400 includes:
an information determining unit 401, configured to determine an operating state of each node in the node group in response to a preset trigger condition being triggered, and determine available nodes and a total number of the available nodes according to the operating state of each node;
an information obtaining unit 402, configured to obtain a target order information set from a target database, where the target order information in the target order information set includes the following data items: a business identifier and an enterprise identifier;
a node determining unit 403, configured to determine an available node corresponding to each target order information according to the total number and a data item included in each target order information;
and the node allocating unit 404 is configured to allocate each piece of target order information to a corresponding available node, control each available node to perform information assembly processing on the allocated target order information based on the enterprise identifier and the service identifier in the allocated target order information, and push assembled assembly information to a terminal of a corresponding enterprise.
As an embodiment of the present application, the node determining unit 403 is specifically configured to: and performing modular operation on the order hash value and the total number of the corresponding target order information according to each target order information to obtain a modular value corresponding to the corresponding target order information, and determining an available node corresponding to the current node with the same serial number as the modular value as an available node corresponding to the corresponding target order information.
As an embodiment of the present application, the node allocating unit 404 is specifically configured to: and aiming at each available node, if the fault of the corresponding available node is detected before the target order information is distributed, selecting other available nodes as substitute nodes, and distributing the target order information corresponding to the corresponding available node to the substitute nodes, wherein the other available nodes are available nodes except the corresponding available node.
As an embodiment of the present application, the node allocating unit 404 is further specifically configured to: for each available node, if the fault of the corresponding available node is detected after the target order information is distributed, distributing the target order information which is not processed and corresponds to the corresponding available node to other available nodes when the target order information is distributed next time, and distributing the target order information which is not processed and is completely corresponding to the corresponding available node to other available nodes when the preset cache failure time length is arranged at intervals.
As an embodiment of the present application, the apparatus further includes an information storage unit (not shown in the figure). Wherein the information storage unit is used for: firstly, when order information is generated, an order hash value of the order information is determined according to an order identifier and a service identifier in the order information, and the determined order hash value is used as a data item of the order information. Then, the data type of the order creation time of the order information is converted into a numerical type, and the order creation time after the data type conversion is taken as a data item of the order information. And finally, storing the order information comprising the data items as target order information into a target database.
As an embodiment of the present application, if the preset trigger condition is that an order query request is received, and the order query request includes at least one of an order hash value, an order creation time, an order identifier, a service identifier, and an enterprise identifier, the information obtaining unit 402 is specifically configured to: and acquiring a set of target order information adapted to the order query request from a target database, and recording the set of target order information as a target order information set.
As an embodiment of the present application, in the node allocating unit 404, controlling each available node to perform information assembly processing on the allocated target order information based on the enterprise identifier and the service identifier in the allocated target order information includes: firstly, controlling each available node to select an information presentation template corresponding to an enterprise identifier and a service identifier in the allocated target order information, and writing each data item in the allocated target order information into a corresponding part of the information presentation template to obtain assembly information aiming at the allocated target order information. And then, controlling each available node to carry out secondary assembly on the assembly information of the target order information corresponding to the same information presentation template in the corresponding available node to obtain total assembly information under each business in each enterprise.
The device provided by the embodiment processes and pushes the order information through a plurality of available nodes, which is beneficial to improving the information pushing efficiency. In addition, information assembly is carried out by taking enterprises and services as separation, so that the assembled information pushed to the enterprises is clear in classification, information pushing errors are not easy to occur, and the classified viewing of the enterprises receiving the information is facilitated. In addition, when the server is connected with a new enterprise and a new business type, only corresponding information assembly modes need to be added, expansibility is good, and development efficiency of the platform is improved.
It should be understood that, in the structural block diagram of the information pushing apparatus shown in fig. 4, each unit is configured to execute each step in the embodiment corresponding to fig. 1 to 3, and each step in the embodiment corresponding to fig. 1 to 3 has been explained in detail in the above embodiment, and specific reference is made to relevant descriptions in the embodiments corresponding to fig. 1 to 3 and fig. 1 to 3, which is not described herein again.
Fig. 5 is a block diagram of a server according to another embodiment of the present application. As shown in fig. 5, the server 500 of this embodiment includes: a processor 501, a memory 502 and a computer program 503, such as a program of an information push method, stored in the memory 502 and executable on the processor 501. The processor 501 executes the computer program 503 to implement the steps in the embodiments of the information pushing method, such as the steps 101 to 104 shown in fig. 1. Alternatively, when the processor 501 executes the computer program 503, the functions of the units in the embodiment corresponding to fig. 4, for example, the functions of the units 401 to 404 shown in fig. 4, are implemented, for which reference is specifically made to the relevant description in the embodiment corresponding to fig. 4, which is not repeated herein.
Illustratively, the computer program 503 may be divided into one or more units, which are stored in the memory 502 and executed by the processor 501 to accomplish the present application. One or more elements may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of computer program 503 in server 500. For example, the computer program 503 may be divided into an information determination unit, an information acquisition unit, a node determination unit, and a node allocation unit, each of which functions as described above.
The server may include, but is not limited to, a processor 501, a memory 502. Those skilled in the art will appreciate that fig. 5 is merely an example of a server 500, and does not constitute a limitation on server 500, and may include more or fewer components than shown, or some components in combination, or different components, e.g., a turntable device may also include input output devices, network access devices, buses, etc.
The Processor 501 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 502 may be an internal storage unit of the server 500, such as a hard disk or a memory of the server 500. The memory 502 may also be an external storage device of the server 500, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the server 500. Further, memory 502 may also include both internal storage units of server 500 and external storage devices. The memory 502 is used for storing computer programs and other programs and data required by the turntable device. The memory 502 may also be used to temporarily store data that has been output or is to be output.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated module, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable storage medium may be non-volatile or volatile. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable storage medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable storage media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.