CN113793490B - Pressure testing method and device for electronic fence, storage medium and terminal - Google Patents

Pressure testing method and device for electronic fence, storage medium and terminal Download PDF

Info

Publication number
CN113793490B
CN113793490B CN202110925778.3A CN202110925778A CN113793490B CN 113793490 B CN113793490 B CN 113793490B CN 202110925778 A CN202110925778 A CN 202110925778A CN 113793490 B CN113793490 B CN 113793490B
Authority
CN
China
Prior art keywords
fence
service interface
electronic
track
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110925778.3A
Other languages
Chinese (zh)
Other versions
CN113793490A (en
Inventor
李会彩
李志浩
宋志新
夏曙东
兰捷
孙智彬
张志平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Transwiseway Information Technology Co Ltd
Original Assignee
Beijing Transwiseway Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Transwiseway Information Technology Co Ltd filed Critical Beijing Transwiseway Information Technology Co Ltd
Priority to CN202110925778.3A priority Critical patent/CN113793490B/en
Publication of CN113793490A publication Critical patent/CN113793490A/en
Application granted granted Critical
Publication of CN113793490B publication Critical patent/CN113793490B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B29/00Checking or monitoring of signalling or alarm systems; Prevention or correction of operating errors, e.g. preventing unauthorised operation
    • G08B29/12Checking intermittently signalling or alarm systems
    • G08B29/126Checking intermittently signalling or alarm systems of annunciator circuits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/021Services related to particular areas, e.g. point of interest [POI] services, venue services or geofences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]

Abstract

The invention discloses a pressure testing method, a pressure testing device, a storage medium and a terminal of an electronic fence, wherein the method comprises the following steps: constructing a plurality of electronic fences; any point outside the outermost electronic fence is bound with a preset number of vehicles to obtain track points of the bound vehicles, and the track points are controlled to pass through each electronic fence to generate marking data and track files for driving in and driving out; counting the number of the marking data of the driving-in and driving-out to generate an expected result; connecting a computing service interface and a pushing service interface of a plurality of electronic fences; calculating parameter values of track points in and out of a plurality of electronic fences in a track file according to a calculation service interface to generate a fence message for driving in and out; generating an actual result according to the push service interface and the number of the on-coming and off-coming fence messages; and determining whether the service interface is normal according to the expected result and the actual result. Therefore, the method and the device can reduce the risk of downtime of the service interface of the electronic fence, and therefore the operating efficiency of the service interface is improved.

Description

