Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The embodiment of the specification provides a risk prevention and control method, a risk prevention and control system and terminal equipment, so as to solve the problem that the risk prevention and control method in the prior art needs to continuously adjust keywords to achieve the purpose of risk prevention and control, and the cost is high. The embodiment of the present specification provides a risk prevention and control method, and an execution subject of the method may be, but is not limited to, a terminal device or an apparatus or system capable of being configured to execute the method provided by the embodiment of the present specification.
For convenience of description, the following description will be made of an embodiment of the method taking as an example that an execution subject of the method is a terminal device capable of executing the method. It is understood that the implementation of the method by the terminal device is only an exemplary illustration, and should not be construed as a limitation of the method.
The risk prevention and control method provided by the embodiment of the specification can be applied to international logistics or domestic logistics, and the embodiment of the specification takes the application to the international logistics as an example for detailed description.
Fig. 1 is a flowchart of a risk prevention and control method provided in an embodiment of the present specification, where the method of fig. 1 may be executed by a terminal device. As shown in fig. 1, the method may include:
and step 110, processing the logistics address information for real-time transaction of the user to obtain a plurality of address elements.
The method comprises the following steps of processing logistics address information of a user for real-time transaction to obtain a plurality of address elements, and specifically comprises the following steps:
splitting logistics address information of a user for real-time transaction to obtain a plurality of address elements; or, the logistics address information of the real-time transaction of the user is recombined to obtain a plurality of address elements.
And step 120, determining the text similarity between the address elements in the temporary list and the preset address elements in the preset list.
The temporary list is created from a plurality of address elements, the temporary list being used to mark the plurality of address elements.
The preset address element may refer to each component in the correct logistics address.
The preset list is created from lock preset address elements.
In this embodiment of the present specification, determining a text similarity between an address element in the temporary list and a preset address element in the preset list may be implemented in the following manners:
firstly, determining the text similarity between the address elements in the temporary list and the preset address elements in the preset list through a text editing distance algorithm;
secondly, determining the text similarity between the address elements in the temporary list and the preset address elements in the preset list through an included angle cosine algorithm;
thirdly, determining the text similarity between the address elements in the temporary list and the preset address elements in the preset list through an Euclidean distance algorithm.
Step 130, determining whether to execute the transaction based on the text similarity of the address elements.
The determining whether to execute the transaction based on the text similarity of the address elements may specifically be: if the text similarity value of the address element is larger than the threshold value, terminating the execution of the transaction; and if the text similarity value of the address element is less than or equal to the threshold value, continuing to execute the transaction.
The embodiment of the specification processes the logistics address information of the user for real-time transaction to obtain a plurality of address elements, determines whether to execute the transaction or not based on the text similarity between the address elements in the temporary list and the preset address elements in the preset list, can dynamically capture fuzzy modification of the logistics address, does not need to adjust keywords, is low in cost, and can achieve a better wind control effect.
Optionally, as an embodiment, the step 120 may be specifically implemented as:
and determining the text similarity between the address elements in the temporary list and the preset address elements in the preset list based on the minimum number of editing operations required for converting the character strings corresponding to the address elements into the character strings corresponding to the preset address elements.
Illustratively, taking the address element as Cohinnd and the preset address element as China as an example:
the edit distance of Cohinnd and China needs to be calculated as Cohinnd → Cohinna → China
First, 7X 9 Table 1(Cohinnd length 7, China length 5, each plus 2) is created
TABLE 1
Then, the following positions are filled with numbers, as shown in table 2:
TABLE 2
|
|
C
|
h
|
i
|
n
|
a
|
|
0
|
1
|
2
|
3
|
4
|
5
|
C
|
1
|
|
|
|
|
|
o
|
2
|
|
|
|
|
|
h
|
3
|
|
|
|
|
|
i
|
4
|
|
|
|
|
|
n
|
5
|
|
|
|
|
|
n
|
6
|
|
|
|
|
|
a
|
7
|
|
|
|
|
|
Starting from 3, 3 grids, the calculation is started. Take the minimum of the following three values:
the upper left digit if the uppermost character is equal to the leftmost character. Otherwise, it is the upper left digit + 1. (1 for 3, 3)
Left digit +1 (for 3, 3 grids 2)
Upper number +1 (for 3, 3 grids 2)
Thus, grid 3, 3 is 0, as shown in table 3:
TABLE 3
|
|
C
|
h
|
i
|
n
|
a
|
|
0
|
1
|
2
|
3
|
4
|
5
|
C
|
1
|
0
|
|
|
|
|
o
|
2
|
|
|
|
|
|
h
|
3
|
|
|
|
|
|
i
|
4
|
|
|
|
|
|
n
|
5
|
|
|
|
|
|
n
|
6
|
|
|
|
|
|
a
|
7
|
|
|
|
|
|
The calculation starts with a 3, 4 (three rows and four columns) grid. Take the minimum of the following three values:
the upper left digit if the uppermost character is equal to the leftmost character. Otherwise, it is the upper left digit + 1. (2 for 3, 4)
Left digit +1 (for 3, 4 grids 1)
Upper number +1 (for 3, 4 grids 3)
Thus, panels 3, 4 are 1, as shown in table 4:
TABLE 4
|
|
C
|
h
|
i
|
n
|
a
|
|
0
|
1
|
2
|
3
|
4
|
5
|
C
|
1
|
0
|
1
|
|
|
|
o
|
2
|
|
|
|
|
|
h
|
3
|
|
|
|
|
|
i
|
4
|
|
|
|
|
|
n
|
5
|
|
|
|
|
|
n
|
6
|
|
|
|
|
|
a
|
7
|
|
|
|
|
|
The operation was cycled to give Table 5
TABLE 5
|
|
C
|
h
|
i
|
n
|
a
|
|
0
|
1
|
2
|
3
|
4
|
5
|
C
|
1
|
0
|
1
|
2
|
3
|
4
|
o
|
2
|
1
|
1
|
2
|
3
|
4
|
h
|
3
|
2
|
1
|
2
|
3
|
4
|
i
|
4
|
3
|
2
|
1
|
2
|
3
|
n
|
5
|
4
|
3
|
2
|
1
|
2
|
n
|
6
|
5
|
4
|
3
|
2
|
2
|
a
|
7
|
6
|
5
|
4
|
3
|
2 |
The lower right corner is taken to obtain an edit distance of 2.
In the embodiment of the description, based on the minimum number of editing operations required for converting the character string corresponding to the address element into the character string corresponding to the preset address element, the text similarity between the address element in the temporary list and the preset address element in the preset list is determined, and the modification of the address element can be dynamically captured, so that the wind control effect is better achieved.
Optionally, as an embodiment, the step 120 may be specifically implemented as:
respectively establishing vectors corresponding to the address elements and the preset address elements on the basis of the address elements in the temporary list and the preset address elements in the preset list;
and determining the text similarity between the address elements in the temporary list and the preset address elements in the preset list based on the cosine values of the vectors corresponding to the address elements and the preset address elements.
For example, for a two-dimensional space, assuming that the vectors corresponding to the address elements and the preset address elements are a and b, respectively, it is obvious that:
let the coordinates of the vectors a, b be (x), respectively1,y1)、(x2,y2). Then:
the cosine value ranges between [ -1,1], the closer the value is to 1, the closer the directions of the two vectors are, namely, the more similar the address element is to the preset address element, the smaller the similarity value is; the closer to-1, the more opposite their direction, i.e. the more different the address element and the preset address element, the greater the similarity value.
The embodiment of the description establishes vectors corresponding to the address elements and the preset address elements respectively based on the address elements in the temporary list and the preset address elements in the preset list; and determining the text similarity between the address elements in the temporary list and the preset address elements in the preset list based on the cosine values of the vectors corresponding to the address elements and the preset address elements, and dynamically capturing the modification of the address elements so as to better achieve the wind control effect.
Optionally, as an embodiment, the step 110 may be specifically implemented as:
and splitting the logistics address information of the user for real-time transaction by taking the separators as splitting nodes to obtain a plurality of address elements.
The separator may be a common separator, which may be a space, an underline, a comma, a semicolon. Illustratively, delimiters (“ - ”, “ _ ”, “, ”, “ ”) are commonly used.
Exemplarily, assuming that the logistics address is China Beijing chaoyangqu, the separator is used as a splitting node, and after splitting the logistics address information of the user for real-time transaction, a plurality of address elements are respectively China, Beijing and chaoyangqu.
The embodiment of the specification takes the separator as the splitting node, splits the logistics address information of the real-time transaction of the user, so as to simply split the logistics address information to obtain each element of the logistics address, so that the text similarity of each element can be conveniently determined in the follow-up process, fuzzy modification of each element can be captured in real time without any adjustment, and a foundation is laid for achieving a better wind control effect.
Optionally, as an embodiment, before performing step 110, the risk prevention and control method provided in this embodiment may further include:
before the plurality of address elements are obtained by processing the logistics address information for real-time transaction of the user, the method further comprises the following steps:
acquiring transaction data of a user for real-time transaction;
if the transaction data meet risk conditions, determining that the transaction corresponding to the transaction data is a risk transaction; the risk condition is a condition with the action of embezzlement of transaction information;
step 110 may be specifically implemented as:
and processing the logistics address information based on the risk transaction to obtain a plurality of address elements.
In the embodiment of the description, transaction data of real-time transactions of users are screened, risky transactions (namely risk transactions) are screened, and logistics address information based on the risk transactions is processed to obtain a plurality of address elements, so that the transaction data of the real-time transactions are preliminarily screened, the data volume is reduced, the occupied space of a memory is reduced, and the efficiency is improved.
Optionally, as an embodiment, the step 130 may be specifically implemented as:
if the obtained maximum text similarity value is larger than a threshold value, terminating the execution of the transaction;
and if the obtained maximum text similarity value is less than or equal to the threshold value, continuing to execute the transaction.
In the embodiment of the description, the maximum text similarity value is selected from the plurality of address elements, and if the maximum text similarity value is greater than a threshold value, the transaction is terminated; if the maximum text similarity value is larger than the threshold value, the transaction is stopped, fuzzy modification of the address elements can be captured dynamically, whether the transaction is executed or not can be judged in real time according to the fuzzy modification of the address elements, the safety is improved, and a better wind control effect can be achieved.
The method of the embodiments of the present invention will be further described with reference to specific embodiments.
Fig. 2 shows a flowchart of a risk prevention and control method for a service provided by an embodiment of the present invention in an actual application scenario;
specifically, as shown in fig. 2:
at 210, transaction data of the user for performing real-time transactions is obtained;
at 220, if the transaction data meets a risk condition, determining that the transaction corresponding to the transaction data is a risk transaction; the risk condition is a condition with the action of embezzlement of transaction information;
at 230, processing based on the logistics address information of the risk transaction to obtain a plurality of address elements;
the method comprises the following steps of processing logistics address information of a user for real-time transaction to obtain a plurality of address elements, and specifically comprises the following steps: splitting logistics address information of a user for real-time transaction to obtain a plurality of address elements; or, the logistics address information of the real-time transaction of the user is recombined to obtain a plurality of address elements.
At 240, creating a temporary list based on the plurality of address elements;
at 250, the text similarity between the address elements in the temporary list and the preset address elements in the preset list is determined based on the minimum number of editing operations required for converting the character strings corresponding to the address elements into the character strings corresponding to the preset address elements.
At 260, the maximum text similarity value is taken for the calculated text similarity values of all address elements;
at 270, the retrieved maximum text similarity value is compared to a threshold to determine whether the maximum text similarity value is greater than the threshold;
at 280, if the obtained maximum text similarity value is greater than a threshold value, terminating execution of the transaction;
at 290, if the maximum text similarity value is less than or equal to the threshold, the transaction is continued.
Specific implementation of each step and corresponding beneficial effects in the embodiments of the present description are detailed in the relevant contents in the above embodiments, and the embodiments of the present description are not described again.
The embodiment of the specification processes the logistics address information of the user for real-time transaction to obtain a plurality of address elements, determines whether to execute the transaction or not based on the text similarity between the address elements in the temporary list and the preset address elements in the preset list, can dynamically capture fuzzy modification of the logistics address, does not need to adjust keywords, is low in cost, and can achieve a better wind control effect.
The method for risk prevention and control according to the embodiment of the present disclosure is described in detail above with reference to fig. 1 to 2, and the system for risk prevention and control according to the embodiment of the present disclosure is described in detail below with reference to fig. 3.
Fig. 3 is a schematic structural diagram of a risk prevention and control system provided in an embodiment of the present specification, and as shown in fig. 3, the risk prevention and control system 300 may include:
the processing module 310 is configured to process logistics address information for performing real-time transaction on a user to obtain a plurality of address elements;
a first determining module 320, configured to determine a text similarity between an address element in a temporary list and a preset address element in a preset list, where the temporary list is used to mark the plurality of address elements;
a second determining module 330, configured to determine whether to execute the transaction based on the text similarity of the address elements.
In one embodiment, the first determining module 320 may include:
and the first determining unit is used for determining the text similarity between the address elements in the temporary list and the preset address elements in the preset list based on the minimum number of editing operations required for converting the character strings corresponding to the address elements into the character strings corresponding to the preset address elements.
In one embodiment, the first determining module 320 may include:
the establishing unit is used for respectively establishing vectors corresponding to the address elements and the preset address elements on the basis of the address elements in the temporary list and the preset address elements in the preset list;
and the second determining unit is used for determining the text similarity between the address elements in the temporary list and the preset address elements in the preset list based on the cosine values of the vectors corresponding to the address elements and the preset address elements.
In one embodiment, the processing module 310 may include:
and the splitting unit is used for splitting the logistics address information of the real-time transaction of the user by taking the separators as splitting nodes to obtain a plurality of address elements.
In one embodiment, the risk prevention and control system 300 may further include:
the obtaining module 340 is configured to obtain transaction data of a user performing real-time transaction;
a third determining module 350, configured to determine, if the transaction data meets a risk condition, that a transaction corresponding to the transaction data is a risk transaction; the risk condition is a condition with the action of embezzlement of transaction information;
the processing module 310 may include: and the processing unit is used for processing the logistics address information based on the risk transaction to obtain a plurality of address elements.
In one embodiment, the second determining module 330 may include:
the execution unit is used for terminating the execution of the transaction if the obtained maximum text similarity value is larger than a threshold value; and if the obtained maximum text similarity value is less than or equal to the threshold value, continuing to execute the transaction.
The embodiment of the specification processes the logistics address information of the user for real-time transaction to obtain a plurality of address elements, determines whether to execute the transaction or not based on the text similarity between the address elements in the temporary list and the preset address elements in the preset list, can dynamically capture fuzzy modification of the logistics address, does not need to adjust keywords, is low in cost, and can achieve a better wind control effect.
Fig. 4 is a schematic structural diagram of a terminal device provided in an embodiment of the present specification. Referring to fig. 4, in the hardware level, the terminal device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the terminal device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory to the memory and then runs the computer program to form the association device of the resource value-added object and the resource object on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
processing the logistics address information for real-time transaction of the user to obtain a plurality of address elements;
determining text similarity between address elements in a temporary list and preset address elements in a preset list, wherein the temporary list is used for marking the plurality of address elements;
determining whether to execute the transaction based on the text similarity of the address elements.
The embodiment of the specification processes the logistics address information of the user for real-time transaction to obtain a plurality of address elements, determines whether to execute the transaction or not based on the text similarity between the address elements in the temporary list and the preset address elements in the preset list, can dynamically capture fuzzy modification of the logistics address, does not need to adjust keywords, is low in cost, and can achieve a better wind control effect.
The risk prevention and control method disclosed in the embodiment of fig. 1 in the present specification may be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in one or more embodiments of the present specification may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with one or more embodiments of the present disclosure may be embodied directly in hardware, in a software module executed by a hardware decoding processor, or in a combination of the hardware and software modules executed by a hardware decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The terminal device may further execute the risk prevention and control method of fig. 1 executed by the risk prevention and control system of fig. 3, which is not described herein again.
Of course, the terminal device in this specification does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, besides the software implementation, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
Embodiments of the present disclosure further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above method embodiments, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description 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 description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. 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 a system for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction system which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). 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.
The foregoing description describes certain embodiments of the specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
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.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.