CN115733920A - Data code acquisition method and device, storage medium and electronic equipment - Google Patents

Data code acquisition method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115733920A
CN115733920A CN202211345169.1A CN202211345169A CN115733920A CN 115733920 A CN115733920 A CN 115733920A CN 202211345169 A CN202211345169 A CN 202211345169A CN 115733920 A CN115733920 A CN 115733920A
Authority
CN
China
Prior art keywords
position data
preset route
data
acquiring
data code
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
CN202211345169.1A
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.)
Spreadtrum Communications Shenzhen Co ltd
Original Assignee
Spreadtrum Communications Shenzhen 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 Spreadtrum Communications Shenzhen Co ltd filed Critical Spreadtrum Communications Shenzhen Co ltd
Priority to CN202211345169.1A priority Critical patent/CN115733920A/en
Publication of CN115733920A publication Critical patent/CN115733920A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Navigation (AREA)

Abstract

The embodiment of the invention provides a method and a device for acquiring a data code, a storage medium and electronic equipment. The method comprises the following steps: acquiring position data with a set number of positions on a preset route in the moving process of a user; determining the moving direction according to the position data of the set number; judging whether the moving direction is the target direction of a preset route or not; if the moving direction is judged to be the target direction, the data code is obtained, so that the electronic equipment obtains the data code in the moving process of the user, the user can display the health code on the display screen without waiting after opening the data code application, the crowd gathering condition is reduced, and the burden of a base station and the possibility of network congestion are reduced.

Description