Pressure testing method and device for electronic fence, storage medium and terminal
Technical Field
The invention relates to the technical field of intelligent traffic, in particular to a pressure testing method and device of an electronic fence, a storage medium and a terminal.
Background
In recent years, with the increasing of vehicle intelligence technology and the need of special vehicle management. The service interface of the electronic fence of the vehicle terminal is gradually rising and rapidly developing. The service interface of the electronic fence can be understood as the related function set for the electronic fence. For example, one function may be a function of controlling the vehicle to travel only in a predetermined area or route, and when the vehicle travels out of the predetermined area or route, the vehicle may be decelerated by the vehicle-mounted terminal, alarm information may be transmitted, or the like.
In the prior art, a scheme for performing data pressure test on a service interface of an electronic fence does not exist at present, so that the service interface of the electronic fence is on line without being subjected to the pressure test, data generated by a vehicle is exponentially increased along with the increase of the vehicle at present, and when the service interface of the electronic fence cannot bear a large amount of data load, the service interface of the electronic fence is down, and the operating efficiency of the service interface of the electronic fence is reduced.
Disclosure of Invention
The embodiment of the application provides a pressure testing method and device for an electronic fence, a storage medium and a terminal. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
In a first aspect, an embodiment of the present application provides a method for testing a pressure of an electronic fence, where the method includes:
determining an origin, and constructing a plurality of electronic fences based on the origin and a plurality of preset radiuses;
any track point is taken from the outermost electronic fence of the electronic fences, and the track point is bound with a preset number of vehicles to obtain track points of the bound vehicles;
controlling track points of bound vehicles to sequentially pass through each electronic fence, and generating marking data and track files for driving in and out;
counting the number of the marking data of the driving-in and driving-out to generate an expected result;
connecting service interfaces set for a plurality of electronic fences; the service interface at least comprises a calculation service interface and a push service interface;
calculating parameter values of track points in the track file entering and exiting a plurality of electronic fences according to the calculation service interface to generate a fence message entering and exiting;
generating an actual result according to the pushing service interface and the number of the on-coming and off-coming fence messages;
and determining whether the service interface is normal according to the expected result and the actual result.
Optionally, determining an origin, and constructing a plurality of electronic fences based on the origin and a plurality of preset radii, includes:
acquiring a polygon with a preset number of edges in an electronic map by using an arcgis tool;
acquiring the longitude and latitude of each point on the polygon;
calculating the barycentric coordinates of the polygon according to the longitude and latitude of each point on the polygon;
sequentially constructing a plurality of polygons according to a plurality of preset radiuses by taking the barycentric coordinate as an origin;
and copying each polygon in the polygons according to preset times by adopting a polygon fence interface to generate a plurality of electronic fences.
Optionally, calculating parameter values of track points in the track file entering and exiting the plurality of electronic fences according to the computing service interface, and generating a fence message entering and exiting the electronic fences, where the method includes:
track points in the track file are sent to a distributed subscription message system in a Mock mode;
acquiring track points from a distributed subscription message system through a computing service interface;
calculating the obtained track point and each point on a plurality of electronic fences to generate a calculation result;
determining the states of the vehicles on the acquired track points in the plurality of electronic fences according to the calculation result;
when the vehicle is in a driving-in state in a plurality of electronic fences, storing the acquired track points into a cache;
alternatively, the first and second electrodes may be,
when the state of the vehicle in the electronic fences is the exit state, the acquired track points are removed from the cache;
an on-coming out fence message is generated based on the on-coming state and the off-going state.
Optionally, generating an actual result according to the number of the push service interfaces and the number of the fence messages driven in and out, includes:
starting a user system and a supporting monitoring platform;
pushing the on-off fence information to a user system according to a pushing service interface to generate log information;
aggregating the log information to obtain a first statistical result;
pushing the driven-in and driven-out fence message to a supporting monitoring platform according to a pushing service interface, and outputting a second statistical result;
and combining the first statistical result and the second statistical result to generate an actual result.
Optionally, determining whether the service interface is normal according to the expected result and the actual result includes:
when the expected result is equal to the actual result, the service interface is determined to be normal.
Optionally, determining whether the service interface is normal according to the expected result and the actual result includes:
when the expected result is not equal to the actual result, calculating a difference value between the expected result and the actual result;
calculating the ratio of the difference to the expected result;
when the ratio is larger than a preset threshold value, determining that the service interface is abnormal;
generating early warning information;
and sending the early warning information to external equipment in a preset mode.
Optionally, the preset manner at least includes: a telephone mode, a short message mode and a mail mode.
In a second aspect, an embodiment of the present application provides an apparatus for testing pressure of an electronic fence, the apparatus including:
the electronic fence constructing module is used for determining an origin point and constructing a plurality of electronic fences based on the origin point and a plurality of preset radiuses;
the vehicle binding module is used for taking any track point outside the outermost electronic fence of the electronic fences and binding the track point with a preset number of vehicles to obtain the track point of the bound vehicle;
the data generation module is used for controlling track points of the bound vehicles to sequentially pass through each electronic fence to generate marking data and track files for driving in and out;
the expected result generating module is used for counting the number of the marking data which are driven in and out to generate an expected result;
the service interface connecting module is used for connecting service interfaces set for the electronic fences; the service interface at least comprises a calculation service interface and a push service interface;
the fence message generation module is used for calculating parameter values of track points in the track file entering and exiting the plurality of electronic fences according to the calculation service interface and generating a driving-in and driving-out fence message;
the actual result generating module is used for generating an actual result according to the pushing service interface and the number of the on-off fence messages;
and the service interface judging module is used for determining whether the service interface is normal or not according to the expected result and the actual result.
In a third aspect, embodiments of the present application provide a computer storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides a terminal, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the embodiment of the application, the pressure testing device of the electronic fences firstly constructs a plurality of electronic fences, any point outside the outermost electronic fence is bound with a preset number of vehicles to obtain track points of the bound vehicles, then the track points are controlled to pass through each electronic fence to generate marking data and track files for driving in and out, and then the number of the marking data for driving in and out is counted to generate an expected result; and connecting the calculation service interfaces and the push service interfaces of the electronic fences, calculating parameter values of track points in and out of the electronic fences in the track file according to the calculation service interfaces to generate a driving-in and driving-out fence message, generating an actual result according to the number of the push service interfaces and the driving-in and driving-out fence message, and finally determining whether the service interfaces are normal or not according to an expected result and the actual result. Because this application simulates vehicle track point through electronic fence through constructing electronic fence and vehicle track point, adopts the operational aspect that data that produce come the analysis service interface when the electronic fence passes through simultaneously, confirms whether can go on the line according to the operational aspect to the service interface that consequently can reduce electronic fence appears the risk of dying to the operating efficiency of service interface has been promoted.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic flowchart illustrating a method for testing a pressure of an electronic fence according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an electronic fence constructed according to an embodiment of the present application;
fig. 3 is a schematic diagram of a track point driving-in and driving-out electronic fence according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of the generation of an expected result provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of an actual result generation provided by the embodiment of the present application;
fig. 6 is a schematic process block diagram of a pressure testing process of an electronic fence according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a pressure testing apparatus for an electronic fence according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them.
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 following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
In the description of the present invention, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The application provides a pressure testing method and device for an electronic fence, a storage medium and a terminal, which are used for solving the problems in the related technical problems. Among the technical scheme that this application provided, because this application simulates vehicle track point through constructing fence and vehicle track point and passes through fence, adopt the operational aspect that data that produce come analysis service interface when passing fence simultaneously, confirm whether the service interface can go online according to the operational aspect, consequently can reduce fence's the risk that the machine was stopped appears in service interface to promote service interface's operating efficiency, adopt the exemplary embodiment to carry out the detailed description below.
The method for testing the stress of the electronic fence according to the embodiment of the present application will be described in detail below with reference to fig. 1 to 6. The method may be implemented in dependence of a computer program, which may be run on a pressure testing device of a fencing based on the von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application.
Referring to fig. 1, a flow chart of a method for testing the pressure of an electronic fence according to an embodiment of the present application is provided. As shown in fig. 1, the method of the embodiment of the present application may include the steps of:
s101, determining an origin, and constructing a plurality of electronic fences based on the origin and a plurality of preset radiuses;
the electronic fence is a perimeter alarm system, and the system mainly comprises an electronic fence host, front-end accessories and a rear-end control system. The electronic fence is set based on a road network in an electronic map and used for monitoring vehicle dynamics.
Generally, an electronic fence in the present application is a large set of electronic fences created in a concentric circle manner.
In the embodiment of the application, firstly, an arcgis tool is used to obtain a polygon with a preset number of edges in an electronic map, then, latitude and longitude of each point on the polygon are obtained, then, a barycentric coordinate of the polygon is calculated according to the latitude and longitude of each point on the polygon, a plurality of polygons are sequentially constructed according to a plurality of preset radiuses by taking the barycentric coordinate as an origin, and finally, a polygon fence interface is used to copy each polygon in the polygons according to preset times to generate a plurality of electronic fences, for example, as shown in fig. 2.
In a possible implementation mode, a group of polygons with 10 sides are taken by an arcgis tool, the longitude and latitude of the center of gravity of each polygon are obtained after the coordinates of the center of gravity of each polygon are calculated through the longitude and latitude of each point, the longitude and latitude of the center of gravity are taken as a reference, the center of gravity is unchanged, hundred meters are extended according to preset 11 different radiuses and the distance of the center of gravity, and 11 longitude and latitude coordinates of the electronic fence are generated and are formed through the following formats:
116.479368,39.318363|116.509151,39.318645|116.511812,39.305961|116.485033,39.300382|116.480613,39.309946|…………|116.47675,39.313731|116.479368,39.318363。
further, a tool is used for calling a polygonal fence interface, different ID identifications are generated for the 11 electronic fences, the ID identifications of the 11 electronic fences are stored in a database, and finally the 11 electronic fences are marked. The ID of one of the electronic fences is, for example: 48649262BA33928BE050A8C0366804C 9.
Specifically, when the marking is performed, the rule is as follows: number of edges # fence index # overlap index, the outermost large fence index is 0, e.g.:
P10Y #0#0 is interpreted as the 10-sided fence, the outermost largest fence, overlapping fence 0
P10Y #0#999 is interpreted as the 10-sided fence, the outermost largest fence, the 999 st fence in the overlapping fences
P10Y #1#0 is interpreted as the 1 st fence of the 10-sided fence, the next largest fence, the overlapping fence
P10Y #1#999 is interpreted as the 10-sided fence, the next largest fence, the 999 th fence in the overlapping fence.
Finally, the innermost fence is overlapped and created for 9 ten thousand times, and other 10 fences are repeatedly created for 1000 times, so that 10 ten thousand electronic fences are generated.
S102, any track point is taken out of the outermost electronic fences of the electronic fences, and the track points are bound with a preset number of vehicles to obtain track points of the bound vehicles;
in a possible implementation manner, after a plurality of electronic fences are constructed, any track point is taken outside the outermost electronic fence of the plurality of electronic fences, for example, any track point is taken outside the outermost electronic fence of the plurality of electronic fences in fig. 2, then a predetermined certain number of pieces of vehicle track point data are obtained, finally, a track point outside the outermost electronic fence is bound with a predetermined certain number of pieces of vehicle track point data, and finally, a track point for binding the vehicle data is obtained.
S103, controlling track points of the bound vehicles to sequentially pass through each electronic fence, and generating marking data and track files for driving in and out;
in a possible implementation manner, when it is known that 11 non-overlapping electronic fences are constructed based on step S101, and 10 ten thousand electronic fences are constructed based on 11 non-overlapping electronic fences through replication, for example, as shown in fig. 3, first, the direction of movement of the track points is controlled from left to right, and it is assumed that the track point bound to the vehicle in step S102 is the leftmost track point, then, from left to right, every time the vehicle enters one circle, one point is taken, the vehicle goes out from the center, every circle is taken, and finally, 25 track points are obtained after all the fences are taken out.
Specifically, the 1 st track point, the 2 nd track point and the 11 th track point are sequentially driven into an overlapped fence until all fences are driven into, the 12 th track point, the 13 th track point and the 14 th track point are simultaneously in10 thousands of fences, the 15 th track point to the 24 th track point are sequentially driven out of the overlapped fence, and the last track point is driven out of all fences. As can be seen, the track points 2-11 are driving-in, the track points 15-24 are driving-out, and the track points 12, 13 and 14 are in all circles and can be regarded as invalid points. This generates a track file with 25 track points and marking data for the incoming and outgoing tracks.
For example, the marking process when driving in/out of the electronic fence is as follows: marking the 1 st track point: out0, trace point 2 marking: in1. in 10; marking at the 15 th track point: out110, mark at trace point 16: let us say 24 track point: out 1; marking at the 25 th track point: inout 0. For example, the marking data for a vehicle driving in may be:
115.5322265625,38.4105582509,667,20191209/153529,0, 74960317430657592, wing 000000,17800000000, out 0.
S104, counting the number of the marking data of the driving-in and driving-out to generate an expected result;
where the desired result is the number of strips ideally pushed.
In a possible implementation manner, according to the step flow of the above steps S101 to S103, valid data in the marking data that is driven in and out is counted in advance, for example: concurrent 100 vehicles simultaneously transmit position for 1500 seconds, at which time concurrent pressure is generated on the fence calculation service and the push service, with the results: and generating effective data of 10 ten thousand (number of barriers) 100 (number of vehicles) 22 (effective driving-in and driving-out) 2 (number of track file circulation times) of driving-in and driving-out areas, and finally determining the number of the effective data as an expected result.
For example, as shown in fig. 4, fig. 4 is a schematic flow chart of generating an expected result provided in the embodiment of the present application, in an ideal case, when calculating the number of pushed pieces, first, a large number of electronic fences are generated according to polygon coordinates, then, an interface is called to generate an electronic fence identifier ID, then, the marked electronic fences are stored in a database, then, track points are collected to bind vehicles, and then, the electronic fences are moved out, so as to generate marking data and track files that are moved in and out, and finally, the number of the marking data that are moved in and out is counted, so as to generate an expected result.
S105, connecting service interfaces set for a plurality of electronic fences; the service interface at least comprises a calculation service interface and a push service interface;
the service interface is a function set by research and development departments for the electronic fence, and the function at least comprises a calculation service interface and a push service interface.
In a possible implementation manner, when performing an actual stress test on the service interfaces set for the plurality of electronic fences, the service interfaces set for the plurality of electronic fences need to be connected to first.
S106, calculating parameter values of track points in and out of the plurality of electronic fences according to the calculation service interface, and generating fence information of driving in and driving out;
in a possible implementation mode, firstly, track points in a track file are sent to a distributed subscription message system in a Mock mode, then the track points are obtained from the distributed subscription message system through a calculation service interface, the obtained track points and all points on a plurality of electronic fences are calculated to generate a calculation result, then the states of vehicles on the obtained track points on the plurality of electronic fences are determined according to the calculation result, and then when the states of the vehicles on the plurality of electronic fences are driving-in states, the obtained track points are stored in a cache; or when the vehicle is in the exit state in the states of the electronic fences, clearing the acquired track points from the cache, and finally generating an exit-entrance fence message based on the entrance state and the exit state.
S107, generating an actual result according to the push service interface and the number of the on-off fence messages;
in a possible implementation manner, a user system and a support monitoring platform are started firstly, then, the rail information of the driving-in and the driving-out is pushed to the user system according to a pushing service interface to generate log information, then, the log information is aggregated to obtain a first statistical result, then, the rail information of the driving-in and the driving-out is pushed to the support monitoring platform according to the pushing service interface to output a second statistical result, and finally, the first statistical result and the second statistical result are combined to generate an actual result.
And S108, determining whether the service interface is normal or not according to the expected result and the actual result.
In one possible implementation, the service interface is determined to be normal when the expected result is equal to the actual result.
In another possible implementation manner, when the expected result is not equal to the actual result, a difference between the expected result and the actual result is calculated, then a ratio of the difference to the expected result is calculated, when the ratio is greater than a preset threshold, it is determined that the service interface is abnormal, the early warning information is generated, and finally the early warning information is sent to the external device in a preset manner.
Wherein, the predetermined mode includes at least: a telephone mode, a short message mode and a mail mode.
For example, as shown in fig. 5, fig. 5 is a flow chart of generating an actual result and an early warning, which can also be understood as an implementation process of obtaining the actual result and a final early warning, a simulated user receiving system is started to receive a platform push service, a Mock manner sends a track in a track file to the distributed subscription message system kafka, and a computing service determines whether a vehicle enters a fence, and if the vehicle enters the fence, the vehicle is stored in a cache. For example:
when vehicles enter the rail, the Ji 000001#2_48649262BA33928BE050A8C0366804C9 enters the buffer vehicle exit rail, and the data is cleared from the buffer.
Vehicle not driven into and out of any fence condition: the computing service calculates whether to drive in and drive out, but not push.
The pushing service pushes the information of the driving-in and driving-out fence to a user system, meanwhile, the information is recorded into a support system to be displayed on a page, meanwhile, marks are marked in a log, statistics and comparison are convenient to use, and finally, a statistical actual result is obtained.
And finally, generating an early warning strategy and an expansion strategy according to data comparison of the support page display, the log data group by statistics and the predicted value. And a modification early warning strategy can be configured on the page, and the early warning is generated and is notified to research and develop in a telephone and short message mode so as to respond in time.
For example, taking the wide and wide high speed as an example, the longitude and latitude coordinates of the expressway are obtained from production and crawled, 100 different points are selected as the gravity centers, polygonal fences with the number of sides of 100 are drawn, and each fence is overlapped by 1000 fences. The test environment 100 vehicles then passed the fence (sending location data to kafka). The calculation service calculates which fence each position passes through, whether the position drives in or drives out or does not drive in or drive out, and corresponding calculation time consumption and push values are obtained.
For example, as shown in fig. 6, fig. 6 is a general flow chart of a pressure test of an electronic fence provided by the present application, which is used for performing a pressure test on a calculation service and a push service of a driving-in and driving-out electronic fence, comparing test results such as a push accuracy, average time consumption, and the like with expected results, providing a corresponding early warning policy and early warning mechanism basis, prompting to research and develop a calculation and push function of optimizing the driving-in and driving-out electronic fence, improving user experience, providing a basis for capacity expansion of an online server, and embodying a commercial value.
In the embodiment of the application, the pressure testing device of the electronic fences firstly constructs a plurality of electronic fences, any point outside the outermost electronic fence is bound with a preset number of vehicles to obtain track points of the bound vehicles, then the track points are controlled to pass through each electronic fence to generate marking data and track files for driving in and out, and then the number of the marking data for driving in and out is counted to generate an expected result; and connecting the calculation service interfaces and the push service interfaces of the electronic fences, calculating parameter values of track points in and out of the electronic fences in the track file according to the calculation service interfaces to generate a driving-in and driving-out fence message, generating an actual result according to the push service interfaces and the number of the driving-in and driving-out fence messages, and finally determining whether the service interfaces are normal or not according to an expected result and the actual result. Because this application simulates vehicle track point through electronic fence through constructing electronic fence and vehicle track point, adopts the operational aspect that data that produce come the analysis service interface when the electronic fence passes through simultaneously, confirms whether can go on the line according to the operational aspect to the service interface that consequently can reduce electronic fence appears the risk of dying to the operating efficiency of service interface has been promoted.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the embodiments of the method of the present invention.
Referring to fig. 7, a schematic structural diagram of a pressure testing apparatus for an electronic fence according to an exemplary embodiment of the invention is shown. The electronic fence pressure testing device can be realized by software, hardware or a combination of the software and the hardware to form all or part of the terminal. The device 1 comprises an electronic fence constructing module 10, a vehicle binding module 20, a data generating module 30, an expected result generating module 40, a service interface connecting module 50, a fence message generating module 60, an actual result generating module 70 and a service interface judging module 80.
The electronic fence constructing module 10 is configured to determine an origin point, and construct a plurality of electronic fences based on the origin point and a plurality of preset radii;
the vehicle binding module 20 is used for obtaining any track point outside the outermost electronic fence of the electronic fences, and binding the track point with a preset number of vehicles to obtain track points of the bound vehicles;
the data generation module 30 is used for controlling track points of the bound vehicles to sequentially pass through each electronic fence to generate marking data and track files for driving in and out;
an expected result generation module 40, configured to count the number of the marking data that is driven in and out, and generate an expected result;
a service interface connection module 50 for connecting service interfaces provided for a plurality of electronic fences; the service interface at least comprises a calculation service interface and a push service interface;
a fence message generating module 60, configured to calculate parameter values of a plurality of electronic fences entering and exiting from a track point in a track file according to a calculation service interface, and generate a fence message entering and exiting;
an actual result generating module 70, configured to generate an actual result according to the number of the push service interfaces and the number of the fence messages that are driven in and out;
and a service interface judging module 80, configured to determine whether the service interface is normal according to the expected result and the actual result.
It should be noted that, when the pressure testing apparatus for an electronic fence provided in the foregoing embodiment executes the pressure testing method for an electronic fence, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules, so as to complete all or part of the functions described above. In addition, the pressure testing device for the electronic fence and the pressure testing method for the electronic fence provided by the above embodiments belong to the same concept, and details of implementation processes are found in the method embodiments, which are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
In the embodiment of the application, the pressure testing device of the electronic fences firstly constructs a plurality of electronic fences, any point outside the outermost electronic fence is bound with a preset number of vehicles to obtain track points of the bound vehicles, then the track points are controlled to pass through each electronic fence to generate marking data and track files for driving in and out, and then the number of the marking data for driving in and out is counted to generate an expected result; and connecting the calculation service interfaces and the push service interfaces of the electronic fences, calculating parameter values of track points in and out of the electronic fences in the track file according to the calculation service interfaces to generate a driving-in and driving-out fence message, generating an actual result according to the push service interfaces and the number of the driving-in and driving-out fence messages, and finally determining whether the service interfaces are normal or not according to an expected result and the actual result. Because this application simulates vehicle track point through electronic fence through constructing electronic fence and vehicle track point, adopts the operational aspect that data that produce come the analysis service interface when the electronic fence passes through simultaneously, confirms whether can go on the line according to the operational aspect to the service interface that consequently can reduce electronic fence appears the risk of dying to the operating efficiency of service interface has been promoted.
The invention also provides a computer readable medium, on which program instructions are stored, and the program instructions, when executed by a processor, implement the method for testing the pressure of the electronic fence provided by the above method embodiments. The present invention also provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for stress testing of an electronic fence of the above-described method embodiments.
Please refer to fig. 8, which provides a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 8, terminal 1000 can include: at least one processor 1001, at least one network interface 1004, a user interface 1003, memory 1005, at least one communication bus 1002.
Wherein a communication bus 1002 is used to enable connective communication between these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 1001 may include one or more processing cores, among other things. The processor 1001 interfaces various components throughout the electronic device 1000 using various interfaces and lines to perform various functions of the electronic device 1000 and to process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005 and invoking data stored in the memory 1005. Alternatively, the processor 1001 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1001, but may be implemented by a single chip.
The Memory 1005 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable medium. The memory 1005 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 8, a memory 1005, which is a type of computer storage medium, can include an operating system, a network communication module, a user interface module, and a stress testing application for the electronic fence.
In the terminal 1000 shown in fig. 8, the user interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and the processor 1001 may be configured to invoke the stress testing application of the electronic fence stored in the memory 1005, and specifically perform the following operations:
determining an origin, and constructing a plurality of electronic fences based on the origin and a plurality of preset radiuses;
any track point is taken from the outermost electronic fence of the electronic fences, and the track point is bound with a preset number of vehicles to obtain track points of the bound vehicles;
controlling track points of bound vehicles to sequentially pass through each electronic fence to generate marking data and track files for driving in and out;
counting the number of the marking data of the driving-in and driving-out to generate an expected result;
connecting service interfaces set for a plurality of electronic fences; the service interface at least comprises a calculation service interface and a push service interface;
calculating parameter values of track points in the track file entering and exiting a plurality of electronic fences according to the calculation service interface to generate a fence message entering and exiting;
generating an actual result according to the push service interface and the number of the on-coming and off-coming fence messages;
and determining whether the service interface is normal according to the expected result and the actual result.
In one embodiment, the processor 1001 specifically performs the following operations when determining the origin and constructing the plurality of electronic fences based on the origin and a predetermined plurality of radii:
acquiring a polygon with a preset number of edges in an electronic map by using an arcgis tool;
acquiring the longitude and latitude of each point on the polygon;
calculating the barycentric coordinates of the polygon according to the longitude and latitude of each point on the polygon;
sequentially constructing a plurality of polygons according to a plurality of preset radiuses by taking the barycentric coordinate as an origin;
and copying each polygon in the polygons according to preset times by adopting a polygon fence interface to generate a plurality of electronic fences.
In an embodiment, when executing the calculation of the parameter values of the track points in the track file for entering and exiting the plurality of electronic fences according to the calculation service interface to generate the message of the entered and exited fence, the processor 1001 specifically executes the following operations:
track points in the track file are sent to a distributed subscription message system in a Mock mode;
acquiring track points from a distributed subscription message system through a computing service interface;
calculating the obtained track point and each point on a plurality of electronic fences to generate a calculation result;
determining the states of the vehicles on the acquired track points in the plurality of electronic fences according to the calculation result;
when the vehicle is in a driving-in state in a plurality of electronic fences, storing the acquired track points into a cache;
alternatively, the first and second liquid crystal display panels may be,
when the vehicle is in the state of the electronic fences, the acquired track points are removed from the cache;
and generating an entry-exit fence message based on the entry state and the exit state.
In one embodiment, the processor 1001, when executing the actual result generated according to the push service interface and the number of the inbound and outbound fence messages, specifically performs the following operations:
starting a user system and a supporting monitoring platform;
pushing the on-off fence information to a user system according to a pushing service interface to generate log information;
aggregating the log information to obtain a first statistical result;
pushing the driven-in and driven-out fence message to a supporting monitoring platform according to a pushing service interface, and outputting a second statistical result;
and combining the first statistical result and the second statistical result to generate an actual result.
In one embodiment, the processor 1001 specifically performs the following operations when determining whether the service interface is normal according to the expected result and the actual result:
and when the expected result is equal to the actual result, determining that the service interface is normal.
In one embodiment, the processor 1001 specifically performs the following operations when determining whether the service interface is normal according to the expected result and the actual result:
when the expected result is not equal to the actual result, calculating a difference value between the expected result and the actual result;
calculating the ratio of the difference to the expected result;
when the ratio is larger than a preset threshold value, determining that the service interface is abnormal;
generating early warning information;
and sending the early warning information to external equipment in a preset mode.
In the embodiment of the application, the pressure testing device of the electronic fences firstly constructs a plurality of electronic fences, any point outside the outermost electronic fence is bound with a preset number of vehicles to obtain track points of the bound vehicles, then the track points are controlled to pass through each electronic fence to generate marking data and track files for driving in and out, and then the number of the marking data for driving in and out is counted to generate an expected result; and connecting the calculation service interfaces and the push service interfaces of the electronic fences, calculating parameter values of track points in and out of the electronic fences in the track file according to the calculation service interfaces to generate a driving-in and driving-out fence message, generating an actual result according to the push service interfaces and the number of the driving-in and driving-out fence messages, and finally determining whether the service interfaces are normal or not according to an expected result and the actual result. Because this application simulates vehicle track point through fence through constructing fence and vehicle track point, adopts the operational aspect that data that produce come analysis service interface when passing fence simultaneously, confirms whether service interface can go online according to the operational aspect, consequently can reduce fence's the risk that service interface appears dying to service interface's operating efficiency has been promoted.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments can be implemented by a computer program to instruct related hardware, and the program for the pressure test of the electronic fence can be stored in a computer-readable storage medium, and when executed, the program can include the processes of the embodiments of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (10)

