[go: up one dir, main page]

CN114205412A - Information pushing method and device, server and storage medium - Google Patents

Information pushing method and device, server and storage medium Download PDF

Info

Publication number
CN114205412A
CN114205412A CN202111548920.3A CN202111548920A CN114205412A CN 114205412 A CN114205412 A CN 114205412A CN 202111548920 A CN202111548920 A CN 202111548920A CN 114205412 A CN114205412 A CN 114205412A
Authority
CN
China
Prior art keywords
order information
information
target order
node
target
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
CN202111548920.3A
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.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce 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 Ping An E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN202111548920.3A priority Critical patent/CN114205412A/en
Publication of CN114205412A publication Critical patent/CN114205412A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请适用于人工智能技术领域,提供了一种信息推送方法、装置、服务器及存储介质,该方法包括:响应于预设触发条件被触发,确定节点组中各节点的运行状态,以及根据各节点的运行状态确定可用节点及可用节点的总数目;从目标数据库中获取目标订单信息集;根据总数目和各目标订单信息所包括的数据项,确定各目标订单信息对应的可用节点;将各目标订单信息分配至对应可用节点,以及控制各可用节点基于所分配的目标订单信息中的企业标识和业务标识,对所分配的目标订单信息进行信息组装处理,以及将组装得到的组装信息向对应企业的终端推送。本申请通过多个可用节点同时执行对订单信息进行处理以及推送,有助于提高信息推送效率。

Figure 202111548920

The present application is applicable to the field of artificial intelligence technology, and provides an information push method, device, server and storage medium. The method includes: in response to a preset trigger condition being triggered, determining the running state of each node in the node group, and according to each The running state of the nodes determines the available nodes and the total number of available nodes; obtains the target order information set from the target database; determines the available nodes corresponding to each target order information according to the total number and the data items included in each target order information; The target order information is allocated to the corresponding available nodes, and each available node is controlled to perform information assembly processing on the allocated target order information based on the enterprise ID and business ID in the allocated target order information, and to send the assembled assembly information to the corresponding Enterprise terminal push. This application simultaneously processes and pushes order information through multiple available nodes, which helps to improve the efficiency of information push.

Figure 202111548920

Description

Information pushing method and device, server and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to an information pushing method, an information pushing apparatus, a server, and a storage medium.
Background
With the continuous development of network technology, network reservation technology is already common. In practice, many enterprises generate more or less orders on the schedule planning platform, and the schedule planning platform also needs to return the order information of each enterprise to the corresponding enterprise in order to perform unified checking of the information.
In the related art, if order information related to each enterprise is pushed to the corresponding enterprise one by one, a long time is consumed, and the information pushing efficiency is not high.
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.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments or the related technical descriptions will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of an implementation of an information pushing method provided in an embodiment of the present application;
FIG. 2 is a flow chart of an implementation of an information assembling process provided by an embodiment of the present application;
FIG. 3 is a flow chart of an implementation for storing target order information provided by an embodiment of the present application;
fig. 4 is a block diagram of an information pushing apparatus according to an embodiment of the present application;
fig. 5 is a block diagram of a server according to an embodiment of the present disclosure.
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.

Claims (10)

1. An information pushing method, characterized in that the method comprises:
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 an available node corresponding to each target order information according to the total number and the data items included in each 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.
2. The information pushing method according to claim 1, wherein determining an available node corresponding to each target order information according to the total number and a data item included in each target order information includes:
and performing modular operation on the order hash value of the corresponding target order information and the total number according to each target order information to obtain a modular value corresponding to the corresponding target order information, and determining an available node with the corresponding current node serial number equal to the modular value as an available node corresponding to the corresponding target order information.
3. The information pushing method according to claim 1, wherein the allocating each target order information to a corresponding available node comprises:
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.
4. The information pushing method according to claim 3, wherein the allocating each target order information to a corresponding available node further comprises:
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.
5. The information pushing method according to claim 1, further comprising:
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 the target database.
6. The information pushing method according to claim 1, wherein 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 a target order information set from a target database includes:
and acquiring a set of target order information adapted to the order query request from the target database, and recording the set of target order information as a target order information set.
7. The information pushing method according to any one of claims 1 to 6, wherein the controlling each available node performs information assembly processing on the allocated target order information based on a business identifier and a business identifier in the allocated target order information, and includes:
controlling each available node to select an information presentation template corresponding to an enterprise identifier and a service identifier in the distributed target order information, and writing each data item in the distributed target order information into a corresponding part of the information presentation template to obtain assembly information aiming at the distributed 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.
8. An information pushing apparatus, characterized in that the apparatus comprises:
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.
9. A server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202111548920.3A 2021-12-17 2021-12-17 Information pushing method and device, server and storage medium Pending CN114205412A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111548920.3A CN114205412A (en) 2021-12-17 2021-12-17 Information pushing method and device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111548920.3A CN114205412A (en) 2021-12-17 2021-12-17 Information pushing method and device, server and storage medium

Publications (1)

