CN113569547A - Police service system test method and related device - Google Patents

Police service system test method and related device Download PDF

Info

Publication number
CN113569547A
CN113569547A CN202010347920.6A CN202010347920A CN113569547A CN 113569547 A CN113569547 A CN 113569547A CN 202010347920 A CN202010347920 A CN 202010347920A CN 113569547 A CN113569547 A CN 113569547A
Authority
CN
China
Prior art keywords
data
alarm
alarm condition
simulation data
preset target
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
CN202010347920.6A
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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN202010347920.6A priority Critical patent/CN113569547A/en
Publication of CN113569547A publication Critical patent/CN113569547A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Abstract

The invention discloses a warning system testing method and a related device, which can obtain warning situation simulation data construction instructions, construct warning situation simulation data of the data construction number in a preset data construction mode, and generate data insertion instructions for inserting at least part of constructed warning situation simulation data into a preset target warning situation table; executing the data insertion instruction to insert at least part of the constructed at least part of the alarm simulation data in the preset target alarm table, and recording data insertion time; and sending the alarm condition simulation data in the preset target alarm condition table to an alarm service system for testing according to the recorded data insertion time. The invention can automatically construct the warning condition simulation data and test the warning system according to the warning condition simulation data without using real warning condition data, thereby not causing the leakage of the real warning condition data and realizing the effective test of the warning system.

Description

