CN109818981A - Message treatment method, device and equipment - Google Patents

Message treatment method, device and equipment Download PDF

Info

Publication number
CN109818981A
CN109818981A CN201910220831.2A CN201910220831A CN109818981A CN 109818981 A CN109818981 A CN 109818981A CN 201910220831 A CN201910220831 A CN 201910220831A CN 109818981 A CN109818981 A CN 109818981A
Authority
CN
China
Prior art keywords
message
business object
mark
content
receiving end
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
CN201910220831.2A
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.)
Koubei Shanghai Information Technology Co Ltd
Original Assignee
Koubei Shanghai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Koubei Shanghai Information Technology Co Ltd filed Critical Koubei Shanghai Information Technology Co Ltd
Priority to CN201910220831.2A priority Critical patent/CN109818981A/en
Publication of CN109818981A publication Critical patent/CN109818981A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

This specification provides a kind of message treatment method, device and equipment, for the origination message that need to be sent, this method can determine the business object mark of target service contents of object, by the way that the origination message to be converted to the compressed message for not carrying target service contents of object but carrying business object mark, origination message is replaced to be sent to receiving end using compressed message, since compressed message eliminates more business object content, so that the compressed message of transmission can satisfy the requirement of message transmission;After receiving end receives compressed message, due to being stored with target service contents of object and business object mark, receiving end can use the mark of the business object in compressed message and inquire corresponding business object content.The present embodiment is by simplifying origination message so that the message delivered is able to satisfy delivery and requires, be able to solve message it is longer and the problem of can not send.

Description

