CN109525552B - Dynamic code synchronous process capacity expansion method, dynamic code generator and storage medium - Google Patents

Dynamic code synchronous process capacity expansion method, dynamic code generator and storage medium Download PDF

Info

Publication number
CN109525552B
CN109525552B CN201811185073.7A CN201811185073A CN109525552B CN 109525552 B CN109525552 B CN 109525552B CN 201811185073 A CN201811185073 A CN 201811185073A CN 109525552 B CN109525552 B CN 109525552B
Authority
CN
China
Prior art keywords
dynamic code
processes
synchronization
synchronous
short message
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
CN201811185073.7A
Other languages
Chinese (zh)
Other versions
CN109525552A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811185073.7A priority Critical patent/CN109525552B/en
Publication of CN109525552A publication Critical patent/CN109525552A/en
Priority to PCT/CN2019/088633 priority patent/WO2020073661A1/en
Application granted granted Critical
Publication of CN109525552B publication Critical patent/CN109525552B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • H04L63/0838Network architectures or network communication protocols for network security for authentication of entities using passwords using one-time-passwords
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/18Network architectures or network communication protocols for network security using different networks or channels, e.g. using out of band channels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a security technology, disclosing a dynamic code synchronization process capacity expansion method, comprising: initializing and setting the number of the short message dynamic code synchronization processes to be N; counting the average synchronization time T of the short message dynamic code in the current counting period, and calculating the reference synchronization time T of the short message dynamic codeJ(ii) a Based on the average synchronization time T and the reference synchronization time TJJudging whether to trigger a capacity expansion or capacity reduction request of the synchronous process according to the first preset condition instruction; and adjusting the number of the dynamic code synchronization processes to be N' according to the process capacity expansion or capacity reduction request and a preset method. The invention also provides a dynamic code generator and a computer readable storage medium. The invention can relieve the service pressure of short message dynamic code transmission and accelerate the transmission rate of the short message dynamic code.

Description