Publication Number Publication Date
CN114205412A true CN114205412A (en) 2022-03-18

Family

ID=80654781

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111548920.3A Pending CN114205412A (en) 2021-12-17 2021-12-17 Information pushing method and device, server and storage medium

Country Status (1)

Country Link
CN (1) CN114205412A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116600026A (en) * 2023-04-26 2023-08-15 中国工商银行股份有限公司 Data transmission method, device, electronic device, medium and program product

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107944985A (en) * 2017-12-27 2018-04-20 掌合天下(北京)信息技术有限公司 Order retransmission method, device, server and readable storage medium storing program for executing
CN109034937A (en) * 2018-06-06 2018-12-18 北京六艺九州科技有限公司 A kind of order processing method and GDS system
CN109615465A (en) * 2018-11-22 2019-04-12 阿里巴巴集团控股有限公司 Service order processing method and device and electronic equipment
CN110415077A (en) * 2019-07-24 2019-11-05 万翼科技有限公司 Data processing method, server, terminal and storage medium based on the date
CN110503512A (en) * 2019-07-19 2019-11-26 北京三快在线科技有限公司 Order processing method, device, electronic device and storage medium
CN111340463A (en) * 2020-03-23 2020-06-26 中国邮政储蓄银行股份有限公司 Data processing system and data processing method thereof
CN111489100A (en) * 2020-04-27 2020-08-04 好活(昆山)网络科技有限公司 Order creating method, device, equipment and medium based on big data
CN111861662A (en) * 2020-07-17 2020-10-30 上海聚音信息科技有限公司 Order push-back and inventory management method, device and computer readable storage medium
CN113127168A (en) * 2021-04-07 2021-07-16 深圳希施玛数据科技有限公司 Service distribution method, system, device, server and medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107944985A (en) * 2017-12-27 2018-04-20 掌合天下(北京)信息技术有限公司 Order retransmission method, device, server and readable storage medium storing program for executing
CN109034937A (en) * 2018-06-06 2018-12-18 北京六艺九州科技有限公司 A kind of order processing method and GDS system
CN109615465A (en) * 2018-11-22 2019-04-12 阿里巴巴集团控股有限公司 Service order processing method and device and electronic equipment
CN110503512A (en) * 2019-07-19 2019-11-26 北京三快在线科技有限公司 Order processing method, device, electronic device and storage medium
CN110415077A (en) * 2019-07-24 2019-11-05 万翼科技有限公司 Data processing method, server, terminal and storage medium based on the date
CN111340463A (en) * 2020-03-23 2020-06-26 中国邮政储蓄银行股份有限公司 Data processing system and data processing method thereof
CN111489100A (en) * 2020-04-27 2020-08-04 好活(昆山)网络科技有限公司 Order creating method, device, equipment and medium based on big data
CN111861662A (en) * 2020-07-17 2020-10-30 上海聚音信息科技有限公司 Order push-back and inventory management method, device and computer readable storage medium
CN113127168A (en) * 2021-04-07 2021-07-16 深圳希施玛数据科技有限公司 Service distribution method, system, device, server and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116600026A (en) * 2023-04-26 2023-08-15 中国工商银行股份有限公司 Data transmission method, device, electronic device, medium and program product

Similar Documents

Publication Publication Date Title
US8510323B2 (en) Grouping identity records to generate candidate lists to use in an entity and relationship resolution process
US9906477B2 (en) Distributing retained messages information in a clustered publish/subscribe system
CN108289034B (en) A kind of fault discovery method and apparatus
CN113360554A (en) Method and equipment for extracting, converting and loading ETL (extract transform load) data
CN112307122B (en) Data lake-based data management system and method
CN111209352A (en) Data processing method and device, electronic equipment and storage medium
CN108647357A (en) The method and device of data query
CN109740129B (en) Report generation method, device and equipment based on blockchain and readable storage medium
CN110162526A (en) Querying method, device and the equipment of data record in a kind of piece of chain type account book
CN108228322B (en) Distributed link tracking and analyzing method, server and global scheduler
JP2021518021A (en) Data processing methods, equipment and computer readable storage media
CN103109293B (en) A user behavior processing system and method
CN111770002A (en) Test data forwarding control method and device, readable storage medium and electronic equipment
US20220342887A1 (en) Predictive query processing
CN105491078A (en) Data processing method and device in SOA system, and SOA system
CN112035471A (en) Transaction processing method and computer equipment
CN113297245A (en) Method and device for acquiring execution information
CN114401239A (en) Metadata transmission method and device, computer equipment and storage medium
CN106682167A (en) User behavior data statistics device and method
CN114595127B (en) Log exception processing method, device, equipment and storage medium
CN114205412A (en) Information pushing method and device, server and storage medium
Lytvyn et al. Development of Intellectual System for Data De-Duplication and Distribution in Cloud Storage.
CN114281549A (en) Data processing method and device
CN111291127B (en) Data synchronization method, device, server and storage medium
CN113886419A (en) SQL statement processing method and device, computer equipment and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220318

RJ01 Rejection of invention patent application after publication