Message treatment method, device and equipment
Technical field
This specification is related to Internet technical field more particularly to message treatment method, device and equipment.
Background technique
Some distributed systems have the message size of transmission certain limitation, such as limitation message size is no more than 4k, the content for being possible to occur message carrying in practical business scene is excessive and the problem that causes message excessive.For example, interconnecting In the business scenarios such as net food and drink, shop is provided with multinomial vegetable and selects for user, and in a catering services, user is possible to select In multinomial vegetable, it is larger so as to cause message since this message carries excessive dish information content.Based on this, it is desirable to provide A kind of safer reliable Message Processing scheme.
Summary of the invention
To overcome the problems in correlation technique, present description provides message treatment method, device and equipment.
According to this specification embodiment in a first aspect, providing a kind of message treatment method, comprising:
The origination message that need to be sent to receiving end is obtained, the origination message carries: one or more target services pair As content;
After determining the corresponding business object mark of the target service contents of object, the business object content and institute are stored Business object mark is stated, for receiving end inquiry;
Compressed message is generated using the origination message and business object mark, wherein the compressed message carries There is the business object mark, carry the target service contents of object;
The compressed message is sent to the receiving end.
Optionally, the business object mark is determined by following either type:
It is generated using random algorithm;
At least one field is chosen from multiple fields that the target service contents of object includes to determine;Or,
Configuration interface for business object mark is provided, the mark configuration parameter of input is received by the configuration interface It determines.
Optionally, the storage business object content and business object mark, comprising:
The target service contents of object and business object mark are stored using key-value key-value pair mode, In, key characterizes the business object mark, and value characterizes the target service contents of object.
Optionally, this method is applied to operation system, and the target service contents of object and business object mark are deposited In the other systems independently of the operation system, the other systems are provided with query interface and inquire institute for the receiving end for storage State business object content.
It is optionally, described to generate compressed message using the origination message and business object mark, comprising:
Business object mark is stored in the data structure of chained list List, the compressed message is obtained.
It is optionally, described that the compressed message is sent to receiving end, comprising:
The compressed message is sent to distributed middleware system, reception is sent to by the distributed middleware system End.
According to the second aspect of this specification embodiment, a kind of message treatment method is provided, comprising:
Compressed message is received, the compressed message carries business object mark, do not carry the corresponding business object The business object content of mark;Wherein, the business object content is stored in goal systems;
The acquisition request for being directed to the business object content is initiated to the goal systems, wherein the acquisition request is taken It is identified with the business object;
It receives the goal systems and identifies the business inquired using the business object carried in the acquisition request Contents of object.
According to the third aspect of this specification embodiment, a kind of message treatment method is provided, comprising:
The catering services message that need to be sent to receiving end is obtained, the catering services message carries: one or more mesh Mark vegetable content;
After determining the corresponding vegetable mark of the target vegetable content, the target vegetable content and the vegetable mark are stored Know, for receiving end inquiry;
Compressed message is generated using the catering services message and vegetable mark, wherein the compressed message carries There is the vegetable mark, carry the target vegetable content;
The compressed message is sent to the receiving end.
Optionally, the vegetable mark is determined by following either type:
It is generated using random algorithm;
At least one field is chosen from multiple fields that the target vegetable content includes to determine;Or,
The configuration interface for vegetable mark is provided, the mark configuration parameter for receiving input by the configuration interface is true It is fixed.
Optionally, the storage target vegetable content and vegetable mark, comprising:
The target vegetable content and vegetable mark are stored using key-value key-value pair mode, wherein key table The vegetable mark is levied, value characterizes the target vegetable content.
Optionally, this method is applied to operation system, and the target vegetable content and vegetable mark are stored in independence In the other systems of the operation system, the other systems are provided with query interface and inquire the business pair for the receiving end As content.
It is optionally, described to generate compressed message using the catering services message and vegetable mark, comprising:
Vegetable mark is stored in the data structure of chained list List, the compressed message is obtained.
It is optionally, described that the compressed message is sent to receiving end, comprising:
The compressed message is sent to distributed middleware system, reception is sent to by the distributed middleware system End.
According to the fourth aspect of this specification embodiment, a kind of message processing apparatus is provided, comprising:
Obtain module, be used for: the origination message of receiving end need to be sent to by obtaining, and the origination message carries: one or Multiple target service contents of object;
Memory module is used for: after determining the corresponding business object mark of the target service contents of object, storing the industry Contents of object of being engaged in and business object mark, for receiving end inquiry;
Conversion module is used for: generating compressed message using the origination message and business object mark, wherein institute Compressed message is stated to carry the business object mark, do not carry the target service contents of object;
Sending module is used for: the compressed message is sent to receiving end.
Optionally, the business object mark is determined by following either type:
It is generated using random algorithm;
At least one field is chosen from multiple fields that the target service contents of object includes to determine;Or,
Configuration interface for business object mark is provided, the mark configuration parameter of input is received by the configuration interface It determines.
Optionally, the memory module, is specifically used for:
The target service contents of object and business object mark are stored using key-value key-value pair mode, In, key characterizes the business object mark, and value characterizes the target service contents of object.
Optionally, which is applied to operation system, and the target service contents of object and business object mark are deposited The other systems independently of the operation system are stored in, the other systems are provided with query interface and inquire institute for the receiving end State business object content.
Optionally, the conversion module, is specifically used for:
Business object mark is stored in the data structure of chained list List, the compressed message is obtained.
Optionally, the sending module, is specifically used for:
The compressed message is sent to distributed middleware system, reception is sent to by the distributed middleware system End.
According to the 5th of this specification embodiment the aspect, a kind of message processing apparatus is provided, comprising:
Message reception module is used for: receiving compressed message, the compressed message carries business object mark, do not carry There is the business object content of the corresponding business object mark;Wherein, the business object content is stored in goal systems;
Enquiry module is used for: Xiang Suoshu goal systems initiates the acquisition request for being directed to the business object content, wherein The acquisition request carries the business object mark;
Content receiver module is used for: receiving the goal systems using the business pair carried in the acquisition request As identifying the business object content inquired.
According to the 6th of this specification embodiment aspect, a kind of computer equipment is provided, including memory, processor and deposit Store up the computer program that can be run on a memory and on a processor, wherein the processor is realized when executing described program Aforementioned messages processing method embodiment.
The technical solution that the embodiment of this specification provides can include the following benefits:
In this specification embodiment, for the origination message that need to be sent, this method can determine target service contents of object Business object mark, do not carry target service contents of object by being converted to the origination message but carry business object The compressed message of mark replaces origination message to be sent to receiving end, since compressed message eliminates more industry using compressed message Business contents of object, so that the compressed message of transmission can satisfy the requirement of message transmission;After receiving end receives compressed message, by In being stored with target service contents of object and business object mark, receiving end can use the mark of the business object in compressed message Inquire corresponding business object content.The present embodiment is by simplifying origination message, so that the message delivered is able to satisfy delivery It is required that be able to solve message it is longer and the problem of can not send.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not This specification can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the reality for meeting this specification Example is applied, and is used to explain the principle of this specification together with specification.
Figure 1A is a kind of this specification schematic diagram of distributed system shown according to an exemplary embodiment.
Figure 1B is a kind of flow chart for message treatment method that this specification embodiment provides.
Fig. 2 is the flow chart of this specification another message treatment method shown according to an exemplary embodiment.
Fig. 3 A is the schematic diagram of this specification origination message shown according to an exemplary embodiment and compressed message.
Fig. 3 B is the flow chart of this specification another message treatment method shown according to an exemplary embodiment.
Fig. 3 C is the flow chart of this specification another message treatment method shown according to an exemplary embodiment.
Fig. 4 is a kind of hardware structure diagram of computer equipment where this specification embodiment message processing apparatus.
Fig. 5 is a kind of this specification block diagram of message processing apparatus shown according to an exemplary embodiment.
Fig. 6 is the block diagram of this specification another message processing apparatus shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with this specification.On the contrary, they are only and such as institute The example of the consistent device and method of some aspects be described in detail in attached claims, this specification.
It is only to be not intended to be limiting this explanation merely for for the purpose of describing particular embodiments in the term that this specification uses Book.The "an" of used singular, " described " and "the" are also intended to packet in this specification and in the appended claims Most forms are included, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein is Refer to and includes that one or more associated any or all of project listed may combine.
It will be appreciated that though various information may be described using term first, second, third, etc. in this specification, but These information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not taking off In the case where this specification range, the first information can also be referred to as the second information, and similarly, the second information can also be claimed For the first information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... " or " in response to determination ".
Distributed system is the calculating communicated by one group by network, in order to complete common task co-ordination The system of machine node composition.B system is delivered to by the message of A system is asynchronous using message-oriented middleware in distributed system.Message Middleware refer to support distributed system in send and received message hardware or software infrastructure, be mainly used in system or The reliable and asynchronous communication of message between component, middleware can be understood as the component in " middle layer ", be system and system Between bridge.Distributed message middleware refers to that message-oriented middleware itself is also a distributed system.
Some distributed systems have the message size of transmission certain limitation, such as limitation message size is no more than 4k, therefore the content that is possible to occur message carrying in practical business scene is excessive and the problem that causes message excessive.As example Son, in internet catering services scene, shop is provided with multinomial vegetable and selects for user, in a catering services, user It is possible that multinomial vegetable is chosen, it is larger so as to cause message since this message carries excessive dish information content.At other In example, such as in online shopping scene, the seller is provided with multinomial commodity and buys for user, since user is likely to purchase multiple commodity, It is larger that the excessive merchandise news content of online shopping order carrying of user eventually leads to message.Therefore, these excessive message are being transmitted When face the problem of can not issuing.If from the length of message source limitation message, it is possible to the serious shadow because limiting user behavior Ring user experience.
Based on this, this specification embodiment provides a kind of message treatment method, for the origination message that need to be sent, this method Can determine business object content business object mark, by the origination message is converted to do not carry business object content, But the compressed message for carrying business object mark replaces origination message to be sent to receiving end, due to compression using compressed message Message eliminates more business object content, so that the compressed message of transmission can satisfy the requirement of message transmission;Receive termination After receiving compressed message, due to being stored with business object content and business object mark, receiving end be can use in compressed message Business object mark inquire corresponding business object content.
It as shown in Figure 1A, is the schematic diagram of this specification distributed system shown according to an exemplary embodiment, as Example shows two operation systems in Figure 1A, and the message-oriented middleware system of message dilivery is carried out between operation system. As shown in Figure 1B, it is a kind of flow chart for message treatment method that this specification embodiment provides, includes the following steps:
In a step 102, the origination message that need to be sent to receiving end is obtained, the origination message carries: one or more A target service contents of object.
At step 104, after determining the corresponding business object mark of the target service contents of object, the target is stored Business object content and business object mark, for receiving end inquiry.
In step 106, compressed message is generated using the origination message and business object mark, wherein described Compressed message carries the business object mark, does not carry the target service contents of object;
In step 108, the compressed message is sent to the receiving end.
This embodiment scheme can be applied in operation system, replace origination message to be sent to receiving end using compressed message; Wherein, the origination message of the present embodiment meaning can be all message that operation system needs to issue, and can also be that size is super Cross the message of limitation.In some instances, operation system can also all use the scheme of the present embodiment to disappear all message Breath is sent.In other examples, the operation system for needing to send message can first check whether the size of message is more than limitation, In the case where being more than limitation using the scheme of the present embodiment to the transmission message;In such cases, receiving end is likely to be received Origination message, it is also possible to receive compressed message, receiving end can determine that the received message of institute is original in several ways Message or it is compressed message, for example, what origination message may be stored from compressed message using different type of data structure, lead to The type for crossing reading message can determine;It is determined alternatively, can be by reading message content, carries one in origination message Or multiple business object contents, and what compressed message carried is one or more business object marks;Alternatively, compression can also be enabled Message carries the label having an agreement, and after receiving end receives message, is by the way that whether message carries agreement label determination No is compressed message.
In the present embodiment, cause message longer since origination message may carry more multiple business object contents, this reality It applies a scheme expectation to simplify origination message, so that the message delivered is able to satisfy delivery and requires.Optionally, can disappear original All business object contents carried in breath are all extracted without sending, and also be can according to need and are extracted partial service pair As content is without sending, as long as simplifying origination message to meet the requirements after extracting.Wherein, for the ease of with origination message All business object contents of middle carrying distinguish, these business object contents without transmission are known as mesh by the present embodiment Mark business object content, it will be understood that the target service contents of object of the present embodiment may also mean that be carried in origination message All or part of business object contents.
Wherein, current embodiment require that determining the corresponding business object mark of target service contents of object, business object mark For uniquely distinguishing target service contents of object, the realization of flexible configuration business object mark can according to need in practical application Mode.For example, origination message carries one or more business object contents, in practical application, business object content may be wrapped Include one or more fields;In the case that business object content includes a field, it can be made by oneself for the configuration of business object content The business object mark of justice.In the case where business object content includes multiple fields, it can according to need and flexibly determine business The corresponding business object mark of contents of object;For example, it is possible to contain mark in field included by business object content Character learning section can then choose the identification field and identify directly as business object;If not including identification field, one can be chosen The combination of a field or two or more fields is identified as business object, as long as making business object mark can Unique differentiated service contents of object.
In other examples, it can determine that business object identifies by receiving the mark configuration parameter of input, such as can To be provided with the configuration interface for being directed to business object mark, the input which can be provided with mark configuration parameter enters Mouthful, so that related personnel inputs mark configuration parameter, each mesh is determined by the mark configuration parameter that the configuration interface receives input Mark the business object mark of business object content, by way of example, can be directly using the mark configuration parameter of input as business Object identity is also possible to identify after carrying out mark configuration parameter relevant treatment as business object, specific relevant treatment The present embodiment is not construed as limiting this.
In other examples, business object mark can also be generated using random algorithm, to realize that business object identifies Automatic configuration, can be and generate random number, generate various ways, the present embodiment such as random string and do not limit this.
Wherein, according to business needs, the present embodiment can also limit service object identity size, prevent business object from identifying It is larger, guarantee the efficiency of transmission of compressed message ultimately generated.
Since, to the limitation of message size, the present embodiment is by generating compressed message to replace original disappear in distributed system Breath can be replaced original so that the compressed message of transmission can satisfy the message dilivery requirement of distributed system using compressed message Message is sent to receiving end.Due to not carrying business object content in compressed message, it is provided with solution in the present embodiment, So that receiving end obtains business object content.Specifically, the present embodiment passes through extra storage business object content and the business Object identity can be inquired for receiving end and obtain business object content.Wherein, the present embodiment is not limited storage location, It can be the operation system for issuing message, be also possible to the other systems of the operation system independently of the sending message, to subtract Dependence between few operation system.For example, if being configured with the data management system for synchronizing real time data in distributed scene, Such as distributed uniform context system etc., to realize that the contextual information between cross-system is synchronous, the interface of such system is realized It is relatively easy to, therefore, optionally, the business object content and institute can temporarily be stored using distributed uniform context system Business object mark is stated, the distribution uniform context system can open query interface and inquire for the receiving end.
Wherein, the mode of storage can be interim storage, storage duration can according to actual business requirement flexible configuration, It after storage duration reaches or is that data can be deleted after determining that receiving end has inquired business object content.
Wherein, for the ease of subsequent inquiry, the present embodiment can store the industry using key-value key-value pair mode Contents of object of being engaged in and business object mark, wherein key characterizes the business object mark, and value characterizes the business pair As content.The data storage occupancy of which is smaller, and is easy to inquire, and inquiry velocity is very fast.
Compressed message in the present embodiment carries the business object mark of every business object content, for the ease of reading It takes, the business object in the origination message can be identified and be stored in the data structure of chained list List, described in acquisition ArrayList in compressed message, such as Java.
Based on this, by simplifying to origination message, compressed message can satisfy the message dilivery requirement of distributed system, Compressed message can be sent to distributed middleware system, be sent to receiving end by distributed middleware system.
Next the Message Processing scheme of the present embodiment is described from reception end side.As shown in Fig. 2, being this specification embodiment A kind of flow chart of the message treatment method provided, includes the following steps:
In step 202, compressed message is received, the compressed message carries business object mark, do not carry correspondence The business object content of the business object mark;Wherein, the business object content is stored in goal systems.
In step 204, Xiang Suoshu goal systems initiates the acquisition request for being directed to the business object content, wherein institute It states acquisition request and carries the business object mark.
In step 206, the goal systems is received to identify using the business object carried in the acquisition request The business object content inquired.
In the present embodiment, after operation system receives the compressed message of distributed middleware delivery, it can be found that compression disappears Business object content is not carried in breath, due to carrying business object mark in compressed message, receiving end can use business Object identity inquires corresponding business object content.
Wherein, since the number of the business object content in origination message is more, it can according to need and send multiple acquisitions Request, each acquisition request includes the business object mark of setting number, so that goal systems sending includes business object The message of content can satisfy message dilivery requirement;Specifically, the number that the business object in acquisition request identifies can basis Flexible configuration is actually needed.
As shown in Figure 3A, the signal of this specification origination message shown according to an exemplary embodiment and compressed message Scheme, the business object content of one or more business objects is carried in origination message A, each business object has business object Mark, business object mark are used for unique differentiated service object.The every business that will be carried in origination message A in the present embodiment Contents of object labeled as object A.1, A.2 ..., A.n can be refined by the parsing to origination message from origination message The business object of each business object identifies id out.
Wherein, id indicates business object mark, can be corresponding with business object content a certain with what is carried in origination message A field is also possible to the combination of multiple fields, can also be customized as needed.
It will A.1 store with corresponding id into distributed uniform context system to A.n in the present embodiment, specifically can be used Key-value key-value pair mode stores, and as shown in Figure 3A, key characterizes the business object mark, and value characterizes the business Contents of object, data structure of the object A.1 with id1 storage can be id1: object
A.1。
The present embodiment extracts the business that can uniquely distinguish different business object by carrying out abstract refinement to business object Object identity, the business object content of each business object can be stored in distributed uniform context system, and be carried out by id Association.The content for simplifying origination message in this way, greatly promotes the utilization rate of message body, can carry more information Number.And by the operation that message body and object A are solved to lotus root, the content that can also reduce object A in system iterative process becomes Message body maximum brought by changing can carry the uncertain risk of A number of object.
Following business scenario is faced in practical application, catering services face problem on a line, in certain product iteration It has opened to the outside world one and has added buying order query interface, buying order is added to refer to that in order of once ordering, user is on the basis of having ordered dishes It is added to vegetable once more;This needs outflow plus buying order and adds vegetable involved in buying order after adding buying order query interface called It is single, more dish information may be carried in the message spread out of due to the interface, such as user orders dishes more than 30, it is possible to Cause message (general content size suggestion is no more than 4k) undeliverable because of message overlength.
Based on above-mentioned business scenario, this specification provides a kind of message treatment method embodiment, the business in the present embodiment Object may include the vegetable in catering services scene, and business object mark includes that vegetable identifies, and business object content includes dish Product content, by way of example, as shown in Figure 3B, include the following steps:
In step 302, the catering services message that need to be sent to receiving end is obtained, the catering services message carries: One or more target vegetable contents.
In step 304, after determining the corresponding vegetable mark of the target vegetable content, the target vegetable content is stored And the vegetable mark, for receiving end inquiry.
Within step 306, compressed message is generated using the catering services message and vegetable mark, wherein described Compressed message carries the vegetable mark, does not carry the target vegetable content.
In step 308, the compressed message is sent to the receiving end.
Optionally, the vegetable mark is determined by following either type:
It is generated using random algorithm;
At least one field is chosen from multiple fields that the target vegetable content includes to determine;Or,
The configuration interface for vegetable mark is provided, the mark configuration parameter for receiving input by the configuration interface is true It is fixed.
Optionally, the storage target vegetable content and vegetable mark, comprising:
The target vegetable content and vegetable mark are stored using key-value key-value pair mode, wherein key table The vegetable mark is levied, value characterizes the target vegetable content.
Optionally, this method is applied to operation system, and the target vegetable content and vegetable mark are stored in independence In the other systems of the operation system, the other systems are provided with query interface and inquire in the vegetable for the receiving end Hold.
It is optionally, described to generate compressed message using the origination message and vegetable mark, comprising:
Vegetable mark is stored in the data structure of chained list List, the compressed message is obtained.
It is optionally, described that the compressed message is sent to receiving end, comprising:
The compressed message is sent to distributed middleware system, reception is sent to by the distributed middleware system End.
In the present embodiment, in catering services scene, more vegetable content may be carried due to catering services message and Leading to message overlength, in the requirement background being previously mentioned in above-mentioned present case, adding the id in buying order model is 32 number compositions, That is 32 bytes, the message of 4k theoretically can at most store 128 id (1k=1024 byte), i.e., of equal value it is considered that passing 128 object A have been passed, 30 in relatively original present case requirement background are the case where reporting an error, to improve 4 times of ability, from And greatly promote user experience.
It as shown in Figure 3 C, is this specification Message Processing schematic diagram shown according to an exemplary embodiment, comprising:
Convert inside 1.1 system A, extracts id, and valuation object B for object A.i
1.2 system A call distributed uniform context, the information of interim storage object A
(above 1.1 and 1.2 be a circulate operation, and object A.i refers to object A.1 any of to A.n, and n is followed more greatly Ring number is more)
After 1.3 system A assemble new information body by object B, it is sent to distributed message middleware
The basic inter-process of 1.4 distributed message middlewares
2.1 distributed message middlewares give message dilivery to system B
After 2.2 system B receive request, the object B in message body is solved, and distributed uniform context is called to obtain by id Take corresponding object A body matter
2.3 system B carry out originally set inter-process
(above 2.2 and 2.3 be a circulate operation, and n more systemic circulation number may be more)
By in timing diagram it can be found that interim storage object A is removed using distributed uniform context system, relative to straight It connects open synchronous query interface to call to system B, the weak dependence of system A and system B in the operation flow can not be destroyed and closed System.
This programme core concept is through the abstract refinement to object A, and critical field id therein is constructed in extraction It is exclusively used in the object B of message transmission, other content is stored in distributed uniform context system, and is associated by id. The content of simplified message body in this way greatly promotes the utilization rate of message body, can carry more information numbers.And And the operation by the way that message body and object A to be solved to lotus root, the content change that can also reduce object A in system iterative process are brought Message body maximum can carry uncertain risk (such as the asking in the requirement background being previously mentioned in present case of A number of object Topic).
With the requirement background being previously mentioned in present case, adding the id in purchase model is 32 number compositions, i.e. 32 bytes, 4k Message body theoretically can at most store 128 id (1k=1024 byte), i.e., it is of equal value it is considered that deliver 128 it is right As A, relatively original 30 are the case where reporting an error, 4 times of ability to be improved, to greatly promote user experience.
Corresponding with the embodiment of aforementioned messages processing method, this specification additionally provides message processing apparatus and its is answered The embodiment of equipment.
The embodiment of this specification message processing apparatus can be applied on a computing device, such as server or terminal are set It is standby.Installation practice can also be realized by software realization by way of hardware or software and hardware combining.With software reality It is by the processor of file process where it by nonvolatile memory as the device on a logical meaning for existing In corresponding computer program instructions be read into memory operation formed.For hardware view, as shown in figure 4, being this theory A kind of hardware structure diagram of computer equipment where bright book embodiment message processing apparatus, in addition to processor 410 shown in Fig. 4, Server or electricity except memory 430, network interface 420 and nonvolatile memory 440, in embodiment where device 431 Sub- equipment can also include other hardware, repeat no more to this generally according to the actual functional capability of the computer equipment.
As shown in figure 5, Fig. 5 is a kind of this specification frame of message processing apparatus shown according to an exemplary embodiment Figure, described device include:
Module 51 is obtained, is used for: obtaining the origination message that need to be sent to receiving end, the origination message carries: one Or multiple target service contents of object;
Memory module 52, is used for: after determining the corresponding business object mark of the target service contents of object, described in storage Business object content and business object mark, for receiving end inquiry;
Conversion module 53, is used for: generating compressed message using the origination message and business object mark, wherein The compressed message carries the business object mark, does not carry the target service contents of object;
Sending module 54, is used for: the compressed message is sent to receiving end.
Optionally, the business object mark is determined by following either type:
It is generated using random algorithm;
At least one field is chosen from multiple fields that the target service contents of object includes to determine;Or,
Configuration interface for business object mark is provided, the mark configuration parameter of input is received by the configuration interface It determines.
Optionally, the memory module, is specifically used for:
The target service contents of object and business object mark are stored using key-value key-value pair mode, In, key characterizes the business object mark, and value characterizes the target service contents of object.
Optionally, which is applied to operation system, and the target service contents of object and business object mark are deposited The other systems independently of the operation system are stored in, the other systems are provided with query interface and inquire institute for the receiving end State business object content.
Optionally, the conversion module, is specifically used for:
Business object mark is stored in the data structure of chained list List, the compressed message is obtained.
Optionally, the sending module, is specifically used for:
The compressed message is sent to distributed middleware system, reception is sent to by the distributed middleware system End.
As shown in fig. 6, Fig. 6 is a kind of this specification frame of message processing apparatus shown according to an exemplary embodiment Figure, comprising:
Message reception module 61, is used for: receiving compressed message, the compressed message carries business object mark, do not take Business object content with the correspondence business object mark;Wherein, the business object content is stored in goal systems;
Enquiry module 62, is used for: Xiang Suoshu goal systems initiates the acquisition request for being directed to the business object content, In, the acquisition request carries the business object mark;
Content receiver module 63, is used for: receiving the goal systems using the business carried in the acquisition request The business object content that object identity inquires.
Correspondingly, the present embodiment also provides a kind of computer equipment, including memory, processor and storage are on a memory And the computer program that can be run on a processor, wherein the processor realizes aforementioned messages processing when executing described program The embodiment of method.
The function of modules and the realization process of effect are specifically detailed in above-mentioned Message Processing in above-mentioned message processing apparatus The realization process of step is corresponded in method, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The module of explanation may or may not be physically separated, and the component shown as module can be or can also be with It is not physical module, it can it is in one place, or may be distributed on multiple network modules.It can be according to actual The purpose for needing to select some or all of the modules therein to realize this specification scheme.Those of ordinary skill in the art are not In the case where making the creative labor, it can understand and implement.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can With or may be advantageous.
Those skilled in the art will readily occur to this specification after considering specification and practicing the invention applied here Other embodiments.This specification is intended to cover any variations, uses, or adaptations of this specification, these modifications, Purposes or adaptive change follow the general principle of this specification and do not apply in the art including this specification Common knowledge or conventional techniques.The description and examples are only to be considered as illustrative, the true scope of this specification and Spirit is indicated by the following claims.
It should be understood that this specification is not limited to the precise structure that has been described above and shown in the drawings, And various modifications and changes may be made without departing from the scope thereof.The range of this specification is only limited by the attached claims System.
The foregoing is merely the preferred embodiments of this specification, all in this explanation not to limit this specification Within the spirit and principle of book, any modification, equivalent substitution, improvement and etc. done should be included in the model of this specification protection Within enclosing.