Dynamic code synchronous process capacity expansion method, dynamic code generator and storage medium
Technical Field
The present invention relates to the field of security, and in particular, to an automatic capacity expansion method for a short message dynamic code synchronization process, a dynamic code generator, and a computer-readable storage medium.
Background
In the era of mobile internet, mobile phones play more and more important roles, and shopping, payment and even bank account transfer can be realized through the mobile phones, so that the authentication means of the mobile phones is particularly important for guaranteeing the property safety of users. Compared with other authentication means, the mobile phone short message dynamic code can more easily and accurately confirm the identity of the user, and the identity authentication safety is powerfully guaranteed.
The short message dynamic code is a one-time password sent to the mobile phone of the user through SMS (short message service), and the user can use the one-time password as password authentication of login, payment and inquiry links or internet access credentials of public places.
More and more enterprises (futures, securities, insurance, internet banking, aviation, operators and large enterprises) tend to adopt short message dynamic codes, only an online business system is integrated with a short message dynamic code authentication system deployed in an intranet of the enterprises, extra identity authentication equipment is not required to be distributed to customers of the enterprises, the user experience is improved, the implementation and management cost of the enterprises is greatly saved, and the short message dynamic codes are high in reputation degree from the user feedback condition.
At present, the mobile phone short message dynamic code is widely applied to websites, network equipment login passwords, payment and transaction passwords, temporary passwords (such as hotel internet access and public place wireless internet access), consumption credentials (such as group purchase and ticket booking), user password resetting/retrieving and the like, so that the purposes of improving safety, not carrying additional hardware authentication equipment, not modifying the existing flow, being easy to accept by users, unattended management, saving enterprise management cost, carrying out 7 x 24-hour self-service by users, supporting access of various application systems, saving money and resources and the like are achieved.
Safety regulations require that the short message dynamic code has a certain validity period, so that the short message dynamic code can reach the user quickly and is very important. The existing synchronization mechanism adopts a fixed process number to transmit the short message dynamic code from the dynamic code generation server to the short message server so as to synchronize the dynamic code. If the process is abnormal or the service pressure is too high, manual intervention is needed, and the time consumption is long.
Disclosure of Invention
The invention provides a dynamic code synchronization process capacity expansion method, a dynamic code generator and a computer readable storage medium, and mainly aims to provide a method capable of relieving the service pressure of short message dynamic code transmission and accelerating the transmission rate of short message dynamic codes.
In order to achieve the above object, the method for expanding the dynamic code synchronization process of the present invention includes:
initializing and setting the number of the short message dynamic code synchronization processes to be N;
counting the average synchronization time T of the short message dynamic code in the current counting period, and calculating the reference synchronization time T of the short message dynamic codeJ
Based on the average synchronization time T and the reference synchronization time TJJudging whether to trigger a capacity expansion or capacity reduction request of the synchronous process according to the first preset condition instruction;
and adjusting the number of the dynamic code synchronization processes to be N' according to the process capacity expansion or capacity reduction request and a preset method.
Optionally, the reference synchronization time TJThe calculation is as follows:
TJ=(W1*T1+W2*T2+W3*T3+W4*T4)/(W1+W2+W3+W4);
wherein T is1、T2、T3、T4Respectively mean synchronization time of one week, one month, three months and six months, W, from the current time1、W2、W3、W4Is the weight corresponding to one week, one month, three months and six months, and W1>W2>W3>W4
Optionally, the first preset condition instruction includes:
when T-TJ>1, triggering a capacity expansion request of the synchronous processes, and performing capacity expansion processing on the number of the synchronous processes according to a preset method; and
when T-TJ<-1, triggering a capacity reduction request of the synchronous process, and carrying out capacity reduction processing on the number of the synchronous processes according to a preset method.
Optionally, the preset method includes:
when the request type is a trigger process capacity expansion request, increasing the number of the synchronous processes by n on the existing basis;
when the request type is a trigger process capacity reduction request, reducing the number of synchronous processes by n on the existing basis; and
when the request class is no request triggered, then the existing number of synchronization processes is maintained.
Optionally, the method further comprises:
monitoring the number P of the current online processes at any time;
if the number P of the current online processes is not equal to the number N' of the dynamic code synchronous processes, starting a standby process; and
and if the number P of the current online processes is equal to the number N' of the dynamic code synchronization processes, not starting the standby processes.
In addition, to achieve the above object, the present invention further provides a dynamic code generator, including a memory and a processor, where the memory stores a dynamic code synchronization process capacity expansion program operable on the processor, and when executed by the processor, the dynamic code synchronization process capacity expansion program implements the following steps:
initializing and setting the number of the short message dynamic code synchronization processes to be N;
counting the average synchronization time T of the short message dynamic code in the current counting period, and calculating the reference synchronization time T of the short message dynamic codeJ
Based on the average synchronization time T and the reference synchronization time TJJudging whether to trigger a capacity expansion or capacity reduction request of the synchronous process according to the first preset condition instruction;
and adjusting the number of the dynamic code synchronization processes to be N' according to the process capacity expansion or capacity reduction request and a preset method.
Optionally, the reference synchronization time TJThe calculation is as follows:
TJ=(W1*T1+W2*T2+W3*T3+W4*T4)/(W1+W2+W3+W4);
wherein T is1、T2、T3、T4Respectively mean synchronization time of one week, one month, three months and six months, W, from the current time1、W2、W3、W4Is the weight corresponding to one week, one month, three months and six months, and W1>W2>W3>W4
Optionally, the first preset condition instruction includes:
when T-TJ>1, triggering a capacity expansion request of the synchronous processes, and performing capacity expansion processing on the number of the synchronous processes according to a preset method; and
when T-TJ<-1, triggering a capacity reduction request of the synchronous process, and carrying out capacity reduction processing on the number of the synchronous processes according to a preset method.
Optionally, when executed by the processor, the dynamic code synchronization process capacity expansion program further implements the following steps:
monitoring the number P of the current online processes at any time;
if the number P of the current online processes is not equal to the number N' of the dynamic code synchronous processes, starting a standby process;
and if the number P of the current online processes is equal to the number N' of the dynamic code synchronization processes, not starting the standby processes.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, where a dynamic code synchronization process capacity expansion program is stored on the computer-readable storage medium, where the dynamic code synchronization process capacity expansion program is executable by one or more processors to implement the steps of the dynamic code synchronization process capacity expansion method described above.
The dynamic code synchronization process capacity expansion method, the dynamic code generator and the computer readable storage medium provided by the invention are used for counting the average synchronization time T of the short message dynamic code in the current counting period and calculating the reference synchronization time T of the short message dynamic codeJ(ii) a Based on the average synchronization time T and the reference synchronization time TJJudging whether to trigger a capacity expansion or capacity reduction request of the synchronous process according to the first preset condition instruction; and adjusting the number of the dynamic code synchronization processes according to the process capacity expansion or capacity reduction request and a preset method. The method for dynamically adjusting the dynamic code synchronization process can relieve the service pressure of dynamic code synchronization and accelerate the transmission speed of the dynamic code.
Drawings
Fig. 1 is a schematic flowchart of a dynamic code synchronization process capacity expansion method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an internal structure of a dynamic code generator according to an embodiment of the present invention;
fig. 3 is a block diagram of a dynamic code synchronization procedure expanding program in a dynamic code generator according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a dynamic code synchronization process capacity expansion method. In the method, a client, such as a mobile phone or a computer, sends a request of a short message dynamic code to a dynamic code generator, and the dynamic code generator generates a group of random dynamic codes according to a preset algorithm after receiving the request of the short message dynamic code, wherein the dynamic codes are characters formed by a string of letters or numbers. After the dynamic code generator generates the dynamic code, the dynamic code is synchronized to a short message server, and the short message server sends the dynamic code to a preset mobile phone in a short message mode. Since the dynamic code of the short message must have a certain validity period, such as 60S, it is necessary to synchronize the dynamic code to the short message server as soon as possible after the dynamic code generator generates the dynamic code.
In detail, referring to fig. 1, a flowchart of a dynamic code synchronization process capacity expansion method according to an embodiment of the present invention is shown. The method may be performed by the dynamic code generator, which may be implemented by software and/or hardware.
S10, initializing and setting the number of the short message dynamic code synchronization processes to be N.
The process is an instance of a program that is running. In the embodiment of the invention, the synchronization process is used for synchronizing the dynamic code generated by the dynamic code generator to the short message server. Typically, each synchronization process is run once to synchronize a verification code from the dynamic code generator to the sms server.
In a preferred embodiment of the present invention, the number of the synchronization processes may be preset by a system administrator according to experience with reference to the number of the dynamic codes synchronized from the dynamic code generator to the short message server at the same time.
For example, the number N of synchronization processes may be set to 100, etc.
S20, counting the average synchronous time T of the short message dynamic code in the current statistical period, and calculating the reference synchronous time T of the short message dynamic codeJ
The current statistical period is a preset time period from the current time onward, for example, the first 1 minute, the first 1 hour, the first 1 day, and the like from the current time.
In the statistical period, the dynamic code generator synchronizes to n dynamic codes in the short message server, if the synchronization time of each dynamic code, namely the dynamic code generator sends out, the time of reaching the short message server is X respectively1、X2、X3、……XnThen the average synchronization time is:
Figure BDA0001825999240000051
in the preferred embodiment of the present invention, the T isJThe calculation method of (2) is as follows:
TJ=(W1*T1+W2*T2+W3*T3+W4*T4)/(W1+W2+W3+W4)。
wherein T is1、T2、T3、T4Average synchronization time of the last week, month three and month six, W1、W2、W3、W4The weights correspond to one week, one month, three months and six months.
Preferably, said W1、W2、W3、W4Set for the system administrator based on experience, and W1>W2>W3>W4
S30, based on the average synchronization time T and the reference synchronization time TJAnd judging whether to trigger the capacity expansion or capacity reduction request of the synchronous process according to the first preset condition instruction.
In one embodiment of the present invention, the first preset condition instruction is the average synchronization time T and the reference synchronization time TJThe ratio of (a) to (b).
Preferably, when T-TJ>And 1, triggering a capacity expansion request of the synchronous processes, and performing capacity expansion processing on the number of the synchronous processes according to a preset method.
When T-TJ<-1, triggering a capacity reduction request of the synchronous process, and carrying out capacity reduction processing on the number of the synchronous processes according to a preset method.
In other embodiments of the present invention, the first predetermined conditional instruction is a pre-trained machine discrimination model, and whether to trigger a capacity expansion or capacity reduction request of the synchronization process is determined according to an operation of the machine discrimination model.
Preferably, the Machine discriminant model includes, but is not limited to, a Support Vector Machine (SVM) model.
The invention uses the average synchronization time T and the reference synchronization time T in the current statistical periodJAnd outputting request types after being calculated by the machine discrimination model as the input of the machine discrimination model, wherein the request types comprise: triggering a process capacity expansion request, triggering a process capacity reduction request and not triggering any request.
In a preferred embodiment of the present invention, the training process of the machine discriminant model includes:
1) acquiring synchronous time data of a positive sample and synchronous time data of a negative sample, wherein the synchronous time data can comprise an average synchronous time T in any statistical period and a corresponding reference synchronous time TJAnd labeling the request type of the synchronous time data of the positive sample so that the synchronous time data of the positive sample carries a request type label.
For example, 500 capacity expansion requests that need to trigger a synchronization process, capacity reduction requests that need to trigger a synchronization process, and synchronization time data that does not trigger any request are respectively obtained, and each synchronization time data is labeled with a category, "1" may be used as a label of the synchronization time data that needs to trigger the capacity expansion request of the synchronization process, "2" may be used as a label of the synchronization time data that does not need to trigger the capacity expansion request of the synchronization process, and "3" may be used as a label of the synchronization time data that does not trigger any request.
2) And randomly dividing the synchronous time data of the positive sample and the synchronous time data of the negative sample into a training set with a first preset proportion and a verification set with a second preset proportion, training the machine discrimination model by using the training set, and verifying the accuracy of the trained machine discrimination model by using the verification set.
The training samples in the training sets of different request classes are distributed to different folders. For example, a training sample that triggers a capacity expansion request for a synchronization process is distributed into a first folder, a training sample that triggers a capacity contraction request for a synchronization process is distributed into a second folder, and a training sample that does not trigger any requests is distributed into a third folder. Then, the training samples with the first preset proportion (for example, 70%) are respectively extracted from different folders to serve as total training samples to train the machine discrimination model, and the remaining training samples with the second preset proportion (for example, 30%) are respectively extracted from different folders to serve as total test samples to perform accuracy verification on the trained machine discrimination model.
3) If the accuracy is greater than or equal to a preset accuracy threshold, ending the training, and taking the machine discrimination model after the training as a classifier to identify the current request category; and if the accuracy is smaller than the preset accuracy threshold, increasing the number of positive samples and the number of negative samples to retrain the machine discrimination model until the accuracy is larger than or equal to the preset accuracy threshold.
S40, adjusting the number of dynamic code synchronization processes to N' according to the process expansion or contraction request and a preset method.
In a preferred embodiment of the present invention, the preset method comprises: when the request type is a trigger process capacity expansion request, increasing the number of the synchronous processes by n on the existing basis; when the request type is a trigger process capacity reduction request, reducing the number of synchronous processes by n on the existing basis; when the request class is no request triggered, then the existing number of synchronization processes is maintained.
In a preferred embodiment of the present invention, n is 2.
And S50, constantly monitoring the number P of the current online processes, and determining whether to start a standby process or not according to a second preset condition instruction based on the number P of the current online synchronous processes and the number N' of the dynamic code synchronous processes.
And reporting the state to a control system before each process executes the dynamic code synchronization, wherein the control system detects the number of synchronous processes reporting the state at preset time intervals, such as 30s, and if a synchronous process does not report the state within 30s, the synchronous process is considered to be offline.
In a preferred embodiment of the present invention, the second predetermined conditional instruction is: if the number P of the current online processes is not equal to the number N' of the dynamic code synchronous processes, starting a standby process; and if the number P of the current online processes is equal to the number N' of the dynamic code synchronization processes, not starting the standby processes.
The invention also provides a dynamic code generator for executing the capacity expansion of the dynamic code synchronization process. Fig. 2 is a schematic diagram illustrating an internal structure of a dynamic code generator according to an embodiment of the present invention.
In this embodiment, the dynamic code generator 1 may be a terminal device such as a smart phone, a tablet Computer, or a mobile Computer, may be a PC (Personal Computer), and may also be a server or a server group. The dynamic code generator 1 comprises at least a memory 11, a processor 12, a communication bus 13, and a network interface 14.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the dynamic code generator 1, for example a hard disk of the dynamic code generator 1. The memory 11 may also be an external storage device of the dynamic code generator 1 in other embodiments, such as a plug-in hard disk provided on the dynamic code generator 1, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 11 may also include both an internal storage unit and an external storage device of the dynamic code generator 1. The memory 11 may be used to store not only application software installed in the dynamic code generator 1 and various types of data, such as code of the dynamic code synchronization process capacity expansion program 01, but also temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and is used to execute program codes or process data stored in the memory 11, such as executing the dynamic code synchronization process capacity expanding program 01.
The communication bus 13 is used to realize connection communication between these components.
The network interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and is typically used to establish a communication link between the dynamic code generator 1 and other electronic devices.
Optionally, the dynamic code generator 1 may further comprise a user interface, the user interface may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the dynamic code generator 1 and for displaying a visualized user interface.
Fig. 2 only shows the dynamic code generator 1 with the components 11-14 and the dynamic code synchronization process flash 01, and it will be understood by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the dynamic code generator 1, and may comprise fewer or more components than shown, or some components may be combined, or a different arrangement of components.
In the embodiment of the dynamic code generator 1 shown in fig. 2, a capacity expansion program 01 of the dynamic code synchronization process is stored in the memory 11; when the processor 12 executes the dynamic code synchronization process capacity expansion program 01 stored in the memory 11, the following steps are implemented:
step one, initializing and setting the number of the short message dynamic code synchronization processes to be N.
The process is an instance of a program that is running. In the embodiment of the invention, the synchronization process is used for synchronizing the dynamic code generated by the dynamic code generator to the short message server. Typically, each synchronization process is run once to synchronize a verification code from the dynamic code generator to the sms server.
In a preferred embodiment of the present invention, the number of the synchronization processes may be preset by a system administrator according to experience with reference to the number of the dynamic codes synchronized from the dynamic code generator to the short message server at the same time.
For example, the number N of synchronization processes may be set to 100, etc.
Step two, counting the average synchronization time T of the short message dynamic code in the current counting period, and calculating the reference synchronization time T of the short message dynamic codeJ
The current statistical period is a preset time period from the current time onward, for example, the first 1 minute, the first 1 hour, the first 1 day, and the like from the current time.
In the statistical period, the dynamic code generator is synchronized to n dynamic codes in the short message server, if the synchronization time of each dynamic code is the same, the dynamic code generator sends the dynamic code to the short message serverThe time of the server is X1、X2、X3、……XnThen the average synchronization time is:
Figure BDA0001825999240000091
in the preferred embodiment of the present invention, the T isJThe calculation method of (2) is as follows:
TJ=(W1*T1+W2*T2+W3*T3+W4*T4)/(W1+W2+W3+W4)。
wherein T is1、T2、T3、T4Respectively mean synchronization time of one week, one month, three months and six months, W, from the current time1、W2、W3、W4The weights correspond to one week, one month, three months and six months.
Preferably, said W1、W2、W3、W4Set for the system administrator based on experience, and W1>W2>W3>W4
Step three, based on the average synchronization time T and the reference synchronization time TJAnd judging whether to trigger the capacity expansion or capacity reduction request of the synchronous process according to the first preset condition instruction.
In one embodiment of the present invention, the first preset condition instruction is the average synchronization time T and the reference synchronization time TJThe ratio of (a) to (b).
Preferably, when T-TJ>And 1, triggering a capacity expansion request of the synchronous processes, and performing capacity expansion processing on the number of the synchronous processes according to a preset method.
When T-TJ<-1, triggering a capacity reduction request of the synchronous process, and carrying out capacity reduction processing on the number of the synchronous processes according to a preset method.
In other embodiments of the present invention, the first predetermined conditional instruction is a pre-trained machine discrimination model, and whether to trigger a capacity expansion or capacity reduction request of the synchronization process is determined according to an operation of the machine discrimination model.
Preferably, the Machine discriminant model includes, but is not limited to, a Support Vector Machine (SVM) model.
The invention uses the average synchronization time T and the reference synchronization time T in the current statistical periodJAnd outputting request types after being calculated by the machine discrimination model as the input of the machine discrimination model, wherein the request types comprise: triggering a process capacity expansion request, triggering a process capacity reduction request and not triggering any request.
In a preferred embodiment of the present invention, the training process of the machine discriminant model includes:
1) acquiring synchronous time data of a positive sample and synchronous time data of a negative sample, wherein the synchronous time data can comprise an average synchronous time T in any statistical period and a corresponding reference synchronous time TJAnd labeling the request type of the synchronous time data of the positive sample so that the synchronous time data of the positive sample carries a request type label.
For example, 500 capacity expansion requests that need to trigger a synchronization process, capacity reduction requests that need to trigger a synchronization process, and synchronization time data that does not trigger any request are respectively obtained, and each synchronization time data is labeled with a category, "1" may be used as a label of the synchronization time data that needs to trigger the capacity expansion request of the synchronization process, "2" may be used as a label of the synchronization time data that does not need to trigger the capacity expansion request of the synchronization process, and "3" may be used as a label of the synchronization time data that does not trigger any request.
2) And randomly dividing the synchronous time data of the positive sample and the synchronous time data of the negative sample into a training set with a first preset proportion and a verification set with a second preset proportion, training the machine discrimination model by using the training set, and verifying the accuracy of the trained machine discrimination model by using the verification set.
The training samples in the training sets of different request classes are distributed to different folders. For example, a training sample that triggers a capacity expansion request for a synchronization process is distributed into a first folder, a training sample that triggers a capacity contraction request for a synchronization process is distributed into a second folder, and a training sample that does not trigger any requests is distributed into a third folder. Then, the training samples with the first preset proportion (for example, 70%) are respectively extracted from different folders to serve as total training samples to train the machine discrimination model, and the remaining training samples with the second preset proportion (for example, 30%) are respectively extracted from different folders to serve as total test samples to perform accuracy verification on the trained machine discrimination model.
3) If the accuracy is greater than or equal to a preset accuracy threshold, ending the training, and taking the machine discrimination model after the training as a classifier to identify the current request category; and if the accuracy is smaller than the preset accuracy threshold, increasing the number of positive samples and the number of negative samples to retrain the machine discrimination model until the accuracy is larger than or equal to the preset accuracy threshold.
And step four, adjusting the number of the dynamic code synchronization processes to be N' according to the process capacity expansion or capacity reduction request and a preset method.
In a preferred embodiment of the present invention, the preset method comprises: when the request type is a trigger process capacity expansion request, increasing the number of the synchronous processes by n on the existing basis; when the request type is a trigger process capacity reduction request, reducing the number of synchronous processes by n on the existing basis; when the request class is no request triggered, then the existing number of synchronization processes is maintained.
In a preferred embodiment of the present invention, n is 2.
And fifthly, monitoring the number P of the current online processes, and determining whether to start a standby process or not according to a second preset condition instruction based on the number P of the current online synchronous processes and the number N' of the dynamic code synchronous processes.
And reporting the state to a control system before each process executes the dynamic code synchronization, wherein the control system detects the number of synchronous processes reporting the state at preset time intervals, such as 30s, and if a synchronous process does not report the state within 30s, the synchronous process is considered to be offline.
In a preferred embodiment of the present invention, the second predetermined conditional instruction is: if the number P of the current online processes is not equal to the number N' of the dynamic code synchronous processes, starting a standby process; and if the number P of the current online processes is equal to the number N' of the dynamic code synchronization processes, not starting the standby processes.
The dynamic code generator provided in this embodiment counts the average synchronization time T of the short message dynamic code in the current statistical period, and calculates the reference synchronization time T of the short message dynamic codeJ(ii) a Based on the average synchronization time T and the reference synchronization time TJJudging whether to trigger a capacity expansion or capacity reduction request of the synchronous process according to the first preset condition instruction; and adjusting the number of the dynamic code synchronization processes according to the process capacity expansion or capacity reduction request and a preset method. The method for dynamically adjusting the dynamic code synchronization process can relieve the service pressure of dynamic code synchronization and accelerate the transmission speed of the dynamic code.
Optionally, in this embodiment of the present invention, the dynamic code synchronization process capacity expansion program 01 may also be divided into one or more modules, and one or more modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 12) to complete the present invention.
For example, referring to fig. 3, a schematic diagram of program modules of a dynamic code synchronization process capacity expansion program in an embodiment of the dynamic code generator of the present invention is shown, in this embodiment, the dynamic code synchronization process capacity expansion program may be divided into an initialization module 10, a dynamic adjustment module 20, and a monitoring module 30, which exemplarily:
the initialization module 10 is configured to: and initializing the number of the short message dynamic code synchronization processes to be N.
In a preferred embodiment of the present invention, the number of the synchronization processes may be preset by a system administrator according to experience with reference to the number of the dynamic codes synchronized from the dynamic code generator to the short message server at the same time.
For example, the number N of synchronization processes may be set to 100, etc.
The dynamic adjustment module 20 is configured to: counting the average synchronization time T of the short message dynamic code in the current counting period, and calculating the reference synchronization time T of the short message dynamic codeJAnd based on the average synchronization time T and the reference synchronization time TJAnd judging whether to trigger the capacity expansion or capacity reduction request of the synchronous processes according to a first preset condition instruction, and adjusting the number of the dynamic code synchronization processes to be N' according to the capacity expansion or capacity reduction request of the processes and a preset method.
The current statistical period is a preset time period from the current time onward, for example, the first 1 minute, the first 1 hour, the first 1 day, and the like from the current time.
In the statistical period, the dynamic code generator synchronizes to n dynamic codes in the short message server, if the synchronization time of each dynamic code, namely the dynamic code generator sends out, the time of reaching the short message server is X respectively1、X2、X3、……XnThen the average synchronization time is:
Figure BDA0001825999240000121
in the preferred embodiment of the present invention, the T isJThe calculation method of (2) is as follows:
TJ=(W1*T1+W2*T2+W3*T3+W4*T4)/(W1+W2+W3+W4)。
wherein T is1、T2、T3、T4The last week and month respectivelyThree months, six months mean synchronization time, W1、W2、W3、W4The weights correspond to one week, one month, three months and six months.
Preferably, said W1、W2、W3、W4Set for the system administrator based on experience, and W1>W2>W3>W4
In one embodiment of the present invention, the first preset condition instruction is the average synchronization time T and the reference synchronization time TJThe ratio of (a) to (b).
Preferably, when T-TJ>And 1, triggering a capacity expansion request of the synchronous processes, and performing capacity expansion processing on the number of the synchronous processes according to a preset method.
When T-TJ<-1, triggering a capacity reduction request of the synchronous process, and carrying out capacity reduction processing on the number of the synchronous processes according to a preset method.
In other embodiments of the present invention, the first predetermined conditional instruction is a pre-trained machine discrimination model, and whether to trigger a capacity expansion or capacity reduction request of the synchronization process is determined according to an operation of the machine discrimination model.
Preferably, the Machine discriminant model includes, but is not limited to, a Support Vector Machine (SVM) model.
In a preferred embodiment of the present invention, the preset method comprises: when the request type is a trigger process capacity expansion request, increasing the number of the synchronous processes by n on the existing basis; when the request type is a trigger process capacity reduction request, reducing the number of synchronous processes by n on the existing basis; when the request class is no request triggered, then the existing number of synchronization processes is maintained.
In a preferred embodiment of the present invention, n is 2.
The monitoring module 30 is configured to: and monitoring the number P of the current online processes at any moment, and determining whether to start a standby process according to a second preset condition instruction based on the number P of the current online synchronous processes and the number N' of the dynamic code synchronous processes.
In a preferred embodiment of the present invention, the second predetermined conditional instruction is: if the number P of the current online processes is not equal to the number N' of the dynamic code synchronous processes, starting a standby process; and if the number P of the current online processes is equal to the number N' of the dynamic code synchronization processes, not starting the standby processes.
The functions or operation steps of the initialization module 10, the dynamic adjustment module 20, the monitoring module 30 and other program modules implemented when executed are substantially the same as those of the above embodiments, and are not described herein again.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a dynamic code synchronization process capacity expansion program is stored on the computer-readable storage medium, where the dynamic code synchronization process capacity expansion program is executable by one or more processors to implement the following operations:
initializing and setting the number of the short message dynamic code synchronization processes to be N;
counting the average synchronization time T of the short message dynamic code in the current counting period, and calculating the reference synchronization time T of the short message dynamic codeJ
Based on the average synchronization time T and the reference synchronization time TJJudging whether to trigger a capacity expansion or capacity reduction request of the synchronous process according to the first preset condition instruction;
adjusting the number of the dynamic code synchronization processes to be N' according to the process capacity expansion or capacity reduction request and a preset method; and
and monitoring the number P of the current online processes at any moment, and determining whether to start a standby process according to a second preset condition instruction based on the number P of the current online synchronous processes and the number N' of the dynamic code synchronous processes.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the above embodiments of the dynamic code capacity-expanding dynamic code generator and method for the dynamic code synchronization process, and will not be described herein again.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A dynamic code synchronization process extension method, the method comprising:
the number of the short message dynamic code synchronization processes is initialized to be N, and each short message dynamic code synchronization process can synchronize one dynamic code from a dynamic code generator to a short message server when running once;
counting the average synchronization time T of the short message dynamic code in the current counting period,and calculating the reference synchronous time T of the short message dynamic codeJThe current statistical period is 1 minute, 1 hour or 1 day from the current time; the reference synchronization time TJThe calculation is as follows:
TJ=(W1*T1+W2*T2+W3*T3+W4*T4)/(W1+W2+W3+W4);
wherein T1, T2, T3 and T4 are average synchronization time of a week, a month, three months and six months which are pushed forward from the current time respectively, W1, W2, W3 and W4 are weights corresponding to the week, the month, the three months and the six months, and W1> W2> W3> W4;
based on the average synchronization time T and the reference synchronization time TJJudging whether to trigger a capacity expansion or capacity reduction request of the synchronous process according to the first preset condition instruction; and
and adjusting the number of the short message dynamic code synchronization processes to be N' according to the process capacity expansion or capacity reduction request and a preset method.
2. The dynamic code synchronization process capacity expansion method of claim 1, wherein the first preset conditional instruction comprises:
when T-TJ>1, triggering a capacity expansion request of the synchronous processes, and performing capacity expansion processing on the number of the synchronous processes according to a preset method; and
when T-TJ<-1, triggering a capacity reduction request of the synchronous process, and carrying out capacity reduction processing on the number of the synchronous processes according to a preset method.
3. The dynamic code synchronization process capacity expansion method according to claim 2, wherein the preset method comprises:
when the request type is a trigger process capacity expansion request, increasing the number of the synchronous processes by n on the existing basis;
when the request type is a trigger process capacity reduction request, reducing the number of synchronous processes by n on the existing basis;
when the request class is no request triggered, then the existing number of synchronization processes is maintained.
4. The dynamic code synchronization process capacity expansion method of claim 1, wherein the method further comprises:
monitoring the number P of the current online processes at any time;
if the number P of the current online processes is not equal to the number N' of the dynamic code synchronous processes, starting a standby process; and
and if the number P of the current online processes is equal to the number N' of the dynamic code synchronization processes, not starting the standby processes.
5. A dynamic code generator, comprising a memory and a processor, wherein the memory stores a dynamic code synchronization process volume expansion program operable on the processor, and wherein the dynamic code synchronization process volume expansion program when executed by the processor implements the steps of:
the method comprises the steps that N dynamic short message code synchronization processes are initialized, and each synchronization process can synchronize a verification code from a dynamic code generator to a short message server when running once;
counting the average synchronization time T of the short message dynamic code in the current counting period, and calculating the reference synchronization time T of the short message dynamic codeJThe current statistical period is 1 minute, 1 hour or 1 day from the current time; the reference synchronization time TJThe calculation is as follows:
TJ=(W1*T1+W2*T2+W3*T3+W4*T4)/(W1+W2+W3+W4);
wherein T is1、T2、T3、T4Respectively mean synchronization time of one week, one month, three months and six months which are pushed forward from the current time,W1、W2、W3、W4is the weight corresponding to one week, one month, three months and six months, and W1>W2>W3>W4
Based on the average synchronization time T and the reference synchronization time TJJudging whether to trigger a capacity expansion or capacity reduction request of the synchronous process according to the first preset condition instruction; and
and adjusting the number of the short message dynamic code synchronization processes to be N' according to the process capacity expansion or capacity reduction request and a preset method.
6. The dynamic code generator of claim 5, wherein the first preset conditional instruction comprises:
when T-TJ>1, triggering a capacity expansion request of the synchronous processes, and performing capacity expansion processing on the number of the synchronous processes according to a preset method; and
when T-TJ<-1, triggering a capacity reduction request of the synchronous process, and carrying out capacity reduction processing on the number of the synchronous processes according to a preset method.
7. The dynamic code generator of claim 5, wherein the dynamic code synchronization process volume expansion program when executed by the processor further performs the steps of:
monitoring the number P of the current online processes at any time;
if the number P of the current online processes is not equal to the number N' of the dynamic code synchronous processes, starting a standby process;
and if the number P of the current online processes is equal to the number N' of the dynamic code synchronization processes, not starting the standby processes.
8. A computer-readable storage medium having stored thereon a dynamic code synchronization process capacity expansion program, the dynamic code synchronization process capacity expansion program being executable by one or more processors to implement the steps of the dynamic code synchronization process capacity expansion method as recited in any one of claims 1 to 4.
CN201811185073.7A 2018-10-11 2018-10-11 Dynamic code synchronous process capacity expansion method, dynamic code generator and storage medium Active CN109525552B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811185073.7A CN109525552B (en) 2018-10-11 2018-10-11 Dynamic code synchronous process capacity expansion method, dynamic code generator and storage medium
PCT/CN2019/088633 WO2020073661A1 (en) 2018-10-11 2019-05-27 Dynamic code synchronization process capacity expansion method, dynamic code generator, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811185073.7A CN109525552B (en) 2018-10-11 2018-10-11 Dynamic code synchronous process capacity expansion method, dynamic code generator and storage medium

Publications (2)

Publication Number Publication Date
CN109525552A CN109525552A (en) 2019-03-26
CN109525552B true CN109525552B (en) 2021-08-31

Family

ID=65771976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811185073.7A Active CN109525552B (en) 2018-10-11 2018-10-11 Dynamic code synchronous process capacity expansion method, dynamic code generator and storage medium

Country Status (2)

Country Link
CN (1) CN109525552B (en)
WO (1) WO2020073661A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109525552B (en) * 2018-10-11 2021-08-31 平安科技(深圳)有限公司 Dynamic code synchronous process capacity expansion method, dynamic code generator and storage medium
CN110442436A (en) * 2019-07-12 2019-11-12 平安普惠企业管理有限公司 Process management method and relevant apparatus based on container
CN115474165B (en) * 2021-05-24 2024-05-07 中移动金融科技有限公司 Self-monitoring dynamic adjustment method and system for short message service

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106100867A (en) * 2016-05-27 2016-11-09 乐视控股(北京)有限公司 The operation maintenance method and device of distribution service
CN106302565A (en) * 2015-05-12 2017-01-04 浙江格林蓝德信息技术有限公司 The dispatching method of service server and system
CN107995264A (en) * 2017-11-20 2018-05-04 北京知道未来信息技术有限公司 A kind of CDN service identifying code distribution method and system based on message queue
CN108229127A (en) * 2016-12-21 2018-06-29 英业达科技有限公司 Verification data are generated in advance to distinguish the system and method for client

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE502005001865D1 (en) * 2004-09-01 2007-12-20 Agenda Informationssysteme Gmb Method for controlling access to an application program
CN104239758B (en) * 2013-06-13 2018-04-27 阿里巴巴集团控股有限公司 A kind of man-machine recognition methods and corresponding man-machine identifying system
CN106933659B (en) * 2015-12-30 2020-06-26 华为技术有限公司 Method and device for managing processes
CN107135227A (en) * 2017-05-27 2017-09-05 深圳来电科技有限公司 Verification method and equipment
CN108492109B (en) * 2018-03-15 2021-09-21 平安科技(深圳)有限公司 Electronic device, dynamic code request processing method and storage medium
CN109525552B (en) * 2018-10-11 2021-08-31 平安科技(深圳)有限公司 Dynamic code synchronous process capacity expansion method, dynamic code generator and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106302565A (en) * 2015-05-12 2017-01-04 浙江格林蓝德信息技术有限公司 The dispatching method of service server and system
CN106100867A (en) * 2016-05-27 2016-11-09 乐视控股(北京)有限公司 The operation maintenance method and device of distribution service
CN108229127A (en) * 2016-12-21 2018-06-29 英业达科技有限公司 Verification data are generated in advance to distinguish the system and method for client
CN107995264A (en) * 2017-11-20 2018-05-04 北京知道未来信息技术有限公司 A kind of CDN service identifying code distribution method and system based on message queue

Also Published As

Publication number Publication date
CN109525552A (en) 2019-03-26
WO2020073661A1 (en) 2020-04-16

Similar Documents

Publication Publication Date Title
US11621954B2 (en) Token based one-time password security
US11854003B2 (en) Signature verification method, apparatus, and system
CN110602052B (en) Micro-service processing method and server
US10313882B2 (en) Dynamic unlock mechanisms for mobile devices
US9178866B2 (en) Techniques for user authentication
WO2019169758A1 (en) Data processing device and method and computer readable storage medium
CN109525552B (en) Dynamic code synchronous process capacity expansion method, dynamic code generator and storage medium
JP2015528947A (en) Method and system for secure communication of personal information
CN103150837A (en) System and method for achieving cardless withdrawal on automatic teller machine (ATM)
CN109257321B (en) Secure login method and device
WO2015096800A1 (en) Data processing method, intermediate server and system
US10447796B2 (en) Pushlet instant messaging framework and pushlet instant messaging method
CN104348617A (en) Verification code processing method and device, and terminal and server
WO2019140826A1 (en) Electronic red envelope gifting device and method and computer readable storage medium
EP4040720B1 (en) Secure identity card using unclonable functions
US11811753B2 (en) Computer-based systems involving enhanced one-time passcode (OTP) messaging and methods of use thereof
CN111651749A (en) Method and device for finding account based on password, computer equipment and storage medium
CN112655173B (en) Data integrity improvement using trusted code attestation tokens
CN110889106A (en) Configuration method, device, system and computer readable storage medium
US10748136B1 (en) Presence verification for electronic transactions
CN112598810A (en) Exhibition entrance processing method and device
US20170169211A1 (en) One kind of website passwords generating method and apparatus
CN110826977A (en) Data updating method and device, computer equipment and storage medium
CN113343211B (en) Data processing method, processing system, electronic device and storage medium
CN114422586B (en) Event notification method, event notification device, computer equipment 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