CN115208849B - Interaction method and device - Google Patents
Interaction method and device Download PDFInfo
- Publication number
- CN115208849B CN115208849B CN202210743052.2A CN202210743052A CN115208849B CN 115208849 B CN115208849 B CN 115208849B CN 202210743052 A CN202210743052 A CN 202210743052A CN 115208849 B CN115208849 B CN 115208849B
- Authority
- CN
- China
- Prior art keywords
- user
- information
- image
- users
- interaction
- 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
Links
- 230000003993 interaction Effects 0.000 title claims abstract description 98
- 238000000034 method Methods 0.000 title claims abstract description 67
- 230000002452 interceptive effect Effects 0.000 claims abstract description 27
- 238000004891 communication Methods 0.000 claims description 20
- 238000004422 calculation algorithm Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
Abstract
The embodiment of the application provides an interaction method, which comprises the following steps: receiving first information reported by a first user and second information reported by N second users, wherein N is an integer, and the first information and the second information comprise information for determining the relative positions of the first user and the second user; determining whether a third user exists according to the first information and the second information, wherein the third user is the second user positioned in the preset distance range of the first user; acquiring an image of the first user as a first image and acquiring an image of the third user as a second image when the third user exists; and generating an interactive image according to the first image and the second image. The interaction method provided by the embodiment of the application can better integrate the online and offline interaction, and enrich the interaction modes among users.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to an interaction method, an interaction device, a computer device, and a storage medium.
Background
In real life, human-to-human interactions can be largely divided into two forms: one is online, which carries out activity communication through the internet; one is offline, where active communication is performed by focusing on a certain location.
However, these two types of interactions are mostly separated, i.e. either on-line or off-line, and the two types of interactions on-line and off-line are not fused together well, so that the types of interactions are not abundant.
Disclosure of Invention
The application aims to provide an interaction method, an interaction device, computer equipment and a storage medium, which are used for solving the technical problems that the online and offline two types of interaction cannot be fused together and the interaction form is not rich enough at present.
An aspect of an embodiment of the present application provides an interaction method, including: receiving first information reported by a first user and second information reported by N second users, wherein N is an integer, and the first information and the second information comprise information for determining the relative positions of the first user and the second user; determining whether a third user exists according to the first information and the second information, wherein the third user is a second user positioned in a preset distance range of the first user; acquiring an image of a first user as a first image and acquiring an image of a third user as a second image when the third user exists; an interactive image is generated from the first image and the second image.
Optionally, the method further comprises: user matching is carried out according to the first information and the second information, wherein the user matching comprises matching of the first user and the second user and matching of the second user; determining the users with the distances between the users not larger than a preset distance range as the users with successful matching, and recording the successful matching result; before determining whether the third user exists according to the first information and the second information, the method further comprises: and querying the result, and executing the step of determining whether a third user exists according to the first information and the second information in the case that the result does not comprise the first user.
Optionally, the first information and the second information include at least one of account information, IP address information, GPS information, WIFI information, and near field communication information.
Optionally, determining whether the third user exists according to the first information and the second information includes: and if the first information or the second information comprises account information, determining that a third user exists if the first information or the second information comprises the account information of the first user and the account information of at least one second user, wherein the account information of the first user is acquired through Bluetooth equipment of the second user, and the account information of the second user is acquired through the Bluetooth equipment of the first user.
Optionally, after receiving the first information reported by the first user and the second information reported by the N second users, the method further includes: storing the users corresponding to the same IP address in a set data structure under the condition that the first information and the second information comprise IP address information; determining whether a third user exists according to the first information and the second information comprises: in case there is a first user and at least one second user in the same IP address, it is determined that there is a third user.
Optionally, determining whether the third user exists according to the first information and the second information includes: under the condition that the first information and the second information comprise GPS information, inquiring whether a second user located in a preset distance range of the first user exists or not by adopting GeoHash algorithm according to the GPS information; in the presence, a third user is determined to be present.
Optionally, the first information and the second information include at least two of account information, IP address information, GPS information, WIFI information, and near field communication information, and the method further includes: and determining whether a third user exists according to each piece of information according to a preset sequence, and performing locking control on each determination process.
Optionally, after determining whether the third user exists according to each information in the preset order and performing locking control on each determination process, the method further includes: obtaining a sub-result determined according to each type of information; combining the sub-results to obtain a combined result; and determining whether a third user exists according to the combination result.
An aspect of an embodiment of the present application further provides an interaction device, including: the receiving module is used for receiving first information reported by a first user and second information reported by N second users, wherein N is an integer, and the first information and the second information comprise information for determining the relative positions of the first user and the second user; the determining module is used for determining whether a third user exists according to the first information and the second information, wherein the third user is a second user positioned in a preset distance range of the first user; the acquisition module is used for acquiring an image of a first user as a first image and acquiring an image of a third user as a second image under the condition that the third user exists; and the interaction module is used for generating an interaction image according to the first image and the second image.
In one aspect, the embodiments of the present application further provide a computer device, where the computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor is configured to implement the steps of the interaction method described above when executing the computer program.
An aspect of the embodiments of the present application further provides a computer readable storage medium having a computer program stored therein, where the computer program is executable by at least one processor to cause the at least one processor to perform the steps of the interaction method described above.
The interaction method, the interaction device, the computer equipment and the storage medium provided by the embodiment of the application have the following advantages:
By receiving the first information reported by the first user and the second information reported by N second users, determining whether the second users located in the preset distance range of the first user exist or not according to the first information and the second information, and generating an interaction image among the users under the condition that the second users exist, a new form of interaction can be provided; because the interactive image generated on line is the image of the interaction between the users within the preset distance range, the users within the preset distance range can also perform corresponding off-line activities, so that the two types of interaction on line and off line can be well fused together, and the interaction modes between the users are enriched.
Drawings
FIG. 1 schematically illustrates an environmental architecture diagram of an embodiment of the present application;
FIG. 2 schematically shows a flowchart of an interaction method according to a first embodiment of the application;
FIG. 3 schematically illustrates another flowchart of an interaction method according to a first embodiment of the present application;
FIG. 4 is a schematic diagram of an interaction method according to a first embodiment of the present application;
FIG. 5 is a flowchart illustrating an interaction method according to a first embodiment of the present application;
FIG. 6 schematically shows a block diagram of an interactive apparatus according to a second embodiment of the present application;
Fig. 7 schematically shows a hardware architecture diagram of a computer device according to a third embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that the descriptions of "first," "second," etc. in the embodiments of the present application are 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 at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present application.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order in which the steps are performed, but are merely used to facilitate description of the present application and to distinguish between each step, and thus should not be construed as limiting the present application.
The following is an explanation of the terminology involved in the present application:
near Field Communication (NFC) is a set of Communication protocols that allow two electronic devices to communicate within a few centimeters of each other.
The set data structure is similar to an array, but the values of the members are all unique and have no duplicate values.
GeoHash is an address code, which can code two-dimensional longitude and latitude into a one-dimensional character string, is a rectangular area, and GeoHash algorithm is an effective solution for solving the search of nearby places.
Geo, a microformat that marks the geographic coordinates (longitude, latitude) of WGS84 (world geodetic system) in HTML (hypertext markup language) and XHTML (extensible hypertext markup language).
A gyroscope, which is a device for sensing and maintaining direction based on the theory of conservation of angular momentum.
The vibrator is a mechanical device capable of generating vibration, and is mostly generated by a motor with eccentric load on a transmission shaft.
Fig. 1 schematically illustrates an environmental architecture diagram of an embodiment of the present application, as shown in fig. 1:
The clients 300 are connected with the server 100 through the network 200, the user reports information for determining the relative position between the users to the server 100 through the network 200 by utilizing each client 300, the server 100 determines whether the distance between the two clients 300 is within a preset distance range according to the information reported by each client 300, if the distance is within the preset distance range, the successful matching between the users is determined, an image of the user which is successfully matched is obtained, an interactive image is generated according to the obtained image, and the interactive image is sent to the client 300 corresponding to the user which is successfully matched.
In an exemplary embodiment, the server 100 may refer to a data center, such as a single house, or distributed across different geographic locations (e.g., across several houses). The server 100 may provide services through one or more networks 200.
Network 200 includes various network devices such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. Network 200 may include physical links such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and/or the like. Network 200 may include wireless links such as cellular links, satellite links, wi-Fi links, and/or the like.
The client 300 may include, for example, a mobile device, tablet device, laptop computer, smart device (e.g., smart clothing, smart watch, smart glasses), virtual reality headset, gaming device, set top box, digital streaming device, robot, vehicle terminal, smart television, television box, or electronic book reader.
At present, the on-line and off-line interactions are mostly separated, the two types of interactions cannot be well fused together, and the types of interactions are not abundant.
The interaction scheme of the embodiment of the application can better fuse the interaction of the two modes of online and offline together, thereby enriching the interaction mode.
The following describes the interaction scheme through several embodiments, and for ease of understanding, the following will describe the server 100 in fig. 1 as an execution body.
Example 1
Fig. 2 schematically shows a flowchart of an interaction method according to a first embodiment of the present application, including steps S410 to S440, and specifically described as follows:
step S410, receiving first information reported by a first user and second information reported by N second users, where N is an integer, and the first information and the second information include information for determining a relative position between the first user and the second user.
The first user may be the user initiating the interactive request and the second user may be another user relative to the first user. It will be appreciated that the second user may also be the user who initiated the request for interaction, but not the other user with respect to the first user, i.e. the roles of the first user and the second user are interchangeable. For example, both user a and user B initiate an interaction request, and for user a, user a is a first user, and user B is a second user; for user B, user B is a first user, and user a is a second user.
The first user and the second user report the first information and the second information through respective clients 300, respectively. Optionally, the first user and the second user report information to the server 100 through a specific application (such as app). When the user reports the information, the user can be considered to send an interaction request, for example, when the first user reports the first information, the first user can be considered to send an interaction request. Alternatively, the user may report the information first and then send an interaction request to the server 100, for example, after step S410, the server 100 receives the interaction request sent by the first user, and after receiving the interaction request sent by the first user, performs step S420 and the following steps.
It will be appreciated that N may be 0, since there may be no second user reporting the second information while the first user is reporting the first information.
The specific information of the first information and the second information may be set according to actual needs, so long as the relative position between the users can be determined according to the first information and the second information, thereby determining whether the second user is within the preset distance range of the first user. Since the roles of the first user and the second user may be interchanged, in the subsequent step S420, it is determined whether the third user exists according to the first information and the second information, and in fact, for the server 100, it is determined whether the distance between the users exists within the preset distance range.
In an exemplary embodiment, the first information and the second information include at least one of account information, IP address information, GPS information, WIFI information, and near field communication information.
Step S420, determining whether a third user exists according to the first information and the second information, wherein the third user is a second user located in a preset distance range of the first user.
For example, if the first information and the second information are WIFI information, the server 100 may determine whether the first information and the second information are the same WIFI information, and if the first information and the second information are the same WIFI information, it indicates that there is a second user that uses the same router to access the internet, and the distances between users that use the same router to access the internet are all relatively close, so that it may be determined that there is a third user. Of course, in the foregoing example, the judgment principle of determining whether the third user exists is to be within the preset distance range, and since the distances of the users surfing the internet using the same router are all relatively close, when determining that the first user and the plurality of second users surf the internet using the same router, the server 100 may determine that the distances between the users are within the preset distance range, thereby determining that the third user exists; that is, the server 100 may set up to: when the first information and the second information meet the preset condition, the second user which is located in the preset distance range of the first user is considered to exist, namely the third user is determined to exist.
For another example, the first information and the second information are near field communication information, for example, the first user and the plurality of second users report the first information and the second information by colliding with terminals (such as mobile phones) corresponding to the respective clients 300, and since the near field communication information needs to be very close to the users, if the server 100 receives the near field communication information, it can directly determine that the third user exists.
It should be understood that, when the information types of the first information and the second information are different, the client 300 may acquire the corresponding information in different manners and report the corresponding information to the server 100; after receiving the first information and the second information, the server 100 may also process the first information and the second information in different manners according to different information types, and may specifically set the first information and the second information according to actual needs, which is not limited herein.
In step S430, in the case where the third user is present, an image of the first user is acquired as the first image, and an image of the third user is acquired as the second image.
The specific images of the first image and the second image can be determined according to actual needs, for example, an avatar of a user, an uploaded picture photographed by the user, and the like. The first image and the second image may be included in the first information and the second information, that is, the information reported by the user includes the corresponding image, and the server 100 obtains the corresponding first image and the second image from the first information and the second information. Alternatively, the server 100 may acquire the first image and the second image again if it is determined that the third user exists.
In step S440, an interactive image is generated according to the first image and the second image.
When generating the interactive image according to the first image and the second image, a preset template can be utilized to generate the corresponding interactive image. For example, the server 100 obtains the head portrait of the first user as a first image, obtains the head portrait of the third user as a second image, and then obtains a template (preset template) of the dry cup, and generates a group photo of the first user and the dry cup (interaction) of the third user by using the template of the dry cup. The specific preset template and the generated interactive image can be set according to actual needs, and the method is not limited herein.
After generating the interactive image, the server 100 may send the interactive image to the client 300 corresponding to the first user and the third user, so that the first user and the third user may share with friends, further increasing the interest of interaction, and thus enriching the effect of interaction.
According to the interaction method provided by the embodiment, through receiving the first information reported by the first user and the second information reported by the N second users, whether the second users located in the preset distance range of the first user exist or not is determined according to the first information and the second information, and under the condition that the second users exist, an interaction image among the users is generated, so that a new form of interaction can be provided; because the interactive image generated on line is the image of the interaction between the users within the preset distance range, the users within the preset distance range can also perform corresponding off-line activities, so that the two types of interaction on line and off line can be well fused together, and the interaction modes between the users are enriched.
In an exemplary embodiment, as shown in fig. 3, another flowchart of the interaction method according to the first embodiment of the present application is schematically shown, including steps S510 to S570, which are specifically described as follows:
step S510, receiving first information reported by a first user and second information reported by N second users, where N is an integer, and the first information and the second information include information for determining a relative position between the first user and the second user.
And step S520, performing user matching according to the first information and the second information, wherein the user matching comprises matching of the first user and the second user and matching between the second user.
I.e. the server 100 performs matching between all users according to all reported information. For example, if the first user is user a and the second user includes user B and user C, the server 100 performs matching between user a and user B, C according to all the reported information, and matches between user B and user C.
In step S530, the users with the distance between the users not greater than the preset distance range are determined as the users with successful matching, and the result of successful matching is recorded.
As described above, when the server 100 performs the matching determination, the distance may be determined directly according to the first information and the second information, or the distance between the users may be indirectly determined to be not greater than the preset distance range according to whether the first information and the second information meet the preset condition.
If the distance between the users is not greater than the preset distance range, the server 100 determines the users as users successfully matched, and records the result of successful matching, for example, if the distance between the users a, B, and C is not greater than the preset distance range, the result records as successful matching of the users a, B, and C. It will be appreciated that successful matching of multiple users means that the distance between each of them is no greater than the predetermined distance range.
Illustratively, if the distance between users is greater than a preset distance range, a match failure is determined.
Step S540, inquiring the result, judging whether the result contains the first user, if so, determining that the third user exists, and proceeding to step S560, otherwise proceeding to step S550.
Optionally, the server 100 may execute step S540 after receiving the interaction request sent by the first user, that is, the first user sends the interaction request through the client 300, and after receiving the interaction request sent by the first user, the server 100 queries the result and the subsequent judgment process according to the interaction request. When the first user sends an interaction request through the client 300, the first user may trigger a gyroscope (angular velocity sensor) to send the interaction request by shaking the terminal where the client 300 is located, and then may start a vibrator, so that the user obviously senses the vibration sense of the terminal, and the interaction effect may be effectively enhanced.
Because the result records the information of the successfully matched user, the server 100 can judge whether the first user is included according to the result, if the first user is included, the result indicates that the matching result related to the first user exists before, and the first user is successfully matched with at least one second user, so that the third user is determined to exist, and the corresponding result is returned; if the first user is not included, there may be no matching result related to the first user before that, so step S550 is proceeded to make further judgment to determine whether the third user exists.
Step S550, determining whether a third user exists according to the first information and the second information, wherein the third user is a second user located in a preset distance range of the first user.
In step S560, in the case where the third user is present, the image of the first user is acquired as the first image, and the image of the third user is acquired as the second image.
Step S570, generating an interactive image according to the first image and the second image.
The steps S510, S550 to S570 are the same as the steps S140 to S440, and the detailed description is omitted here.
In this embodiment, user matching is performed according to the first information and the second information, a result of successful matching is recorded, before a third user is determined according to the first information and the second information, the result of successful matching is queried, and if the result does not include the first user, the following steps are executed, so that the first user can determine the third user according to the matching result; because the processing and judging processes of the server 100 on the users are the same when the users initiate the interactive request within the same or similar time, before determining the third user according to the first information and the second information, whether the corresponding matching result exists is queried, so that after the server 100 processes the request of one user, other users can use the matching result obtained by processing the user, repeated processing is avoided, and the utilization rate of computing resources of the server 100 is improved.
In an exemplary embodiment, in step S420, determining whether a third user exists according to the first information and the second information includes: and if the first information or the second information comprises account information, determining that a third user exists if the first information or the second information comprises the account information of the first user and the account information of at least one second user, wherein the account information of the first user is acquired through Bluetooth equipment of the second user, and the account information of the second user is acquired through the Bluetooth equipment of the first user.
The account information may be information related to the identity of the user, such as the user's name, nickname, ID, etc.
For example, if the first information includes (Zhang three, liu four), where Zhang three is the account information of the first user and Liu four is the account information of the second user, it is determined that the third user exists.
In practical applications, the first user and the second user may respectively open the respective clients 300 (specifically, for example, apps), obtain bluetooth rights, broadcast their own account information to other users via bluetooth, and obtain account information broadcast by other users via bluetooth, so that the information reported by the users may include their own account information and account information of other users.
In this embodiment, when the first information or the second information includes account information of the first user and account information of at least one second user, it is determined that the third user exists, and whether the third user exists may be determined according to the account information; because the account information of other users is acquired through the Bluetooth equipment, and the communication distance of the Bluetooth equipment is relatively short, the communication distance can be considered to be within the preset distance range, so that whether the third user exists or not is determined according to the account information, and whether the distance between the users is within the preset distance range can be conveniently judged.
In an exemplary embodiment, after step S410, that is, after receiving the first information reported by the first user and the second information reported by the N second users, the method further includes: storing the users corresponding to the same IP address in a set data structure under the condition that the first information and the second information comprise IP address information; in step S420, determining whether the third user exists according to the first information and the second information may include: in case there is a first user and at least one second user in the same IP address, it is determined that there is a third user.
Storing the users corresponding to the same IP address in a set data structure is, for example: the first IP address (user a, user B, user C … …) so that the server 100 can determine that a third user exists if the first user and at least one second user exist in the same IP address.
In this embodiment, when the first information and the second information include IP address information, the user corresponding to the same IP address is stored in the set data structure, and when the first user and at least one second user exist in the same IP address, it is determined that a third user exists, and the third user can be determined according to the IP address; because the distance between users with the same IP address is relatively short, the users can be considered to be within the preset distance range, so that the users corresponding to the same IP address are stored in the set data structure, and whether a third user exists can be conveniently judged according to the IP address; meanwhile, the set data structure has no repeated value, so that the server 100 is facilitated to perform corresponding judgment.
In an exemplary embodiment, in step S420, determining whether a third user exists according to the first information and the second information includes: and inquiring whether a second user located in the preset distance range of the first user exists or not by adopting GeoHash algorithm according to the GPS information under the condition that the first information and the second information comprise the GPS information, and determining that a third user exists under the condition that the second user exists.
The GPS information can be stored in the Geo structure, so that corresponding calculation is conveniently performed through GeoHash algorithm.
For example, the first information and the second information both include GPS information (specifically, longitude and latitude information may be, for example 123.223,122.4), then GeoHash algorithm may be used to calculate whether the distance between the first user and the second user is within a preset distance range, and if the distance is within the preset distance range, then it is determined that the third user exists.
In this embodiment, if the first information and the second information include GPS information, a GeoHash algorithm is adopted to query whether a second user exists within a preset distance range of the first user according to the GPS information, if so, a third user is determined to exist, and if so, whether the third user exists can be determined according to the GPS information; since the GPS information can effectively reflect the location information of the users, and the GeoHash algorithm can effectively calculate the distance between the users, the third user can be effectively determined by calculating the GPS information using the GeoHash algorithm.
In an exemplary embodiment, the first information and the second information include at least two of account information, IP address information, GPS information, WIFI information, and near field communication information, and the interaction method may further include: and determining whether a third user exists according to each piece of information according to a preset sequence, and performing locking control on each determination process.
The locking control is used for locking the current calculation processing process of the server 100, preventing interference or interruption caused by other processes or requests of other users, and facilitating concurrent processing of the server 100. Optionally, if during the locking process, other users send interactive requests to request the locking authority, the server 100 may notify the user to retry later, and the client 300 corresponding to the user performs logic processing of retry later.
For example, the first information and the second information include two information including IP address information and GPS information, and the preset order is that the IP address information is processed before the GPS information is processed, and then the server 100 performs processing according to the preset order, and performs locking control when determining whether the third user exists according to the IP address information or according to the GPS information.
In this embodiment, the first information and the second information include at least two kinds of information, whether the third user exists or not is determined according to each kind of information according to a preset sequence, and locking control is performed for each determination process, so that the server 100 is facilitated to perform corresponding data processing, and the situation of multi-user concurrent interaction requests is effectively dealt with.
In an exemplary embodiment, after determining whether the third user exists according to each information in a preset order and performing locking control on each determination process, the interaction method may further include: and obtaining a sub-result determined according to each piece of information, carrying out merging processing on the sub-result to obtain a merging result, and determining whether a third user exists according to the merging result.
Because the first information and the second information are reported by different users, and the information reported by different users may have differences, when determining whether a third user exists according to a single type of information, the situation that the third user does not exist can occur with a high probability; and the result of each information determination is combined, so that the result of multiple information determinations can be integrated, and the success rate of interaction is ensured to a greater extent. For example, the account information is acquired through the bluetooth device, bluetooth permission needs to be acquired first, and if the user does not allow the bluetooth permission, the user cannot acquire the account information; if the user is simply determined according to the account information, the result is that the third user does not exist; however, if other information is available and the result obtained each time is combined, the probability of the third user being present in the result will be greatly increased.
In this embodiment, when the first information and the second information include at least two kinds of information, the sub-results determined according to each kind of information are obtained, and the sub-results are combined to obtain a combined result, and whether the third user exists is determined according to the combined result, so that the success rate of user interaction can be effectively improved.
Please refer to fig. 4, which is a schematic diagram of an interaction method according to an embodiment of the present application, and can be simply divided into two parts: firstly, reporting information, and secondly, matching results, wherein a user can report the information to the server 100 through the APP of the client 300; the server 100 stores corresponding information, matches according to the corresponding information, and places the successfully matched record into the storage; when other users send out interactive requests (training requests), the server side judges according to the stored records, if the corresponding matching records exist, the corresponding training results are returned according to the matching records, and if the corresponding matching records do not exist, the processing and judgment are performed according to the reported information.
More specifically, please refer to fig. 5, which is a flowchart illustrating an interaction method according to an embodiment of the present application, wherein the process is substantially as follows:
1. the first user sends out a training request (interactive request);
2. The server 100 inquires whether a corresponding matching result exists, if so, the method enters 3, otherwise, the method enters 4;
3. Returning a matching result according to the corresponding result record, acquiring an image of a user successfully matched, generating an interactive image, and sending the interactive image to the corresponding client 300;
4. The server 100 inquires the information reported by the client 300 (of the first user and the second user), if no corresponding information exists, the process goes to 5, otherwise, the process goes to 6;
5. Returning a result of the matching failure to the client 300 of the first user;
6. According to the reported information, carrying out classification matching (taking IP address information, GPS information and account information as examples in the figure) and respectively carrying out matching of the IP address information, the GPS information and the user account information;
7. comprehensively classifying the matching result, judging whether the matching is successful, if so, entering 8, otherwise, returning to 5;
8. And recording the successfully matched result into a result record, deleting the reported data of the successfully matched user, and ending the matching process.
Example two
Fig. 6 schematically shows a block diagram of an interaction device 600 according to a second embodiment of the application, which interaction device 600 may be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors to complete the embodiment of the application. Program modules in accordance with the embodiments of the present application are directed to a series of computer program instruction segments capable of performing the specified functions, and the following description describes each program module in detail.
As shown in fig. 6, the interaction device 600 may include a receiving module 610, a determining module 620, an obtaining module 630, and an interaction module 640.
The receiving module 610 is configured to receive first information reported by a first user and second information reported by N second users, where N is an integer, and the first information and the second information include information for determining a relative position between the first user and the second user;
a determining module 620, configured to determine whether a third user exists according to the first information and the second information, where the third user is a second user located within a preset distance range of the first user;
an acquiring module 630, configured to acquire, in the presence of a third user, an image of the first user as a first image, and acquire, in the presence of the third user, an image of the third user as a second image;
the interaction module 640 is configured to generate an interaction image according to the first image and the second image.
In an exemplary embodiment, the interaction device 600 further includes a matching module and a query module (not shown in the figure), and the area matching module is configured to: user matching is carried out according to the first information and the second information, wherein the user matching comprises matching of the first user and the second user and matching of the second user; determining the users with the distances between the users not larger than a preset distance range as the users with successful matching, and recording the successful matching result; and the query module is used for: and querying the result, and executing the step of determining whether a third user exists according to the first information and the second information in the case that the result does not comprise the first user.
In an exemplary embodiment, the first information and the second information include at least one of account information, IP address information, GPS information, WIFI information, and near field communication information.
In an exemplary embodiment, the determination module 620 is further configured to: and if the first information or the second information comprises account information, determining that a third user exists if the first information or the second information comprises the account information of the first user and the account information of at least one second user, wherein the account information of the first user is acquired through Bluetooth equipment of the second user, and the account information of the second user is acquired through the Bluetooth equipment of the first user.
In an exemplary embodiment, the interaction device 600 further comprises a storage module (not shown in the figure) for: storing the users corresponding to the same IP address in a set data structure under the condition that the first information and the second information comprise IP address information; the determining module 620 is further configured to: in case there is a first user and at least one second user in the same IP address, it is determined that there is a third user.
In an exemplary embodiment, the determination module 620 is further configured to: under the condition that the first information and the second information comprise GPS information, inquiring whether a second user located in a preset distance range of the first user exists or not by adopting GeoHash algorithm according to the GPS information; in the presence, a third user is determined to be present.
In an exemplary embodiment, the first information and the second information include at least two of account information, IP address information, GPS information, WIFI information, and near field communication information, and the interaction device 600 further includes a locking module (not shown in the figure) for: and determining whether a third user exists according to each piece of information according to a preset sequence, and performing locking control on each determination process.
In an exemplary embodiment, the interaction device 600 further includes a merging module (not shown in the figure), where the merging module is configured to: obtaining a sub-result determined according to each type of information; combining the sub-results to obtain a combined result; and determining whether a third user exists according to the combination result.
Example III
Fig. 7 schematically shows a hardware architecture diagram of a computer device 700 adapted for an interactive method according to a third embodiment of the application. The computer device 700 may be a device capable of automatically performing numerical calculation and/or data processing according to a preset or stored instruction. For example, it may be a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers), a gateway, or the like. As shown in fig. 7, computer device 700 includes at least, but is not limited to: memory 710, processor 720, and network interface 730 may be communicatively linked together by a system bus. Wherein:
The memory 710 includes at least one type of computer-readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 710 may be an internal storage module of the computer device 700, such as a hard disk or memory of the computer device 700. In other embodiments, the memory 710 may also be an external storage device of the computer device 700, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, abbreviated as SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the computer device 700. Of course, the memory 710 may also include both internal memory modules of the computer device 700 and external memory devices. In this embodiment, the memory 710 is typically used to store an operating system and various types of application software installed on the computer device 700, such as program codes of an interaction method. In addition, the memory 710 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 720 may be a central processing unit (Central Processing Unit, simply CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 720 is typically used to control the overall operation of the computer device 700, such as performing control and processing related to data interaction or communication with the computer device 700, and the like. In this embodiment, processor 720 is used to execute program code or process data stored in memory 710.
Network interface 730 may include a wireless network interface or a wired network interface, and network interface 730 is typically used to establish a communication link between computer device 700 and other computer devices. For example, the network interface 730 is used to connect the computer device 700 to an external terminal through a network, establish a data transmission channel and a communication link between the computer device 700 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a global system for mobile communications (Global System of Mobile communication, abbreviated GSM), wideband code division multiple access (Wideband Code Division Multiple Access, abbreviated WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, etc.
It should be noted that fig. 7 only shows a computer device having components 710-730, but it should be understood that not all of the illustrated components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the interaction method stored in the memory 710 may be further divided into one or more program modules and executed by one or more processors (the processor 720 in this embodiment) to perform an embodiment of the present application.
Example IV
The embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the interaction method of the embodiments.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, abbreviated as SMC), a Secure Digital (abbreviated as SD) card, a flash memory card (FLASH CARD), or the like, which are provided on the computer device. Of course, the computer-readable storage medium may also include both internal storage units of a computer device and external storage devices. In this embodiment, the computer readable storage medium is typically used to store an operating system and various types of application software installed on the computer device, such as program codes of the interaction method in the embodiment. Furthermore, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than what is shown or described, or they may be separately fabricated into individual integrated circuit modules, or a plurality of modules or steps in them may be fabricated into a single integrated circuit module. Thus, embodiments of the application are not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (10)
1. A method of interaction, comprising:
receiving first information reported by a first user and second information reported by N second users, wherein N is an integer, and the first information and the second information comprise information for determining the relative positions of the first user and the second user;
determining whether a third user exists according to the first information and the second information, wherein the third user is the second user positioned in the preset distance range of the first user;
Acquiring an image of the first user as a first image and acquiring an image of the third user as a second image when the third user exists;
Generating an interactive image according to the first image and the second image;
The method further comprises the steps of:
Performing user matching according to the first information and the second information, wherein the user matching comprises matching of the first user and the second user and matching of the second user;
determining the users with the distances between the users not larger than the preset distance range as successful users, and recording the successful matching result;
before said determining whether a third user exists according to said first information and said second information, further comprising:
querying the result, and executing the step of determining whether a third user exists according to the first information and the second information if the result does not include the first user;
And in the case that the result includes the first user, determining that the third user exists, executing the steps of acquiring an image of the first user as a first image and acquiring an image of the third user as a second image in the case that the third user exists, and generating an interactive image according to the first image and the second image.
2. The method of interaction of claim 1, wherein the first information and the second information comprise at least one of account information, IP address information, GPS information, WIFI information, and near field communication information.
3. The method of interaction of claim 2, wherein said determining whether a third user is present based on said first information and said second information comprises:
and if the first information or the second information comprises account information, determining that the third user exists if the first information or the second information comprises the account information of the first user and at least one account information of the second user, wherein the account information of the first user is acquired through Bluetooth equipment of the second user, and the account information of the second user is acquired through Bluetooth equipment of the first user.
4. The interaction method according to claim 2, further comprising, after receiving the first information reported by the first user and the second information reported by the N second users:
storing a user corresponding to the same IP address in a set data structure in case that the first information and the second information include the IP address information;
The determining whether a third user exists according to the first information and the second information comprises:
in case the first user and at least one second user are present in the same IP address, it is determined that a third user is present.
5. The method of interaction of claim 2, wherein said determining whether a third user is present based on said first information and said second information comprises:
Inquiring whether the second user located in the first user preset distance range exists or not by adopting GeoHash algorithm according to the GPS information under the condition that the first information and the second information comprise GPS information;
in the presence, a third user is determined to be present.
6. The interaction method of claim 2, wherein the first information and the second information include at least two of the account information, IP address information, GPS information, WIFI information, and near field communication information, the method further comprising:
and determining whether a third user exists according to each piece of information according to a preset sequence, and performing locking control on each determination process.
7. The interactive method according to claim 6, further comprising, after said determining whether a third user exists according to each of said information in a predetermined order and performing locking control for each determination process:
Obtaining a sub-result determined according to each piece of information;
combining the sub-results to obtain a combined result;
and determining whether the third user exists according to the combination result.
8. An interactive apparatus, comprising:
The receiving module is used for receiving first information reported by a first user and second information reported by N second users, wherein N is an integer, and the first information and the second information comprise information for determining the relative positions of the first user and the second user;
The determining module is used for determining whether a third user exists according to the first information and the second information, wherein the third user is the second user positioned in the preset distance range of the first user;
the acquisition module is used for acquiring an image of the first user as a first image and acquiring an image of the third user as a second image when the third user exists;
The interaction module is used for generating an interaction image according to the first image and the second image;
the interaction device further comprises a matching module and a query module, wherein the area matching module is used for: performing user matching according to the first information and the second information, wherein the user matching comprises matching of the first user and the second user and matching of the second user; determining the users with the distances between the users not larger than the preset distance range as successful users, and recording the successful matching result;
The query module is used for: querying the result, and executing the step of determining whether a third user exists according to the first information and the second information if the result does not include the first user; and in the case that the result includes the first user, determining that the third user exists, executing the steps of acquiring an image of the first user as a first image and acquiring an image of the third user as a second image in the case that the third user exists, and generating an interactive image according to the first image and the second image.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor is adapted to implement the steps of the interaction method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program executable by at least one processor to cause the at least one processor to perform the steps of the interaction method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210743052.2A CN115208849B (en) | 2022-06-27 | Interaction method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210743052.2A CN115208849B (en) | 2022-06-27 | Interaction method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115208849A CN115208849A (en) | 2022-10-18 |
CN115208849B true CN115208849B (en) | 2024-07-26 |
Family
ID=
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104025625A (en) * | 2011-10-24 | 2014-09-03 | 裵陈友 | Method for providing location-based service for finding person using smart device |
CN104580930A (en) * | 2013-10-28 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Group photo taking method and system |
CN112604303A (en) * | 2020-12-24 | 2021-04-06 | 南方科技大学 | Game player matching method, device, equipment and storage medium |
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104025625A (en) * | 2011-10-24 | 2014-09-03 | 裵陈友 | Method for providing location-based service for finding person using smart device |
CN104580930A (en) * | 2013-10-28 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Group photo taking method and system |
CN112604303A (en) * | 2020-12-24 | 2021-04-06 | 南方科技大学 | Game player matching method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11917037B2 (en) | Methods, devices, and systems for determining a subset for autonomous sharing of digital media | |
US11546439B2 (en) | Method and system for predicting a geographic location of a network entity | |
EP3200417B1 (en) | Method and device for information interaction and association between human biological feature data and account | |
US9774642B2 (en) | Method and device for pushing multimedia resource and display terminal | |
CN103686591B (en) | Obtain the method and system of positional information | |
US20140250385A1 (en) | Interactive method, user terminal, server and system, computer storage medium | |
KR101667946B1 (en) | Determining additional information associated with geographic location information | |
KR20190067194A (en) | Methods, devices, and servers for account login | |
CN111643907A (en) | Game login method and device, storage medium and electronic equipment | |
CN106254319B (en) | Light application login control method and device | |
CN104767767A (en) | Method, device and system for sharing Internet access data and network equipment | |
CN109150913B (en) | Method and device for accessing application under micro-service architecture, storage medium and server | |
KR20190069574A (en) | Wireless network type detection method and apparatus, and electronic device | |
JP2015514969A (en) | POSITIONING METHOD, POSITIONING DEVICE, AND COMPUTER PROGRAM | |
CN115208849B (en) | Interaction method and device | |
CN108989312B (en) | Authentication method and device based on geographic position | |
CN115208849A (en) | Interaction method and device | |
US20160156726A1 (en) | Method, server, terminal, system, and storage medium for displaying multiuser map | |
KR102416178B1 (en) | Method and apparatus for generating user group | |
CN110769065A (en) | Remote management method, system, terminal equipment and server | |
CN114051243B (en) | Verification method, verification device, electronic equipment and storage medium | |
JP2020511078A (en) | Attach visible network for synchronous local search results | |
CN115134405B (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
CN108243178B (en) | Method and system for acquiring anchor attention state | |
CN116961915A (en) | Differential data processing method, system and related equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |