CN117009098A - Method for determining message distribution object, server and computer readable storage medium - Google Patents

Method for determining message distribution object, server and computer readable storage medium Download PDF

Info

Publication number
CN117009098A
CN117009098A CN202210475165.9A CN202210475165A CN117009098A CN 117009098 A CN117009098 A CN 117009098A CN 202210475165 A CN202210475165 A CN 202210475165A CN 117009098 A CN117009098 A CN 117009098A
Authority
CN
China
Prior art keywords
pairing
subscriber
data
message
data unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210475165.9A
Other languages
Chinese (zh)
Inventor
李双良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Midea Group Co Ltd
GD Midea Air Conditioning Equipment Co Ltd
Original Assignee
Midea Group Co Ltd
GD Midea Air Conditioning Equipment 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, GD Midea Air Conditioning Equipment Co Ltd filed Critical Midea Group Co Ltd
Priority to CN202210475165.9A priority Critical patent/CN117009098A/en
Publication of CN117009098A publication Critical patent/CN117009098A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method for determining a message distribution object, a server and a computer readable storage medium. The determining method comprises the following steps: responding to a user subscription request sent by a client, and determining a subscriber identifier and a corresponding subscription keyword; carrying out data processing on the subscription keywords to obtain paired data; generating a subscriber data unit according to the pairing data and the subscriber identification; storing subscriber data units in a memory; acquiring a report message; extracting message keywords from the reported message; performing word bit pairing processing according to the message keywords and the pairing data to obtain a pairing result; and under the condition that the pairing result is the same as the preset value, determining the subscriber identification corresponding to the pairing result. According to the determining method, whether the user corresponding to the corresponding subscriber identifier subscribes to the report message can be determined according to whether the pairing result is the same as the preset value, so that the efficiency of processing a large amount of information is improved.

Description

