CN114338806B - Synchronous message processing method and system - Google Patents

Synchronous message processing method and system Download PDF

Info

Publication number
CN114338806B
CN114338806B CN202210183921.0A CN202210183921A CN114338806B CN 114338806 B CN114338806 B CN 114338806B CN 202210183921 A CN202210183921 A CN 202210183921A CN 114338806 B CN114338806 B CN 114338806B
Authority
CN
China
Prior art keywords
information
message
synchronous
asynchronous
synchronous message
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.)
Active
Application number
CN202210183921.0A
Other languages
Chinese (zh)
Other versions
CN114338806A (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.)
Hunan Yunchang Network Technology Co ltd
Original Assignee
Hunan Yunchang Network 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 Hunan Yunchang Network Technology Co ltd filed Critical Hunan Yunchang Network Technology Co ltd
Priority to CN202210183921.0A priority Critical patent/CN114338806B/en
Publication of CN114338806A publication Critical patent/CN114338806A/en
Application granted granted Critical
Publication of CN114338806B publication Critical patent/CN114338806B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to the technical field of information processing, and particularly discloses a synchronous message processing method and a synchronous message processing system, wherein the method comprises the steps of receiving instruction information input by a user, identifying the instruction information, and marking the instruction information according to an identification result; when the instruction information is asynchronous information, risk detection is carried out on the asynchronous information, and after the asynchronous information passes the risk detection, the asynchronous information is sent to an equipment end, and a feedback signal of the equipment end is monitored in real time; and when the instruction information is synchronous information, generating routing information according to the synchronous information, and locking and storing the synchronous information. The invention reduces the complexity of system architecture, reduces the consumption of network resources and reduces the difficulty of realizing two-way communication between equipment and a platform; the asynchronous message is converted into the synchronous message, and the requirement scene of synchronous communication is met.

Description