Claims (10)

1. a kind of message treatment method, comprising:
The origination message that need to be sent to receiving end is obtained, the origination message carries: in one or more target service objects Hold;
After determining the corresponding business object mark of the target service contents of object, the business object content and the industry are stored Business object identity, for receiving end inquiry;
Compressed message is generated using the origination message and business object mark, wherein the compressed message carries It states business object mark, carry the target service contents of object;
The compressed message is sent to the receiving end.
2. according to the method described in claim 1, business object mark is determined by following either type:
It is generated using random algorithm;
At least one field is chosen from multiple fields that the target service contents of object includes to determine;Or,
The configuration interface for business object mark is provided, the mark configuration parameter for receiving input by the configuration interface is true It is fixed.
3. according to the method described in claim 1, the storage business object content and business object mark, packet It includes:
The target service contents of object and business object mark are stored using key-value key-value pair mode, wherein Key characterizes the business object mark, and value characterizes the target service contents of object.
4. method according to claim 1 or 2, this method is applied to operation system, the target service contents of object and The business object mark is stored in the other systems independently of the operation system, and the other systems are provided with query interface The business object content is inquired for the receiving end.
5. according to the method described in claim 1, described generate compression using the origination message and business object mark Message, comprising:
Business object mark is stored in the data structure of chained list List, the compressed message is obtained.
6. according to the method described in claim 1, described be sent to receiving end for the compressed message, comprising:
The compressed message is sent to distributed middleware system, receiving end is sent to by the distributed middleware system.
7. a kind of message treatment method, comprising:
Compressed message is received, the compressed message carries business object mark, do not carry the corresponding business object mark Business object content;Wherein, the business object content is stored in goal systems;
The acquisition request for being directed to the business object content is initiated to the goal systems, wherein the acquisition request carries The business object mark;
It receives the goal systems and identifies the business object inquired using the business object carried in the acquisition request Content.
8. a kind of message treatment method, comprising:
The catering services message that need to be sent to receiving end is obtained, the catering services message carries: one or more target dishes Product content;
After determining the corresponding vegetable mark of the target vegetable content, the target vegetable content and vegetable mark are stored, For receiving end inquiry;
Compressed message is generated using the catering services message and vegetable mark, wherein the compressed message carries It states vegetable mark, carry the target vegetable content;
The compressed message is sent to the receiving end.
9. a kind of message processing apparatus, comprising:
Module is obtained, is used for: obtaining the origination message that need to be sent to receiving end, the origination message carries: is one or more Target service contents of object;
Memory module is used for: after determining the corresponding business object mark of the target service contents of object, storing the business pair As content and business object mark, for receiving end inquiry;
Conversion module is used for: generating compressed message using the origination message and business object mark, wherein the pressure Contracting message carries the business object mark, does not carry the target service contents of object;
Sending module is used for: the compressed message is sent to receiving end.
10. a kind of message processing apparatus, comprising:
Message reception module is used for: receiving compressed message, the compressed message carries business object mark, do not carry pair Answer the business object content of the business object mark;Wherein, the business object content is stored in goal systems;
Enquiry module is used for: Xiang Suoshu goal systems initiates the acquisition request for being directed to the business object content, wherein described Acquisition request carries the business object mark;
Content receiver module is used for: receiving the goal systems using the business object mark carried in the acquisition request Know the business object content inquired.
CN201910220831.2A 2019-03-22 2019-03-22 Message treatment method, device and equipment Pending CN109818981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910220831.2A CN109818981A (en) 2019-03-22 2019-03-22 Message treatment method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910220831.2A CN109818981A (en) 2019-03-22 2019-03-22 Message treatment method, device and equipment