1. A method for testing the pressure of an electronic fence, which is characterized by comprising the following steps:
determining an origin point, and constructing a plurality of electronic fences based on the origin point and a plurality of preset radiuses;
any track point is taken outside the outermost electronic fence of the electronic fences, and the track point is bound with a preset number of vehicles to obtain track points of the bound vehicles;
controlling track points of the bound vehicles to sequentially pass through each electronic fence to generate marking data and track files for driving in and out;
counting the number of the marking data of the driving-in and driving-out to generate an expected result;
connecting service interfaces set for the plurality of electronic fences; wherein the service interface at least comprises a computing service interface and a pushing service interface;
calculating the parameter values of track points in the track file entering and exiting the plurality of electronic fences according to a calculation service interface, and generating a fence message entering and exiting;
generating an actual result according to the pushing service interface and the number of the on-coming and off-coming fence messages;
and determining whether the service interface is normal or not according to the expected result and the actual result.
2. The method of claim 1, wherein determining an origin point and constructing a plurality of electronic fences based on the origin point and a predetermined plurality of radii comprises:
acquiring a polygon with a preset number of edges in an electronic map by using an arcgis tool;
acquiring the longitude and latitude of each point on the polygon;
calculating the barycentric coordinates of the polygon according to the longitude and latitude of each point on the polygon;
sequentially constructing a plurality of polygons according to a plurality of preset radiuses by taking the barycentric coordinate as an origin;
and copying each polygon in the plurality of polygons according to preset times by adopting a polygon fence interface to generate a plurality of electronic fences.
3. The method of claim 1, wherein calculating values of parameters of track points in the track file for entry into and exit from the plurality of electronic fences from a computing service interface to generate an entry-exit fence message comprises:
track points in the track file are sent to a distributed subscription message system in a Mock mode;
acquiring track points from the distributed subscription message system through a computing service interface;
calculating the obtained track points and all points on the plurality of electronic fences to generate a calculation result;
determining the states of the vehicles on the track points in the plurality of electronic fences according to the calculation result;
when the vehicle is in the driving state in the plurality of electronic fences, storing the acquired track points into a cache;
alternatively, the first and second liquid crystal display panels may be,
when the vehicle is in the state of the electronic fences and is in the driving-out state, the acquired track points are removed from the cache;
generating an entry-exit fence message based on the entry state and the exit state.
4. The method of claim 1, wherein generating the actual result according to the number of push service interfaces and the inbound and outbound fence messages comprises:
starting a user system and a supporting monitoring platform;
pushing the on-coming and off-coming fence message to the user system according to a pushing service interface to generate log information;
aggregating the log information to obtain a first statistical result;
pushing the on-off fence message to the supporting monitoring platform according to a pushing service interface, and outputting a second statistical result;
and combining the first statistical result and the second statistical result to generate an actual result.
5. The method of claim 1, wherein the determining whether the service interface is normal according to the expected result and the actual result comprises:
determining that the service interface is normal when the expected result is equal to the actual result.
6. The method of claim 1, wherein the determining whether the service interface is normal according to the expected result and the actual result comprises:
when the expected result is not equal to the actual result, calculating a difference value between the expected result and the actual result;
calculating a ratio of the difference to the expected result;
when the ratio is larger than a preset threshold value, determining that the service interface is abnormal;
generating early warning information;
and sending the early warning information to external equipment in a preset mode.
7. The method according to claim 6, wherein the predetermined manner at least comprises: a telephone mode, a short message mode and a mail mode.
8. A pressure testing apparatus for an electronic fence, the apparatus comprising:
the electronic fence constructing module is used for determining an origin point and constructing a plurality of electronic fences based on the origin point and a plurality of preset radiuses;
the vehicle binding module is used for taking any track point outside the outermost electronic fence of the electronic fences and binding the track point with a preset number of vehicles to obtain the track point of the bound vehicle;
the data generation module is used for controlling track points of the bound vehicles to sequentially pass through each electronic fence to generate marking data and track files for driving in and out;
the expected result generating module is used for counting the number of the marking data for driving in and out to generate expected results;
the service interface connecting module is used for connecting service interfaces set for the electronic fences; the service interface at least comprises a computing service interface and a pushing service interface;
the fence message generation module is used for calculating the parameter values of the track points in the track file entering and exiting the plurality of electronic fences according to a calculation service interface and generating a fence message entering and exiting;
the actual result generating module is used for generating an actual result according to the pushing service interface and the number of the on-coming and off-coming fence messages;
and the service interface judging module is used for determining whether the service interface is normal or not according to the expected result and the actual result.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 7.
10. A terminal, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps according to any of claims 1 to 7.
CN202110925778.3A 2021-08-12 2021-08-12 Pressure testing method and device for electronic fence, storage medium and terminal Active CN113793490B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110925778.3A CN113793490B (en) 2021-08-12 2021-08-12 Pressure testing method and device for electronic fence, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110925778.3A CN113793490B (en) 2021-08-12 2021-08-12 Pressure testing method and device for electronic fence, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN113793490A CN113793490A (en) 2021-12-14
CN113793490B true CN113793490B (en) 2022-09-13