Synchronous message processing method and system
Technical Field
The invention relates to the technical field of information processing, in particular to a synchronous message processing method and a synchronous message processing system.
Background
With the increase of access types of hardware devices, the demand for synchronous processing of message interaction between a platform and the hardware devices is becoming stronger and stronger in order to deal with different device application scenarios. The message processing is performed in a conventional processing mode, namely an asynchronous message processing mode or an http request mode, and the mode cannot meet the requirement scene of synchronous messages or cause relatively large network resource consumption.
Disclosure of Invention
The present invention is directed to a method and a system for processing a synchronization message, so as to solve the problems in the background art.
In order to achieve the purpose, the invention provides the following technical scheme:
a method of synchronization message processing, the method comprising:
receiving instruction information input by a user, identifying the instruction information, and marking the instruction information according to an identification result; wherein the tag categories include synchronous messages and asynchronous messages;
when the instruction information is asynchronous information, risk detection is carried out on the asynchronous information, and after the asynchronous information passes the risk detection, the asynchronous information is sent to an equipment end, and a feedback signal of the equipment end is monitored in real time;
when the instruction information is synchronous information, generating routing information according to the synchronous information, and locking and storing the synchronous information;
and sending the routing information to the equipment end, monitoring a feedback signal of the equipment end in real time, unlocking the locked and stored synchronous message according to the feedback signal, and executing subsequent operation.
As a further scheme of the invention: when the instruction information is an asynchronous message, the step of performing risk detection on the asynchronous message comprises:
when the instruction information is asynchronous information, intercepting the asynchronous information according to a preset detection frequency to obtain an information fragment;
determining reference instructions corresponding to different information segments and segment numbers thereof based on a preset instruction library;
normalizing the number of the fragments, determining probability values of different reference instructions, and comparing the reference instructions with the asynchronous messages when the probability values reach a preset probability threshold;
and judging whether the asynchronous message passes risk detection or not according to the comparison result.
As a further scheme of the invention: when the instruction information is an asynchronous message, the step of performing risk detection on the asynchronous message further includes:
reading information segments, and arranging and combining the information segments to obtain a secondary segment; wherein the number of the secondary fragments is less than a preset species threshold;
sequentially inputting the secondary fragments into different trained virtual machines to obtain output data of the virtual machines; the virtual machine and different equipment terminals are in a mapping relation;
and determining the risk probability according to the output data of the virtual machine.
As a further scheme of the invention: the step of determining a risk probability from the output data of the virtual machine comprises:
extracting output data and corresponding secondary fragments of the virtual machine;
randomly selecting a secondary segment as a reference segment, and sequentially calculating the contact ratio between other secondary segments and the reference segment;
sorting the secondary fragments and corresponding output data according to the contact ratio;
and sequentially calculating the contact ratio between the output data after sequencing and the output data corresponding to the reference segment, and determining the risk probability according to the contact ratio between the output data.
As a further scheme of the invention: when the instruction information is a synchronous message, the step of generating routing information according to the synchronous message and locking and storing the synchronous message comprises the following steps:
when the instruction information is a synchronous message, generating an identification code which is in a mapping relation with the synchronous message;
inputting the identification code into a trained encryption function to obtain an encryption key;
locking the synchronous message according to the encryption key to acquire locking time, and inserting the locked synchronous message into a cache region by taking the locking time as an index; the synchronous message in the cache region contains a time item, and the cache region is updated at regular time;
generating routing information according to the synchronous message; wherein the synchronization message and the routing information both contain identification codes.
As a further scheme of the invention: the step of sending the routing information to the equipment end, monitoring the feedback signal of the equipment end in real time, unlocking the locked and stored synchronous message according to the feedback signal, and executing the subsequent operation comprises the following steps:
sending the routing information containing the identification code to the equipment end, acquiring a feedback signal of the equipment end in real time, and determining a working state; the device end sends different feedback signals when executing the task and when the task is completed;
when the working state is that the task is completed, inquiring synchronous information in a cache region according to the identification code;
determining a decryption key according to the identification code, unlocking the synchronous message according to the decryption key, and executing subsequent operation; the encryption key and the decryption key are determined by the same encryption function.
As a further scheme of the invention: the step of updating the cache periodically comprises the following steps:
acquiring the current time in real time, and calculating the storage time of different synchronous messages in a cache region according to the current time and the time item;
when the storage time reaches a preset time threshold value, deleting the corresponding synchronous message in the cache region;
and extracting the identification code in the deleted synchronous message, generating prompt information with the identification code as a label and displaying the prompt information to a user.
The technical scheme of the invention also provides a synchronous message processing system, which comprises:
the information marking module is used for receiving instruction information input by a user, identifying the instruction information and marking the instruction information according to an identification result; wherein the tag categories include synchronous messages and asynchronous messages;
the risk detection module is used for carrying out risk detection on the asynchronous message when the instruction information is the asynchronous message, sending the asynchronous message to the equipment end after the asynchronous message passes the risk detection, and monitoring a feedback signal of the equipment end in real time;
the locking storage module is used for generating routing information according to the synchronous message and locking and storing the synchronous message when the instruction information is the synchronous message;
and the unlocking processing module is used for sending the routing information to the equipment end, monitoring a feedback signal of the equipment end in real time, unlocking the locked and stored synchronous message according to the feedback signal and executing subsequent operation.
As a further scheme of the invention: the locking storage module includes:
the identification code generating unit is used for generating an identification code which is in a mapping relation with the synchronous message when the instruction information is the synchronous message;
the encryption key generating unit is used for inputting the identification code into a trained encryption function to obtain an encryption key;
a data insertion unit, configured to lock the synchronization message according to the encryption key, acquire lock time, and insert the locked synchronization message into a cache area by using the lock time as an index; the synchronous message in the cache region contains a time item, and the cache region is updated at regular time;
the data conversion unit is used for generating routing information according to the synchronous message; wherein the synchronization message and the routing information both contain identification codes.
As a further scheme of the invention: the unlocking processing module comprises:
the state determining unit is used for sending the routing information containing the identification code to the equipment end, acquiring a feedback signal of the equipment end in real time and determining the working state; the device end sends different feedback signals when executing the task and when the task is completed;
the data query unit is used for querying the synchronous message in the cache region according to the identification code when the working state is that the task is completed;
the data decryption unit is used for determining a decryption key according to the identification code, unlocking the synchronous message according to the decryption key and executing subsequent operation; the encryption key and the decryption key are determined by the same encryption function.
Compared with the prior art, the invention has the beneficial effects that: the invention reduces the complexity of system architecture, reduces the consumption of network resources and reduces the difficulty of realizing two-way communication between equipment and a platform; the asynchronous message is converted into the synchronous message, and the requirement scene of synchronous communication is met.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention.
Fig. 1 is a flow chart diagram of a synchronization message processing method.
Fig. 2 is a first sub-flow block diagram of a synchronization message processing method.
Fig. 3 is a second sub-flow diagram of a method of synchronization message processing.
Fig. 4 is a third sub-flow diagram of a method of synchronization message processing.
Fig. 5 is a fourth sub-flow block diagram of a synchronization message processing method.
Fig. 6 is a block diagram showing a configuration of a synchronous message processing system.
FIG. 7 is a block diagram of the lock storage module in the synchronous message processing system.
Fig. 8 is a block diagram showing the structure of an unlock processing module in the synchronous message processing system.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
With the increase of access types of hardware devices, in order to deal with different device application scenarios, the requirement for synchronous processing of message interaction between a platform and the hardware devices is more and more strong. The message is processed in a conventional processing mode, namely an asynchronous message processing mode or an http request mode, which cannot meet the requirement scene of synchronous messages or cause relatively large network resource consumption, so that the technical scheme of the invention provides data transmission between hardware equipment and a platform based on an Mqtt communication protocol, and reduces the network resource consumption of the data transmission. Meanwhile, a CountDown latch mode is used for locking the threads, the task thread information is stored by combining with a local cache, and the purpose of processing asynchronous messages into synchronous messages by waiting for the message response of the equipment end is achieved
Example 1
Fig. 1 is a flow chart of a synchronization message processing method, and in an embodiment of the present invention, a synchronization message processing method includes steps S100 to S400:
step S100: receiving instruction information input by a user, identifying the instruction information, and marking the instruction information according to an identification result; wherein the tag categories include synchronous messages and asynchronous messages;
step S100 is an information identification process, which is used to determine whether the instruction information input by the user is a synchronous message or an asynchronous message.
Step S200: when the instruction information is asynchronous information, risk detection is carried out on the asynchronous information, and after the asynchronous information passes the risk detection, the asynchronous information is sent to an equipment end, and a feedback signal of the equipment end is monitored in real time;
in general, a synchronous message is a message that can be executed after the message is processed; the asynchronous message is a message which does not need to wait for completion after being sent, and obviously, the processing mode of the asynchronous message is simple and only needs to carry out data transmission.
Step S300: when the instruction information is synchronous information, generating routing information according to the synchronous information, and locking and storing the synchronous information;
for the synchronous message, the subsequent operation cannot be performed before the feedback is not received, so the processing speed of the synchronous message is lower than that of the asynchronous message, and even a thread enters a dead loop, step S300 provides a technical solution of locking and storing, the synchronous message to be fed back is locked and stored, when the feedback signal is received, the synchronous message which is locked and stored is taken out from the storage area and then the operation is performed, so that the utilization rate of the computing resource can be improved.
Step S400: sending the routing information to an equipment end, monitoring a feedback signal of the equipment end in real time, unlocking the locked and stored synchronous message according to the feedback signal, and executing subsequent operation;
step S400 is a step based on step S300, and the unlocking process and the locking storage process are inverse processes to each other.
Fig. 2 is a first sub-flow block diagram of a synchronous message processing method, where, when the instruction information is an asynchronous message, the step of performing risk detection on the asynchronous message includes steps S201 to S204:
step S201: when the instruction information is asynchronous information, intercepting the asynchronous information according to a preset detection frequency to obtain an information fragment;
step S202: determining reference instructions corresponding to different information segments and segment numbers thereof based on a preset instruction library;
step S203: normalizing the number of the fragments, determining probability values of different reference instructions, and comparing the reference instructions with the asynchronous messages when the probability values reach a preset probability threshold;
step S204: and judging whether the asynchronous message passes risk detection or not according to the comparison result.
For asynchronous messages, data transfer is a core function, and on this basis, steps S201 to S204 specifically define the risk detection process of the asynchronous message, specifically, extract fragments in the asynchronous message, and match the fragments in the instruction library, it can be thought that the same fragment may correspond to multiple instructions, and among multiple instructions corresponding to all fragments, an instruction with the highest frequency should be the asynchronous message, and if not, it indicates that the asynchronous message may have ambiguity, that is, a hole.
Fig. 3 is a second sub-flow block diagram of the synchronous message processing method, where, when the instruction information is an asynchronous message, the step of performing risk detection on the asynchronous message further includes steps S205 to S207:
step S205: reading information segments, and arranging and combining the information segments to obtain a secondary segment; wherein the number of the secondary fragments is less than a preset species threshold;
step S206: sequentially inputting the secondary fragments into different trained virtual machines to obtain output data of the virtual machines; the virtual machine and different equipment terminals are in a mapping relation;
step S207: and determining the risk probability according to the output data of the virtual machine.
Steps S205 to S207 provide a higher-level detection method, which detects whether some "instructional" combinations can occur in each combination of segments, for example, some combinations of segments may be data that a certain acquisition device may recognize, and such data is of course invalid data, and an error is reported upon input, so that the above-mentioned situation is detected.
It should be noted that: the function of the condition that the number of the types of the secondary fragments is less than the preset type threshold value is to limit the number of the permutation and combination.
The step of determining a risk probability from the output data of the virtual machine comprises:
extracting output data and corresponding secondary fragments of the virtual machine;
randomly selecting a secondary segment as a reference segment, and sequentially calculating the contact ratio between other secondary segments and the reference segment;
sorting the secondary fragments and corresponding output data according to the contact ratio;
and sequentially calculating the contact ratio between the output data after sequencing and the output data corresponding to the reference segment, and determining the risk probability according to the contact ratio between the output data.
The above provides a specific risk probability calculation mode, if the output obtained by some similar messy codes is also similar, it can be a means of attack, and the higher the similarity is, the higher the risk probability is.
Fig. 4 is a third sub-flow block diagram of the method for processing a synchronization message, where, when the instruction information is a synchronization message, the step of generating routing information according to the synchronization message and performing locking storage on the synchronization message includes steps S301 to S304:
step S301: when the instruction information is a synchronous message, generating an identification code which is in a mapping relation with the synchronous message;
step S302: inputting the identification code into a trained encryption function to obtain an encryption key;
step S303: locking the synchronous message according to the encryption key to acquire locking time, and inserting the locked synchronous message into a cache region by taking the locking time as an index; the synchronous message in the cache region contains a time item, and the cache region is updated at regular time;
step S304: generating routing information according to the synchronous message; wherein the synchronization message and the routing information both contain identification codes.
In one example of the technical solution of the present invention:
1. after the platform service issues a message to the equipment end, the current task thread is locked and waited, and the current task thread is locked and put into a local cache;
2. after receiving the message, the Mqtt service routes the message to the corresponding equipment service;
3. the equipment service executes corresponding operation after receiving the message;
4. sending a response message to the Mqtt service after the operation is executed;
5. after receiving the response message of the equipment terminal, the Mqtt service routes the message to the platform service terminal;
6. and after receiving the response message, the platform service takes out the corresponding task thread from the local cache and unlocks the corresponding task thread, and the whole message transmission flow is finished.
Fig. 5 is a fourth sub-flow block diagram of the method for processing a synchronization message, where the step of sending routing information to a device, monitoring a feedback signal of the device in real time, unlocking a locked and stored synchronization message according to the feedback signal, and executing subsequent operations includes steps S401 to S403:
step S401: sending the routing information containing the identification code to the equipment end, acquiring a feedback signal of the equipment end in real time, and determining a working state; the device end sends different feedback signals when executing the task and when the task is completed;
step S402: when the working state is that the task is completed, inquiring synchronous information in a cache region according to the identification code;
step S403: determining a decryption key according to the identification code, unlocking the synchronous message according to the decryption key, and executing subsequent operation; the encryption key and the decryption key are determined by the same encryption function.
Steps S401 to S403 are unlocking processes, and it should be emphasized that the encryption key and the decryption key are determined by the same encryption function, so that the security and the accuracy of the synchronization message processing process can be ensured.
As a preferred embodiment of the technical solution of the present invention, the step of updating the cache periodically includes:
acquiring the current time in real time, and calculating the storage time of different synchronous messages in a cache region according to the current time and the time item;
when the storage time reaches a preset time threshold value, deleting the corresponding synchronous message in the cache region;
and extracting the identification code in the deleted synchronous message, generating prompt information with the identification code as a label and displaying the prompt information to a user.
In order to avoid the situation that the task thread always blocks and waits due to message loss or delayed response caused by network reasons, timeout time setting is carried out on the synchronous request waiting time, and the task processing is considered to be failed when the thread waiting time reaches the set timeout time.
Example 2
Fig. 6 is a block diagram of a structure of a synchronous message processing system, in an embodiment of the present invention, a synchronous message processing system, where the system 10 includes:
the information marking module 11 is configured to receive instruction information input by a user, identify the instruction information, and mark the instruction information according to an identification result; wherein the tag categories include synchronous messages and asynchronous messages;
the risk detection module 12 is configured to perform risk detection on the asynchronous message when the instruction information is the asynchronous message, send the asynchronous message to the device end after the asynchronous message passes the risk detection, and monitor a feedback signal of the device end in real time;
a locking storage module 13, configured to generate routing information according to the synchronization message when the instruction information is a synchronization message, and lock and store the synchronization message;
and the unlocking processing module 14 is configured to send the routing information to the device side, monitor a feedback signal of the device side in real time, unlock the locked and stored synchronization message according to the feedback signal, and execute subsequent operations.
Fig. 7 is a block diagram illustrating a structure of a lock storage module in a synchronous message processing system, where the lock storage module 13 includes:
an identification code generating unit 131, configured to generate an identification code in a mapping relationship with the synchronization message when the instruction information is the synchronization message;
an encryption key generation unit 132, configured to input the identification code into a trained encryption function to obtain an encryption key;
a data inserting unit 133, configured to lock the synchronization message according to the encryption key, acquire a locking time, and insert the locked synchronization message into a cache region by using the locking time as an index; the synchronous message in the cache region contains a time item, and the cache region is updated at regular time;
a data conversion unit 134, configured to generate routing information according to the synchronization message; wherein the synchronization message and the routing information both contain identification codes.
Fig. 8 is a block diagram illustrating a structure of an unlocking processing module in the synchronization message processing system, where the unlocking processing module 14 includes:
the state determining unit 141 is configured to send routing information including the identification code to the device side, obtain a feedback signal of the device side in real time, and determine a working state; the device end sends different feedback signals when executing the task and when the task is completed;
a data query unit 142, configured to query a synchronization message in the cache region according to the identification code when the working status is that the task is completed;
the data decryption unit 143 is configured to determine a decryption key according to the identification code, unlock the synchronization message according to the decryption key, and perform subsequent operations; the encryption key and the decryption key are determined by the same encryption function.
The functions that can be performed by the synchronization message processing method are performed by a computer device that includes one or more processors and one or more memories having at least one program code stored therein, which is loaded and executed by the one or more processors to perform the functions of the synchronization message processing method.
The processor fetches instructions and analyzes the instructions one by one from the memory, then completes corresponding operations according to the instruction requirements, generates a series of control commands, enables all parts of the computer to automatically, continuously and coordinately act to form an organic whole, realizes the input of programs, the input of data, the operation and the output of results, and the arithmetic operation or the logic operation generated in the process is completed by the arithmetic unit; the Memory comprises a Read-Only Memory (ROM) for storing a computer program, and a protection device is arranged outside the Memory.
Illustratively, a computer program can be partitioned into one or more modules, which are stored in memory and executed by a processor to implement the present invention. One or more of the modules may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of the computer program in the terminal device.
Those skilled in the art will appreciate that the above description of the service device is merely exemplary and not limiting of the terminal device, and may include more or less components than those described, or combine certain components, or different components, such as may include input output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is the control center of the terminal equipment and connects the various parts of the entire user terminal using various interfaces and lines.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the terminal device by operating or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory mainly comprises a storage program area and a storage data area, wherein the storage program area can store an operating system, application programs (such as an information acquisition template display function, a product information publishing function and the like) required by at least one function and the like; the storage data area may store data created according to the use of the berth-state display system (e.g., product information acquisition templates corresponding to different product types, product information that needs to be issued by different product providers, etc.), and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The terminal device integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the modules/units in the system according to the above embodiment may be implemented by a computer program, which may be stored in a computer-readable storage medium and used by a processor to implement the functions of the embodiments of the system. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element identified by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for processing a synchronization message, the method comprising:
receiving instruction information input by a user, identifying the instruction information, and marking the instruction information according to an identification result; wherein the tag categories include synchronous messages and asynchronous messages;
when the instruction information is asynchronous information, risk detection is carried out on the asynchronous information, and after the asynchronous information passes the risk detection, the asynchronous information is sent to an equipment end, and a feedback signal of the equipment end is monitored in real time;
when the instruction information is synchronous information, generating routing information according to the synchronous information, and locking and storing the synchronous information;
sending the routing information to an equipment end, monitoring a feedback signal of the equipment end in real time, unlocking the locked and stored synchronous message according to the feedback signal, and executing subsequent operation;
when the instruction information is an asynchronous message, the step of performing risk detection on the asynchronous message comprises:
when the instruction information is asynchronous information, intercepting the asynchronous information according to a preset detection frequency to obtain an information fragment;
determining reference instructions corresponding to different information segments and segment numbers thereof based on a preset instruction library;
normalizing the number of the fragments, determining probability values of different reference instructions, and comparing the reference instructions with the asynchronous messages when the probability values reach a preset probability threshold;
and judging whether the asynchronous message passes risk detection or not according to the comparison result.
2. The synchronous message processing method according to claim 1, wherein the step of performing risk detection on the asynchronous message when the instruction information is the asynchronous message further comprises:
reading information segments, and arranging and combining the information segments to obtain a secondary segment; wherein the number of the secondary fragments is less than a preset species threshold;
sequentially inputting the secondary fragments into different trained virtual machines to obtain output data of the virtual machines; the virtual machine and different equipment terminals are in a mapping relation;
and determining the risk probability according to the output data of the virtual machine.
3. The synchronous message processing method of claim 2, wherein the step of determining a risk probability from the output data of the virtual machine comprises:
extracting output data and corresponding secondary fragments of the virtual machine;
randomly selecting a secondary segment as a reference segment, and sequentially calculating the contact ratio between other secondary segments and the reference segment;
sorting the secondary fragments and corresponding output data according to the contact ratio;
and sequentially calculating the contact ratio between the output data after sequencing and the output data corresponding to the reference segment, and determining the risk probability according to the contact ratio between the output data.
4. The method according to claim 1, wherein, when the instruction information is a synchronization message, the step of generating routing information according to the synchronization message and storing the synchronization message in a locked manner comprises:
when the instruction information is a synchronous message, generating an identification code which is in a mapping relation with the synchronous message;
inputting the identification code into a trained encryption function to obtain an encryption key;
locking the synchronous message according to the encryption key to acquire locking time, and inserting the locked synchronous message into a cache region by taking the locking time as an index; the synchronous message in the cache region contains a time item, and the cache region is updated at regular time;
generating routing information according to the synchronous message; wherein the synchronization message and the routing information both contain identification codes.
5. The method according to claim 4, wherein the step of sending the routing information to the device, monitoring a feedback signal of the device in real time, unlocking the locked and stored synchronization message according to the feedback signal, and performing subsequent operations comprises:
sending the routing information containing the identification code to the equipment end, acquiring a feedback signal of the equipment end in real time, and determining a working state; the device end sends different feedback signals when executing the task and when the task is completed;
when the working state is that the task is completed, inquiring synchronous information in a cache region according to the identification code;
determining a decryption key according to the identification code, unlocking the synchronous message according to the decryption key, and executing subsequent operation; the encryption key and the decryption key are determined by the same encryption function.
6. The method of claim 5, wherein the step of updating the buffer timing comprises:
acquiring the current time in real time, and calculating the storage time of different synchronous messages in a cache region according to the current time and the time item;
when the storage time reaches a preset time threshold, deleting the corresponding synchronous message in the cache region;
and extracting the identification code in the deleted synchronous message, generating prompt information with the identification code as a label and displaying the prompt information to a user.
7. A synchronous message processing system, the system comprising:
the information marking module is used for receiving instruction information input by a user, identifying the instruction information and marking the instruction information according to an identification result; wherein the tag categories include synchronous messages and asynchronous messages;
the risk detection module is used for carrying out risk detection on the asynchronous message when the instruction information is the asynchronous message, sending the asynchronous message to the equipment end after the asynchronous message passes the risk detection, and monitoring a feedback signal of the equipment end in real time;
the locking storage module is used for generating routing information according to the synchronous message and locking and storing the synchronous message when the instruction information is the synchronous message;
the unlocking processing module is used for sending the routing information to the equipment end, monitoring a feedback signal of the equipment end in real time, unlocking the locked and stored synchronous message according to the feedback signal and executing subsequent operation;
the locking storage module comprises:
the identification code generating unit is used for generating an identification code which is in a mapping relation with the synchronous message when the instruction information is the synchronous message;
the encryption key generating unit is used for inputting the identification code into a trained encryption function to obtain an encryption key;
the data insertion unit is used for locking the synchronous message according to the encryption key, acquiring locking time and inserting the locked synchronous message into a cache region by taking the locking time as an index; the synchronous message in the cache region contains a time item, and the cache region is updated at regular time;
the data conversion unit is used for generating routing information according to the synchronous message; wherein the synchronization message and the routing information both contain identification codes.
8. The synchronous message processing system of claim 7, wherein the unlock processing module comprises:
the state determining unit is used for sending the routing information containing the identification code to the equipment end, acquiring a feedback signal of the equipment end in real time and determining a working state; the device end sends different feedback signals when executing the task and when the task is completed;
the data query unit is used for querying the synchronous message in the cache region according to the identification code when the working state is that the task is completed;
the data decryption unit is used for determining a decryption key according to the identification code, unlocking the synchronous message according to the decryption key and executing subsequent operation; the encryption key and the decryption key are determined by the same encryption function.
CN202210183921.0A 2022-02-28 2022-02-28 Synchronous message processing method and system Active CN114338806B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210183921.0A CN114338806B (en) 2022-02-28 2022-02-28 Synchronous message processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210183921.0A CN114338806B (en) 2022-02-28 2022-02-28 Synchronous message processing method and system

Publications (2)

Publication Number Publication Date
CN114338806A CN114338806A (en) 2022-04-12
CN114338806B true CN114338806B (en) 2022-06-21

Family

ID=81030500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210183921.0A Active CN114338806B (en) 2022-02-28 2022-02-28 Synchronous message processing method and system

Country Status (1)

Country Link
CN (1) CN114338806B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117560415B (en) * 2024-01-11 2024-03-22 德阳城市智慧之心信息技术有限公司 Asynchronous and synchronous communication method and system for smart community micro-service architecture (MQTT)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017067415A1 (en) * 2015-10-22 2017-04-27 阿里巴巴集团控股有限公司 Data transmission method and device
CN113886627A (en) * 2021-10-09 2022-01-04 陕西通信规划设计研究院有限公司 Mobile communication system based on information synchronization

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7013465B1 (en) * 1999-08-17 2006-03-14 Emc Corporation System, device and method for interprocessor communication in a computer system
EP1199723B1 (en) * 2000-10-18 2008-12-31 STMicroelectronics S.r.l. Interlaced memory device with random or sequential access
JP4975656B2 (en) * 2008-02-01 2012-07-11 東京エレクトロン株式会社 Information processing apparatus, information processing method, and program
US9271057B2 (en) * 2010-02-22 2016-02-23 Qualcomm Incorporated Methods and apparatus for time synchronization and measurement of power distribution systems
CN101923618B (en) * 2010-08-19 2011-12-21 中国航天科技集团公司第七一0研究所 Hidden Markov model based method for detecting assembler instruction level vulnerability
US10079841B2 (en) * 2013-09-12 2018-09-18 Virsec Systems, Inc. Automated runtime detection of malware
US10346224B2 (en) * 2017-08-30 2019-07-09 Vmware, Inc. Management framework for applications using passcode-based encryption
CN110099078B (en) * 2018-01-29 2022-02-25 阿里巴巴集团控股有限公司 Method, device, equipment and storage medium for communication between equipment and message synchronization
CN113656189A (en) * 2018-05-15 2021-11-16 西安万像电子科技有限公司 Message processing method and device
CN110231633B (en) * 2019-05-15 2021-05-28 西安交通大学 GNSS deception jamming identification and inhibition method and system based on LSTM in signal capture stage
CN110795171B (en) * 2019-09-18 2023-08-04 平安银行股份有限公司 Service data processing method, device, computer equipment and storage medium
CN113722121A (en) * 2021-08-09 2021-11-30 青岛鼎信通讯股份有限公司 MQTT protocol-based message receiving and transmitting method for acquisition terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017067415A1 (en) * 2015-10-22 2017-04-27 阿里巴巴集团控股有限公司 Data transmission method and device
CN113886627A (en) * 2021-10-09 2022-01-04 陕西通信规划设计研究院有限公司 Mobile communication system based on information synchronization