Police service system test method and related device
Technical Field
The invention relates to the field of system testing, in particular to a police service system testing method and a related device.
Background
With the improvement of the technological level, the application of the police service system with high automation and intellectualization is more and more common.
The police system can manage the warning situation data, and the data management level is greatly improved. However, prior to formal use, the police service requires a significant number of tests to be performed. Some of these tests require the use of large amounts of alert data. However, for security purposes, the real warning situation data is not sent to the police system testing party, which makes the police system testing party unable to effectively test the police system.
Because the police condition data can not be used for testing the police service system, the stability and the safety of the conventional police service system can not be ensured.
Disclosure of Invention
In view of the above problems, the present invention provides a police service system testing method and related apparatus for overcoming the above problems or at least partially solving the above problems, and the technical solution is as follows:
a police service system test method comprises the following steps:
obtaining an alarm condition simulation data construction instruction, wherein the alarm condition simulation data construction instruction carries: the number of data construction pieces;
constructing the alarm condition simulation data of the data construction number in a preset data construction mode, wherein the constructed alarm condition simulation data comprise: data respectively matched with all fields in part or all fields in a preset target alarm condition table;
generating a data insertion instruction for inserting at least part of the constructed alarm condition simulation data into the preset target alarm condition table;
executing the data insertion instruction to insert at least part of the constructed alarm condition simulation data in the preset target alarm condition table, and recording data insertion time;
and sending the alarm condition simulation data in the preset target alarm condition table to an alarm service system for testing according to the recorded data insertion time.
Optionally, the preset data constructing method includes: at least one of the first, second, and third structural forms,
wherein the first construction mode is as follows: generating a plurality of fixed data which are respectively matched with each field in part or all fields in the preset target alarm condition table;
the second construction mode is as follows: generating a plurality of random data respectively matched with each field in part or all fields in the preset target alarm condition table;
the third construction mode is as follows: and generating a plurality of data which are respectively matched with each field in part or all fields in the preset target alarm table according to a preset change mode, wherein the plurality of data which are sequentially constructed through the third construction mode and matched with the same field are changed according to the preset change mode.
Optionally, the sending the warning situation simulation data in the preset target warning situation table to a warning system for testing according to the recorded data insertion time includes:
determining the latest time in the data insertion time of the warning situation simulation data which is sent to the warning system last time;
and sending the warning condition simulation data with the data insertion time later than the latest time in the preset target warning condition table to a warning service system for testing.
Optionally, the preset target warning condition table includes: at least one of an alarm person information table, an alarm receiving information table and a feedback information table, wherein each piece of alarm condition simulation data corresponds to one simulation police case,
the alarm condition simulation data comprises alarm condition simulation data, an alarm condition information table, an alarm output information table, an alarm receiving information table and a feedback information table, wherein the alarm condition simulation data corresponds to the alarm condition simulation data of the same simulated police case.
Optionally, the data insertion instruction is: the structured query language INSERT INTOs statement.
A police service system testing apparatus comprising: an instruction obtaining unit, a data constructing unit, an instruction generating unit, an instruction executing unit and a data transmitting unit,
the instruction obtaining unit is used for obtaining an alarm condition simulation data construction instruction, wherein the alarm condition simulation data construction instruction carries: the number of data construction pieces;
the data construction unit is used for constructing the alarm condition simulation data of the data construction number in a preset data construction mode, wherein the constructed alarm condition simulation data comprise: data respectively matched with all fields in part or all fields in a preset target alarm condition table;
the instruction generating unit is used for generating a data inserting instruction for inserting at least part of the constructed alarm simulation data into the preset target alarm table;
the instruction execution unit is used for executing the data insertion instruction to insert at least part of the constructed alarm simulation data into the preset target alarm table and recording data insertion time;
and the data sending unit is used for sending the warning condition simulation data in the preset target warning condition table to a warning system for testing according to the recorded data insertion time.
Optionally, the preset data constructing method includes: at least one of the first, second, and third structural forms,
wherein the first construction mode is as follows: generating a plurality of fixed data which are respectively matched with each field in part or all fields in the preset target alarm condition table;
the second construction mode is as follows: generating a plurality of random data respectively matched with each field in part or all fields in the preset target alarm condition table;
the third construction mode is as follows: and generating a plurality of data which are respectively matched with each field in part or all fields in the preset target alarm table according to a preset change mode, wherein the plurality of data which are sequentially constructed through the third construction mode and matched with the same field are changed according to the preset change mode.
Optionally, the data sending unit includes: a time determination subunit and an analog data transmission subunit,
the time determining subunit is used for determining the latest time in the data insertion time of the alarm situation simulation data which is sent to the police service system last time;
and the analog data sending subunit is used for sending the warning situation analog data with the data insertion time later than the latest time in the preset target warning situation table to a warning system for testing.
An apparatus, comprising: at least one processor, and at least one memory, bus connected with the processor; the processor and the memory complete mutual communication through the bus; the processor is used for calling the program instructions in the memory to execute any one of the police system testing methods.
A storage medium, wherein the storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, the method for testing a police system is implemented.
By means of the technical scheme, the warning system testing method and the related device provided by the invention can obtain warning situation simulation data construction instructions, construct the warning situation simulation data of the data construction number in a preset data construction mode, and generate data insertion instructions for inserting at least part of the constructed warning situation simulation data into the preset target warning situation table; executing the data insertion instruction to insert at least part of the constructed at least part of the alarm simulation data in the preset target alarm table, and recording data insertion time; and sending the alarm condition simulation data in the preset target alarm condition table to an alarm service system for testing according to the recorded data insertion time. The invention can automatically construct the warning condition simulation data and test the warning system according to the warning condition simulation data without using real warning condition data, thereby not causing the leakage of the real warning condition data and realizing the effective test of the warning system.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 shows a flowchart of a police system testing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram illustrating a police system testing device according to an embodiment of the present invention;
fig. 3 shows a schematic structural diagram of an apparatus provided in an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As shown in fig. 1, a method for testing a police system according to an embodiment of the present invention may include:
s100, obtaining an alarm condition simulation data construction instruction, wherein the alarm condition simulation data construction instruction carries: the data constructs the number of pieces.
The alarm situation simulation data may be related information of a simulated alarm case, for example: at least one of alarm person information, alarm receiving information, feedback information and the like. The alarm simulation data can be matched with part or all of fields in the preset target alarm table. The preset target alert table may be a table for storing alert simulation data. Alternatively, the preset target alert table may be a table in a database.
Optionally, the preset target alert table may include: at least one of the alarm person information table, the alarm receiving information table and the feedback information table is used for storing the alarm person information, the alarm information table, the alarm receiving information and the feedback information respectively.
The preset target alarm table may include a plurality of fields, and the fields in different types of preset target alarm tables may not be identical. Wherein, the alarm information may include: at least one of the alarm number, the name of the alarm person, the contact information and the like. The alarmer information table may include: alarm number, name of the alarm person, contact information and the like. The alarm receiving information may include: and at least one of information such as an alarm receiving number, an alarm receiving person name, a case belonging unit, alarm receiving time, alarm content and the like. The alarm receiving information table may include: alarm receiving number, alarm receiving person name, case belonging unit, alarm receiving time, alarm content and other fields. The police dispatch information may include: at least one of the information of the alarm serial number, the name of the alarm person, the unit of the case, the alarm time, the alarm place, the alarm reason and the like. The alarm information table may include: the number of the alarm, the name of the person giving the alarm, the unit to which the case belongs, the time of the alarm, the place of the alarm, the reason of the alarm and the like. The feedback information may include: and at least one of information such as feedback numbers, feedback object names, case belonging units, feedback person names, feedback contents, feedback results and the like. The feedback information table may include: feedback number, feedback object name, case belonging unit, feedback person name, feedback content, feedback result and other fields.
Aiming at different types of preset target alarm forms, the alarm simulation data matched with part or all fields in each type of preset target alarm form can be respectively generated. For example: firstly, 500 pieces of alarm condition simulation data matched with all fields in an alarm information table are generated (wherein one piece of alarm condition simulation data can be BJ001, Zhang III and 15900000001, wherein BJ001 is an alarm number, Zhang III is the name of an alarm and 15900000001 is a contact way), then 500 pieces of alarm condition simulation data matched with all fields in the alarm information table are generated (one piece of alarm condition simulation data can be CJ001, Liqu and A dispatching place, wherein CJ001 is the alarm number, Liqu is the name of the alarm, A dispatching place belongs to the unit), and so on. Of course, the present invention may also generate the alarm simulation data matched with some or all of the fields in at least two types of preset target alarm tables at the same time. For example: and generating 500 pieces of alarm condition simulation data, wherein each piece of alarm condition simulation data comprises data which are respectively matched with part or all of fields in at least two types of preset target alarm condition tables. For example, one of the alarm condition simulation data may be: BJ001, Zhang San, 15900000001, CJ001, Li Si and A. Wherein BJ001 is the alarm number, Zhang three is the name of the alarm, 15900000001 is the contact, CJ001 is the alarm number, Li four is the name of the alarm, and A is the unit of the case.
Optionally, each piece of the alarm situation simulation data may correspond to one simulated alarm case, for example: the first piece of alarm condition simulation data corresponds to a simulation alarm case A, and the second piece of alarm condition simulation data corresponds to a simulation alarm case B.
Specifically, the warning situation simulation data construction instruction can be obtained through an interface through which a user can input information, and the interface at least comprises a data construction number input box or a selection box.
Of course, the user may also input other information through the above-described interface, such as: alarm content, location of a case, etc. The invention can use the information input by the user as the warning situation simulation data construction instruction.
S200, constructing the alarm condition simulation data of the data construction number in a preset data construction mode, wherein the constructed alarm condition simulation data comprise: and the data are respectively matched with each field in part or all fields in the preset target alarm condition table.
Optionally, since the preset target alert table may include a plurality of fields, each piece of alert simulation data generated by the present invention may include: and the data are respectively matched with each field in part or all fields in the preset target alarm condition table. For example, one of the pieces of alarm condition simulation data may be: BJ001, zhang san, 15900000001, wherein BJ001 matches the field "alarm number", zhang san matches the field "name of alarm", 15900000001 matches the field "contact address".
The preset data construction mode may include: at least one of the first, second, and third configurations.
Wherein, the first structure mode is as follows: and generating a plurality of fixed data which are respectively matched with each field in part or all fields in the preset target alarm condition table.
For example: the units of the cases in the alarm condition simulation data generated by the first construction mode are all fixed data, namely, the dispatching place of the district A, province B, city C. The following steps are repeated: the alarm time in each piece of alarm condition simulation data generated by the first construction mode is fixed data, namely 3 months and 13 days in 2020.
The data used for testing the police service system is constructed warning situation simulation data instead of real data. The warning situation simulation data does not need to be excessively real, and the result of testing the warning system is not influenced. Moreover, the complexity of constructing the alarm situation simulation data can be effectively reduced by using the fixed data.
The second construction mode is as follows: and generating a plurality of random data which are respectively matched with each field in part or all fields in the preset target alarm condition table.
Specifically, the field of the random data match may be a name, for example: the name of the person giving the alarm, etc.
Through the randomization of the name, the alarm condition simulation data can be distinguished to a certain extent, so that the test effect is ensured.
Optionally, the invention may use the second construction method to construct the matched data for all the fields in each piece of alarm condition simulation data. For example, the matched data is constructed by the second construction mode for the name field and all other fields except the name in each piece of alarm condition simulation data.
The third construction mode is as follows: and generating a plurality of data which are respectively matched with each field in part or all fields in the preset target alarm table according to a preset change mode, wherein the plurality of data which are sequentially constructed through the third construction mode and matched with the same field are changed according to the preset change mode.
The invention can use the third construction mode to construct the serial number in the warning situation simulation data. Data matching the same number field is numbered according to the sequence of construction, for example: every time data matched with the field alarm number is constructed, 1 is added on the basis of the data matched with the field alarm number constructed last time.
Optionally, the alarm serial number, the alarm receiving serial number, the alarm outputting serial number and the feedback serial number in the alarm condition simulation data corresponding to the same simulation police case may be the same or different. When the alarm serial number, the alarm receiving serial number, the alarm outputting serial number and the feedback serial number in the alarm condition simulation data corresponding to the same simulation police case are the same, the alarm serial number, the alarm receiving serial number, the alarm outputting serial number and the feedback serial number are combined into one serial number, so that the complexity of the data can be effectively reduced. Further, the field names corresponding to the alarm number, the alarm receiving number, the alarm outputting number, and the feedback number may also be the same, for example: case numbering.
It is understood that the alarm number, the alarm receiving number, the alarm outputting number and the feedback number may be primary keys.
When the alarm serial number, the alarm receiving serial number, the alarm outputting serial number and the feedback serial number in the alarm condition simulation data corresponding to the same simulation alarm case are different, the alarm serial number, the alarm receiving serial number, the alarm outputting serial number and the feedback serial number in the alarm condition simulation data corresponding to the same simulation alarm case can be associated together in a main external key association mode. Namely: the alarm condition simulation data comprises alarm condition simulation data, an alarm condition information table, an alarm output information table, an alarm receiving information table and a feedback information table, wherein the alarm condition simulation data corresponds to the alarm condition simulation data of the same simulated police case.
Optionally, the invention may construct the matched data for the name field in each warning situation simulation data in the second construction mode, the invention may construct the matched data for the number in each warning situation simulation data in the third construction mode, and the invention may construct the matched data for other fields except the name and the number in the second construction mode.
S300, generating a data insertion instruction for inserting at least part of the constructed alarm simulation data into the preset target alarm table.
The data insertion instruction may be: the structured query language INSERT INTOs statement. Of course, when the alarm situation simulation data is stored in the database in another language, the data insertion instruction may also be an insertion instruction in another language.
The following provides a pattern of data insertion instructions:
INSERT INTO table name VALUES (value 1, value 2...)
Wherein, the "table name" is the name of the table into which the data is inserted, such as: and an alarm information table.
"value 1, value 2." is the specific content of the data to be inserted, i.e. some or all of the data in the constructed alarm situation simulation data, such as: 0001, Zhang III, district C of B, A, 3.13.2020, district D, Li Si and Wan Wu Bu.
The invention can adjust the sequence of various types of alarm condition simulation data in the data insertion instruction according to the sequence of fields in the table to be inserted.
For example, for the ordering of the fields shown in Table 1 below, the present invention may adjust the ordering of data in the data insertion instruction that matches the fields in Table 1 to be consistent with the ordering of the fields. Namely: the data insertion instruction is as follows:
INSERT INTO police dispatch information sheet VALUES (0001, Zhang III, 3.13.2020, C district post of B city, province A, D district, Liquan and Wang Wu Bu).
TABLE 1 police information table
Figure BDA0002470847960000091
It will be appreciated that a row of data may be inserted into the table each time the data insertion instruction is executed.
Since the required data of different forms may be different, the invention can extract the data matched with the fields in the form from the constructed alarm situation simulation data according to the fields of the form and construct the data insertion instruction for inserting the data into the form.
S400, executing the data insertion instruction to insert at least part of the constructed at least part of alarm simulation data in the preset target alarm table, and recording data insertion time.
The data insertion time may be a time when data is inserted into the table, or may be a construction time of the data inserted into the table.
And S500, sending the warning condition simulation data in the preset target warning condition table to a warning service system for testing according to the recorded data insertion time.
Optionally, step S500 may specifically include:
determining the latest time in the data insertion time of the warning situation simulation data which is sent to the warning system last time;
and sending the warning condition simulation data with the data insertion time later than the latest time in the preset target warning condition table to a warning service system for testing.
Since in practice the alarm data does not all occur at one time, but gradually increases over time, the invention makes it possible to construct alarm simulation data multiple times at different times to simulate real situations. When the police system is tested, the early constructed warning condition simulation data is already sent to the police system for testing, and when a batch of new warning condition simulation data is constructed subsequently, the newly constructed warning condition simulation data only needs to be sent to the police system for testing, so that repeated testing of old data can be avoided, and the data transmission quantity is also reduced.
The warning system testing method provided by the invention can obtain warning situation simulation data construction instructions, construct the warning situation simulation data of the data construction number in a preset data construction mode, and generate data insertion instructions for inserting at least part of the constructed warning situation simulation data into the preset target warning situation table; executing the data insertion instruction to insert at least part of the constructed at least part of the alarm simulation data in the preset target alarm table, and recording data insertion time; and sending the alarm condition simulation data in the preset target alarm condition table to an alarm service system for testing according to the recorded data insertion time. The invention can automatically construct the warning condition simulation data and test the warning system according to the warning condition simulation data without using real warning condition data, thereby not causing the leakage of the real warning condition data and realizing the effective test of the warning system.
Corresponding to the police service system testing method provided by the embodiment of the present invention, the embodiment of the present invention further provides a police service system testing apparatus, as shown in fig. 2, the apparatus may include: an instruction obtaining unit 100, a data constructing unit 200, an instruction generating unit 300, an instruction executing unit 400 and a data transmitting unit 500,
the instruction obtaining unit 100 is configured to obtain an alarm condition simulation data construction instruction, where the alarm condition simulation data construction instruction carries: the data constructs the number of pieces.
The data constructing unit 200 is configured to construct the alarm condition simulation data of the data construction number by a preset data constructing manner, where the constructed alarm condition simulation data includes: and the data are respectively matched with each field in part or all fields in the preset target alarm condition table.
Optionally, the preset data constructing method includes: at least one of the first, second, and third structural forms,
optionally, the preset target alert table may include: at least one of an alarm person information table, an alarm receiving information table and a feedback information table, wherein each piece of alarm condition simulation data corresponds to one simulation police case.
The alarm condition simulation data comprises alarm condition simulation data, an alarm condition information table, an alarm output information table, an alarm receiving information table and a feedback information table, wherein the alarm condition simulation data corresponds to the alarm condition simulation data of the same simulated police case.
Wherein the first construction mode is as follows: generating a plurality of fixed data which are respectively matched with each field in part or all fields in the preset target alarm condition table;
the second construction mode is as follows: generating a plurality of random data respectively matched with each field in part or all fields in the preset target alarm condition table;
the third construction mode is as follows: and generating a plurality of data which are respectively matched with each field in part or all fields in the preset target alarm table according to a preset change mode, wherein the plurality of data which are sequentially constructed through the third construction mode and matched with the same field are changed according to the preset change mode.
The instruction generating unit 300 is configured to generate a data insertion instruction for inserting at least part of the constructed alarm simulation data into the preset target alarm table.
Optionally, the data insertion instruction may be: the structured query language INSERT INTOs statement.
The instruction execution unit 400 is configured to execute the data insertion instruction to insert at least part of the constructed alarm simulation data into the preset target alarm table, and record data insertion time.
The data sending unit 500 is configured to send the warning situation simulation data in the preset target warning situation table to a warning system for testing according to the recorded data insertion time.
Optionally, the data sending unit 500 may specifically include: a time determination subunit and an analog data transmission subunit,
the time determining subunit is used for determining the latest time in the data insertion time of the alarm situation simulation data which is sent to the police service system last time;
and the analog data sending subunit is used for sending the warning situation analog data with the data insertion time later than the latest time in the preset target warning situation table to a warning system for testing.
The warning system testing device provided by the invention can obtain warning situation simulation data construction instructions, construct warning situation simulation data of the data construction number in a preset data construction mode, and generate data insertion instructions for inserting at least part of constructed warning situation simulation data into a preset target warning situation table; executing the data insertion instruction to insert at least part of the constructed at least part of the alarm simulation data in the preset target alarm table, and recording data insertion time; and sending the alarm condition simulation data in the preset target alarm condition table to an alarm service system for testing according to the recorded data insertion time. The invention can automatically construct the warning condition simulation data and test the warning system according to the warning condition simulation data without using real warning condition data, thereby not causing the leakage of the real warning condition data and realizing the effective test of the warning system.
The police service system testing device comprises a processor and a memory, wherein the instruction obtaining unit 100, the data constructing unit 200, the instruction generating unit 300, the instruction executing unit 400, the data sending unit 500 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, alarm condition simulation data are automatically constructed by adjusting kernel parameters, and the alarm system is tested according to the alarm condition simulation data.
The embodiment of the invention provides a storage medium, wherein a program is stored on the storage medium, and the program realizes the police service system test method when being executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the police service system test method is executed when the program runs.
As shown in fig. 3, an embodiment of the present invention provides an apparatus 70, where the apparatus 70 includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; the processor 701 and the memory 702 complete mutual communication through a bus 703; the processor 701 is configured to call the program instructions in the memory 702 to execute the police system testing method described above. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
obtaining an alarm condition simulation data construction instruction, wherein the alarm condition simulation data construction instruction carries: the number of data construction pieces;
constructing the alarm condition simulation data of the data construction number in a preset data construction mode, wherein the constructed alarm condition simulation data comprise: data respectively matched with all fields in part or all fields in a preset target alarm condition table;
generating a data insertion instruction for inserting at least part of the constructed alarm condition simulation data into the preset target alarm condition table;
executing the data insertion instruction to insert at least part of the constructed alarm condition simulation data in the preset target alarm condition table, and recording data insertion time;
and sending the alarm condition simulation data in the preset target alarm condition table to an alarm service system for testing according to the recorded data insertion time.
Optionally, the preset data constructing method includes: at least one of the first, second, and third structural forms,
wherein the first construction mode is as follows: generating a plurality of fixed data which are respectively matched with each field in part or all fields in the preset target alarm condition table;
the second construction mode is as follows: generating a plurality of random data respectively matched with each field in part or all fields in the preset target alarm condition table;
the third construction mode is as follows: and generating a plurality of data which are respectively matched with each field in part or all fields in the preset target alarm table according to a preset change mode, wherein the plurality of data which are sequentially constructed through the third construction mode and matched with the same field are changed according to the preset change mode.
Optionally, the sending the warning situation simulation data in the preset target warning situation table to a warning system for testing according to the recorded data insertion time includes:
determining the latest time in the data insertion time of the warning situation simulation data which is sent to the warning system last time;
and sending the warning condition simulation data with the data insertion time later than the latest time in the preset target warning condition table to a warning service system for testing.
Optionally, the preset target warning condition table includes: at least one of an alarm person information table, an alarm receiving information table and a feedback information table, wherein each piece of alarm condition simulation data corresponds to one simulation police case,
the alarm condition simulation data comprises alarm condition simulation data, an alarm condition information table, an alarm output information table, an alarm receiving information table and a feedback information table, wherein the alarm condition simulation data corresponds to the alarm condition simulation data of the same simulated police case.
Optionally, the data insertion instruction is: the structured query language INSERT INTOs statement.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A police service system test method is characterized by comprising the following steps:
obtaining an alarm condition simulation data construction instruction, wherein the alarm condition simulation data construction instruction carries: the number of data construction pieces;
constructing the alarm condition simulation data of the data construction number in a preset data construction mode, wherein the constructed alarm condition simulation data comprise: data respectively matched with all fields in part or all fields in a preset target alarm condition table;
generating a data insertion instruction for inserting at least part of the constructed alarm condition simulation data into the preset target alarm condition table;
executing the data insertion instruction to insert at least part of the constructed alarm condition simulation data in the preset target alarm condition table, and recording data insertion time;
and sending the alarm condition simulation data in the preset target alarm condition table to an alarm service system for testing according to the recorded data insertion time.
2. The method of claim 1, wherein the predetermined data structuring comprises: at least one of the first, second, and third structural forms,
wherein the first construction mode is as follows: generating a plurality of fixed data which are respectively matched with each field in part or all fields in the preset target alarm condition table;
the second construction mode is as follows: generating a plurality of random data respectively matched with each field in part or all fields in the preset target alarm condition table;
the third construction mode is as follows: and generating a plurality of data which are respectively matched with each field in part or all fields in the preset target alarm table according to a preset change mode, wherein the plurality of data which are sequentially constructed through the third construction mode and matched with the same field are changed according to the preset change mode.
3. The method according to claim 1, wherein the sending the alarm simulation data in the preset target alarm table to a police system for testing according to the recorded data insertion time comprises:
determining the latest time in the data insertion time of the warning situation simulation data which is sent to the warning system last time;
and sending the warning condition simulation data with the data insertion time later than the latest time in the preset target warning condition table to a warning service system for testing.
4. The method of claim 1, wherein the preset target alert table comprises: at least one of an alarm person information table, an alarm receiving information table and a feedback information table, wherein each piece of alarm condition simulation data corresponds to one simulation police case,
the alarm condition simulation data comprises alarm condition simulation data, an alarm condition information table, an alarm output information table, an alarm receiving information table and a feedback information table, wherein the alarm condition simulation data corresponds to the alarm condition simulation data of the same simulated police case.
5. The method of claim 1, wherein the data insertion instruction is: the structured query language INSERT INTOs statement.
6. A police service system testing arrangement, characterized by, includes: an instruction obtaining unit, a data constructing unit, an instruction generating unit, an instruction executing unit and a data transmitting unit,
the instruction obtaining unit is used for obtaining an alarm condition simulation data construction instruction, wherein the alarm condition simulation data construction instruction carries: the number of data construction pieces;
the data construction unit is used for constructing the alarm condition simulation data of the data construction number in a preset data construction mode, wherein the constructed alarm condition simulation data comprise: data respectively matched with all fields in part or all fields in a preset target alarm condition table;
the instruction generating unit is used for generating a data inserting instruction for inserting at least part of the constructed alarm simulation data into the preset target alarm table;
the instruction execution unit is used for executing the data insertion instruction to insert at least part of the constructed alarm simulation data into the preset target alarm table and recording data insertion time;
and the data sending unit is used for sending the warning condition simulation data in the preset target warning condition table to a warning system for testing according to the recorded data insertion time.
7. The apparatus of claim 6, wherein the predetermined data structuring comprises: at least one of the first, second, and third structural forms,
wherein the first construction mode is as follows: generating a plurality of fixed data which are respectively matched with each field in part or all fields in the preset target alarm condition table;
the second construction mode is as follows: generating a plurality of random data respectively matched with each field in part or all fields in the preset target alarm condition table;
the third construction mode is as follows: and generating a plurality of data which are respectively matched with each field in part or all fields in the preset target alarm table according to a preset change mode, wherein the plurality of data which are sequentially constructed through the third construction mode and matched with the same field are changed according to the preset change mode.
8. The apparatus of claim 6, wherein the data transmission unit comprises: a time determination subunit and an analog data transmission subunit,
the time determining subunit is used for determining the latest time in the data insertion time of the alarm situation simulation data which is sent to the police service system last time;
and the analog data sending subunit is used for sending the warning situation analog data with the data insertion time later than the latest time in the preset target warning situation table to a warning system for testing.
9. An apparatus, comprising: at least one processor, and at least one memory, bus connected with the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to invoke program instructions in the memory to perform the police system testing method of any one of claims 1 to 5.
10. A storage medium having stored thereon computer-executable instructions which, when loaded and executed by a processor, carry out a police system testing method according to any one of claims 1 to 5.
CN202010347920.6A 2020-04-28 2020-04-28 Police service system test method and related device Pending CN113569547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010347920.6A CN113569547A (en) 2020-04-28 2020-04-28 Police service system test method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010347920.6A CN113569547A (en) 2020-04-28 2020-04-28 Police service system test method and related device

Publications (1)

Publication Number Publication Date
CN113569547A true CN113569547A (en) 2021-10-29

Family

ID=78157881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010347920.6A Pending CN113569547A (en) 2020-04-28 2020-04-28 Police service system test method and related device

Country Status (1)

Country Link
CN (1) CN113569547A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968370A (en) * 2012-11-26 2013-03-13 中国电信股份有限公司云计算分公司 Test data generating method and device
CN103442042A (en) * 2013-08-14 2013-12-11 福建天晴数码有限公司 Incremental data synchronization method and system
CN103473325A (en) * 2013-09-13 2013-12-25 中国工商银行股份有限公司 System and method for generating test case data
CN107835206A (en) * 2017-09-19 2018-03-23 平安普惠企业管理有限公司 Data-updating method, server and computer-readable recording medium
CN109815252A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Test data generating method, device, computer equipment and readable storage medium storing program for executing
WO2019165691A1 (en) * 2018-02-28 2019-09-06 平安科技(深圳)有限公司 Method, apparatus and device for automatically generating test case, and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968370A (en) * 2012-11-26 2013-03-13 中国电信股份有限公司云计算分公司 Test data generating method and device
CN103442042A (en) * 2013-08-14 2013-12-11 福建天晴数码有限公司 Incremental data synchronization method and system
CN103473325A (en) * 2013-09-13 2013-12-25 中国工商银行股份有限公司 System and method for generating test case data
CN107835206A (en) * 2017-09-19 2018-03-23 平安普惠企业管理有限公司 Data-updating method, server and computer-readable recording medium
WO2019165691A1 (en) * 2018-02-28 2019-09-06 平安科技(深圳)有限公司 Method, apparatus and device for automatically generating test case, and readable storage medium
CN109815252A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Test data generating method, device, computer equipment and readable storage medium storing program for executing