Family

ID=78875957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110925778.3A Active CN113793490B (en) 2021-08-12 2021-08-12 Pressure testing method and device for electronic fence, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN113793490B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114463872B (en) * 2022-01-13 2023-12-08 北京中交兴路信息科技有限公司 Method and device for calculating freight loading time of truck, electronic equipment and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170069470A (en) * 2015-12-11 2017-06-21 현대자동차주식회사 A method for deterioration of pressure sensor for common rail and an apparatus the same
CN107067171A (en) * 2017-04-12 2017-08-18 卢松青 Vehicle insurance business intelligence dispatches system
CN107331192A (en) * 2017-07-05 2017-11-07 杭州科技职业技术学院 A kind of private parking stall idle period shared service method and system
CN108255839A (en) * 2016-12-28 2018-07-06 沈阳美行科技有限公司 A kind of user's run-length management system and correlation technique
CN108628743A (en) * 2018-04-26 2018-10-09 武汉斗鱼网络科技有限公司 Applied program testing method, device, equipment and storage medium
CN108974044A (en) * 2018-08-09 2018-12-11 铁路愿景欧洲有限公司 Railroad track assets survey system
CN110309244A (en) * 2018-03-23 2019-10-08 北京京东尚科信息技术有限公司 A kind of method and apparatus of object location
CN110493724A (en) * 2019-08-22 2019-11-22 北京云中融信网络科技有限公司 Position monitoring method, device, server and computer readable storage medium
CN110728822A (en) * 2019-10-09 2020-01-24 中兴健康科技有限公司 Processing method for alarm of electronic fence system
CN111361524A (en) * 2020-03-31 2020-07-03 上海云木科技有限公司 Vehicle safety control system and method
CN112235712A (en) * 2020-09-03 2021-01-15 浙江吉利汽车研究院有限公司 Vehicle driving early warning method, system, device and equipment
CN112799950A (en) * 2021-02-04 2021-05-14 北京中交兴路信息科技有限公司 Background service load capacity test system and method, storage medium and electronic device
CN113129530A (en) * 2021-04-19 2021-07-16 武汉拥钟智能科技有限公司 Intelligent security electronic fence alarm system based on Internet of things and machine vision
CN113204451A (en) * 2021-03-22 2021-08-03 北京中交兴路信息科技有限公司 Pressure testing method and system for Redis cluster, storage medium and terminal

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170069470A (en) * 2015-12-11 2017-06-21 현대자동차주식회사 A method for deterioration of pressure sensor for common rail and an apparatus the same
CN108255839A (en) * 2016-12-28 2018-07-06 沈阳美行科技有限公司 A kind of user's run-length management system and correlation technique
CN107067171A (en) * 2017-04-12 2017-08-18 卢松青 Vehicle insurance business intelligence dispatches system
CN107331192A (en) * 2017-07-05 2017-11-07 杭州科技职业技术学院 A kind of private parking stall idle period shared service method and system
CN110309244A (en) * 2018-03-23 2019-10-08 北京京东尚科信息技术有限公司 A kind of method and apparatus of object location
CN108628743A (en) * 2018-04-26 2018-10-09 武汉斗鱼网络科技有限公司 Applied program testing method, device, equipment and storage medium
CN108974044A (en) * 2018-08-09 2018-12-11 铁路愿景欧洲有限公司 Railroad track assets survey system
CN110493724A (en) * 2019-08-22 2019-11-22 北京云中融信网络科技有限公司 Position monitoring method, device, server and computer readable storage medium
CN110728822A (en) * 2019-10-09 2020-01-24 中兴健康科技有限公司 Processing method for alarm of electronic fence system
CN111361524A (en) * 2020-03-31 2020-07-03 上海云木科技有限公司 Vehicle safety control system and method
CN112235712A (en) * 2020-09-03 2021-01-15 浙江吉利汽车研究院有限公司 Vehicle driving early warning method, system, device and equipment
CN112799950A (en) * 2021-02-04 2021-05-14 北京中交兴路信息科技有限公司 Background service load capacity test system and method, storage medium and electronic device
CN113204451A (en) * 2021-03-22 2021-08-03 北京中交兴路信息科技有限公司 Pressure testing method and system for Redis cluster, storage medium and terminal
CN113129530A (en) * 2021-04-19 2021-07-16 武汉拥钟智能科技有限公司 Intelligent security electronic fence alarm system based on Internet of things and machine vision

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
电子围栏技术在景区交通问题中应用的SWOT分析;苏杭;《物流工程与服务》;20190930;第41卷(第9期);第124-126页 *