Method for determining message distribution object, server and computer readable storage medium
Technical Field
The present invention relates to the field of message subscription relationship matching technology, and in particular, to a method, a server, and a computer readable storage medium for determining a message distribution object.
Background
In the related art, a user can acquire a report message of the intelligent device in time in a subscription mode. When the reported message is acquired, the user identity subscribed to the reported message needs to be quickly and accurately matched, so that the subsequent processing of the reported message is convenient.
Disclosure of Invention
The invention provides a method for determining a message distribution object, a server and a computer readable storage medium.
The invention provides a method for determining a message distribution object, which comprises the following steps: responding to a user subscription request sent by a client, and determining a subscriber identifier and a corresponding subscription keyword; performing data processing on the subscription keywords to obtain paired data; generating a subscriber data unit according to the pairing data and the subscriber identification; storing the subscriber data unit in a memory; acquiring a report message; extracting a message keyword from the reported message; performing word bit pairing processing according to the message keywords and the pairing data to obtain a pairing result; and under the condition that the pairing result is the same as a preset numerical value, determining the subscriber identification corresponding to the pairing result.
According to the determining method, whether the users corresponding to the corresponding subscriber identifications subscribe to the reporting message or not can be determined according to whether the pairing result is the same as the preset value, the subscriber data units are stored in the memory, the network of the external equipment is not required to be accessed, and the users subscribed to the reporting message can be rapidly determined, so that the reporting message can be conveniently distributed to the corresponding users, and further the efficiency of processing a large amount of information can be improved.
In some embodiments, the determining method comprises: under the condition that the user subscription request is obtained, checking the user subscription request; and under the condition that the user subscription request is determined to not meet the first verification condition after verification, ignoring the user subscription request. Thus, the security of the data can be improved.
In some embodiments, the step of performing data processing on the subscription key to obtain the pairing data includes: and according to a first algorithm, performing inversion calculation on all word bits of the subscription keywords to obtain the pairing data. Thus, the acquisition of the pairing data can be realized.
In some embodiments, before the step of obtaining the report message, the determining method includes: checking the reported message; and under the condition that the reported message does not meet the second checking condition through checking, ignoring the reported message. Thus, the security of the data can be improved.
In some embodiments, the step of performing word-bit pairing processing according to the message keyword and the pairing data to obtain a pairing result includes: and carrying out exclusive OR operation on the message key words and the pairing data according to a second algorithm to obtain the pairing result. Thus, the subscriber identification corresponding to the message keyword can be conveniently and quickly determined.
In some embodiments, the subscriber data units are sequentially stored in a data unit set, the data unit set including adjacent first and second subscriber data units, the second subscriber data units being sequentially arranged after the first subscriber data unit, the determining method comprising: and after the pairing processing of the pairing data of the first subscriber data unit is completed, performing shift calculation on the pairing data of the first subscriber data unit so as to perform the pairing processing on the pairing data of the second subscriber data unit. In this way, the efficiency and speed of pairing can be ensured.
In some embodiments, the set of data units is divided into at least two packets of data units according to the order in which the subscriber data units are arranged; the first subscriber data unit and the second subscriber data unit are located in the same data unit group or the first subscriber data unit and the second subscriber data unit are located in different data unit groups. Thus, a huge number of data units can be conveniently stored.
In some embodiments, the determining method comprises: deleting the corresponding subscriber data unit under the condition that the first command is acquired, and sequentially moving other subscriber data units positioned behind the deleted subscriber data unit forwards; or under the condition that the second command is acquired, confirming the subscriber data unit corresponding to the second command as invalid data. Thus, the additional operation cost caused by frequently moving the data unit can be reduced.
In some embodiments, the determining method comprises: discarding the report message under the condition that no corresponding subscriber identifier is determined; and pushing the report message to a user corresponding to the determined subscriber identity under the condition that the corresponding subscriber identity is determined to exist. Thus, the processing effect on the reported message can be realized.
The server of the embodiment of the invention is used for: responding to a user subscription request sent by a client, and determining a subscriber identifier and a corresponding subscription keyword; performing data processing on the subscription keywords to obtain paired data; generating a subscriber data unit according to the pairing data and the subscriber identification; storing the subscriber data unit in a memory; acquiring a report message; extracting a message keyword from the reported message; performing word bit pairing processing according to the message keywords and the pairing data to obtain a pairing result; and under the condition that the pairing result is the same as a preset numerical value, determining the subscriber identification corresponding to the pairing result.
According to the server, whether the users corresponding to the corresponding subscriber identifications subscribe to the reporting message or not can be determined according to whether the pairing result is the same as the preset value, the subscriber data units are stored in the memory, the network of the external equipment is not required to be accessed, and the users subscribed to the reporting message can be rapidly determined, so that the reporting message can be conveniently distributed to the corresponding users, and further the efficiency of processing a large amount of information can be improved.
A server according to an embodiment of the present invention includes a memory storing a computer program and a processor implementing the determination method according to any one of the above embodiments when the processor executes the program.
According to the server, whether the users corresponding to the corresponding subscriber identifications subscribe to the reporting message or not can be determined according to whether the pairing result is the same as the preset value, the subscriber data units are stored in the memory, the network of the external equipment is not required to be accessed, and the users subscribed to the reporting message can be rapidly determined, so that the reporting message can be conveniently distributed to the corresponding users, and further the efficiency of processing a large amount of information can be improved.
A computer-readable storage medium according to an embodiment of the present invention stores thereon a computer program that, when executed by a processor, implements the determination method according to any of the above embodiments.
According to the computer readable storage medium, whether the users corresponding to the corresponding subscriber identifications subscribe to the reporting message or not can be determined according to whether the pairing result is the same as the preset value, the subscriber data units are stored in the memory, the network of the external equipment is not required to be accessed, and the users subscribed to the reporting message can be rapidly determined, so that the reporting message can be conveniently distributed to the corresponding users, and further the efficiency of processing a large amount of information can be improved.
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
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of a method of determining an embodiment of the present invention;
FIG. 2 is a schematic block diagram of a smart device and a server according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method of determining an embodiment of the present invention;
FIG. 4 is a schematic diagram of acquiring pairing data according to an embodiment of the invention;
FIG. 5 is a flow chart of a method of determining an embodiment of the present invention;
FIG. 6 is a schematic diagram of obtaining pairing results according to an embodiment of the invention;
FIG. 7 is a schematic diagram of obtaining pairing results according to an embodiment of the invention;
FIG. 8 is a schematic diagram of a set of data units according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a subscriber data unit of an embodiment of the present invention;
FIG. 10 is a diagram of a word-bit pairing process for a message key with a subscriber data unit in a set of data units according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of a data unit packet according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of a subscriber data unit in accordance with an embodiment of the present invention.
Description of main reference numerals:
server 100, smart device 200.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for explaining the present invention and are not to be construed as limiting the present invention.
The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. In order to simplify the present disclosure, components and arrangements of specific examples are described below. They are, of course, merely examples and are not intended to limit the invention. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples, which are for the purpose of brevity and clarity, and which do not themselves indicate the relationship between the various embodiments and/or arrangements discussed. In addition, the present invention provides examples of various specific processes and materials, but one of ordinary skill in the art will recognize the application of other processes and/or the use of other materials.
In the related art, a user can acquire a report message of the intelligent device in time in a subscription mode. When the reported message is acquired, the user identity subscribed to the reported message needs to be quickly and accurately matched, so that the subsequent processing of the reported message is convenient.
Specifically, in some related technologies, the server side can push the total amount of the received report messages to the downstream message application, so that the downstream message application screens all the received report messages, thereby facilitating the pushing of the user. However, the total message delivery is easy to cause the reduction of the subscription hit rate, the waste of a large amount of network resources and the overlarge delivery pressure of the server to the reported message.
Moreover, for the intelligent device capable of uploading the reported message to the server, the network environment is very complex, and particularly, some low-power consumption devices need to form the network environment in the forms of bluetooth, zigBee and the like, which causes unstable network and large time delay. In addition, when a plurality of different devices upload to the server, and the server acquires a large number of reported messages in a short time, the capacity of the server for concurrently processing the reported messages is easily limited due to factors such as network I/O, resource synchronization mutual exclusion lock and the like.
In some related technologies, databases are deployed on servers of other nodes, and when acquiring hot spot data, the databases need to access the servers of other nodes first and pass through networks of the servers of other nodes, so that a certain delay exists, which is not beneficial to achieving the effect of high concurrency data processing.
Referring to fig. 1, a method for determining a message distribution object according to an embodiment of the present invention includes:
01: responding to a user subscription request sent by a client, and determining a subscriber identifier and a corresponding subscription keyword;
02: carrying out data processing on the subscription keywords to obtain paired data;
03: generating a subscriber data unit according to the pairing data and the subscriber identification;
04: storing subscriber data units in a memory;
05: acquiring a report message;
06: extracting message keywords from the reported message;
07: performing word bit pairing processing according to the message keywords and the pairing data to obtain a pairing result;
08: and under the condition that the pairing result is the same as the preset value, determining the subscriber identification corresponding to the pairing result.
The method for determining a message distribution object according to the embodiment of the present invention may be implemented by the server 100 according to the embodiment of the present invention. Specifically, referring to fig. 2, the server 100 is configured to: responding to a user subscription request sent by a client, and determining a subscriber identifier and a corresponding subscription keyword; carrying out data processing on the subscription keywords to obtain paired data; generating a subscriber data unit according to the pairing data and the subscriber identification; storing subscriber data units in a memory; acquiring a report message; extracting message keywords from the reported message; performing word bit pairing processing according to the message keywords and the pairing data to obtain a pairing result; and under the condition that the pairing result is the same as the preset value, determining the subscriber identification corresponding to the pairing result.
According to the determining method and the server 100, whether the users corresponding to the corresponding subscriber identifications subscribe to the report message or not can be determined according to whether the pairing result is the same as the preset value, the subscriber data units are stored in the memory, the network of the external equipment is not required to be accessed, and the users subscribed to the report message can be rapidly determined, so that the report message can be conveniently distributed to the corresponding users, and further the efficiency of processing a large amount of information can be improved.
Specifically, in fig. 2, a smart device 200 may communicate with a server 100. The report message acquired by the server 100 may be uploaded to the server 100 by the smart device 200. The report message may include a message key, and in the case where the report message is acquired, the server 100 may extract the message key from the report message.
Pairing data may represent the morphology of the message key when stored within the server 100. Under the condition that the message keyword is obtained, the message keyword and the pairing data can be paired, wherein if the intelligent device 200 corresponding to the pairing data is the same as the intelligent device 200 uploading the message keyword, the pairing between the message keyword and the pairing data is successful, the obtained pairing result can meet the preset condition, and then the subscriber identification corresponding to the pairing data can be determined. The subscriber identifier may indicate a user associated with the pairing data, and in case that the pairing result may meet a preset condition, the user needs to acquire the report message uploaded by the intelligent device 200, so as to subscribe to the report message uploaded by the intelligent device 200, so as to conveniently and timely confirm the report message uploaded by the intelligent device 200. In this case, it may be determined to which users the reported message uploaded by the smart device 200 needs to be distributed (i.e., the distribution object of the reported message), so as to facilitate subsequent processing of the reported message.
In one application scenario, the smart device 200 may be an air conditioner. The report message may include the operating state parameters of the air conditioner and the message keywords. The message key may include an authentication code of the air conditioner. Under the condition that the pairing result between the pairing data and the authentication code of the air conditioner is the same as the preset value, the authentication code of the user corresponding to the pairing result is determined, and the user corresponding to the authentication code of the air conditioner can be determined through the authentication code of the user, so that the subsequent processing of the reported message can be facilitated. The processing of the report message may include sending the working state parameter of the air conditioner to a terminal device of the authentication code of the corresponding user, so that the user may check the working state parameter of the air conditioner through the terminal device. The smart device 200 may include: intelligent door lock, intelligent banks, intelligent air conditioner, intelligent water heater, air purifier, automatic (window) curtain, machine of sweeping floor.
The report message may include a device authentication code, a user authentication code, and a home group authentication code. The device authentication code may correspond to the smart device 200. The user authentication code may correspond to a user subscribed to the reporting message. The family group authentication code may correspond to a plurality of users subscribing to the reporting message.
With respect to subscriber identification, a subscriber's identity verification code, subscription validity identification, subscriber metadata may be included. The user of the corresponding subscriber may be determined by the subscriber identity.
The memory refers to the memory of the server 100. The subscriber data unit is stored in the memory of the server 100, so that when the server 100 needs to perform word bit pairing processing on the message keyword and the pairing data, the memory can be directly read to obtain the corresponding pairing data. Compared with the situation that the paired data storage database is deployed on the server 100 of other nodes, the server 100 of other nodes can be accessed without being required, delay existing in the data request process can be effectively reduced, high concurrency effect in data processing is facilitated, and therefore data processing efficiency of the server 100 can be improved.
The user subscription request may be request information for a user to subscribe to a message. For the user, the target object of the interested uploading report message can be selected by the user, and the user subscription request is sent to the server 100 under the condition that the report message of the target object to be subscribed is determined. Upon receiving the user subscription request, the server 100 may determine the authentication code of the user and the subscription key of the corresponding target object according to the user subscription request. The subscription key may be integer data or character data.
Referring to fig. 3, in some embodiments, step 02 (data processing the subscription key to obtain paired data) includes:
021: and according to a first algorithm, performing inverse calculation on all word bits of the subscription keywords to obtain paired data.
The method for determining a message distribution object according to the embodiment of the present invention may be implemented by the server 100 according to the embodiment of the present invention. Specifically, referring to fig. 2, the server 100 is configured to: and according to a first algorithm, performing inverse calculation on all word bits of the subscription keywords to obtain paired data.
Thus, the acquisition of the pairing data can be realized.
Specifically, please refer to fig. 4 in conjunction with which the subscription key is denoted as a. Pairing data is denoted B. The subscription key is "00000001". The first algorithm may be an inversion calculation algorithm. When all word bits of the subscription key are calculated reversely, 0 in the subscription key is calculated to be 1, and 1 is calculated to be 0, so that the obtained calculation result is 11111110, and the calculation result is determined to be paired data. In other embodiments, the first algorithm may include a hash slot.
In some embodiments, the determining method comprises:
under the condition that the user subscription request is obtained, checking the user subscription request;
And under the condition that the user subscription request is determined to not meet the first verification condition after verification, ignoring the user subscription request.
The method for determining a message distribution object according to the embodiment of the present invention may be implemented by the server 100 according to the embodiment of the present invention. Specifically, referring to fig. 2, the server 100 is configured to: under the condition that the user subscription request is obtained, checking the user subscription request; and under the condition that the user subscription request is determined to not meet the first verification condition after verification, ignoring the user subscription request.
Thus, the security of the data can be improved.
The verification content may include verification of a subscriber identity verification code in the user subscription request, or verification of a subscription keyword in the user subscription request.
Specifically, in some embodiments, the first verification condition includes: the user subscription request originates from a preset program, the number of times of acquiring the user subscription request is smaller than the preset number of times, and the data format of the user subscription request accords with the preset format.
By determining that the user subscription request originates from a preset program, it can be known whether the user subscription request can be compatible. Under the condition that the user subscription request does not originate from a preset program, the user subscription request can be determined to be incompatible, and the subscriber identification and the subscription keyword cannot be determined for the user subscription request.
By determining whether the number of times the user subscription request is acquired is less than a preset number of times, it can be determined whether pairing data has been stored. When the number of times the user subscription request is acquired is greater than or equal to the preset number of times, the pairing data can be determined to be stored, and the pairing data does not need to be processed again to obtain the pairing data. The preset number of times may be 2.
By determining whether the data format of the user subscription request conforms to a preset format, it can be determined whether the user subscription request has been tampered with. Under the condition that the data format of the user subscription request does not accord with the preset format, the user subscription request can be determined to be tampered, and pairing data can not be obtained by processing in response to the user subscription request.
In some embodiments, prior to step 05 (retrieving the report message), the determining method includes:
checking the reported message;
and under the condition that the reported information does not meet the second checking condition after checking, ignoring the reported information.
The method for determining a message distribution object according to the embodiment of the present invention may be implemented by the server 100 according to the embodiment of the present invention. Specifically, referring to fig. 2, the server 100 is configured to: checking the reported message; and under the condition that the reported information does not meet the second checking condition after checking, ignoring the reported information.
Thus, the security of the data can be improved.
Specifically, in some embodiments, the second calibration conditions include: the reported information is from a preset program, the number of times of acquiring the reported information is smaller than the preset number of times, and the data format of the reported information accords with the preset format.
By determining that the reported message originates from a preset program, it can be known whether the reported message is compatible. Under the condition that the reported message does not originate from a preset program, the incompatibility of the reported message can be determined, and the message keywords can not be extracted from the reported message.
By determining whether the number of times the reported message was acquired is less than a preset number of times, it may be determined whether the corresponding subscriber identity has been determined. And under the condition that the acquired times of the report message are greater than or equal to the preset times, determining the corresponding subscriber identification without confirming again. The preset number of times may be 2.
By determining whether the data format of the reported message conforms to the preset format, whether the reported message is tampered can be determined. Under the condition that the data format of the report message does not accord with the preset format, the report message can be determined to be tampered, and the report message can not be responded to be processed to obtain the pairing result.
Referring to fig. 5, in some embodiments, step 07 (performing word-bit pairing processing according to the message key and the pairing data to obtain a pairing result) includes:
071: and carrying out exclusive OR operation on the message keywords and the pairing data according to the second algorithm to obtain a pairing result.
The method for determining a message distribution object according to the embodiment of the present invention may be implemented by the server 100 according to the embodiment of the present invention. Specifically, referring to fig. 2, the server 100 is configured to: and carrying out exclusive OR operation on the message keywords and the pairing data according to the second algorithm to obtain a pairing result.
Thus, the subscriber identification corresponding to the message keyword can be conveniently and quickly determined.
Specifically, please refer to fig. 6, the paired data is denoted B. The message key is denoted as C. The pairing result is denoted D. The message key is "00000001". The pairing data is "11111110". The second algorithm is an exclusive or calculation algorithm. The preset value is "11111111". And carrying out bitwise exclusive OR calculation on the message key words and the paired data according to the word bits, wherein the paired result obtained by the method is 11111111, namely the paired result is the same as the preset numerical value because the corresponding word bits of the message key words and the paired data are different.
Referring again to fig. 7, the paired data is denoted B. The message key is denoted as C. The pairing result is denoted D. The message key is "00000010". The pairing data is "11111110". And performing bitwise exclusive OR calculation on the message keywords and the paired data according to the word bits, wherein the paired result obtained is 11111100, namely the paired result is different from the preset value.
On the basis of the above embodiment, when the number of paired data is plural, by pairing the message key with each paired data, it is possible to determine whether all paired data are the same as the preset value, so that the subscriber identity corresponding to the paired result that is the same as the preset value can be determined. The second algorithm may also be a hash slot algorithm.
Referring to fig. 8 and 9, in some embodiments, subscriber data units are stored sequentially in a data unit set. The data unit set includes adjacent first and second subscriber data units. The second subscriber data units are arranged in sequence behind the first subscriber data units. The determining method comprises the following steps:
after the pairing processing of the pairing data of the first subscriber data unit is completed, shift calculation is carried out on the pairing data of the first subscriber data unit so as to carry out the pairing processing on the pairing data of the second subscriber data unit.
The method for determining a message distribution object according to the embodiment of the present invention may be implemented by the server 100 according to the embodiment of the present invention. Specifically, referring to fig. 2, the server 100 is configured to: after the pairing processing of the pairing data of the first subscriber data unit in the data unit set is completed, shift calculation is carried out on the pairing data of the first subscriber data unit so as to carry out the pairing processing on the pairing data of the second subscriber data unit.
In this way, the efficiency and speed of pairing can be ensured.
Specifically, please refer to fig. 9, the paired data is denoted B. The subscriber identity is denoted as I. The pairing data and the corresponding subscriber identity form a subscriber data unit. The subscriber data unit is denoted U. The subscriber data unit can correspond to a section of continuous storage space, and the subsequent pairing processing of message keywords can be facilitated.
In the case where the number of the subscriber data units to be constituted is plural, the plural subscriber data units may be arranged in a specific arrangement order. In fig. 8, the first subscriber data unit is denoted as U1, the subscriber identifier in the first subscriber data unit is denoted as I1, and the pairing data in the first subscriber data unit is denoted as B1. The second subscriber data unit is denoted U2, the subscriber identity in the second subscriber data unit is denoted I2, and the pairing data in the second subscriber data unit is denoted B2. The third subscriber data unit is denoted U3, the subscriber identity In the third subscriber data unit is denoted I3, the pairing data In the third subscriber data unit is denoted B3, and so on until the last subscriber data unit In the set of data units is denoted Un, the subscriber identity In the last subscriber data unit is denoted In, the pairing data In the last subscriber data unit is denoted Bn, n denotes the number of subscriber data units In the set of data units. The set of data units, which is formed by sequentially arranging all subscriber data units, is denoted as E. All subscriber data units are stored in sequence in a data unit set.
It should be noted that although all subscriber data units within a data unit set are contiguous in a sequential arrangement, not all memory spaces corresponding to storing the subscriber data units are necessarily contiguous. The adjacent two subscriber data units may be stored continuously or intermittently in the actual physical storage structure. That is, the data unit set may be a continuous memory space address at one end, or may be a linked list structure with discontinuous memory space.
Referring to fig. 10, in the case of determining the data unit set, since the paired data in the previous subscriber data unit and the paired data in the next subscriber data unit may be logically arranged in a continuous manner, in one embodiment, during the pairing process of the paired data of the first subscriber data unit, the pointer gradually points from the highest bit of the paired data of the first subscriber data unit to the lowest bit of the paired data of the first subscriber data unit. Upon completion of the pairing process for the pairing data for the first subscriber data unit in the set of data units, the pointer will stay at the lowest order bit of the pairing data for the first subscriber data unit. By performing shift calculation on the paired data of the first subscriber data unit, the back pointer moves backward by a preset number of bits and finally points to the highest bit of the paired data of the second subscriber data unit, and at this time, pairing processing on the paired data of the second subscriber data unit can be started. The preset number of bits corresponds to the number of bits of the subscriber identity. The preset number of bits may be 16.
In fig. 10, X1 represents a pairing process between a message keyword and pairing data of a corresponding subscriber data unit, and X2 represents shift calculation performed on the pairing data of the subscriber data unit.
That is, after the pairing process of the pairing data of the previous subscriber data unit in the data unit set is completed, the process can enter the starting stage of the pairing process of the pairing data of the next subscriber data unit through shift calculation, so as to facilitate the pairing process of the pairing data of the next subscriber data unit.
Through shift calculation, under the condition that the subscriber identification of the next subscriber data unit is stored between the paired data in the two adjacent subscriber data units, the intermediate subscriber identification can be directly skipped to realize the switching of the paired data of the subscriber data units, so that the subscriber identification and the paired data in the subscriber data units are mutually separated in the pairing process, and the data structure in the subscriber data units is not easy to be damaged by interference.
Moreover, as the switching of the paired data is realized only by shifting the pointer, the positions of the paired data stored in the interior are not required to be confirmed one by one for all the subscriber data units, so that the memory space of the subscriber data units can be shared by multiple threads, the same paired data can be paired with multiple message keywords without mutual interference, the effect of concurrent execution is realized, the paired processing efficiency and the concurrent processing capability can be greatly improved, the response time delay can be effectively reduced, and the user experience is improved.
In addition, in some embodiments, in a case where a new subscriber data unit needs to be added to the data unit set, the added subscriber data unit may be arranged at the tail of the data unit set according to a preset algorithm policy, and the new subscriber data unit may be arranged at other positions in the data unit set.
In some embodiments, the set of data units is divided into at least two groupings of data units in the order in which the subscriber data units are arranged.
Specifically, referring to fig. 11, in one embodiment, a data unit packet is denoted as F. The number of data unit packets is three. Wherein three subscriber data units are stored in data unit group F1, three subscriber data units are stored in data unit group F2, and three subscriber data units are stored in data unit group F1.
When pairing is performed using paired data of subscriber data units in the data unit set, pairing may be performed on paired data of subscriber data units in any one of the three data unit groups. Because the subscriber data units are logically contiguous, the first subscriber data unit and the second subscriber data unit may be located in the same data unit group, or the first subscriber data unit and the second subscriber data unit may be located in different data unit groups. When the pairing processing is performed, parallel operation can be performed on all the data unit groups, so that the pairing processing is performed on the pairing data of the subscriber data units in all the data unit groups at the same time, and the processing efficiency is improved. Moreover, the data unit set is divided into a plurality of data unit groups, so that all the data unit groups can be conveniently stored in storage spaces at different positions, and the method can be suitable for the situations that the number of subscriber data units is huge, the memory resources of a server are less, and the continuous large memory space cannot be allocated.
Thus, a large number of subscriber data units can be conveniently stored.
In addition, in other embodiments, multiple data unit packets may also be formed into a tree structure. Specifically, the balanced tree structure may be constructed according to hash values of the subscription keywords, for example, the subscription keywords are modulo, and each node of the balanced tree is constructed sequentially according to increasing order until the whole data unit set is formed.
In some embodiments, the determining method comprises:
deleting the corresponding subscriber data unit under the condition that the first command is acquired, and sequentially moving other subscriber data units positioned behind the deleted subscriber data unit forwards; or (b)
And under the condition that the second command is acquired, confirming the subscriber data unit corresponding to the second command as invalid data.
The method for determining a message distribution object according to the embodiment of the present invention may be implemented by the server 100 according to the embodiment of the present invention. Specifically, referring to fig. 2, the server 100 is configured to: deleting the corresponding subscriber data unit under the condition that the first command is acquired, and sequentially moving other subscriber data units positioned behind the deleted subscriber data unit forwards; or under the condition that the second command is acquired, confirming the subscriber data unit corresponding to the second command as invalid data.
Thus, the additional operation overhead caused by frequently moving and sorting subscriber data units can be reduced.
Specifically, in some embodiments, the first command may be a delete command. In the event that the first command is obtained, then it may be determined that the subscriber data unit corresponding to the first command needs to be deleted. In other embodiments, the second command may be a discard command. When the second command is acquired, the subscriber data unit corresponding to the second command may be determined as invalid data, and the invalid data may be skipped directly when the pairing process is performed subsequently.
On the basis of the embodiment, frequent movement of the subscriber data units can be reduced, so that the operation overhead occupied by the subscriber data units can be reduced.
In some embodiments, the determining method comprises:
discarding the report message under the condition that no corresponding subscriber identification exists;
and pushing the report message to the user corresponding to the determined subscriber identity under the condition that the corresponding subscriber identity exists.
The method for determining a message distribution object according to the embodiment of the present invention may be implemented by the server 100 according to the embodiment of the present invention. Specifically, referring to fig. 2, the server 100 is configured to: discarding the report message under the condition that no corresponding subscriber identification exists; and pushing the report message to the user corresponding to the determined subscriber identity under the condition that the corresponding subscriber identity exists.
Thus, the processing effect on the reported message can be realized.
Specifically, in one embodiment, referring to FIG. 2, the server 100 may be provided with a set of interested subscribers. The set of interested subscribers may store subscriber identities determined by pairing. Under the condition that no corresponding subscriber identification exists, the fact that no subscriber identification can be determined through pairing is indicated, the subscriber identification is not stored in the interested subscriber set, and further it can be determined that no user subscribes to the currently paired report message, and therefore the report message can be discarded. In the event that a corresponding subscriber identity is determined to be present, the corresponding subscriber identity is stored into the set of interested subscribers. After the pairing processing between the message keywords and all the paired data is completed, determining the user corresponding to each subscriber identifier according to all the subscriber identifiers stored in the interested subscriber set, and pushing the report message to all the users.
In one embodiment, after the pairing process for one reported message has been completed, step 05 may be returned to pair another reported message.
Referring to fig. 12, in some embodiments, the number of paired data corresponding to each subscriber identifier is at least one.
Thus, memory can be advantageously saved.
Specifically, in fig. 12, the number of paired data is three, and the three paired data are B11, B12, B13, respectively. The three paired data all correspond to the same subscriber identity I. Because the three paired data can correspond to the same subscriber identification, the fact that one subscriber identification is stored for each paired data can be avoided, and therefore storage space can be saved.
In summary, the method for determining the message distribution object according to the embodiment of the invention can be implemented by adopting the bit complementation operation of the subscription key words and other modes for message subscription matching, thereby avoiding complex floating point operation, effectively reducing the CPU operation load and the time delay of message processing, and improving the subscription matching efficiency. The method for determining the embodiment of the invention also adopts the subscriber data unit set shift operation to realize the pipelined batch subscription processing, and can realize batch large-scale subscription matching processing only by pointer movement in a continuous memory space, thereby effectively reducing the complexity of matching operation, improving the message matching speed of the server 100 and saving additional memory overhead. The determining method of the embodiment of the invention also separates the subscriber identification in the subscriber data unit from the memory space of the paired data, and omits redundant network I/O overhead and resource competition consumption caused by locking based on processing methods such as local memory operation, non-locking and the like, so that the concurrent processing capacity of the server 100 is greatly improved.
A server 100 of an embodiment of the present invention includes a memory and a processor. The memory stores a computer program. The determination method of any one of the above embodiments is implemented when the processor executes the program.
According to the server, whether the users corresponding to the corresponding subscriber identifications subscribe to the reporting message or not can be determined according to whether the pairing result is the same as the preset value, the subscriber data units are stored in the memory, the network of the external equipment is not required to be accessed, and the users subscribed to the reporting message can be rapidly determined, so that the reporting message can be conveniently distributed to the corresponding users, and further the efficiency of processing a large amount of information can be improved.
For example, in the case where the computer program is executed, the following steps may be implemented:
01: responding to a user subscription request sent by a client, and determining a subscriber identifier and a corresponding subscription keyword;
02: carrying out data processing on the subscription keywords to obtain paired data;
03: generating a subscriber data unit according to the pairing data and the subscriber identification;
04: storing subscriber data units in a memory;
05: acquiring a report message;
06: extracting message keywords from the reported message;
07: performing word bit pairing processing according to the message keywords and the pairing data to obtain a pairing result;
08: and under the condition that the pairing result is the same as the preset value, determining the subscriber identification corresponding to the pairing result.
A computer-readable storage medium of an embodiment of the present invention has a computer program stored thereon. The computer program, when executed by a processor, implements the determination method of any of the above embodiments.
According to the computer readable storage medium, whether the users corresponding to the corresponding subscriber identifications subscribe to the reporting message or not can be determined according to whether the pairing result is the same as the preset value, the subscriber data units are stored in the memory, the network of the external equipment is not required to be accessed, and the users subscribed to the reporting message can be rapidly determined, so that the reporting message can be conveniently distributed to the corresponding users, and further the efficiency of processing a large amount of information can be improved.
For example, in the case where the computer program is executed, the following steps may be implemented:
01: responding to a user subscription request sent by a client, and determining a subscriber identifier and a corresponding subscription keyword;
02: carrying out data processing on the subscription keywords to obtain paired data;
03: generating a subscriber data unit according to the pairing data and the subscriber identification;
04: storing subscriber data units in a memory;
05: acquiring a report message;
06: extracting message keywords from the reported message;
07: performing word bit pairing processing according to the message keywords and the pairing data to obtain a pairing result;
08: and under the condition that the pairing result is the same as the preset value, determining the subscriber identification corresponding to the pairing result.
It is understood that the computer-readable storage medium may include: any entity or device capable of carrying a computer program, a recording medium, a USB flash disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a software distribution medium, and so forth. The computer program comprises computer program code. The computer program code may be in the form of source code, object code, executable files, or in some intermediate form, among others. The computer readable storage medium may include: any entity or device capable of carrying computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), and a software distribution medium.
In some embodiments of the present invention, the server 100 may include a single-chip microcomputer chip integrated with a processor, a memory, a communication module, and the like. The processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, system that includes a processing module, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the description of the present specification, reference to the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., means 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 the invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the spirit and principles of the invention, the scope of which is defined by the claims and their equivalents.