Similar Documents

Publication Publication Date Title
CN111062580B (en) Matching method of staff and target item and electronic equipment
CN112380294B (en) Block chain cross-chain access method and device
CN107665171A (en) Automatic regression test method and device
CN110046523B (en) Intelligent contract checking method and device and electronic equipment
CN112487083B (en) Data verification method and device
CN109345392B (en) Method and system for issuing programming question, issuing solution code and checking solution code
CN112463634A (en) Software testing method and device under micro-service architecture
CN112561690A (en) Method, system, equipment and storage medium for testing credit card staging service interface
CN113569547A (en) Police service system test method and related device
CN111382069A (en) Data flow testing method and system
CN110347678A (en) A kind of storage method of finance data, system, device and equipment
CN110058995A (en) A kind of the data library test method and system of the interference of avoidable type of database
CN111563272B (en) Information statistical method and device
CN115203746A (en) Data account access authorization method and device
CN113377415A (en) Application publishing method and device
CN110955882B (en) User permission setting method and device
CN113761746A (en) Method and device for identifying algebraic ring
CN114443375A (en) Test method and device, electronic device and computer readable storage medium
CN112749163B (en) Data transmission method, device and medium
CN114780595B (en) Verification method, verification device and verification system
CN111062676A (en) Method and device for realizing government affair approval process
CN109446091B (en) Business entity object testing method and device
CN116795723B (en) Chain unit test processing method and device and computer equipment
CN116755922A (en) Error code information management method and related equipment
CN114297082A (en) Method and device for generating program test point, storage medium and electronic equipment

Legal Events

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