CN113315689A - Information processing method, system, electronic device and readable storage medium - Google Patents

Information processing method, system, electronic device and readable storage medium Download PDF

Info

Publication number
CN113315689A
CN113315689A CN202010125427.XA CN202010125427A CN113315689A CN 113315689 A CN113315689 A CN 113315689A CN 202010125427 A CN202010125427 A CN 202010125427A CN 113315689 A CN113315689 A CN 113315689A
Authority
CN
China
Prior art keywords
information
subscription
message
behavior message
behavior
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
CN202010125427.XA
Other languages
Chinese (zh)
Other versions
CN113315689B (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.)
Midea Group Co Ltd
Original Assignee
Midea Group 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 Midea Group Co Ltd filed Critical Midea Group Co Ltd
Priority to CN202010125427.XA priority Critical patent/CN113315689B/en
Publication of CN113315689A publication Critical patent/CN113315689A/en
Application granted granted Critical
Publication of CN113315689B publication Critical patent/CN113315689B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • 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/06Message adaptation to terminal or network requirements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of information, and provides an information processing method, an information processing system, electronic equipment and a readable storage medium. The information processing method comprises the following steps: acquiring a subscription request; auditing the subscription request, and generating subscription information based on the subscription request which passes the auditing; receiving a behavior message query request, wherein the behavior message query request is used for querying the subscription condition of the behavior message; and generating and sending behavior message processing information according to the behavior message query request and the subscription information so that the message platform processes the behavior message according to the behavior message processing information. The subscription platform sends out behavior message processing information based on the subscription request and the behavior message query request, the behavior message processing information can distinguish and process behavior messages in the information technology field, decoupling between services is further achieved, the problems that instantaneous user concurrency is large and data volume is large in the information technology field are solved, the expansibility requirement in the information technology field is met, and flow peak elimination is achieved.

Description