Also Published As

Publication number Publication date
CN113793490A (en) 2021-12-14

Similar Documents

Publication Publication Date Title
WO2021232229A1 (en) Virtual scene generation method and apparatus, computer device and storage medium
CN113838284B (en) Vehicle early warning method and device on accident-prone road section, storage medium and terminal
CN112863172B (en) Highway traffic running state judgment method, early warning method, device and terminal
CN110222893B (en) Method and device for recommending delivery places of shared traffic resources and electronic equipment
CN106170826A (en) The monitoring method and system of cab-getter's number
EP4098975A2 (en) Vehicle travel control method and apparatus
CN113611104B (en) Risk identification method and device for freight vehicle, storage medium and terminal
CN112885112B (en) Vehicle driving detection method, vehicle driving early warning method and device
CN113793490B (en) Pressure testing method and device for electronic fence, storage medium and terminal
CN110573837A (en) Navigation method, navigation device, storage medium and server
CN113807588A (en) Traffic accident-based driving path planning method and device
CN113190538A (en) Road construction method and device based on track data, storage medium and terminal
CN112436960A (en) Vehicle driving control method, terminal and computer readable storage medium
CN112434260A (en) Road traffic state detection method and device, storage medium and terminal
CN111191850A (en) Data processing method, device and equipment
CN114005297A (en) Motorcade coordinated driving method based on Internet of vehicles
CN113867367A (en) Processing method and device for test scene and computer program product
CN111829543B (en) Navigation data processing method and device
WO2023198016A1 (en) Method and apparatus for adding vehicle to virtual scene, and computer device, storage medium and program product
CN110823253A (en) Data processing method, device and equipment based on unmanned vehicle technology and storage medium
CN113724493B (en) Method and device for analyzing flow channel, storage medium and terminal
CN114202272A (en) Vehicle and goods matching method and device based on electronic fence, storage medium and terminal
CN113886413A (en) Map updating method and device
CN113590943A (en) Gas station recommendation method, system, electronic device and medium
CN116050189B (en) Traffic deduction simulation experiment method, system, terminal and storage medium

Legal Events

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