Data code acquisition method and device, storage medium and electronic equipment
[ technical field ] A method for producing a semiconductor device
The embodiment of the invention relates to the technical field of data code acquisition, in particular to a method and a device for acquiring a data code, a storage medium and electronic equipment.
[ background of the invention ]
Nowadays, the health codes are required to be displayed when entering places such as cells, office buildings and the like. However, most users move to the entrance of the place to acquire the health code, and when the users need to acquire the health code, the users need to open the electronic device, click the screen in multiple steps, and wait for the electronic device to establish network connection with the network server before the electronic device can acquire the health code. And the base station is used for realizing the establishment of network connection between the electronic equipment and the network server. When a plurality of people wait to acquire the health code at the entrance of the place, the burden of the base station is increased, the success rate of network connection is reduced, network congestion is possibly caused, and the user needs to wait for a long time at the entrance of the place, so that the electronic equipment can acquire the health code.
[ summary of the invention ]
In view of this, embodiments of the present invention provide a method and an apparatus for acquiring a data code, a storage medium, and an electronic device, so as to solve the problem in the prior art that a user needs to wait for a long time at a doorway of a place, and the electronic device may acquire a health code.
In a first aspect, an embodiment of the present invention provides a method for acquiring a data code, including:
acquiring a set number of position data positioned on a preset route in the moving process of a user;
determining the moving direction of the preset route according to a set number of position data;
judging whether the moving direction is a target direction;
and if the moving direction is judged to be the target direction, acquiring a data code.
In a possible implementation manner, before the obtaining the set number of position data located on the preset route, the method further includes:
acquiring a plurality of historical position data in response to an operation of starting learning input by a user at the start of movement;
generating a preset route and a target direction of the preset route according to the acquired multiple historical position data in response to the learning finishing operation input by the user at the end of movement;
and saving the preset route and the target direction.
In a possible implementation manner, before saving the preset route, the method further includes:
displaying the preset route;
and responding to a saving operation input by a user after the user views the preset route, and executing the step of saving the preset route and the target direction.
In a possible implementation manner, the obtaining of the set number of position data located on the preset route includes:
acquiring current position data according to a set time interval;
judging whether the current position data is positioned on the preset route or not;
if the current position data are judged to be located on the preset route, determining the current position data as position data located on the preset route, and judging whether the counted number of the position data located on the preset route reaches a set number;
if the counted number of the position data on the preset route is judged not to reach the set number, the step of obtaining the current position data is executed;
and if the current position data is judged not to be positioned on the preset route, deleting the current position data and executing the step of acquiring the current position data.
In a possible implementation manner, after the acquiring the data code, the method further includes:
and displaying the data code.
In a possible implementation manner, the displaying the data codes includes:
and responding to the operation of displaying the data code input by the user, and displaying the data code.
In a possible implementation manner, the displaying the data codes includes:
and displaying the data code in a set time period, wherein the starting time point of the set time period is the time point of acquiring the data code.
In one possible implementation, the method further includes:
and if the moving direction is judged not to be the target direction, deleting the position data with the set number, and executing the step of acquiring the position data with the set number on the preset route.
In a possible implementation manner, the acquiring the data code includes:
sending a request for acquiring a data code to a server;
and receiving the data code sent by the server.
In one possible implementation, the data code includes a health code.
In a second aspect, an embodiment of the present invention provides an apparatus for acquiring a data code, including:
the first acquisition module is used for acquiring position data of a set number of positions on a preset route in the moving process of a user;
the determining module is used for determining the moving direction according to the position data with the set number;
the judging module is used for judging whether the moving direction is the target direction of a preset route or not;
and the second acquisition module is used for acquiring the data code if the judgment module judges that the moving direction is the target direction.
In a third aspect, an embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, and when the program runs, a device in which the storage medium is located is controlled to execute the method for acquiring a data code in the first aspect or any possible implementation manner of the first aspect.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory is configured to store information including program instructions, and the processor is configured to control execution of the program instructions, where the program instructions are loaded and executed by the processor, to implement the steps of the method for acquiring data codes in the first aspect or any possible implementation manner of the first aspect.
According to the technical scheme of the data code acquisition method, the data code acquisition device, the storage medium and the electronic equipment, the position data of a set number of positions on a preset route are acquired in the moving process of a user; determining the moving direction according to the position data of the set number; judging whether the moving direction is the target direction of a preset route or not; if the moving direction is judged to be the target direction, the data code is obtained, so that the electronic equipment obtains the data code in the moving process of the user, the user can display the health code on the display screen without waiting after opening the data code application, the crowd gathering condition is reduced, and the burden of the base station and the possibility of network blockage are reduced.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart of a method for acquiring a data code according to an embodiment of the present invention;
fig. 2 is a flowchart of another data code acquiring method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a health code according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for acquiring a data code according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the description of the invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used in embodiments of the present invention to describe numbers, etc., these numbers should not be limited to these terms. These terms are only used to distinguish one number from another. For example, a first number may also be referred to as a second number, and similarly, a second number may also be referred to as a first number, without departing from the scope of embodiments of the present invention.
The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection," depending on context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
Fig. 1 is a flowchart of a method for acquiring a data code according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step 101, the electronic device obtains a set number of position data located on a preset route during the moving process of a user.
In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a portable PC, a desktop computer, a wearable device, and the like, and the wearable device includes a smart watch.
The electronic device has a positioning function. The number is set to an integer greater than 1. For example, the set number is 10, and the electronic device obtains 10 pieces of position data located on the preset route.
In the moving process of the user, the electronic equipment responds to the operation of opening the positioning function by the user and starts the positioning function; according to the positioning function, positioning the position of the user and collecting the position data of the position; and if the position data are determined to be positioned on the preset route, storing the position data positioned on the preset route.
And 102, the electronic equipment determines the moving direction according to the set number of position data.
In the embodiment of the invention, the electronic equipment generates a set according to the set number of position data, the set comprises the set number of position data, and the set number of position data are sequentially arranged according to the collection sequence. For example, the set may be a sequence set including a set number of pieces of position data arranged in order of acquisition. The electronic device generates a movement direction from the set of sequences.
The moving direction refers to a moving trend direction, and refers to a direction determined according to a moving trend of the user. The moving direction includes a direction moving toward a start point of the preset route or a direction moving toward an end point of the preset route. For example, when the user moves on the preset route, if the movement trend of the user is a trend moving towards the end point of the preset route, the movement direction is a direction moving towards the end point of the preset route; if the movement trend of the user is a trend of moving towards the starting point of the preset route, the moving direction is a direction of moving towards the starting point of the preset route.
Step 103, the electronic device judges whether the moving direction is a target direction of a preset route, if so, step 104 is executed; if not, go to step 105.
In an embodiment of the present invention, the preset route includes a first end point and a second end point, where when the first end point is a starting point, the second end point is an end point, and the target direction is a direction from the starting point to the end point, for example, the starting point is a living place, the end point is a company, and the target direction is a direction toward the company. The electronic device judges whether the moving direction is the same as the target direction of the preset route, and the judgment of the electronic device is that whether the user moves towards the end point of the preset route. For example, the preset route is a route for the user to go to a company, and the target direction is a direction of a tendency for the user to move toward the company. The user moves on a preset route, if the user moves towards the company, the electronic equipment judges that the moving direction is the target direction, and step 104 is executed; if the user does not move to the company, the electronic device determines that the moving direction is not the target direction, and then step 105 is executed.
And step 104, the electronic equipment acquires the data code, and the process is ended.
In an embodiment of the present invention, the data code includes a health code. For example, the electronic device establishes a communication connection with the server and sends a request for acquiring the health code to the server; the health code sent by the server is received, so that in the process of moving of the user, the electronic equipment receives the health code sent by the server, the user can open the health code application, the electronic equipment can display the health code on the display screen according to the health code sent by the server, the user can enter the place at once without waiting at the place gate, the condition that a plurality of people gather at the place gate to wait for the electronic equipment to display the health code is reduced, meanwhile, the burden of a base station is also reduced, and the possibility of network congestion is reduced.
Step 105, the electronic device deletes the set number of position data and executes step 101.
In the embodiment of the present invention, the electronic device deletes the sequence set where the set number of position data are located, and executes step 101 to obtain the set number of position data located on the preset route again.
The embodiment of the invention provides a method for acquiring data codes, which is characterized in that position data with a set number of positions on a preset route are acquired in the moving process of a user; determining the moving direction according to the position data of the set number; judging whether the moving direction is the target direction of a preset route or not; if the moving direction is judged to be the target direction, the data code is obtained, so that the electronic equipment obtains the data code in the moving process of the user, the user can display the health code on the display screen without waiting after opening the data code application, the crowd gathering condition is reduced, and the burden of the base station and the possibility of network blockage are reduced.
Fig. 2 is a flowchart of another data code acquiring method according to an embodiment of the present invention, and as shown in fig. 2, the method includes:
in step 201, the electronic device acquires a plurality of historical position data in response to an operation of starting learning, which is input by a user at the start of movement.
In the embodiment of the invention, the electronic equipment is equipment with a positioning function, and the electronic equipment starts the positioning function.
The electronic equipment comprises a display screen, wherein a learning starting button is displayed on the display screen, when the user starts moving, the user clicks the learning starting button, and the electronic equipment responds to the operation of clicking the learning starting button by the user and starts to acquire historical position data. For example, the user determines that the user needs to enter an office building, and within a distance range of about 80 meters to 200 meters from the office building, the user clicks a study start button displayed on the electronic device, so that the electronic device starts to acquire historical position data.
In step 202, the electronic device generates a preset route and a target direction of the preset route according to the acquired multiple pieces of historical position data in response to the learning ending operation input by the user at the end of the movement.
In the embodiment of the invention, a learning ending button is displayed on the display screen, when the movement of the user is ended, the user clicks the learning ending button, and the electronic equipment responds to the operation of clicking the learning ending button by the user and ends to acquire the historical position data. The electronic device acquires a plurality of historical position data within a time period from the start of acquiring the historical position data by the electronic device to the end of acquiring the historical position data by the electronic device. The electronic equipment generates a preset route and a target direction of the preset route according to the plurality of historical position data. The starting point of the preset route is the position when the electronic equipment starts to acquire the historical position data, and the end point of the preset route is the position when the electronic equipment finishes acquiring the historical position data. The target direction is a direction from the starting point toward the ending point.
For example, the preset route is a route where the user moves from 80 meters before the office building to the office building, wherein the starting point of the preset route is 80 meters before the office building, and the ending point of the preset route is the office building.
Step 203, the electronic device saves the preset route and the target direction.
In the embodiment of the present invention, before step 203, the method further includes: the electronic equipment displays a preset route and a target direction; and responding to a saving operation input by a user after the preset route is viewed, and executing the step of saving the preset route and the target direction.
After the electronic equipment generates the preset route, the display screen can display the preset route and the target direction of the preset route, and a user can check whether the preset route is correct or not according to the preset route displayed by the display screen; and checking whether the target direction of the preset route points to the end point from the starting point. The display screen can also display a storage button, when the user determines that the preset route is correct and the target direction points to the end point from the starting point, the user clicks the storage button, and the electronic equipment stores the preset route according to the operation of clicking the storage button input by the user.
And step 204, the electronic equipment acquires the current position data according to the set time interval.
In an embodiment of the present invention, fig. 3 is a schematic diagram of displaying a health code according to an embodiment of the present invention, and as shown in fig. 3, an electronic device starts a positioning function and acquires positioning data every 0.5 seconds for 1 time; judging whether the positioning data is positioned on a preset route or not; if the positioning data are judged not to be located in the preset route, deleting the positioning data, and executing the step of obtaining the positioning data for 1 time every 0.5 second; if the positioning data is judged to be located in the preset route, the positioning data is stored in the position data array; judging whether the length of the position data array reaches 10; if the length of the position data array is judged not to reach 10, a step of acquiring positioning data for 1 time every 0.5 second is executed; if the length of the position data array is judged to reach 10, judging whether the moving direction is entering a building or not; if the route direction is judged not to enter the building, emptying the position data array and executing the step of obtaining the positioning data for 1 time every 0.5 seconds; if the route direction is judged to be entering the building, the health code is acquired from the server; rendering the acquired health code into a health code image; within 10 minutes, a health code graph is presented.
For example, as shown in fig. 3, the set time interval is 0.5 seconds.
Step 205, the electronic device determines whether the current position data is located on a preset route, if so, step 207 is executed; if not, go to step 206.
In the embodiment of the present invention, if the electronic device determines that the current position data is located on the preset route, step 207 is executed; if the current position data is not located on the preset route, step 206 is executed.
As shown in fig. 3, the electronic device determines whether the positioning data is located on a preset route, where the positioning data refers to the current position data.
In step 206, the electronic device deletes the current location data and performs step 204.
In the embodiment of the present invention, the electronic device determines that the user does not move on the preset route according to the fact that the current position data is not located on the preset route, so as to delete the current position data and execute step 204 to obtain the next current position data.
Step 207, the electronic device determines the current position data as position data located on a preset route, and determines whether the counted number of the position data located on the preset route reaches a set number, if yes, step 208 is executed; if not, go to step 204.
In the embodiment of the invention, the electronic equipment stores the position data on the preset route to a set according to the acquisition sequence; counting the number of position data in the set; judging whether the number is larger than or equal to a set number; if the number is greater than or equal to the predetermined number, go to step 208; if the number is smaller than the set number, step 204 is executed. For example, as shown in fig. 3, the set number is 10, the set includes a position data array, and the length of the position data array can be used to represent the number of positioning data in the position data array. The electronic equipment stores the positioning data on the preset route to a position data array; it is determined whether the length of the position data array reaches 10.
And step 208, the electronic equipment determines the moving direction according to the set number of position data.
In the embodiment of the present invention, the moving direction refers to a moving trend direction. When the user moves on the preset route, the moving direction includes a direction moving towards the starting point of the preset route or a direction moving towards the end point of the preset route.
The electronic equipment determines the moving direction according to the collection sequence and the set number of position data. For example, the electronic device sequentially arranges the 10 position data in the order of acquisition to generate the moving direction.
Step 209, the electronic device determines whether the moving direction is a target direction of the preset route, and if so, executes step 210; if not, go to step 212.
In the embodiment of the present invention, if the electronic device determines that the moving direction is the target direction, step 210 is executed; if the moving direction is not the target direction, step 212 is executed. The target direction refers to a direction moving toward the end of the preset route. As shown in fig. 3, the electronic device determines whether the user's moving direction is entering a building.
Step 210, the electronic device obtains a data code.
In the embodiment of the present invention, step 210 includes: the electronic equipment sends a request for acquiring the data code to the server; and receiving the data code sent by the server. The data code includes a health code. As shown in fig. 3, the electronic device establishes a communication connection with the server and receives the health code sent by the server; rendering the received health code into a health code map. Therefore, the electronic equipment renders the health code dynamic image on the background, so that when a user needs to display the health code, the electronic equipment can immediately call the health code dynamic image on the background and display the health code dynamic image, and the waiting time of the user is reduced.
And step 211, the electronic equipment displays the data code, and the process is ended.
In this embodiment of the present invention, in a possible implementation manner, step 211 includes: the electronic equipment responds to the operation of displaying the data codes input by the user and displays the data codes.
For example, the electronic device can respond to the operation of opening the health code program input by the user to display the health code, so that the waiting time of the user is reduced, the power consumption condition of the electronic device is improved, the power consumption caused by the fact that the electronic device needs to be always on when the user waits is reduced, and the power saving of the electronic device is facilitated.
In another possible implementation manner, step 211 includes: and the electronic equipment displays the data code in a set time period, wherein the starting time point of the set time period is the time point of acquiring the data code.
The set time period may be set by the user, or may be a time period generated by the electronic device according to the moving speed of the user. The user can set the set time period according to the time required for moving in the preset route. For example, the time required for movement in the route is preset by the user to be 10 minutes, and as shown in fig. 3, the set time period is 10 minutes. The electronic device displays the health code within 10 minutes after generating the health code. And in the 10 th minute after the health code is acquired, the electronic equipment can automatically close the health code, so that the operation of closing the health code displayed by the electronic equipment by a user is reduced.
In another possible implementation manner, the electronic device displays the data code in response to an operation of displaying the data code input by a user within a set time period, and the starting time point of the set time period is the time point of acquiring the data code.
For example, as shown in fig. 3, the set time period is 10 minutes, and within 10 minutes after the electronic device acquires the health code, the electronic device may respond to an operation of opening a health code program input by the user to display the health code; and in the 10 th minute after the data code is generated, the electronic equipment can automatically close the health code, so that the electronic equipment is favorable for saving electricity, and the operation of closing the health code displayed by the electronic equipment by a user is reduced.
In step 212, the electronic device deletes the set number of position data and executes step 204.
In the embodiment of the invention, the electronic equipment determines that the user does not move towards the end point of the preset route, and deletes the stored position data. For example, deleting the set of the location data stored by the user, as shown in fig. 3, the electronic device deletes the location data array, thereby achieving the purpose of deleting the location data located on the preset route.
The embodiment of the invention provides a method for acquiring data codes, which is characterized in that position data with a set number of positions on a preset route are acquired in the moving process of a user; determining the moving direction according to the position data of the set number; judging whether the moving direction is a target direction; if the moving direction is judged to be the target direction of the preset route, the data code is obtained, so that the electronic equipment can obtain the data code in the moving process of the user, the user can display the health code on the display screen without waiting after opening the data code application, the crowd gathering condition is reduced, and the burden of the base station and the possibility of network blockage are reduced.
Fig. 4 is a schematic structural diagram of an apparatus for acquiring a data code according to an embodiment of the present invention, as shown in fig. 4, the apparatus includes: the device comprises a first acquisition module 11, a determination module 12, a judgment module 13 and a second acquisition module 14. The first obtaining module 11 is connected with the determining module 12, the determining module 12 is connected with the judging module 13, and the judging module 13 is connected with the second obtaining module 14.
The first obtaining module 11 is configured to obtain position data of a set number of positions on a preset route during a moving process of a user; the determining module 12 is configured to determine a moving direction according to a set number of position data; the judging module 13 is configured to judge whether the moving direction is a target direction of the preset route; the second obtaining module 14 obtains the data code if the determining module 13 determines that the moving direction is the target direction.
In an embodiment of the present invention, the apparatus further includes: a third obtaining module 15, a generating module 16 and a storing module 17. The third obtaining module 15 is connected to the generating module 16, the generating module 16 is connected to the saving module 17, and the saving module 17 is connected to the first obtaining module 11.
The third acquisition module 15 is used for acquiring a plurality of historical position data in response to the learning starting operation input by the user at the movement starting time; the generating module 16 is configured to generate a preset route and a target direction of the preset route according to the acquired multiple pieces of historical position data in response to a learning ending operation input by the user at the end of the movement; the saving module 17 is used for saving the preset route and the target direction.
In the embodiment of the present invention, the apparatus further includes: a display module 18. The display module 18 is connected to the saving module 17.
The display module 18 is used for displaying a preset route; the saving module 17 is further configured to perform a step of saving the preset route and the target direction in response to a saving operation input by the user after viewing the preset route.
In this embodiment of the present invention, the first obtaining module 11 includes: a first obtaining sub-module 111, a first judging sub-module 112, a second judging sub-module 113 and a deleting sub-module 114. The first obtaining sub-module 111 is connected to the first judging sub-module 112 and the second judging sub-module 113, and the first judging sub-module 112 is connected to the second judging sub-module 113 and the deleting sub-module 114.
The first obtaining submodule 111 is configured to obtain current position data according to a set time interval; the first judging submodule 112 is configured to judge whether the current position data is located on a preset route; the second judging submodule 113 is configured to determine the current position data as position data on the preset route if the first judging submodule 112 judges that the current position data is on the preset route, and judge whether the counted number of the position data on the preset route reaches a set number; the first obtaining sub-module 111 is further configured to, if the second determining sub-module 113 determines that the counted number of the position data located on the preset route does not reach the set number, perform a step of obtaining the current position data; the deleting submodule 114 is configured to delete the current location data and execute the step of obtaining the current location data if the first determining submodule 112 determines that the current location data is not located on the preset route.
In the embodiment of the present invention, the display module 18 is connected to the second obtaining module 14. The display module 18 is also used for displaying the data codes.
In this embodiment of the present invention, the display module 18 is specifically configured to display the data code in response to an operation of displaying the data code input by the user.
In the embodiment of the present invention, the display module 18 is specifically configured to display the data code within a set time period, where a starting time point of the set time period is a time point of acquiring the data code.
In the embodiment of the present invention, the apparatus further includes: and the deleting module 19, wherein the deleting module 19 is connected with the first acquiring module 11 and the judging module 13.
The deleting module 19 is configured to delete the set number of position data and trigger the first obtaining module 11 to obtain the set number of position data located on the preset route if the determining module 13 determines that the moving direction is not the target direction.
In the embodiment of the present invention, the second obtaining module 14 is specifically configured to send a request for obtaining a data code to a server; and receiving the data code sent by the server.
In an embodiment of the present invention, the data code includes a health code.
The embodiment of the invention provides a data code acquisition device, which is used for acquiring position data of a set number of positions on a preset route in the moving process of a user; determining the moving direction according to the position data of the set number; judging whether the moving direction is the target direction of a preset route or not; if the moving direction is judged to be the target direction, the data code is obtained, so that the electronic equipment obtains the data code in the moving process of the user, the user can display the health code on the display screen without waiting after opening the data code application, the crowd gathering condition is reduced, and the burden of the base station and the possibility of network blockage are reduced.
An embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, where, when the program runs, a device on which the storage medium is located is controlled to execute each step of the above-mentioned embodiment of the data code obtaining method, and for specific description, reference may be made to the above-mentioned embodiment of the data code obtaining method.
An embodiment of the present invention provides an electronic device, which includes a memory and a processor, where the memory is configured to store information including program instructions, and the processor is configured to control execution of the program instructions, and the program instructions are loaded by and executed by the processor to implement steps of an embodiment of the above-mentioned data code acquiring method.
Fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 5, the electronic apparatus 30 of this embodiment includes: the processor 31, the memory 32, and the computer program 33 stored in the memory 32 and capable of running on the processor 31, where the computer program 33 is executed by the processor 31 to implement the data code acquisition method in the embodiments, and in order to avoid repetition, details are not repeated herein. Alternatively, the computer program is executed by the processor 31 to implement the functions of each model/unit in the data code acquiring apparatus in the embodiments, which are not repeated herein to avoid redundancy.
The electronic device 30 includes, but is not limited to, a processor 31, a memory 32. Those skilled in the art will appreciate that fig. 5 is merely an example of the electronic device 30, and does not constitute a limitation of the electronic device 30, and may include more or less components than those shown, or combine certain components, or different components, e.g., the electronic device 30 may also include input-output devices, network access devices, buses, etc.
The Processor 31 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 32 may be an internal storage unit of the electronic device 30, such as a hard disk or a memory of the electronic device 30. The memory 32 may also be an external storage device of the electronic device 30, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the electronic device 30. Further, the memory 32 may also include both internal storage units and external storage devices of the electronic device 30. The memory 32 is used for storing computer programs and other programs and data required by the electronic device 30. The memory 32 may also be used to temporarily store data that has been output or is to be output.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (13)