Publications (1)

Publication Number Publication Date
CN109818981A true CN109818981A (en) 2019-05-28

Family

ID=66609985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910220831.2A Pending CN109818981A (en) 2019-03-22 2019-03-22 Message treatment method, device and equipment

Country Status (1)

Country Link
CN (1) CN109818981A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116827682A (en) * 2023-08-23 2023-09-29 腾讯科技(深圳)有限公司 Data processing method and device and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106302145A (en) * 2016-08-23 2017-01-04 惠州市拉维尼科技有限公司 Forward request processing method
CN107171933A (en) * 2017-04-28 2017-09-15 北京小米移动软件有限公司 Virtual objects packet transmission method, method of reseptance, apparatus and system
US20180139513A1 (en) * 2009-10-29 2018-05-17 Google Technology Holdings LLC System providing sponsored content
CN109428904A (en) * 2017-08-22 2019-03-05 阿里巴巴集团控股有限公司 The publication of business object, acquisition methods, apparatus and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180139513A1 (en) * 2009-10-29 2018-05-17 Google Technology Holdings LLC System providing sponsored content
CN106302145A (en) * 2016-08-23 2017-01-04 惠州市拉维尼科技有限公司 Forward request processing method
CN107171933A (en) * 2017-04-28 2017-09-15 北京小米移动软件有限公司 Virtual objects packet transmission method, method of reseptance, apparatus and system
CN109428904A (en) * 2017-08-22 2019-03-05 阿里巴巴集团控股有限公司 The publication of business object, acquisition methods, apparatus and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116827682A (en) * 2023-08-23 2023-09-29 腾讯科技(深圳)有限公司 Data processing method and device and computer equipment
CN116827682B (en) * 2023-08-23 2023-11-24 腾讯科技(深圳)有限公司 Data processing method and device and computer equipment