Also Published As

Publication number Publication date
CN114338806A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN111901327B (en) Cloud network vulnerability mining method and device, electronic equipment and medium
CN114338806B (en) Synchronous message processing method and system
CN111782383A (en) Task allocation method, server, electronic terminal and computer readable storage medium
CN111813845A (en) ETL task-based incremental data extraction method, device, equipment and medium
CN111241526B (en) Data permission matching method and device, electronic equipment and storage medium
CN111163052B (en) Method, device, medium and electronic equipment for connecting Internet of things platform
CN113158195B (en) Distributed vulnerability scanning method and system based on POC script
CN114239029A (en) System log safety processing method, device, equipment and storage medium
CN117240473A (en) Electronic contract signing method, electronic contract signing device, electronic equipment and storage medium
CN109327499B (en) Service interface management method and device, storage medium and terminal
CN108713199B (en) Authority management method and system, mobile terminal, shared charging equipment and server
CN114461418A (en) Inter-process communication method and device and electronic equipment
CN114221883A (en) Message testing method, device, server and storage medium
CN112685706A (en) Request authentication method and related equipment
CN113064929A (en) Method, device, equipment and storage medium for inquiring transaction data in block chain
CN112738175A (en) Request processing method and related equipment
CN104573519A (en) File scanning method and system
CN112416951B (en) Data transfer method and device and computer storage medium
CN114553930B (en) System integration method, device, computer equipment and storage medium
CN111459899B (en) Log sharing method and device and terminal equipment
CN110933661B (en) Mobile terminal addressing method, device, mobile terminal and medium with one card and multiple numbers
CN116389612A (en) Data acquisition method, device, computer equipment and storage medium
CN116720818B (en) Warehouse processing method, device and computer equipment based on block chain
CN113518118B (en) Information processing method and system based on Internet of things security service
CN114860390B (en) Container data management method, device, program product, medium and electronic equipment

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