1. A method for acquiring a data code, comprising:
acquiring position data with a set number of positions on a preset route in the moving process of a user;
determining the moving direction according to the position data of the set number;
judging whether the moving direction is the target direction of the preset route or not;
and if the moving direction is judged to be the target direction, acquiring a data code.
2. The method of claim 1, wherein before obtaining the set number of location data on the predetermined route, further comprising:
acquiring a plurality of historical position data in response to an operation of starting learning input by a user at the start of movement;
generating a preset route and a target direction of the preset route according to the acquired multiple historical position data in response to the learning finishing operation input by the user at the end of movement;
and saving the preset route and the target direction.
3. The method of claim 2, wherein prior to saving the preset route, further comprising:
displaying the preset route;
and responding to a saving operation input by a user after the user views the preset route, and executing the step of saving the preset route and the target direction.
4. The method of claim 1, wherein obtaining a set number of location data on a predetermined route comprises:
acquiring current position data according to a set time interval;
judging whether the current position data is positioned on the preset route or not;
if the current position data are judged to be positioned on the preset route, determining the current position data as position data positioned on the preset route, and judging whether the counted number of the position data positioned on the preset route reaches a set number;
if the counted number of the position data on the preset route is judged not to reach the set number, the step of obtaining the current position data is executed;
and if the current position data is judged not to be positioned on the preset route, deleting the current position data and executing the step of acquiring the current position data.
5. The method of claim 1, wherein after the obtaining the data code, further comprising:
and displaying the data code.
6. The method of claim 5, wherein the displaying the data code comprises:
and responding to the operation of displaying the data code input by the user, and displaying the data code.
7. The method of claim 5, wherein the displaying the data code comprises:
and displaying the data code in a set time period, wherein the starting time point of the set time period is the time point of acquiring the data code.
8. The method of claim 1, further comprising:
and if the moving direction is judged not to be the target direction, deleting the position data with the set number, and executing the step of acquiring the position data with the set number on the preset route.
9. The method of claim 1, wherein the obtaining the data code comprises:
sending a request for acquiring a data code to a server;
and receiving the data code sent by the server.
10. The method of any one of claims 1 to 9, wherein the data code comprises a health code.
11. An apparatus for acquiring a data code, comprising:
the first acquisition module is used for acquiring position data of a set number of positions on a preset route in the moving process of a user;
the determining module is used for determining the moving direction according to the position data with the set number;
the judging module is used for judging whether the moving direction is the target direction of the preset route or not;
and the second acquisition module is used for acquiring the data code if the judgment module judges that the moving direction is the target direction.
12. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the data code acquiring method according to any one of claims 1 to 10.
13. An electronic device comprising a memory for storing information comprising program instructions and a processor for controlling the execution of the program instructions, characterized in that the program instructions are loaded and executed by the processor to implement the method steps of the data code acquisition method of any one of claims 1 to 10.
CN202211345169.1A 2022-10-31 2022-10-31 Data code acquisition method and device, storage medium and electronic equipment Pending CN115733920A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211345169.1A CN115733920A (en) 2022-10-31 2022-10-31 Data code acquisition method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211345169.1A CN115733920A (en) 2022-10-31 2022-10-31 Data code acquisition method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115733920A true CN115733920A (en) 2023-03-03