Information processing method, system, electronic device and readable storage medium
Technical Field
The present invention relates to the field of information technology, and in particular, to an information processing method, system, electronic device, and readable storage medium.
Background
With the rapid development of the internet of things, the national development enters the era of intelligent internet of things, and the internet of things is almost ubiquitous in various physical environments such as families, enterprise offices, factory production, traffic management, aviation halls, hospital halls and the like. The equipment management cloud platform in the Internet of things industry has the characteristics of large concurrent volume and large data volume of instantaneous users for a long time due to the fact that the equipment reporting, event processing, scene control and equipment instruction issuing center is adopted, and therefore the problem that the equipment management cloud platform in the Internet of things is poor in expansibility and not easy to achieve flow peak elimination is caused.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides an information processing method.
The invention also provides an information processing system.
The invention further provides the electronic equipment.
The invention also proposes a non-transitory computer-readable storage medium.
An information processing method according to an embodiment of a first aspect of the present invention includes:
acquiring a subscription request, wherein the subscription request is used for subscribing a behavior message;
auditing the subscription request, and generating subscription information based on the subscription request which passes the auditing; the subscription information comprises subscriber information of the behavior message;
receiving a behavior message query request, wherein the behavior message query request is used for querying the subscription condition of the behavior message;
generating and sending behavior message processing information according to the behavior message query request and the subscription information, so that a message platform processes the behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message.
According to the information processing method provided by the embodiment of the invention, the subscription platform sends out the behavior message processing information based on the subscription request and the behavior message query request, and the behavior message processing information can be used for distinguishing and processing the behavior messages in the information technology field, so that decoupling between services is realized, the problems of large concurrent amount of instantaneous users and large data amount in the information technology field are solved, the expansibility requirement in the information technology field is met, and traffic peak elimination is realized.
According to an embodiment of the present invention, in the step of reviewing the subscription request and generating subscription information based on the subscription request passing the review, the subscriber information includes a subscriber address, and the type of the subscriber address includes MQ, FILE, HTTP or RPC.
According to an embodiment of the present invention, in the step of reviewing the subscription request and generating subscription information based on the subscription request that passes the review, the subscription information includes first subscription matching attribute information;
in the step of receiving the behavior message query request, the behavior message query request includes second subscription matching attribute information;
the generating and sending behavior message processing information according to the behavior message query request and the subscription information comprises:
and matching the first subscription matching attribute information with the second subscription matching attribute information, wherein if the matching is successful, the subscription condition in the behavior message processing information is subscribed, and if the matching is failed, the subscription condition in the behavior message processing information is not subscribed.
According to an embodiment of the present invention, in the step of reviewing the subscription request and generating subscription information based on the subscription request that passes the review, the subscription information further includes a message event type;
in the step of generating and sending behavior message processing information according to the behavior message query request and the subscription information, the behavior message processing information further includes the message event type, so that the message platform processes the behavior message according to the message event type.
According to an embodiment of the present invention, in the step of reviewing the subscription request and generating subscription information based on the subscription request that passes the review, the subscriber information includes a subscriber address.
An information processing method according to an embodiment of a second aspect of the present invention includes:
receiving a behavior message;
generating and sending a behavior message query request according to the behavior message; the behavior message query request is used for querying the subscription condition of the behavior message;
receiving behavior message processing information, and processing the behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message.
According to the information processing method provided by the embodiment of the invention, the message platform distinguishes and processes the behavior messages in the information technology field, so that decoupling between services is realized, the problems of large instantaneous user concurrency and large data volume in the information technology field are solved, the expansibility requirement in the information technology field is met, and traffic peak elimination is realized.
According to an embodiment of the present invention, the step of processing the behavior message according to the behavior message processing information includes:
and determining that the behavior message is not subscribed according to the behavior message processing information, and discarding the behavior message.
According to an embodiment of the present invention, the step of processing the behavior message according to the behavior message processing information includes:
and determining that the behavior message is subscribed according to the behavior message processing information, and sending the behavior message to a subscriber of the behavior message according to subscriber information contained in the behavior message processing information.
According to an embodiment of the present invention, in the step of sending the behavior message to the subscriber of the behavior message according to the subscriber information included in the behavior message processing information, the subscriber information includes a subscriber address, and the type of the subscriber address includes MQ, FILE, HTTP or RPC.
According to an embodiment of the present invention, in the step of receiving the behavior message, the behavior message is successfully generated based on the behavior.
An information processing system according to an embodiment of the third aspect of the present invention includes:
a subscription platform, configured to implement the information processing method in the foregoing first aspect embodiment;
and the message platform is used for realizing the information processing method in the second aspect embodiment.
The technical effect of the information processing system according to the embodiment of the present invention corresponds to the technical effect of the information processing method described above, and details are not described here.
The electronic device according to the fourth aspect of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the information processing method according to the first aspect of the present invention or the second aspect of the present invention when executing the computer program.
According to the electronic device of the embodiment of the present invention, the technical effect corresponds to the technical effect of the information processing method, and details are not repeated here.
A non-transitory computer-readable storage medium according to an embodiment of the fifth aspect of the present invention has a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the information processing method according to the embodiment of the first aspect or the embodiment of the second aspect.
Technical effects of the non-transitory computer-readable storage medium according to the embodiment of the present invention correspond to those of the information processing method described above, and are not described herein again.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic workflow diagram of an information processing system in the internet of things according to an embodiment of a third aspect of the present invention;
fig. 2 is a schematic flow chart of an information processing method provided in an embodiment of the first aspect of the present invention;
fig. 3 is a schematic flowchart of an information processing method according to an embodiment of the second aspect of the present invention, and fig. 4 is a schematic diagram of a subscription platform according to an embodiment of the third aspect of the present invention;
FIG. 5 is a schematic diagram of a messaging platform provided by an embodiment of the invention;
fig. 6 is a schematic physical structure diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of an embodiment of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Before the embodiments of the present invention are explained in detail, the entire application scenario will be described. The information processing method, the information processing system, the electronic device and the readable storage medium of the embodiment of the invention can be applied to the field of Internet of things and other Internet fields.
Taking the internet of things as an example, the internet of things comprises an equipment management cloud platform, intelligent equipment, a peripheral system (third-party system) and the like, wherein the equipment management cloud platform is a center for reporting of the intelligent equipment, processing of events, scene control and issuing of instructions of the intelligent equipment, and meanwhile, the equipment management cloud platform is also connected with the third-party system to provide supply of event data for the third-party system. For example, an intelligent cooker serving as an intelligent device may perform intelligent cooking based on a cooking instruction of an equipment management cloud platform, during the intelligent cooking, the equipment management cloud platform may generate behavior information related to the intelligent cooking, and the behavior information may be subscribed by a mobile terminal serving as a third-party system, so that the mobile terminal corresponding to a user knows the operating state of the intelligent cooker, and of course, a large amount of behavior messages that are not interesting to the mobile terminal may be generated by the equipment management cloud platform during the intelligent cooking. Besides the intelligent kitchen range, other large quantities of intelligent equipment such as an intelligent television, an intelligent washing machine, an intelligent refrigerator and the like can exist in the Internet of things; the third-party system may also include various types such as a mobile phone, a tablet computer, a notebook, a vehicle-mounted computer, and other intelligent household appliances, and therefore the situation of the intelligent device connected to the device management cloud platform and the third-party system is complex, and the characteristics of large instantaneous user concurrency and large data volume exist for a long time.
Referring to fig. 1, the internet of things architecture according to the embodiment of the present invention includes not only the device management cloud platform, the smart device, and the third-party system, but also a message platform and a subscription platform. When a service background of the device management cloud platform performs a service operation (corresponding to a related behavior of the smart device), various service processing events (behavior messages) may be generated, and the behavior messages may be of interest to a third-party system and need to be subscribed. Of course, the behavior message may be generated directly from the smart device, in addition to the device management cloud platform. Taking the case that the device management cloud platform generates the behavior message as an example, the device management cloud platform sends the behavior message to the message platform. For each third-party system needing to consume the message, a subscription request must be sent to the subscription platform in advance. The message platform sends a behavior message query request to the subscription platform, and the behavior message is sent from the message platform to a subscriber (the subscriber is also a third-party system interested in the current behavior message, such as a user terminal device sending the subscription request) only when the subscription platform subscribes to the corresponding behavior message, otherwise, the behavior message is discarded.
The information processing method according to the embodiment of the first aspect of the present invention is applied to a subscription platform, please refer to fig. 2, and includes:
and S1, obtaining a subscription request, wherein the subscription request is used for subscribing the behavior message.
The subscription request is generally initiated by a third-party system, and common third-party systems include a mobile phone, a tablet computer, a notebook computer, a vehicle-mounted computer, an intelligent household appliance and the like. For example, if a user wants to know the daily playing duration of a television at home, a request for acquiring the daily playing duration of the television can be input through a corresponding APP on a third-party system; for another example, if the user wants to know the increase or decrease of the intelligent household appliances in the home, the user can obtain the request of newly adding the intelligent household appliances or decreasing the intelligent household appliances through the corresponding APP input on the third-party system; for another example, if the user wants to know the current working state of the specific intelligent household electrical appliance in the home, the user can input a request for acquiring the current working state of the specific intelligent household electrical appliance through the corresponding APP on the third-party system; for another example, if the user wants to know the password modification information of the home smart device, the user may input a request for obtaining the password modification information through a corresponding APP on the third-party system. The subscription request may be directed to any behavior message generated based on the related behavior of the existing smart device, and is not limited to smart home, which cannot be exhaustive here. After the user inputs the corresponding subscription request through the third-party system, the third-party system sends the subscription request to the subscription platform.
S2, checking the subscription request, and generating subscription information based on the checked subscription request; the subscription information includes subscriber information for the behavioral message.
And the subscription platform generates subscription information once the subscription request passes through. Of course, some subscription requests may fail to pass the audit, for example, when the subscription request relates to the privacy of other users, the subscription request may be rejected; for another example, when the subscription request relates to some behavior messages that have expired, the subscription request may not pass through.
In one embodiment, the subscription information in step S2 includes first subscription matching attribute information. For example, the first subscription matching attribute information may include one or more of a user ID (user ID, abbreviated as uid), a device ID (application ID), an item ID (kinid), and an application ID (application ID). Of course, the first subscription matching attribute information may also be subscriber information, and is not specifically limited by the examples herein.
In one embodiment, the subscriber information is a subscriber address. Of course, the subscriber information may also be other subscriber identifications, as long as the subscriber identifications can be used to identify the subscribers so as to ensure that the behavior messages can be sent to the corresponding subscribers. The type of the subscriber address may be MQ (Message Queue, an abbreviation of Message Queue), FILE, DM (data mart), HTTP (HyperText Transfer Protocol), RPC (Remote Procedure Call, an abbreviation of Remote Procedure Call), or the like. When the address type is MQ, then the name of Topic (title) may be stored under the corresponding address type; when the address type is FILE, the FILE path can be stored under the corresponding address type; when the address type is DM, a URL (Uniform Resource Locator, which is a Uniform Resource Locator of WWW and is referred to as a network address) may be stored under the corresponding address type. The way in which a particular destination is stored under different address types is different, not to mention one example here.
In one embodiment, the subscription information includes a message event type, that is, the subscription platform may support multi-granular message subscription, and then the third-party system may subscribe to one or some interested behavior messages through the subscription platform. If the subscription information generated based on the subscription request does not include a message event type then the default is to subscribe to all messages of a particular device.
In one embodiment, the subscription information supports wildcards, such as/user/application/, representing all behavioral messages of the subscribing device. The message event type may be user password modification, unbinding of the user and the device, binding of the user and the device, and the like, see the following table:
message event type Description of the invention
/user/password/modify User password modification
/user/appliance/unbind Unbinding of users and devices
/user/appliance/homebind Binding of a user and a device
…… ……
Table 1
S3, receiving an action message inquiry request, wherein the action message inquiry request is used for inquiring the subscription condition of the action message.
Wherein the action message query request is generally initiated by the message platform in the embodiment of the second aspect. When the intelligent home equipment performs a certain action, the intelligent home equipment or the equipment management cloud platform generates a corresponding action message and sends the action message to the message platform, and the message platform sends an action message query request to the subscription platform based on the action message. The action message inquiry request is used for inquiring whether the currently generated action message is subscribed by the third-party system.
For example, if a smart tv of a certain user's home has records of turning on and off, a behavior message for counting the playing time of the tv is generated correspondingly. The behavioral message may originate from the cloud or from the user's smart tv. After the behavior message is generated, the behavior message is sent to the message platform, and the message platform sends a behavior message query request to the subscription platform based on the behavior message. And the subscription platform queries the subscription condition of the behavior message based on the behavior message query request.
In one embodiment, the behavioral message query request includes second subscription matching attribute information.
For example, the second subscription matching attribute information may include one or more of a user ID (user ID, abbreviated as uid), a device ID (application ID), a class ID (done ID), and an application ID (application ID). Of course, the second subscription matching attribute information may also be subscriber information.
S4, generating and sending behavior message processing information according to the behavior message query request and the subscription information, so that the message platform processes the behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message.
After acquiring the behavior message query request, the subscription platform queries subscription information based on the behavior message query request to judge whether a certain behavior message is subscribed or not, and provides different behavior message processing information based on different judgment results.
For example, when it is determined that the current behavior message has been subscribed based on a certain behavior message query request, the subscription platform sends behavior message processing information to the message platform, where the subscription condition in the behavior message processing information is subscribed. The message platform sends the behavior message to the subscriber based on the behavior message processing information. When it is determined that the current behavior message is not subscribed based on a certain behavior message query request, the subscription platform also needs to send behavior message processing information to the message platform, where the subscription condition in the behavior message processing information is not subscribed. The message platform discards the behavior message based on the behavior message processing information so as to release the storage space of the message platform and reduce the data volume of the message platform.
Wherein the message platform decides where to send the subscribed behavior messages based on the type of subscriber address of the subscriber information. The type of the subscriber address can comprise MQ, FILE, HTTP or RPC and the like, and correspondingly, the message platform provides multiple services of MQ, FILE, HTTP, RPC and the like for a third-party system to subscribe the behavior message. Therefore, the subscription which can be effectively received by the subscription platform is not limited by the communication protocol of the third-party system.
And when the subscription information comprises first subscription matching attribute information and the behavior message query request comprises second subscription matching attribute information, matching the first subscription matching attribute information with the second subscription matching attribute information, wherein if the matching is successful, the subscription condition in the behavior message processing information is subscribed, and if the matching is failed, the subscription condition in the behavior message processing information is not subscribed. Here, the first subscription matching attribute information and the second subscription matching attribute information may be referred to as examples in step S2 and step S3, respectively, and are not described in detail here.
And if any one of the first subscription matching attribute information in the subscription information is successfully matched with the second subscription matching attribute information in the behavior message query request, the obtained matching result is successful. And only when any first subscription matching attribute information in the subscription information cannot be successfully matched with the second subscription matching attribute information in the behavior message query request, the matching failure is indicated. Moreover, the type and the number of the first subscription matching attribute information in the subscription information are not limited by examples, and the type and the number of the second subscription matching attribute information in the action message query request are not limited by examples.
In an embodiment, the step of matching the first subscription matching attribute information and the second subscription matching attribute information matches the attributes and the corresponding attribute values stored in the Map format in the first subscription matching attribute information and the attributes and the corresponding attribute values stored in the Map format in the second subscription matching attribute information, and matches the attribute values of the first subscription matching attribute information and the attribute values of the second subscription matching attribute information under the condition that the attributes of the first subscription matching attribute information and the attributes of the second subscription matching attribute information are the same.
The attribute storing the first subscription matching attribute information and the corresponding attribute value may be stored in a Map (a data structure for implementing mapping between a key and a value, where the key is also a key, and the value is also a value), and the attribute storing the second subscription matching attribute information and the corresponding attribute value may also be stored in the Map, and the attribute value of the first subscription matching attribute information and the attribute value of the second subscription matching attribute information are matched under the same attribute of the first subscription matching attribute information and the same attribute of the second subscription matching attribute information.
The implementation types of the data structure Map include HashMap (hash mapping), linkedhhashmap (linked list and hash table implementation), TreeMap (number Map), and the like, which are not listed here.
In one embodiment, the data structure Map adopts HashMap, and the key (key) and the value (value) of HashMap respectively store the attribute and the corresponding attribute value of the first subscription matching attribute information, see the following table:
Figure BDA0002394255320000111
Figure BDA0002394255320000121
table 2
In one embodiment, the data structure Map adopts HashMap, and the key (key) and the value (value) of HashMap respectively store the attribute and the corresponding attribute value of the second subscription matching attribute information, see the following table:
Figure BDA0002394255320000122
Figure BDA0002394255320000131
table 3
The attribute names in table 2 and table 3 above depend on the type of the subscription request and the type of the behavior message, respectively, and cannot be exhaustive here.
For example, the subscription information generated by the subscription platform based on the subscription request includes a device ID, and the message platform generates a behavior message query request based on a behavior message sent by a certain intelligent home appliance device, and the behavior message query request carries the device ID, which indicates that the behavior message of the current intelligent home appliance device is subscribed by the third-party system. For another example, the subscription information generated by the subscription platform based on the subscription request includes an application ID, and the message platform generates a behavior message query request based on the behavior message sent by the application program APP, and the behavior message query request carries the application ID, which indicates that the current behavior message of the application program APP is subscribed by the third-party system.
In one embodiment, the behavioral message processing information further includes a message event type, such that the message platform processes the behavioral message according to the message event type.
According to the information processing method of the embodiment of the first aspect of the invention, the subscription platform sends out the behavior message processing information based on the subscription request and the behavior message query request, and the behavior message processing information can distinguish and process the behavior messages in the Internet of things, so that decoupling between services is realized, the problems of large concurrent amount of instant users and large data amount in the Internet of things industry are solved, the expansibility requirement of the Internet of things is met, and traffic peak elimination is realized.
Similarly, when the information processing method of the embodiment of the invention is applied to other internets in the field of information technology, the problems of large concurrent volume and large data volume of instantaneous users can be solved, and then the expansibility is improved, and the traffic peak elimination is realized. The information processing method, the information processing system, the electronic device and the readable storage medium according to the embodiments of the present invention are all explained in the following by taking the internet of things as an example, and it should be understood that the information processing method, the information processing system, the electronic device and the readable storage medium according to the embodiments of the present invention are all applicable to other networks in the field of information technology.
In one embodiment, the data structure of the subscription information is as follows:
Figure BDA0002394255320000141
table 4
According to a second aspect of the present invention, an information processing method is provided, which is applied to a message platform, please refer to fig. 3, and includes:
and S01, receiving the behavior message.
In step S01, when the smart home device performs a certain action, the smart home device or the device management cloud platform generates a corresponding action message and sends the action message to the message platform. For example, if the smart television has records of being turned on and off, a behavior message for counting the playing time of the television is generated correspondingly. The behavioral message may originate from the cloud or from the user's smart tv. After the action message is generated, the action message is sent to a messaging platform. Of course, the type of the action message is not limited by the examples herein.
In one embodiment, the behavior message is successfully generated based on the behavior, and thus the data volume in the internet of things can be further reduced. For example, if the smart television of the user's home receives the start instruction but is not normally started, the smart television does not generate an over-start behavior, and even does not generate an over-close behavior, and then the device management cloud platform or the smart television does not generate a behavior message for counting the playing time of the smart television based on the behavior of the failed start.
Of course, even if the behavior is unsuccessful, a corresponding behavior message may be generated, and further, the third-party system may subscribe to the behavior message generated when the behavior is unsuccessful, so as to obtain a prompt, time or reason of the unsuccessful behavior. For example, if the smart tv cannot be normally turned on, the user may also perform a behavior message indicating that such related behaviors fail through the third-party system.
In one embodiment, the device management cloud platform sends the behavior message based on the behavior of the relevant smart device. The messaging platform consumes iot-rpc (internet of things remote procedure call) produced messages through KAFKA (a high throughput distributed publish-subscribe messaging system that can handle all the action flow data of consumers in a website).
In one embodiment, the behavioral message includes a message event type. The message event type may be user password modification, unbinding of the user and the device, binding of the user and the device, and the like, see the following table:
Figure BDA0002394255320000151
Figure BDA0002394255320000161
table 5
Further, for subscriptions to behavioral messages, one or more of the types of interest to the subscriptions may be selected. In the case where the type of the behavior message is not divided, that is, the type of the message event is not given, all messages of the subscribing user may be defaulted.
In one embodiment, the behavior message is divided into a fixed message field and a variable message field, and the behavior message cannot be bound with the service.
In one embodiment, the basic structural templates of the behavioral messages are as follows:
{
"msgId" "message flow-req _ id of multiplex request",
"timestamp": time of generation ",
"serviceName": the "service name of the generated event",
"msgType": message type ",
"creator": operator ",
"result" event processing result ",
“match”:{
"attribute 1": attribute value ",
"attribute 2": attribute value ",
},
“extend”:{
parameters { "parameter 1": value "," parameter 2 ": value", …. },
"response": content of response "
}
}
For example, three types of behavior messages of a modified password, a bound device and a unbound device are predefined according to requirements and are expressed in a json format.
Modifying the cryptographic message:
{
"msgId": multiplexing regId ",
“timestamp”:123456789,
“serviceName”:“iot-rpc”,
“msgType”:“/user/password/modify”,
“creator”:“xxxxx”,
"result": user password modification was successful,
“match”:{
"user": 1234 "// 1234 is user's uid
},
“extend”:{
“parameters”:{“user”:“1234”},
“response”:“OK”
}
}
Binding the device message: {
"msgId": multiplexing regId ",
“timestamp”:123456789,
“serviceName”:“iot-rpc”,
“msgType”:“/user/appliance/homebind”,
"creator": 7896 "// 7896 is user's uid
"result": device binding success ",
“match”:{
“appliance”:“A0”
},
“extend”:{
“parameters”:{
“applianceCode”:“A0”,
“homegroupId”:“654321”,
“roomId”:“1234”,
"HomeMaster": 1234 "// 1234 is user's uid
},
“response”:“OK”
}
Unbinding the device message: {
"msgId": multiplexing regId ",
“timestamp”:123456789,
“serviceName”:“iot-rpc”,
“msgType”:“/user/appliance/unbind”,
"creator": 7896 "// 7896 is user's uid
"result" successful device unbinding ",
“match”:{
“appliance”:“A0”
},
“extend”:{
“parameters”:{
“applianceCode”:“A0”,
“homegroupId”:“654321”,
“roomId”:“1234”,
“passive”:false,
"HomeMaster": 1234 "// 1234 is user's uid
},
“response”:“OK”
}
}
For the internet of things, all smart devices generate messages at the time of the lifecycle. For example, events that involve master-slave, association-dependent effects, such as: when the family group changes, the information of the subordinate devices of the family group also changes, so that the current event itself needs to produce messages, and the associated events also need to generate event messages, which belong to behavior messages. For another example, a plurality of different service data may be modified for one call of one interface, such as: adding scenes, increasing user association, equipment association, modifying timing tasks and the like, wherein the solution principle is as follows: and generating service event messages corresponding to the services when the services are completed, wherein the service event messages also belong to the behavior messages. If all behavioral messages are stored on the messaging platform, the amount of data for the messaging platform will be very large. Thus, after acquiring the action message, the message platform further processes the action message, i.e., the subsequent steps S02 and S03.
S02, generating and sending a behavior message query request according to the behavior message; the behavior message query request is used for querying the subscription condition of the behavior message.
In step S02, the message platform generates a behavior message query request based on the behavior message, and sends the behavior message query request to the subscription platform. And the subscription platform generates and sends the behavior message processing information to the message platform according to the behavior message query request and the subscription information.
In one embodiment, the behavioral message query request includes second subscription matching attribute information. For example, the second subscription matching attribute information may include one or more of a user ID (user ID, abbreviated as uid), a device ID (application ID), a class ID (kinid), and an application ID (application ID). Of course, the second subscription matching attribute information may also be subscriber information.
Furthermore, when the subscription information in the subscription platform includes the first subscription matching attribute information, the subscription platform matches the first subscription matching attribute information with the second subscription matching attribute information, and determines the subscription condition in the behavior message processing information based on the matching result. And if the matching is successful, the subscription condition in the behavior message processing information is subscribed, and if the matching is failed, the subscription condition in the behavior message processing information is not subscribed.
S03, receiving the behavior message processing information, and processing the behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message.
In step S03, the message platform receives the behavior message processing information, and performs differentiated processing on the behavior message according to the behavior message processing information.
In one embodiment, the behavior message is discarded based on the behavior message processing information determining that the behavior message is not subscribed. For example, if the behavior message received by the message platform from the device management cloud platform indicates that the smart television is deleted from the home device, based on the behavior message for deleting the smart television, after the message platform sends a corresponding behavior message query request to the subscription platform, the message platform receives behavior message processing information from the subscription platform. The subscription condition in the behavior message processing information is not subscribed, the message platform discards the behavior message based on the subscription condition, the storage space of the message platform is released, and waste of storage resources is avoided.
In one embodiment, the behavior message is determined to be subscribed according to the behavior message processing information, and the behavior message is sent to the subscriber of the behavior message according to subscriber information contained in the behavior message processing information. Taking the event that the smart television is deleted from the home device as an example, if the subscription condition in the behavior message processing information is subscribed, the current behavior message is sent to the corresponding subscriber by the message platform and is retained in the message platform.
In one embodiment, the behavioral message processing information includes a message event type. After the message platform acquires the message event type needing to be subscribed, loading a behavior message of a corresponding type in the message platform based on the message event type, determining a target address based on the target type and the target, and then sending the behavior message to a subscriber corresponding to the target address.
The message platform can provide multiple services such as MQ, FILE, HTTP and RPC and the like for the third-party system to subscribe the behavior message, so that the message platform can meet the subscription requirements of the third-party systems with different communication protocols, the compatibility of the whole information processing system is improved, and the situation that the subscribed behavior message cannot be received due to the limitation of the address type after the third-party system sends out the subscription request is avoided.
According to the information processing method of the embodiment of the second aspect of the invention, the message platform distinguishes and processes the behavior messages in the Internet of things, so that decoupling between services is realized, the problems of large instantaneous user concurrency and large data volume in the Internet of things industry are solved, the expansibility requirement of the Internet of things is met, and traffic peak elimination is realized.
It should be noted that the above S1 to S4 and S01 to S03 are merely for convenience of description, and do not constitute a limitation on the timing of each step in the information processing method. Moreover, some contents are described in detail in the information processing method of the subscription platform side provided in the first aspect, and the contents in all the information processing methods of the subscription platform side can also be applied to the information processing method of the message platform side provided in the second aspect, so that detailed descriptions are not given in the information processing method of the message platform side provided in the second aspect in order to avoid redundancy. Similarly, the content in the information processing method of the above two embodiments can be used to explain the content of all embodiments in the following, and therefore repeated content in the following embodiments is not described repeatedly.
An information processing system according to an embodiment of the third aspect of the present invention includes:
a subscription platform, configured to implement the information processing method according to the embodiment of the first aspect;
and the message platform is used for realizing the information processing method of the second aspect embodiment.
The information processing system comprises a subscription platform and a message platform, so that service can be decoupled. Wherein, the subscription platform receives a subscription request. And the message platform receives the behavior message, generates a behavior message query request based on the behavior message and sends the behavior message query request to the subscription platform. The subscription platform queries whether the behavior message is subscribed or not based on the behavior message query request, and feeds back the behavior message processing information to the message platform, so that the message platform can perform differential processing on the behavior message in the Internet of things.
In one embodiment, referring to fig. 4, the subscription platform includes:
an obtaining module 401, configured to obtain a subscription request, where the subscription request is used to subscribe to a behavior message;
a subscription information generating module 402, configured to audit the subscription request, and generate subscription information based on the subscription request that passes the audit; the subscription information comprises subscriber information of the behavior message;
a first receiving module 403, configured to receive a behavior message query request, where the behavior message query request is used to query a subscription condition of a behavior message;
a behavior message processing information generating module 404, configured to generate and send behavior message processing information according to the behavior message query request and the subscription information, so that a message platform processes a behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message.
In one embodiment, the behavior message processing information generating module 404 includes a matching module, configured to match the first subscription matching attribute information included in the subscription information with the second subscription matching attribute information included in the behavior message query request. And if the matching is successful, the subscription condition in the behavior message processing information is subscribed, and if the matching is failed, the subscription condition in the behavior message processing information is not subscribed.
In one embodiment, the matching module matches the attribute and the corresponding attribute value stored in the Map format in the first subscription matching attribute information with the attribute and the corresponding attribute value stored in the Map format in the second subscription matching attribute information, and matches the attribute value of the first subscription matching attribute information with the attribute value of the second subscription matching attribute information under the condition that the attribute of the first subscription matching attribute information and the attribute of the second subscription matching attribute information are the same.
In one embodiment, the subscription information generated by the subscription information generation module 402 includes a message event type;
the behavioral message processing information generated and transmitted by the behavioral message processing information generation module 404 further includes a message event type.
In one embodiment, the subscription information generated by the subscription information generation module 402 includes a subscriber address. Further, after the subscription platform sends the subscriber address to the messaging platform, the messaging platform may send behavior information to the subscriber based on the subscriber address.
In one embodiment, referring to fig. 5, the message platform includes:
a second receiving module 501, configured to receive a behavior message;
a behavior message query request generating module 502, configured to generate and send a behavior message query request according to the behavior message; the behavior message query request is used for querying the subscription condition of the behavior message;
a behavior message processing module 503, configured to receive behavior message processing information, and process the behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message.
In one embodiment, the behavior message processing module 503 determines that the behavior message is not subscribed according to the behavior message processing information, and discards the behavior message.
In one embodiment, the behavior message processing module 503 determines that the behavior message is subscribed according to the behavior message processing information, and sends the behavior message to the subscriber of the behavior message according to the subscriber information included in the behavior message processing information.
In one embodiment, the behavior message is successfully generated based on the behavior and sent to the second receiving module 501, so that the data size of the message platform can be prevented from being too large.
According to the electronic device of the fourth aspect of the present invention, referring to fig. 6, the electronic device may include: a processor (processor)1110, a communication Interface (Communications Interface)1120, a memory (memory)1130, and a communication bus 1140, wherein the processor 1110, the communication Interface 1120, and the memory 1130 communicate with each other via the communication bus 1140. Processor 1110 may call logic instructions in memory 1130 to perform the following method: acquiring a subscription request, wherein the subscription request is used for subscribing a behavior message; auditing the subscription request, and generating subscription information based on the subscription request which passes the auditing; the subscription information comprises subscriber information of the behavior message; receiving a behavior message query request, wherein the behavior message query request is used for querying the subscription condition of the behavior message; generating and sending behavior message processing information according to the behavior message query request and the subscription information, so that a message platform processes the behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message. Or performing the following method: receiving a behavior message; generating and sending a behavior message query request according to the behavior message; the behavior message query request is used for querying the subscription condition of the behavior message; receiving behavior message processing information, and processing the behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message.
In addition, the logic instructions in the memory may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Further, the present invention discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the methods provided by the above-mentioned method embodiments.
In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the following method when executed by a processor: acquiring a subscription request, wherein the subscription request is used for subscribing a behavior message; auditing the subscription request, and generating subscription information based on the subscription request which passes the auditing; the subscription information comprises subscriber information of the behavior message; receiving a behavior message query request, wherein the behavior message query request is used for querying the subscription condition of the behavior message; generating and sending behavior message processing information according to the behavior message query request and the subscription information, so that a message platform processes the behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message. Or performing the following method: receiving a behavior message; generating and sending a behavior message query request according to the behavior message; the behavior message query request is used for querying the subscription condition of the behavior message; receiving behavior message processing information, and processing the behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message.
The above-described embodiments of the apparatus are merely illustrative, and the units illustrated as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, may be located in one place, 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. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. An information processing method characterized by comprising:
acquiring a subscription request, wherein the subscription request is used for subscribing a behavior message;
auditing the subscription request, and generating subscription information based on the subscription request which passes the auditing; the subscription information comprises subscriber information of the behavior message;
receiving a behavior message query request, wherein the behavior message query request is used for querying the subscription condition of the behavior message;
generating and sending behavior message processing information according to the behavior message query request and the subscription information, so that a message platform processes the behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message.
2. The information processing method according to claim 1, wherein in the step of reviewing the subscription request and generating subscription information based on the subscription request passing the review, the subscriber information includes a subscriber address, and the type of the subscriber address includes MQ, FILE, HTTP or RPC.
3. The information processing method according to claim 1, wherein in the step of reviewing the subscription request and generating subscription information based on the subscription request that passes the review, the subscription information includes first subscription matching attribute information;
in the step of receiving the behavior message query request, the behavior message query request includes second subscription matching attribute information;
correspondingly, the generating and sending behavior message processing information according to the behavior message query request and the subscription information includes:
and matching the first subscription matching attribute information with the second subscription matching attribute information, wherein if the matching is successful, the subscription condition in the behavior message processing information is subscribed, and if the matching is failed, the subscription condition in the behavior message processing information is not subscribed.
4. The information processing method according to claim 1, wherein in the step of reviewing the subscription request and generating subscription information based on the subscription request that passes the review, the subscription information further includes a message event type;
in the step of generating and sending behavior message processing information according to the behavior message query request and the subscription information, the behavior message processing information further includes the message event type, so that the message platform processes the behavior message according to the message event type.
5. An information processing method characterized by comprising:
receiving a behavior message;
generating and sending a behavior message query request according to the behavior message; the behavior message query request is used for querying the subscription condition of the behavior message;
receiving behavior message processing information, and processing the behavior message according to the behavior message processing information; the behavior message processing information comprises the subscription condition of the behavior message and the subscriber information of the subscribed behavior message.
6. The information processing method according to claim 5, wherein the step of processing the behavior message according to the behavior message processing information includes:
and determining that the behavior message is not subscribed according to the behavior message processing information, and discarding the behavior message.
7. The information processing method according to claim 5, wherein the step of processing the behavior message according to the behavior message processing information includes:
and determining that the behavior message is subscribed according to the behavior message processing information, and sending the behavior message to a subscriber of the behavior message according to subscriber information contained in the behavior message processing information.
8. The information processing method according to claim 7, wherein in the step of sending the behavior message to the subscriber of the behavior message according to the subscriber information included in the behavior message processing information, the subscriber information includes a subscriber address, and the type of the subscriber address includes MQ, FILE, HTTP or RPC.
9. The information processing method according to any one of claims 5 to 8, wherein in the step of receiving the behavior message, the behavior message is successfully generated based on the behavior.
10. An information processing system, comprising:
a subscription platform for implementing the information processing method of any one of claims 1 to 4;
a message platform for implementing the information processing method of any one of claims 5 to 9.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the information processing method according to any one of claims 1 to 4 or the steps of the information processing method according to any one of claims 5 to 9 when executing the computer program.
12. A non-transitory computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the steps of the information processing method according to any one of claims 1 to 4, or implementing the steps of the information processing method according to any one of claims 5 to 9.
CN202010125427.XA 2020-02-27 2020-02-27 Information processing method, system, electronic device and readable storage medium Active CN113315689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010125427.XA CN113315689B (en) 2020-02-27 2020-02-27 Information processing method, system, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010125427.XA CN113315689B (en) 2020-02-27 2020-02-27 Information processing method, system, electronic device and readable storage medium

Publications (2)

Publication Number Publication Date
CN113315689A true CN113315689A (en) 2021-08-27
CN113315689B CN113315689B (en) 2022-10-21

Family

ID=77370297

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010125427.XA Active CN113315689B (en) 2020-02-27 2020-02-27 Information processing method, system, electronic device and readable storage medium

Country Status (1)

Country Link
CN (1) CN113315689B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113822769A (en) * 2021-08-31 2021-12-21 东风商用车有限公司 Mining area service information interaction method, device, equipment and readable storage medium
CN116319650A (en) * 2023-05-22 2023-06-23 三一海洋重工有限公司 Port equipment data distribution method, device and system and container crane

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070083569A1 (en) * 2005-10-07 2007-04-12 Lik Wong Commit-time ordered message queue supporting arbitrary read and dequeue patterns from multiple subscribers
CN102710593A (en) * 2012-03-19 2012-10-03 北京邮电大学 Method, device and system for publishing message in graph mashup
CN105591877A (en) * 2014-10-23 2016-05-18 阿里巴巴集团控股有限公司 Method, device and system for service message transmission
CN107592351A (en) * 2017-09-06 2018-01-16 北京锐安科技有限公司 A kind of multi-user's distribution subscription method and system based on Redis
CN109996216A (en) * 2018-01-02 2019-07-09 中国移动通信有限公司研究院 Subscribe to request processing method, network entity and ability open platform
CN110417795A (en) * 2019-08-05 2019-11-05 中国工商银行股份有限公司 Receiving information method for subscribing, device and cash collecting system
CN110731074A (en) * 2018-12-13 2020-01-24 Oppo广东移动通信有限公司 Subscription message processing method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070083569A1 (en) * 2005-10-07 2007-04-12 Lik Wong Commit-time ordered message queue supporting arbitrary read and dequeue patterns from multiple subscribers
CN102710593A (en) * 2012-03-19 2012-10-03 北京邮电大学 Method, device and system for publishing message in graph mashup
CN105591877A (en) * 2014-10-23 2016-05-18 阿里巴巴集团控股有限公司 Method, device and system for service message transmission
CN107592351A (en) * 2017-09-06 2018-01-16 北京锐安科技有限公司 A kind of multi-user's distribution subscription method and system based on Redis
CN109996216A (en) * 2018-01-02 2019-07-09 中国移动通信有限公司研究院 Subscribe to request processing method, network entity and ability open platform
CN110731074A (en) * 2018-12-13 2020-01-24 Oppo广东移动通信有限公司 Subscription message processing method and device, computer equipment and storage medium
CN110417795A (en) * 2019-08-05 2019-11-05 中国工商银行股份有限公司 Receiving information method for subscribing, device and cash collecting system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113822769A (en) * 2021-08-31 2021-12-21 东风商用车有限公司 Mining area service information interaction method, device, equipment and readable storage medium
CN116319650A (en) * 2023-05-22 2023-06-23 三一海洋重工有限公司 Port equipment data distribution method, device and system and container crane
CN116319650B (en) * 2023-05-22 2024-01-30 三一海洋重工有限公司 Port equipment data distribution method, device and system and container crane

Also Published As

Publication number Publication date
CN113315689B (en) 2022-10-21

Similar Documents

Publication Publication Date Title
EP3493485B1 (en) Method, apparatus and system for notification
CN102710593B (en) Method, device and system for publishing message in graph mashup
CN107147945B (en) Multimedia resource playing system, method and device
CN113315689B (en) Information processing method, system, electronic device and readable storage medium
CN113364853B (en) Business service system, business request method and gateway equipment
CN112751748B (en) Session message management method, device, server and readable storage medium
CN108366356B (en) Method and device for intercommunication between M2M system and identification analysis system
US10873640B2 (en) Information exchange method and server
CN110753129A (en) Message transmission method, system, device, equipment and computer readable storage medium
CN111988387B (en) Interface request processing method, device, equipment and storage medium
EP2686981B1 (en) Method and system for managing contact information in a universal plug and play home network environment
CN112866421A (en) Intelligent contract operation method and device based on distributed cache and NSQ
CN110311855B (en) User message processing method and device, electronic equipment and storage medium
CN112261111A (en) Method and system for realizing cross-domain access of browser in application program
CN106411713B (en) State notification method and server
CN108132836B (en) Task distribution method and device and electronic equipment
WO2014015525A1 (en) Method and device for querying for user online state
US20140297763A1 (en) Method of Managing Networked Devices
CN113076380B (en) Data synchronization method, device, system, equipment and storage medium
CN110995890B (en) Domain name request scheduling method and device
CN104346228A (en) Application program sharing method and terminal
CN115883639A (en) Web real-time message pushing method and device, equipment and storage medium
RU2465637C2 (en) System and method for improving operation of media server
CN110855785B (en) Data processing method and device
CN115297066B (en) Resource dynamic cooperation method, device, server and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant