CN115002062A - Message processing method, device, equipment and readable storage medium - Google Patents

Message processing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN115002062A
CN115002062A CN202210579800.8A CN202210579800A CN115002062A CN 115002062 A CN115002062 A CN 115002062A CN 202210579800 A CN202210579800 A CN 202210579800A CN 115002062 A CN115002062 A CN 115002062A
Authority
CN
China
Prior art keywords
message
consumption information
withdrawing
information
withdrawal
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.)
Granted
Application number
CN202210579800.8A
Other languages
Chinese (zh)
Other versions
CN115002062B (en
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 Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202210579800.8A priority Critical patent/CN115002062B/en
Publication of CN115002062A publication Critical patent/CN115002062A/en
Application granted granted Critical
Publication of CN115002062B publication Critical patent/CN115002062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/18Commands or executable codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to the field of cloud storage, and discloses a message processing method, a message processing device, message processing equipment and a message processing storage medium, wherein the method comprises the following steps: when the consumption information is received, marking the consumption information ID and judging whether the consumption information is repeated or not; when the consumption information is repeated, carrying out duplicate removal processing on the consumption information to obtain target consumption information; identifying a withdrawal message of the message withdrawal instruction from the target consumption information when the message withdrawal instruction input by the message producer is received; judging whether the withdrawal message is sent to a message consumer corresponding to the message producer; when the withdrawal message is sent to the message consumer corresponding to the message producer, the withdrawal message target consumption message is recycled; and when the withdrawing message is not sent to the message consumer corresponding to the message producer, inquiring the withdrawing message ID of the withdrawing message from the consumption information ID, and withdrawing the withdrawing message according to the withdrawing message ID. The invention can improve the management efficiency and the trace-remaining efficiency of the test information.

Description

Message processing method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of cloud storage, and in particular, to a message processing method and apparatus, an electronic device, and a readable storage medium.
Background
The message processing refers to a process of processing a message generated by a message producer, for example, a process of transmitting a product purchase message generated after a user purchases a product to a product consumption system server in a product consumption system.
At present, most of common message processing processes messages in a thread mode, but when a producer produces too many messages, the message consumer receives the messages slowly and the delay is high due to the fact that the message is processed by using the thread, therefore, when the message producer produces too many messages, common message processing processes the messages by using a message queue, but due to the characteristics of the message queue, network fluctuation and other reasons, the problems of message repetition, message unrevealed and the like are easily caused, and the efficiency of message processing is reduced.
Disclosure of Invention
The invention provides a message processing method, a message processing device, electronic equipment and a computer readable storage medium, and aims to improve the accuracy and efficiency of message processing.
In order to achieve the above object, a message processing method provided by the present invention includes:
when receiving consumption information input by a message producer, marking the identity of the consumption information to obtain consumption information ID, and judging whether the consumption information is repeated or not;
when the consumption information is repeated, carrying out duplicate removal processing on the consumption information to obtain target consumption information;
identifying a withdrawal message of the message withdrawal instruction from the target consumption information upon receiving a message withdrawal instruction input by the message producer;
judging whether the withdrawing message is sent to a message consumer corresponding to the message producer or not;
when the withdrawing message is sent to the message consumer corresponding to the message producer, the withdrawing message target consumption message is recycled;
and when the withdrawing message is not sent to the message consumer corresponding to the message producer, inquiring the withdrawing message ID of the withdrawing message from the consumption information ID, and withdrawing the withdrawing message according to the withdrawing message ID.
Optionally, the determining whether the consumption information is duplicated includes:
calculating target values of the consumption information at each position in a preset vector space by using a preset hash function;
reading the actual value of each position in the vector space;
and judging whether the consumption information is repeated or not by judging whether the actual value is the same as the target value or not.
Optionally, the calculating, by using a preset hash function, a target value of each position of the consumption information in a preset vector space includes:
calculating a target value g of the consumption information at each position in a preset vector space by using the following formula i (x):
g i (x)=h 1 +i*h 2 +i 2
Wherein, the h 1 Is a 64-bit hash code generated using the murmur3 hash algorithm, said h 2 Is said h 1 The last 32-bit hash code of the medium 64-bit hash code, where i is the spatial position of the vector space.
Optionally, the determining whether the revocation message is sent to the message consumer corresponding to the message producer includes:
searching the withdrawal information in a locally stored message queue;
if the withdrawal information cannot be found in the message queue, judging that the corresponding withdrawal information in the message withdrawal instruction is sent to a message consumer;
if the revocation information can be found in the message queue, the corresponding revocation information in the message revocation instruction is judged not to be sent to the message consumer.
Optionally, the marking the identity of the consumption information to obtain a consumption information ID includes:
carrying out digital signature on the consumption information to obtain an information timestamp;
and encrypting the information timestamp according to the consumption information to obtain a consumption information ID.
Optionally, the revocation message identifying the message revocation instruction from the target consumption information comprises:
backing up the target consumption information to a pre-constructed target consumption message record table;
analyzing the message withdrawing instruction to obtain a message withdrawing parameter contained in the message withdrawing instruction;
and matching the message withdrawing parameters with the target consumption message record table to obtain successfully matched message withdrawing.
Optionally, after the withdrawing the withdrawal message, the method further includes:
when a message breakpoint continuous sending instruction input by a user is received, analyzing the message outage continuous sending instruction to obtain the message continuous sending time of a continuous sending message corresponding to the message outage continuous sending instruction;
storing the renewal message into a pre-constructed renewal queue, and comparing the local system time with the message renewal time;
and when the local system time is the same as the message renewal time, sending a renewal message corresponding to the message renewal time to the message consumer.
In order to solve the above problems, the present invention also provides an offline product recommending apparatus, including:
the message duplication removing module is used for marking the identity of the consumption information to obtain consumption information ID when receiving the consumption information input by a message producer, judging whether the consumption information is duplicated, and carrying out duplication removing processing on the consumption information to obtain target consumption information when the consumption information is duplicated;
the message position judging module is used for identifying a withdrawal message of the message withdrawal instruction from the target consumption information and judging whether the withdrawal message is sent to a message consumer corresponding to the message producer when the message withdrawal instruction input by the message producer is received;
and the message withdrawing module is used for recycling the withdrawn message target consuming message when the withdrawn message is sent to the message consumer corresponding to the message producer, inquiring the withdrawn message ID of the withdrawn message from the consuming message ID when the withdrawn message is not sent to the message consumer corresponding to the message producer, and withdrawing the withdrawn message according to the withdrawn message ID.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one computer program; and
and a processor executing the computer program stored in the memory to implement the message processing method described above.
In order to solve the above problem, the present invention also provides a computer-readable storage medium having at least one computer program stored therein, the at least one computer program being executed by a processor in an electronic device to implement the message processing method described above.
The embodiment of the invention firstly identifies the consumption information to obtain the consumption information ID so as to orderly inquire the consumption information and other operations, secondly, performs duplicate removal processing on the repeated consumption information to ensure the low duplicate rate of the consumption information and improve the efficiency of message processing; furthermore, according to the withdrawal information instruction sent by the message producer, the consumption information is correspondingly recycled or withdrawn by judging the position of the consumption information, so that the probability and risk of message missending are reduced, and the accuracy and efficiency of message processing are improved. Therefore, the message processing method, the message processing device, the electronic device and the readable storage medium provided by the embodiment of the invention can improve the accuracy and efficiency of message processing.
Drawings
Fig. 1 is a schematic flowchart of a message processing method according to an embodiment of the present invention;
FIG. 2 is a block diagram of an offline product recommendation device according to an embodiment of the present invention;
fig. 3 is a schematic internal structural diagram of an electronic device implementing a message processing method according to an embodiment of the present invention;
the implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides a message processing method. The execution subject of the message processing method includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiments of the present application. In other words, the message processing method may be performed by software installed in a terminal device or a server device, or hardware, and the software may be a block chain platform. The server may include an independent server, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Content Delivery Network (CDN), big data and an artificial intelligence platform.
Referring to fig. 1, which is a schematic flow diagram of a message processing method according to an embodiment of the present invention, in an embodiment of the present invention, the message processing method includes:
and S1, when the consumption information input by the message producer is received, marking the identity of the consumption information to obtain the consumption information ID, and judging whether the consumption information is repeated.
In the embodiment of the present invention, the message producer is a producer of the consumption message, for example, the message producer of the product purchase information is a product purchase user. The consumption information may be information generated by a message producer performing a specific task, for example, a user making a product purchase, and the generated product purchase information is consumption information. The identity identification is identification for identifying the uniqueness of the consumption information identity.
In an optional embodiment of the invention, when the message producer executes a specific task, the server identifies the action of the message producer, automatically generates corresponding consumption information according to the action, and transmits the consumption information to a preset message queue so as to realize transmission and transient storage of the consumption information.
The embodiment of the invention marks the identity of the consumption information so as to identify the identity of each consumption information, thereby better managing and controlling the consumption information.
As an optional embodiment of the present invention, the marking the identity of the consumption information to obtain a consumption information ID includes:
carrying out digital signature on the consumption information to obtain an information timestamp;
and encrypting the information timestamp according to the consumption information to obtain a consumption information ID.
In this embodiment of the present invention, the information timestamp is a generation time of the consumption information.
In the optional embodiment of the invention, the digital signature of the consumption information is realized by carrying out public key decryption on the consumption information, and then the timestamp is generated by the parameters and the time information of the consumption information obtained by decryption, so that the identity uniqueness of the consumption information is ensured, and the consumption information is managed in order.
Furthermore, the embodiment of the invention encrypts the message timestamp to ensure that the consumption information IDs corresponding to the consumption information are different under the condition that the message timestamps are the same in time, thereby further ensuring the identity uniqueness of the consumption information.
Furthermore, the embodiment of the invention determines the uniqueness of the consumption information by judging whether the consumption information is repeated, thereby effectively reducing the repeated sending of the consumption information.
As another optional embodiment of the present invention, the determining whether the consumption information is duplicated includes:
calculating target values of the consumption information at each position in a preset vector space by using a preset hash function;
reading the actual value of each position in the vector space;
and judging whether the consumption information is repeated or not by judging whether the actual value is the same as the target value or not.
In the embodiment of the present invention, the hash function is a function that transforms an input with an arbitrary length into an output with a fixed length by a hash algorithm. The predetermined vector space is a byte array having a length, wherein the vector space is determined by the number of consumed messages.
Further, the calculating a target value of the consumption information at each position in a preset vector space by using a preset hash function includes:
calculating a target value g of the consumption information at each position in a preset vector space by using the following formula i (x):
g i (x)=h 1 +i*h 2 +i 2
Wherein, the h 1 Is a 64-bit hash code generated using the murmur3 hash algorithm, said h 2 Is said h 1 The last 32-bit hash code of the medium 64-bit hash code, where i is the spatial position of the vector space.
And S2, when the consumption information is repeated, carrying out duplication elimination processing on the consumption information to obtain target consumption information.
In the embodiment of the present invention, the message consumer is a receiving end of the consumption information generated by the message producer, for example, product purchase information generated by purchasing a product by a user is received by a product server, where the product server may be a message consumer.
In the embodiment of the present invention, when the actual value of each position in the vector space is different from the target value of the consumption information at each position in the vector space, it is determined that the consumption information is repeated, and then further deduplication processing needs to be performed on the consumption information, so as to obtain the target consumption information.
In the embodiment of the invention, the duplicate checking processing and deleting processing are carried out on the repeated consumption information, so that the duplicate removal of the consumption information is realized, the low repetition rate of the consumption information is ensured, and the message processing efficiency is improved.
And S3, identifying the withdrawal message of the message withdrawal instruction from the target consumption information when receiving the message withdrawal instruction input by the message producer.
In the embodiment of the invention, the message withdrawing instruction is an instruction for withdrawing the specified consumption information, and is realized by clicking on a message interface. The revocation message refers to a consumption message included in the revocation message instruction.
In the embodiment of the present invention, when a message producer produces a message, unnecessary consumption information may be generated or an error occurs in the consumption information, and at this time, it is necessary to stop sending the consumption information in time and withdraw the consumption information, so that it is necessary to receive a message withdrawal instruction input by the message producer during message processing.
In the embodiment of the invention, the withdrawal message of the message withdrawal instruction is identified from the target consumption information to confirm the withdrawal message contained in the target consumption message, so that invalid withdrawal is avoided, and the message processing efficiency is improved.
As an embodiment of the present invention, the identifying the withdrawal message of the message withdrawal instruction from the target consumption information includes:
backing up the target consumption information to a pre-constructed target consumption message record table;
analyzing the message withdrawing instruction to obtain a message withdrawing parameter contained in the message withdrawing instruction;
and matching the withdrawing message parameters with the target consumption message record table to obtain the withdrawing message which is successfully matched.
In the embodiment of the present invention, the target consumption message record table is a data table for storing the target consumption information. The revocation message parameter is a position index of the revocation message, and is used for searching the position of the revocation parameter in the target consumption message record table.
In the optional embodiment of the invention, the backup of the target consumption message is realized by copying and pasting the target consumption message, so that the risk caused by mistaken deletion of the message in the message processing process is reduced.
According to the embodiment of the invention, the message withdrawal instruction is analyzed to obtain the message withdrawal parameters contained in the message withdrawal instruction, the message withdrawal parameters are matched with the target consumption message record table to obtain the successfully matched withdrawal message, and the message required to be withdrawn by the message withdrawal instruction is determined, so that the situation of message mistaken withdrawal is avoided, and the accuracy of message processing is improved.
And S4, judging whether the withdrawing message is sent to the message consumer corresponding to the message producer.
The embodiment of the invention avoids the problem of message withdrawal errors when the message withdrawal instruction cannot inquire the corresponding consumption information in the message queue by judging whether the withdrawal message is sent to the message consumer corresponding to the message producer.
As an optional embodiment of the present invention, the determining whether the revocation message is sent to a message consumer corresponding to the message producer includes:
searching the revocation information in a locally stored message queue;
if the withdrawal information cannot be found in the message queue, judging that the corresponding withdrawal information in the message withdrawal instruction is sent to a message consumer;
and if the withdrawing information can be found in the message queue, judging that the withdrawing information corresponding to the message withdrawing instruction is not sent to a message consumer.
And S5, when the withdrawing message is sent to the message consumer corresponding to the message producer, the withdrawing message is recycled.
In the embodiment of the present invention, when the withdrawal message corresponding to the message withdrawal instruction is sent to the message consumer, it is determined that the withdrawal message does not exist in the message queue, and therefore, the withdrawal message needs to be recycled, thereby avoiding a larger loss caused by a transmission error of the consumption information.
According to the embodiment of the invention, the withdrawal information is subjected to message recovery processing, so that the withdrawal processing of the consumption information sent to the message consumer is realized, the withdrawal processing of the withdrawal information under the condition that the withdrawal information is sent is realized, and the message processing errors caused by sending unnecessary consumption information or multi-mistaken consumption information to the message consumer are avoided.
And S6, when the withdrawal message is not sent to the message consumer corresponding to the message producer, inquiring the withdrawal message ID of the withdrawal message from the consumption information ID, and withdrawing the withdrawal message according to the withdrawal message ID.
In the embodiment of the present invention, when the withdrawal message corresponding to the message withdrawal instruction is not sent to the message consumer, it is determined that the withdrawal message exists in the message queue, and therefore, the withdrawal message is subjected to withdrawal processing, so as to prevent problems such as sending errors of the consumption information, which causes enterprise loss and the like.
According to the embodiment of the invention, the withdrawal message ID of the withdrawal message is inquired from the consumption information ID, and the withdrawal message is withdrawn according to the withdrawal message ID, so that the message is ensured not to be sent by mistake, and the accuracy and efficiency of message processing are improved.
In the optional embodiment of the present invention, because the message consumers have differences, there may be a case where the consumption information is continuously sent at a break point, that is, the consumption information is sent to one part of the message consumers first and then to another part of the message consumers.
As an optional embodiment of the present invention, when the consumption information has a breakpoint renewal, after performing the withdrawing processing on the withdrawal message, the method further includes:
when a message breakpoint resume instruction input by a user is received, analyzing the message power-off resume instruction to obtain the message resume time of a resume message corresponding to the message power-off resume instruction;
storing the continuous sending message into a pre-constructed continuous sending queue, and comparing the local system time with the message continuous sending time;
and when the local system time is the same as the message renewal time, sending a renewal message corresponding to the message renewal time to the message consumer.
In the embodiment of the present invention, the message breakpoint continuous sending instruction is an instruction for sending the specified consumption information in a segmented manner. The pre-constructed resume queue is used for storing a resume message corresponding to the message breakpoint resume instruction.
In the optional embodiment of the invention, the local system time is monitored in real time, and the local system time is compared with the message continuous sending time, so that the breakpoint continuous sending task can be timely completed, the message processing speed is increased, and the message processing efficiency is improved.
The test result trace-remaining method provided by the embodiment of the invention obtains the converted graph test information by performing graph conversion on the text test information, and integrates the original graph test information and the converted graph test information to obtain the target graph test information, thereby realizing the compatibility and coexistence of the original graph test information and the text test information; furthermore, the key words in the target graph test information are extracted to obtain test information key words, the target graph test information is matched with a test management bar in a preset management platform according to the test information key words, the target graph test information which is successfully matched is led into the test management bar, and message processing is completed, so that the management platform is fully used, the construction of the management platform is reduced, and the trace leaving efficiency and the management efficiency of the test information are improved.
Fig. 2 is a functional block diagram of the off-line product recommendation device according to the present invention.
The offline product recommendation apparatus 100 according to the present invention may be installed in an electronic device. According to the implemented functions, the offline product recommendation apparatus may include a message deduplication module 101, a message location determination module 102, and a message revocation module 103, which may also be referred to as a unit, and refers to a series of computer program segments that can be executed by a processor of an electronic device and can perform fixed functions, and are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the message duplication elimination module 101 is configured to, when receiving consumption information input by a message producer, mark an identity of the consumption information to obtain a consumption information ID, determine whether the consumption information is duplicated, and, when the consumption information is duplicated, perform duplication elimination processing on the consumption information to obtain target consumption information.
In the embodiment of the present invention, the message producer is a producer of the consumption message, for example, the message producer of the product purchase information is a product purchase user. The consumption information may be information generated by a message producer performing a specific task, for example, a user making a product purchase, and the generated product purchase information is consumption information. The identity identification is identification for identifying the uniqueness of the consumption information identity.
In an optional embodiment of the invention, when the message producer executes a specific task, the server identifies the action of the message producer, automatically generates corresponding consumption information according to the action, and transmits the consumption information to a preset message queue so as to realize transmission and transient storage of the consumption information.
The embodiment of the invention marks the identity of the consumption information so as to identify the identity of each consumption information, thereby better managing and controlling the consumption information.
As an optional embodiment of the present invention, the marking the identity of the consumption information to obtain a consumption information ID includes:
carrying out digital signature on the consumption information to obtain an information timestamp;
and encrypting the information timestamp according to the consumption information to obtain a consumption information ID.
In this embodiment of the present invention, the information timestamp is a generation time of the consumption information.
In the optional embodiment of the invention, the digital signature of the consumption information is realized by carrying out public key decryption on the consumption information, and then the timestamp is generated by the parameters and the time information of the consumption information obtained by decryption, so that the identity uniqueness of the consumption information is ensured, and the consumption information is managed in order.
Furthermore, the embodiment of the invention encrypts the message timestamp to ensure that the consumption information IDs corresponding to the consumption information are different under the condition that the message timestamps appear in time to be the same, thereby further ensuring the identity uniqueness of the consumption information.
Furthermore, the embodiment of the invention determines the uniqueness of the consumption information by judging whether the consumption information is repeated, thereby effectively reducing the repeated sending of the consumption information.
As another optional embodiment of the present invention, the determining whether the consumption information is duplicated includes:
calculating target values of the consumption information at each position in a preset vector space by using a preset hash function;
reading the actual value of each position in the vector space;
and judging whether the consumption information is repeated or not by judging whether the actual value is the same as the target value or not.
In the embodiment of the present invention, the hash function is a function that transforms an input with an arbitrary length into an output with a fixed length by a hash algorithm. The predetermined vector space is an array of bytes having a length, wherein the vector space is determined by the number of consumed messages.
Further, the calculating, by using a preset hash function, a target value of the consumption information at each position in a preset vector space includes:
calculating a target value g of the consumption information at each position in a preset vector space by using the following formula i (x):
g i (x)=h 1 +i*h 2 +i 2
Wherein, the h 1 Is a 64-bit hash code generated using the murmur3 hash algorithm, said h 2 Is the above-mentioned h 1 The last 32-bit hash code of the medium 64-bit hash code, where i is the spatial position of the vector space.
In the embodiment of the present invention, the message consumer is a receiving end of the consumption information generated by the message producer, for example, product purchase information generated by purchasing a product by a user is received by a product server, where the product server may be a message consumer.
In the embodiment of the present invention, when the actual value of each position in the vector space is different from the target value of the consumption information at each position in the vector space, it is determined that the consumption information is repeated, and then further deduplication processing needs to be performed on the consumption information, so as to obtain the target consumption information.
In the embodiment of the invention, the duplicate checking processing and deleting processing are carried out on the repeated consumption information, so that the duplicate removal of the consumption information is realized, the low repetition rate of the consumption information is ensured, and the message processing efficiency is improved.
The message location determining module 102 is configured to, when receiving a message withdrawal instruction input by the message producer, identify a withdrawal message of the message withdrawal instruction from the target consumption information, and determine whether the withdrawal message is sent to a message consumer corresponding to the message producer.
In the embodiment of the invention, the message withdrawing instruction is an instruction for withdrawing the specified consumption information, and is realized by clicking on a message interface. The revocation message refers to a consumption message included in the revocation message instruction.
In the embodiment of the present invention, when a message producer produces a message, unnecessary consumption information may be generated or an error occurs in the consumption information, and at this time, it is necessary to stop sending the consumption information in time and withdraw the consumption information, so that it is necessary to receive a message withdrawal instruction input by the message producer during message processing.
In the embodiment of the invention, the withdrawal message of the message withdrawal instruction is identified from the target consumption information to confirm the withdrawal message contained in the target consumption message, so that invalid withdrawal is avoided, and the message processing efficiency is improved.
As an embodiment of the present invention, the identifying the withdrawal message of the message withdrawal instruction from the target consumption information includes:
backing up the target consumption information to a pre-constructed target consumption message record table;
analyzing the message withdrawing instruction to obtain a message withdrawing parameter contained in the message withdrawing instruction;
and matching the withdrawing message parameters with the target consumption message record table to obtain the withdrawing message which is successfully matched.
In the embodiment of the present invention, the target consumption message record table is a data table for storing the target consumption information. The revocation message parameter is a position index of the revocation message, and is used for searching the position of the revocation parameter in the target consumption message record table.
In the optional embodiment of the invention, the backup of the target consumption message is realized by copying and pasting the target consumption message, so that the risk caused by mistaken deletion of the message in the message processing process is reduced.
According to the embodiment of the invention, the message withdrawal instruction is analyzed to obtain the message withdrawal parameters contained in the message withdrawal instruction, the message withdrawal parameters are matched with the target consumption message record table to obtain the successfully matched withdrawal message, and the message required to be withdrawn by the message withdrawal instruction is determined, so that the situation of message mistaken withdrawal is avoided, and the accuracy of message processing is improved.
According to the embodiment of the invention, the problem of message withdrawal errors when the message withdrawal instruction cannot inquire the corresponding consumption information in the message queue is avoided by judging whether the withdrawal message is sent to the message consumer corresponding to the message producer.
As an optional embodiment of the present invention, the determining whether the revocation message is sent to the message consumer corresponding to the message producer includes:
searching the withdrawal information in a locally stored message queue;
if the revocation information cannot be found in the message queue, determining that the corresponding revocation information in the message revocation instruction is sent to a message consumer;
if the revocation information can be found in the message queue, the corresponding revocation information in the message revocation instruction is judged not to be sent to the message consumer.
The message revocation module 103 is configured to, when the revocation message is sent to a message consumer corresponding to the message producer, perform recovery processing on the revocation message target consumption message, and when the revocation message is not sent to a message consumer corresponding to the message producer, query a revocation message ID of the revocation message from the consumption information ID, and perform revocation processing on the revocation message according to the revocation message ID.
In the embodiment of the present invention, when the withdrawal message corresponding to the message withdrawal instruction is sent to the message consumer, it is determined that the withdrawal message does not exist in the message queue, and therefore, the withdrawal message needs to be recycled, thereby avoiding a larger loss caused by a transmission error of the consumption information.
According to the embodiment of the invention, the withdrawal information is subjected to message recovery processing, so that the withdrawal processing of the consumption information sent to the message consumer is realized, the withdrawal processing of the withdrawal information under the condition that the withdrawal information is sent is realized, and the message processing errors caused by sending unnecessary consumption information or multi-mistaken consumption information to the message consumer are avoided.
In the embodiment of the present invention, when the withdrawal message corresponding to the message withdrawal instruction is not sent to the message consumer, it is determined that the withdrawal message exists in the message queue, and therefore, the withdrawal message is subjected to withdrawal processing, so as to prevent problems such as sending errors of the consumption information, which causes enterprise loss and the like.
According to the embodiment of the invention, the withdrawal message ID of the withdrawal message is inquired from the consumption information ID, and the withdrawal message is withdrawn according to the withdrawal message ID, so that the message is ensured not to be sent by mistake, and the accuracy and efficiency of message processing are improved.
In the optional embodiment of the present invention, because the message consumers have differences, there may be a case where the consumption information is continuously sent at a break point, that is, the consumption information is sent to one part of the message consumers first and then to another part of the message consumers.
As an optional embodiment of the present invention, after performing the withdrawing processing on the withdrawal message when the consumption information has a breakpoint continuous occurrence, the method further includes:
when a message breakpoint continuous sending instruction input by a user is received, analyzing the message outage continuous sending instruction to obtain the message continuous sending time of a continuous sending message corresponding to the message outage continuous sending instruction;
storing the renewal message into a pre-constructed renewal queue, and comparing the local system time with the message renewal time;
and when the local system time is the same as the message renewal time, sending a renewal message corresponding to the message renewal time to the message consumer.
In the embodiment of the present invention, the message breakpoint continuous sending instruction is an instruction for sending the specified consumption information in a segmented manner. The pre-constructed resume queue is used for storing a resume message corresponding to the message breakpoint resume instruction.
In the optional embodiment of the invention, the local system time is monitored in real time, and the local system time is compared with the message continuous sending time, so that the breakpoint continuous sending task can be timely completed, the message processing speed is increased, and the message processing efficiency is improved.
Fig. 3 is a schematic structural diagram of an electronic device implementing the message processing method according to the present invention.
The electronic device may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as an off-line product recommendation program, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of offline product recommendation programs, etc., but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (e.g., off-line product recommendation programs, etc.) stored in the memory 11 and calling data stored in the memory 11.
The communication bus 12 may be a PerIPheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
Fig. 3 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 3 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Optionally, the communication interface 13 may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the communication interface 13 may further include a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally, a standard wired interface and a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
It is to be understood that the embodiments described are illustrative only and are not to be construed as limiting the scope of the claims.
The off-line product recommendation program stored in the memory 11 of the electronic device is a combination of a plurality of computer programs, which when executed in the processor 10, may implement:
when receiving consumption information input by a message producer, marking the identity of the consumption information to obtain a consumption information ID, and judging whether the consumption information is repeated;
when the consumption information is repeated, carrying out duplicate removal processing on the consumption information to obtain target consumption information;
identifying a withdrawal message of the message withdrawal instruction from the target consumption information upon receiving a message withdrawal instruction input by the message producer;
judging whether the withdrawing message is sent to a message consumer corresponding to the message producer or not;
when the withdrawing message is sent to the message consumer corresponding to the message producer, the withdrawing message target consumption message is recycled;
and when the withdrawing message is not sent to the message consumer corresponding to the message producer, inquiring the withdrawing message ID of the withdrawing message from the consumption information ID, and withdrawing the withdrawing message according to the withdrawing message ID.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the electronic device integrated module/unit, 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 medium may be non-volatile or volatile. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
Embodiments of the present invention may also provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program may implement:
when receiving consumption information input by a message producer, marking the identity of the consumption information to obtain a consumption information ID, and judging whether the consumption information is repeated;
when the consumption information is repeated, carrying out duplicate removal processing on the consumption information to obtain target consumption information;
identifying a withdrawal message of the message withdrawal instruction from the target consumption information upon receiving a message withdrawal instruction input by the message producer;
judging whether the withdrawing message is sent to a message consumer corresponding to the message producer or not;
when the withdrawing message is sent to the message consumer corresponding to the message producer, the withdrawing message target consuming message is recycled;
and when the withdrawing message is not sent to the message consumer corresponding to the message producer, inquiring the withdrawing message ID of the withdrawing message from the consumption information ID, and withdrawing the withdrawing message according to the withdrawing message ID.
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention 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, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method of message processing, the method comprising:
when receiving consumption information input by a message producer, marking the identity of the consumption information to obtain consumption information ID, and judging whether the consumption information is repeated or not;
when the consumption information is repeated, carrying out duplicate removal processing on the consumption information to obtain target consumption information;
identifying a withdrawal message of the message withdrawal instruction from the target consumption information upon receiving a message withdrawal instruction input by the message producer;
judging whether the withdrawing message is sent to a message consumer corresponding to the message producer or not;
when the withdrawing message is sent to the message consumer corresponding to the message producer, the withdrawing message target consuming message is recycled;
and when the withdrawing message is not sent to the message consumer corresponding to the message producer, inquiring the withdrawing message ID of the withdrawing message from the consumption information ID, and withdrawing the withdrawing message according to the withdrawing message ID.
2. The message processing method of claim 1, wherein the determining whether the consumption information is duplicated comprises:
calculating target values of the consumption information at each position in a preset vector space by using a preset hash function;
reading the actual value of each position in the vector space;
and judging whether the consumption information is repeated or not by judging whether the actual value is the same as the target value or not.
3. The message processing method according to claim 1, wherein the calculating a target value of the consumption information at each position in a preset vector space by using a preset hash function comprises:
calculating a target value g of the consumption information at each position in a preset vector space by using the following formula i (x):
g i (x)=h 1 +i*h 2 +i 2
Wherein, the h 1 Is a 64-bit hash code generated using the murmur3 hash algorithm, said h 2 Is said h 1 The last 32-bit hash code of the medium 64-bit hash code, where i is the spatial position of the vector space.
4. The message processing method of claim 1, wherein the determining whether the countermand message is sent to the message consumer corresponding to the message producer comprises:
searching the revocation information in a locally stored message queue;
if the revocation information cannot be found in the message queue, determining that the corresponding revocation information in the message revocation instruction is sent to a message consumer;
and if the withdrawing information can be found in the message queue, judging that the withdrawing information corresponding to the message withdrawing instruction is not sent to a message consumer.
5. The message processing method of claim 1, wherein the marking the identity of the consumption information to obtain a consumption information ID comprises:
carrying out digital signature on the consumption information to obtain an information timestamp;
and encrypting the information timestamp according to the consumption information to obtain a consumption information ID.
6. The message processing method of claim 1, wherein the identifying the revocation message of the message revocation instruction from the target consumption information comprises:
backing up the target consumption information to a pre-constructed target consumption message record table;
analyzing the message withdrawing instruction to obtain a message withdrawing parameter contained in the message withdrawing instruction;
and matching the message withdrawing parameters with the target consumption message record table to obtain successfully matched message withdrawing.
7. The message processing method of claim 1 wherein after said fallback processing the fallback message, the method further comprises:
when a message breakpoint resume instruction input by a user is received, analyzing the message power-off resume instruction to obtain the message resume time of a resume message corresponding to the message power-off resume instruction;
storing the continuous sending message into a pre-constructed continuous sending queue, and comparing the local system time with the message continuous sending time;
and when the local system time is the same as the message renewal time, sending a renewal message corresponding to the message renewal time to the message consumer.
8. A message processing apparatus, comprising:
the message duplication removing module is used for marking the identity of the consumption information to obtain consumption information ID when receiving the consumption information input by a message producer, judging whether the consumption information is duplicated, and carrying out duplication removing processing on the consumption information to obtain target consumption information when the consumption information is duplicated;
the message position judging module is used for identifying a withdrawal message of the message withdrawal instruction from the target consumption information and judging whether the withdrawal message is sent to a message consumer corresponding to the message producer when the message withdrawal instruction input by the message producer is received;
and the message withdrawing module is used for recovering and processing the message withdrawing target consumption message when the message withdrawing is sent to the message consumer corresponding to the message producer, inquiring the message withdrawing ID of the message withdrawing from the consumption information ID when the message withdrawing is not sent to the message consumer corresponding to the message producer, and withdrawing the message withdrawing according to the message withdrawing ID.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores computer program instructions executable by the at least one processor to enable the at least one processor to perform the message processing method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a message processing method according to any one of claims 1 to 7.
CN202210579800.8A 2022-05-25 2022-05-25 Message processing method, device, equipment and readable storage medium Active CN115002062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210579800.8A CN115002062B (en) 2022-05-25 2022-05-25 Message processing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210579800.8A CN115002062B (en) 2022-05-25 2022-05-25 Message processing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN115002062A true CN115002062A (en) 2022-09-02
CN115002062B CN115002062B (en) 2024-04-05

Family

ID=83029911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210579800.8A Active CN115002062B (en) 2022-05-25 2022-05-25 Message processing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115002062B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115292482A (en) * 2022-10-09 2022-11-04 深圳市华云中盛科技股份有限公司 Message processing method for public welfare litigation

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140379814A1 (en) * 2013-06-21 2014-12-25 Parlant Technology, Inc. System and method for optimized message creation and delivery
CN108667722A (en) * 2018-05-18 2018-10-16 Oppo(重庆)智能科技有限公司 Short message cancelling method, electronic device and computer readable storage medium
CN111654537A (en) * 2020-05-28 2020-09-11 福建汇天软件科技股份有限公司 Enterprise data cloud storage device and equipment
CN111885207A (en) * 2020-08-06 2020-11-03 中国银行股份有限公司 Streaming data breakpoint continuous transmission method and device
CN113345126A (en) * 2021-04-30 2021-09-03 中船航海科技有限责任公司 Ship navigation data recording device and method for recording navigation data by using steering instrument
CN113886494A (en) * 2021-09-30 2022-01-04 完美世界(北京)软件科技发展有限公司 Message storage method, device, equipment and computer readable medium for instant messaging
CN113986583A (en) * 2021-11-11 2022-01-28 广东好太太智能家居有限公司 Distributed message processing method, device, system, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140379814A1 (en) * 2013-06-21 2014-12-25 Parlant Technology, Inc. System and method for optimized message creation and delivery
CN108667722A (en) * 2018-05-18 2018-10-16 Oppo(重庆)智能科技有限公司 Short message cancelling method, electronic device and computer readable storage medium
CN111654537A (en) * 2020-05-28 2020-09-11 福建汇天软件科技股份有限公司 Enterprise data cloud storage device and equipment
CN111885207A (en) * 2020-08-06 2020-11-03 中国银行股份有限公司 Streaming data breakpoint continuous transmission method and device
CN113345126A (en) * 2021-04-30 2021-09-03 中船航海科技有限责任公司 Ship navigation data recording device and method for recording navigation data by using steering instrument
CN113886494A (en) * 2021-09-30 2022-01-04 完美世界(北京)软件科技发展有限公司 Message storage method, device, equipment and computer readable medium for instant messaging
CN113986583A (en) * 2021-11-11 2022-01-28 广东好太太智能家居有限公司 Distributed message processing method, device, system, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CYHONE: "结合Guava源码解读布隆过滤器", pages 1 - 8 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115292482A (en) * 2022-10-09 2022-11-04 深圳市华云中盛科技股份有限公司 Message processing method for public welfare litigation

Also Published As

Publication number Publication date
CN115002062B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN112653760B (en) Cross-server file transmission method and device, electronic equipment and storage medium
CN111429121B (en) Block chain-based electronic ticket processing method, device, equipment and storage medium
CN113468049A (en) Test method, device, equipment and medium based on configurable interface
CN111625252A (en) Cluster upgrading maintenance method and device, electronic equipment and storage medium
CN114389889A (en) File full life cycle management method and device based on block chain technology
CN115002062B (en) Message processing method, device, equipment and readable storage medium
CN114547696A (en) File desensitization method and device, electronic equipment and storage medium
CN110647409A (en) Message writing method, electronic device, system and medium
CN114491646A (en) Data desensitization method and device, electronic equipment and storage medium
CN112866285B (en) Gateway interception method and device, electronic equipment and storage medium
CN112217639B (en) Data encryption sharing method and device, electronic equipment and computer storage medium
CN113240351A (en) Business data consistency checking method and device, electronic equipment and medium
CN112685384A (en) Data migration method and device, electronic equipment and storage medium
CN114691782B (en) Database table increment synchronization method, device and storage medium
CN114201466B (en) Anti-cache breakdown method, device, equipment and readable storage medium
CN114827354A (en) Identity authentication information display method and device, electronic equipment and readable storage medium
CN115687384A (en) UUID (user identifier) identification generation method, device, equipment and storage medium
CN115145870A (en) Method and device for positioning reason of failed task, electronic equipment and storage medium
CN114897624A (en) Policy data merging method, device, equipment and storage medium
CN115174555A (en) File transmission method and device, electronic equipment and storage medium
CN114826725A (en) Data interaction method, device, equipment and storage medium
CN114399397A (en) Renewal tracking method, device, equipment and medium
CN113419718A (en) Data transmission method, device, equipment and medium
CN114416560A (en) Program crash analysis aggregation method and system
CN114036068A (en) Update detection method, device, equipment and storage medium based on privacy security

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
GR01 Patent grant
GR01 Patent grant