Similar Documents

Publication Publication Date Title
CN109949111B (en) Electronic bill identification distribution method, electronic bill generation method, device and system
CN112003703B (en) Method and device for transmitting authenticatable message across chains
CN106464746B (en) Support the method and non-transitory computer-readable media and system of the failure transfer in event stream processing system
CN108846753B (en) Method and apparatus for processing data
CN107135188B (en) Method, device and system for realizing services of financial information exchange (FIX) protocol
CN110276060B (en) Data processing method and device
CN109213758B (en) Data access method, device, equipment and computer readable storage medium
CN109582655B (en) Method and device for positioning system log and computer readable storage medium
CN108196879A (en) Method for processing business, device, equipment and computer readable storage medium
CN109194565A (en) A kind of message read states reminding method and device
CN109710613A (en) Management method, device, server and the storage medium of field
CN114416075A (en) Service processing method and device
CN105337841A (en) Information processing method and system, client, and server
CN104468399A (en) Data transmission method and device and server
CN104956393B (en) It is communicated using user descriptors with the third party that social networking system user carries out
CN108366098B (en) Data interaction method and device for network nodes
CN104125303A (en) Data read-and-write requesting method, client end and data read-and-write requesting system
CN112615868B (en) Method and device for transmitting authenticatable message across chains
CN109818981A (en) Message treatment method, device and equipment
CN105450589A (en) Remote procedure call method and system
CN104363257B (en) A kind of user interface data method for refreshing and equipment
CN105917703A (en) Advertising storage capabilities accessible via a wireless local area network
CN108650170A (en) A kind of display methods and device of information
US20180218419A1 (en) Method and apparatus for providing digital product using user account synchronization
CN107968798A (en) A kind of network management resources label acquisition method, cache synchronization method, apparatus and system

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: 20190528

RJ01 Rejection of invention patent application after publication