Claims (12)

1. A method for determining a message distribution object, comprising:
responding to a user subscription request sent by a client, and determining a subscriber identifier and a corresponding subscription keyword;
Performing data processing on the subscription keywords to obtain paired data;
generating a subscriber data unit according to the pairing data and the subscriber identification;
storing the subscriber data unit in a memory;
acquiring a report message;
extracting a message keyword from the reported message;
performing word bit pairing processing according to the message keywords and the pairing data to obtain a pairing result;
and under the condition that the pairing result is the same as a preset numerical value, determining the subscriber identification corresponding to the pairing result.
2. The determination method according to claim 1, characterized in that the determination method comprises:
under the condition that the user subscription request is obtained, checking the user subscription request;
and under the condition that the user subscription request is determined to not meet the first verification condition after verification, ignoring the user subscription request.
3. The method for determining according to claim 1, wherein the step of performing data processing on the subscription keyword to obtain paired data includes:
and according to a first algorithm, performing inversion calculation on all word bits of the subscription keywords to obtain the pairing data.
4. The method according to claim 1, wherein before the step of acquiring the report message, the method comprises:
checking the reported message;
and under the condition that the reported information is determined to not meet the second checking condition after checking, ignoring the reported information.
5. The method according to claim 1, wherein the step of performing word-bit pairing processing based on the message key and the pairing data to obtain a pairing result comprises:
and carrying out exclusive OR operation on the message key words and the pairing data according to a second algorithm to obtain the pairing result.
6. The determining method according to claim 1, wherein the subscriber data units are sequentially stored in a data unit set, the data unit set including adjacent first and second subscriber data units, the second subscriber data units being sequentially arranged after the first subscriber data unit, the determining method comprising:
and after the pairing processing of the pairing data of the first subscriber data unit is completed, performing shift calculation on the pairing data of the first subscriber data unit so as to perform the pairing processing on the pairing data of the second subscriber data unit.
7. The determining method according to claim 6, wherein the data unit set is divided into at least two data unit packets according to the arrangement order of the subscriber data units;
the first subscriber data unit and the second subscriber data unit are located in the same data unit group, or
The first subscriber data unit and the second subscriber data unit are located in different ones of the data unit groupings.
8. The determination method according to claim 6, characterized in that the determination method comprises:
deleting the corresponding subscriber data unit under the condition of acquiring the first command, and sequentially moving other subscriber data units positioned behind the deleted subscriber data unit forwards; or (b)
And under the condition that the second command is acquired, confirming the subscriber data unit corresponding to the second command as invalid data.
9. The determination method according to claim 1, characterized in that the determination method comprises:
discarding the report message under the condition that no corresponding subscriber identifier is determined;
and pushing the report message to a user corresponding to the determined subscriber identity under the condition that the corresponding subscriber identity is determined to exist.
10. A server, wherein the server is configured to:
responding to a user subscription request sent by a client, and determining a subscriber identifier and a corresponding subscription keyword;
performing data processing on the subscription keywords to obtain paired data;
generating a subscriber data unit according to the pairing data and the subscriber identification;
storing the subscriber data unit in a memory;
acquiring a report message;
extracting a message keyword from the reported message;
performing word bit pairing processing according to the message keywords and the pairing data to obtain a pairing result;
and under the condition that the pairing result is the same as a preset numerical value, determining the subscriber identification corresponding to the pairing result.
11. A server comprising a memory and a processor, the memory storing a computer program, the processor implementing the determination method of any one of claims 1-9 when executing the program.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the determination method of any of claims 1-9.
CN202210475165.9A 2022-04-29 2022-04-29 Method for determining message distribution object, server and computer readable storage medium Pending CN117009098A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210475165.9A CN117009098A (en) 2022-04-29 2022-04-29 Method for determining message distribution object, server and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210475165.9A CN117009098A (en) 2022-04-29 2022-04-29 Method for determining message distribution object, server and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117009098A true CN117009098A (en) 2023-11-07