Family

ID=85295276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211345169.1A Pending CN115733920A (en) 2022-10-31 2022-10-31 Data code acquisition method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115733920A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239763A (en) * 2014-09-19 2014-12-24 网易有道信息技术(北京)有限公司 Automatic unlocking method and automatic unlocking device
CN111161101A (en) * 2019-12-03 2020-05-15 郑鼎新 Self-help navigation device and method
CN113987453A (en) * 2021-09-28 2022-01-28 珠海格力电器股份有限公司 Identity verification method, system, mobile terminal, storage medium and electronic equipment
CN114153343A (en) * 2021-10-22 2022-03-08 荣耀终端有限公司 Health code display method and electronic equipment
CN114879879A (en) * 2022-07-07 2022-08-09 荣耀终端有限公司 Method for displaying health code, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239763A (en) * 2014-09-19 2014-12-24 网易有道信息技术(北京)有限公司 Automatic unlocking method and automatic unlocking device
CN111161101A (en) * 2019-12-03 2020-05-15 郑鼎新 Self-help navigation device and method
CN113987453A (en) * 2021-09-28 2022-01-28 珠海格力电器股份有限公司 Identity verification method, system, mobile terminal, storage medium and electronic equipment
CN114153343A (en) * 2021-10-22 2022-03-08 荣耀终端有限公司 Health code display method and electronic equipment
CN114879879A (en) * 2022-07-07 2022-08-09 荣耀终端有限公司 Method for displaying health code, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112613475A (en) Code scanning interface display method and device, mobile terminal and storage medium
WO2020135334A1 (en) Television application theme switching method, television, readable storage medium, and device
CN108834040A (en) A kind of attendance information based reminding method and its equipment
EP4191513A1 (en) Image processing method and apparatus, device and storage medium
KR20170019136A (en) Apparatus and method for encoding image thereof
CN115659039A (en) Information recommendation method, information recommendation device, information display method, information recommendation equipment, information display medium and program product
CN106406880A (en) Advertisement information pushing method and terminal
CN111597009B (en) Application program display method and device and terminal equipment
CN112232804B (en) Code scanning payment method and device and electronic equipment
CN106648281B (en) Screenshot method and device
CN110781427A (en) Method, device, equipment and storage medium for calculating first screen time
CN110825298A (en) Information display method and terminal equipment
CN109101174A (en) A kind of scaling method, device, terminal and medium
CN112667212A (en) Buried point data visualization method and device, terminal and storage medium
CN110275753B (en) Value added service acquisition method, device and equipment of application program
CN112486387A (en) Application program control method and device
CN115733920A (en) Data code acquisition method and device, storage medium and electronic equipment
KR20210038849A (en) Data processing methods, devices and storage media
CN108874141B (en) Somatosensory browsing method and device
US20210312476A1 (en) Information processing device, information processing method, and program
CN110751120A (en) Detection method and device and electronic equipment
CN115509650A (en) Intelligent information interface display method, device, equipment and storage medium
CN114092556A (en) Method, apparatus, electronic device, medium for determining human body posture
CN114281424A (en) Processing method, device and equipment for starting application program and storage medium
CN111061451A (en) Information processing method, device and system

Legal Events

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