Family

ID=88573309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210475165.9A Pending CN117009098A (en) 2022-04-29 2022-04-29 Method for determining message distribution object, server and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117009098A (en)

Similar Documents

Publication Publication Date Title
US10747780B2 (en) Blockchain-based data processing method and device
US11349824B2 (en) Block sequencing method and system based on tree-graph structure, and data processing terminal
CN107330094B (en) Bloom filter tree structure for dynamically storing key value pairs and key value pair storage method
CN111522874B (en) Block chain consensus method, apparatus, computer device and storage medium
CN109684099A (en) Message treatment method and device
CN110955704A (en) Data management method, device, equipment and storage medium
CN115033722A (en) Method, system, device and medium for accelerating data query of database
Luo et al. Efficient multiset synchronization
US20220166842A1 (en) Data distribution method and electronic device
CN113973021A (en) Network transmission optimization device and method for image block chain
Patgiri et al. Hunting the pertinency of bloom filter in computer networking and beyond: A survey
CN111026709A (en) Data processing method and device based on cluster access
CN111008218A (en) Method and system for structured storage of data on block chain
CN112165505B (en) Decentralized data processing method, electronic device and storage medium
Berenbrink et al. Efficient information exchange in the random phone-call model
CN117009098A (en) Method for determining message distribution object, server and computer readable storage medium
CN110019043B (en) Block chain data storage method
Haeupler et al. Optimal gossip with direct addressing
CN116319827A (en) Message broadcasting method and device
CN112817980B (en) Data index processing method, device, equipment and storage medium
CN115510161A (en) Data synchronization method, device, equipment and storage medium
CN107800738B (en) Data updating method and device
Knockel et al. Self-healing of Byzantine faults
CN107710165B (en) Method and device for storage node synchronization service request
CN112199333B (en) Storage method and device supporting multi-valued index file

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