WO2020073661A1 - 动态码同步进程扩容方法、动态码生成器及存储介质 - Google Patents
动态码同步进程扩容方法、动态码生成器及存储介质 Download PDFInfo
- Publication number
- WO2020073661A1 WO2020073661A1 PCT/CN2019/088633 CN2019088633W WO2020073661A1 WO 2020073661 A1 WO2020073661 A1 WO 2020073661A1 CN 2019088633 W CN2019088633 W CN 2019088633W WO 2020073661 A1 WO2020073661 A1 WO 2020073661A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- synchronization
- dynamic code
- processes
- request
- expansion
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
- H04L63/0838—Network architectures or network communication protocols for network security for authentication of entities using passwords using one-time-passwords
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/18—Network architectures or network communication protocols for network security using different networks or channels, e.g. using out of band channels
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/12—Messaging; Mailboxes; Announcements
- H04W4/14—Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
Definitions
- the present application relates to the security field, 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.
- mobile phones play an increasingly important role. Shopping, payment, and even bank transfers can be realized through mobile phones. Therefore, mobile phone authentication methods are particularly important to ensure the safety of users' property. Compared with other authentication methods, the mobile phone SMS dynamic code is easier to accurately confirm the user's identity, which effectively guarantees the security of identity authentication.
- the SMS dynamic code is to send the one-time password to the user's mobile phone via SMS (short message), and the user can use it as the password authentication for login, payment, and inquiry or the Internet access credentials in public places.
- SMS dynamic codes More and more enterprises (futures, securities, insurance, online banking, aviation, operators, large enterprises) tend to use SMS dynamic codes, as long as they integrate the online business system with the SMS dynamic code authentication system deployed on their intranet, There is no need to distribute additional identity authentication equipment to its customers, which greatly saves the implementation and management costs of the enterprise while improving the user experience. From the user feedback, the reputation of the SMS dynamic code is very high.
- mobile phone SMS dynamic codes are widely used in website, network device login passwords, payment and transaction passwords, temporary passwords (such as hotel Internet access, wireless Internet access in public places), consumption credentials (such as group purchases, booking), user password reset retrieve and so on, to improve security, no need to carry additional hardware certification equipment, no need to modify existing processes, users are easy to accept, unattended management, save enterprise management costs, 7 ⁇ 24 hours user self-service, while supporting multiple applications The purpose of system access and saving money and resources.
- SMS dynamic code must have a certain validity period, so it is very important that the SMS dynamic code reach the user quickly.
- the existing synchronization mechanism uses a fixed number of processes to transfer the short message dynamic code from the dynamic code generation server to the short message server to synchronize the dynamic code. If the process is abnormal or the business pressure is too high, manual intervention is required, which takes a long time.
- This application provides a dynamic code synchronization process capacity expansion method, a dynamic code generator, and a computer-readable storage medium. Its main purpose is to provide a method that can relieve the business pressure of short message dynamic code transmission and speed up the transmission rate of short message dynamic code .
- the dynamic code synchronization process expansion method of the present application includes:
- the number of synchronization processes of the dynamic signal code is adjusted to N '.
- the present application also provides a dynamic code generator, the dynamic code generator includes a memory and a processor, and the memory stores a dynamic code synchronization process expansion program that can run on the processor When the capacity expansion program of the dynamic code synchronization process is executed by the processor, the following steps are implemented:
- the number of synchronization processes of the dynamic signal code is adjusted to N '.
- the present application also provides a computer-readable storage medium on which a dynamic code synchronization process expansion program is stored, and the dynamic code synchronization process expansion program may be one or more
- the processor executes to implement the steps of the dynamic code synchronization process expansion method described above.
- the dynamic code synchronization process expansion method, dynamic code generator and computer-readable storage medium proposed in this application count the average synchronization time T of the short message dynamic code in the current statistical period, and calculate the reference synchronization time T J of the short message dynamic code;
- the average synchronization time T and the reference synchronization time T J according to the first preset condition instruction, determine whether to trigger the expansion or reduction request of the synchronization process; according to the process expansion or reduction request, according to a preset method, adjust the The number of letter dynamic code synchronization processes.
- the method for dynamically adjusting the dynamic code synchronization process provided by the present application can alleviate the business pressure of dynamic code synchronization and accelerate the speed of dynamic code transmission.
- FIG. 1 is a schematic flowchart of a method for expanding a dynamic code synchronization process according to an embodiment of the present application
- FIG. 2 is a schematic diagram of an internal structure of a dynamic code generator provided by an embodiment of the present application.
- FIG. 3 is a schematic diagram of a module of a dynamic code synchronization process expansion program in a dynamic code generator provided by an embodiment of the present application.
- This application provides a dynamic code synchronization process expansion method.
- a client such as a mobile phone or a computer, sends a request for a short message dynamic code to a dynamic code generator, and the dynamic code generator receives the request for the short message dynamic code according to a preset algorithm Generate a random set of dynamic codes.
- dynamic codes are characters composed of a series of letters or numbers.
- the dynamic code generator 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 manner. Since the short message dynamic code must have a certain validity period, such as 60S, the dynamic code needs to be synchronized to the short message server as soon as possible after the dynamic code generator generates the dynamic code.
- FIG. 1 it is a schematic flowchart of a dynamic code synchronization process expansion method provided by an embodiment of the present application.
- the method may be executed by the dynamic code generator, and the dynamic code generator may be implemented by software and / or hardware.
- the process is an instance of a running program.
- the synchronization process is used to synchronize the dynamic code generated by the dynamic code generator to the short message server.
- each synchronization process runs once to synchronize a verification code from the dynamic code generator to the short message server.
- the number of synchronization processes may be preset by the system administrator based on experience, with reference to the number of dynamic codes that need to be synchronized from the dynamic code generator to the short message server at the same time.
- the number N of the synchronization processes may be set to 100 or the like.
- the current statistical period is a preset time period starting from the current time, for example, 1 minute before, 1 hour before, and 1 day before the current time.
- T J (W 1 * T 1 + W 2 * T 2 + W 3 * T 3 + W 4 * T 4 ) / (W 1 + W 2 + W 3 + W 4 ).
- T 1 , T 2 , T 3 and T 4 are the average synchronization time of the last week, one month, three months and six months respectively, and W 1 , W 2 , W 3 and W 4 are one week, one month and three The corresponding weights for months and six months.
- the W 1 , W 2 , W 3 and W 4 are set by the system administrator based on experience, and W 1 > W 2 > W 3 > W 4 .
- the first preset condition instruction is the ratio of the average synchronization time T and the reference synchronization time T J.
- TT J > 1 a capacity expansion request of the synchronization process is triggered, and the capacity of the number of synchronization processes is expanded according to a preset method.
- a scaling down request of the synchronization process is triggered, and according to a preset method, scaling down the number of the synchronization processes is performed.
- the first preset condition instruction is a pre-trained machine discriminant model. Based on the operation of the machine discriminant model, it is determined whether to trigger an expansion or reduction request of the synchronization process.
- the machine discrimination model includes, but is not limited to, a support vector machine (Support Vector Machine, SVM) model.
- SVM Support Vector Machine
- the average synchronization time T and the reference synchronization time T J in the current statistical period are used as the input of the machine discriminant model.
- a request category is output, and the request category includes: triggering a process Expansion request, trigger process shrinkage request, do not trigger any request.
- the training process of the machine discriminant model includes:
- the synchronization time data may include the average synchronization time T and the corresponding reference synchronization time T J in any statistical period, and convert the positive time
- the synchronization time data of the sample is marked with the request category, so that the synchronization time data of the positive sample carries the request category label.
- the synchronization time data of the positive sample and the synchronization time data of the negative sample are randomly divided into a training set of a first preset ratio and a verification set of a second preset ratio, and the machine is used to train the machine to discriminate Model, and use the verification set to verify the accuracy of the trained machine discriminant model.
- the first preset ratio for example, 70%
- the training is ended, and the trained machine discriminant model is used as a classifier to identify the current request category; if the accuracy rate is less than the predetermined When the accuracy threshold is set, the number of positive samples and the number of negative samples are increased to retrain the machine discrimination model until the accuracy is greater than or equal to the preset accuracy threshold.
- the preset method is: when the request type is a trigger process expansion request, the number of synchronization processes is increased by n on the existing basis; when the request type is trigger When the process shrinks the request, the number of synchronization processes is reduced by n on the existing basis; when the request category is not to trigger any request, the existing number of synchronization processes is maintained.
- n is 2.
- Each process will report the status to the control system before performing the dynamic code synchronization.
- the control system detects the number of synchronization processes that report the status every preset time, such as 30s. If a synchronization process does not report the status within 30s, It is considered that the synchronization process is offline.
- the second preset condition instruction is: if the number P of the currently online processes and the number N 'of the dynamic code synchronization processes are not equal, the standby process is started; if the number of the currently online processes If P is equal to the number N 'of the dynamic code synchronization process, the standby process is not started.
- the application also provides a dynamic code generator for performing dynamic code synchronization process expansion.
- FIG. 2 it is a schematic diagram of an internal structure of a dynamic code generator provided by an embodiment of the present application.
- the dynamic code generator 1 may be a terminal device such as a smart phone, a tablet computer, a portable computer, a PC (Personal Computer), or a server, a server group, or the like.
- the dynamic code generator 1 includes 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 flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, and the like.
- the memory 11 may be an internal storage unit of the dynamic code generator 1, such as 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, such as a plug-in hard disk equipped on the dynamic code generator 1, a smart memory card (Smart Media, Card, SMC), and a secure digital Digital, SD) card, flash card (Flash Card), etc.
- the memory 11 may also include both the internal storage unit of the dynamic code generator 1 and the external storage device.
- the memory 11 can be used not only to store application software and various types of data installed in the dynamic code generator 1, such as the code of the dynamic code synchronization process expansion program 01, but also to temporarily store data that has been output or is about to be output.
- the processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip for running the program code or processing stored in the memory 11 Data, for example, a dynamic code synchronization process expansion program 01, etc.
- CPU central processing unit
- controller microcontroller
- microprocessor or other data processing chip for running the program code or processing stored in the memory 11 Data, for example, a dynamic code synchronization process expansion program 01, etc.
- the communication bus 13 is used to realize connection and communication between these components.
- the network interface 14 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), which are generally used to establish a communication connection between the dynamic code generator 1 and other electronic devices.
- a standard wired interface such as a WI-FI interface
- WI-FI interface wireless interface
- the dynamic code generator 1 may further include a user interface
- the user interface may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface may also include a standard wired interface and a wireless interface.
- the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light emitting diode) touch device, or the like.
- the display may also be appropriately called a display screen or a display unit, for displaying information processed in the dynamic code generator 1 and for displaying a visual user interface.
- FIG. 2 only shows the dynamic code generator 1 having the components 11-14 and the dynamic code synchronization process expansion program 01. Those skilled in the art can understand that the structure shown in FIG. 1 does not constitute the dynamic code generator 1.
- the definition may include fewer or more components than shown, or combine certain components, or arrange different components.
- the dynamic code synchronization process expansion program 01 is stored in the memory 11; the processor 12 implements the following steps when executing the dynamic code synchronization process expansion program 01 stored in the memory 11:
- Step 1 Initially set the number of SMS dynamic code synchronization processes to N.
- the process is an instance of a running program.
- the synchronization process is used to synchronize the dynamic code generated by the dynamic code generator to the short message server.
- each synchronization process runs once to synchronize a verification code from the dynamic code generator to the short message server.
- the number of synchronization processes may be preset by the system administrator based on experience, with reference to the number of dynamic codes that need to be synchronized from the dynamic code generator to the short message server at the same time.
- the number N of the synchronization processes may be set to 100 or the like.
- Step 2 Count the average synchronization time T of the short message dynamic code in the current statistical period, and calculate the reference synchronization time T J of the short message dynamic code.
- the current statistical period is a preset time period starting from the current time, for example, 1 minute before, 1 hour before, and 1 day before the current time.
- T J (W 1 * T 1 + W 2 * T 2 + W 3 * T 3 + W 4 * T 4 ) / (W 1 + W 2 + W 3 + W 4 ).
- T 1 , T 2 , T 3 and T 4 are the average synchronization time of one week, one month, three months and six months starting from the current time, W 1 , W 2 , W 3 and W 4 Weights corresponding to one week, one month, three months, and six months.
- the W 1 , W 2 , W 3 and W 4 are set by the system administrator based on experience, and W 1 > W 2 > W 3 > W 4 .
- Step 3 Based on the average synchronization time T and the reference synchronization time T J , determine whether to trigger the expansion or reduction request of the synchronization process according to the first preset condition instruction.
- the first preset condition instruction is the ratio of the average synchronization time T and the reference synchronization time T J.
- TT J > 1 a capacity expansion request of the synchronization process is triggered, and the capacity of the number of synchronization processes is expanded according to a preset method.
- a scaling down request of the synchronization process is triggered, and according to a preset method, scaling down the number of the synchronization processes is performed.
- the first preset condition instruction is a pre-trained machine discriminant model. Based on the operation of the machine discriminant model, it is determined whether to trigger an expansion or reduction request of the synchronization process.
- the machine discrimination model includes, but is not limited to, a support vector machine (Support Vector Machine, SVM) model.
- SVM Support Vector Machine
- the average synchronization time T and the reference synchronization time T J in the current statistical period are used as the input of the machine discriminant model.
- a request category is output, and the request category includes: triggering a process Expansion request, trigger process shrinkage request, do not trigger any request.
- the training process of the machine discriminant model includes:
- the synchronization time data may include the average synchronization time T and the corresponding reference synchronization time T J in any statistical period, and convert the positive time
- the synchronization time data of the sample is marked with the request category, so that the synchronization time data of the positive sample carries the request category label.
- the synchronization time data of the positive sample and the synchronization time data of the negative sample are randomly divided into a training set of a first preset ratio and a verification set of a second preset ratio, and the machine is used to train the machine to discriminate Model, and use the verification set to verify the accuracy of the trained machine discriminant model.
- the first preset ratio for example, 70%
- the training is ended, and the trained machine discriminant model is used as a classifier to identify the current request category; if the accuracy rate is less than the predetermined When the accuracy threshold is set, the number of positive samples and the number of negative samples are increased to retrain the machine discrimination model until the accuracy is greater than or equal to the preset accuracy threshold.
- Step 4 According to the process expansion or reduction request, according to a preset method, adjust the number of the signal dynamic code synchronization processes to N '.
- the preset method is: when the request type is a trigger process expansion request, the number of synchronization processes is increased by n on the existing basis; when the request type is trigger When the process shrinks the request, the number of synchronization processes is reduced by n on the existing basis; when the request category is not to trigger any request, the existing number of synchronization processes is maintained.
- n is 2.
- Step 5 Monitor the current online process number P at all times. Based on the current online synchronization process number P and the dynamic code synchronization process number N ', decide whether to start the standby process according to the second preset condition instruction.
- Each process will report the status to the control system before performing the dynamic code synchronization.
- the control system detects the number of synchronization processes that report the status every preset time, such as 30s. If a synchronization process does not report the status within 30s, It is considered that the synchronization process is offline.
- the second preset condition instruction is: if the number P of the currently online processes and the number N 'of the dynamic code synchronization processes are not equal, the standby process is started; if the number of the currently online processes If P is equal to the number N 'of the dynamic code synchronization process, the standby process is not started.
- the dynamic code generator proposed 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 J of the short message dynamic code; based on the average synchronization time T and the reference synchronization time T J , According to the first preset condition instruction, determine whether to trigger the expansion or reduction request of the synchronization process; according to the process expansion or reduction request, according to a preset method, adjust the number of synchronization processes of the signal dynamic code.
- the method for dynamically adjusting the dynamic code synchronization process provided by the present application can alleviate the business pressure of dynamic code synchronization and accelerate the speed of dynamic code transmission.
- the dynamic code synchronization process expansion program 01 may also be divided into one or more modules, and the one or more modules are stored in the memory 11 and processed by one or more
- the processor in this embodiment, the processor 12
- the module referred to in the application refers to a series of computer program instruction segments capable of performing specific functions, and is used to describe the dynamic code synchronization process.
- the execution process in the code generator is executed to complete the application.
- FIG. 3 it is a schematic diagram of a program module of a dynamic code synchronization process expansion program in an embodiment of the dynamic code generator of the present application.
- the dynamic code synchronization process expansion program may be divided into an initialization module 10,
- the dynamic adjustment module 20 and the monitoring module 30 exemplarily:
- the initialization module 10 is used to initialize the number of SMS dynamic code synchronization processes to N.
- the number of synchronization processes may be preset by the system administrator based on experience, with reference to the number of dynamic codes that need to be synchronized from the dynamic code generator to the short message server at the same time.
- the number N of the synchronization processes may be set to 100 or the like.
- the dynamic adjustment module 20 is used for: counting the average synchronization time T of the short message dynamic code in the current statistical period, calculating the reference synchronization time T J of the short message dynamic code, and based on the average synchronization time T and the reference synchronization time T J , according to
- the first preset condition instruction determines whether an expansion or reduction request of the synchronization process is triggered. According to the process expansion or reduction request, according to a preset method, the number of synchronization processes of the dynamic code is adjusted to N '.
- the current statistical period is a preset time period starting from the current time, for example, 1 minute before, 1 hour before, and 1 day before the current time.
- T J (W 1 * T 1 + W 2 * T 2 + W 3 * T 3 + W 4 * T 4 ) / (W 1 + W 2 + W 3 + W 4 ).
- T 1 , T 2 , T 3 and T 4 are the average synchronization time of the last week, one month, three months and six months respectively, and W 1 , W 2 , W 3 and W 4 are one week, one month and three The corresponding weights for months and six months.
- the W 1 , W 2 , W 3 and W 4 are set by the system administrator based on experience, and W 1 > W 2 > W 3 > W 4 .
- the first preset condition instruction is the ratio of the average synchronization time T and the reference synchronization time T J.
- TT J > 1 a capacity expansion request of the synchronization process is triggered, and the capacity of the number of synchronization processes is expanded according to a preset method.
- a scaling down request of the synchronization process is triggered, and according to a preset method, scaling down the number of the synchronization processes is performed.
- the first preset condition instruction is a pre-trained machine discriminant model. Based on the operation of the machine discriminant model, it is determined whether to trigger an expansion or reduction request of the synchronization process.
- the machine discrimination model includes, but is not limited to, a support vector machine (Support Vector Machine, SVM) model.
- SVM Support Vector Machine
- the preset method is: when the request type is a trigger process expansion request, the number of synchronization processes is increased by n on the existing basis; when the request type is trigger When the process shrinks the request, the number of synchronization processes is reduced by n on the existing basis; when the request category is not to trigger any request, the existing number of synchronization processes is maintained.
- n is 2.
- the monitoring module 30 is used to monitor the number P of the currently online processes at all times, and based on the number P of the currently online synchronization processes and the number N 'of the dynamic code synchronization processes, determine whether to start the backup process according to the second preset condition instruction .
- the second preset condition instruction is: if the number P of the currently online processes and the number N 'of the dynamic code synchronization processes are not equal, the standby process is started; if the number of the currently online processes If P is equal to the number N 'of the dynamic code synchronization process, the standby process is not started.
- the above-mentioned initialization module 10, the dynamic adjustment module 20, the monitoring module 30, and other program modules that are executed have functions and operation steps that are substantially the same as those in the foregoing embodiment, and will not be repeated here.
- the embodiments of the present application also provide a computer-readable storage medium on which a dynamic code synchronization process expansion program is stored, and the dynamic code synchronization process expansion program may be executed by one or more processors To achieve the following operations:
- the number P of the currently online processes is constantly monitored, and based on the number P of the currently online synchronization processes and the number N 'of the dynamic code synchronization processes, it is determined whether to start the standby process according to the second preset condition instruction.
- the methods in the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware, but in many cases the former is better Implementation.
- the technical solution of the present application can be embodied in the form of a software product in essence or part that contributes to the existing technology, and the computer software product is stored in a storage medium (such as ROM / RAM) as described above , Magnetic disks, optical disks), including several instructions to enable a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to perform the method described in each embodiment of the present application.
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
本申请涉及一种安全技术,揭露了一种动态码同步进程扩容方法,该方法包括:初始化设定短信动态码同步进程的数量为N个;统计当前统计周期内短信动态码的平均同步时间T,并计算短信动态码的基准同步时间T J;基于所述平均同步时间T以及基准同步时间T J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求;根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步进程的数量为N'个。本申请还提出一种动态码生成器以及一种计算机可读存储介质。本申请能够缓解短信动态码传送的业务压力,并加快短信动态码的传送速率。
Description
本申请要求于2018年10月11日提交中国专利局,申请号为201811185073.7、发明名称为“动态码同步进程扩容方法、动态码生成器及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及安全领域,尤其涉及一种短信动态码同步进程的自动扩容方法、动态码生成器及计算机可读存储介质。
移动互联网时代,手机扮演着越来越重要的角色,购物、付费甚至银行转账都可以通过手机实现,因此,手机的认证手段对于保障用户的财产安全尤其重要。相比其他认证手段,手机短信动态码更容易准确确认用户身份,有力保障身份认证安全。
短信动态码是通过SMS(短信)将一次性密码发送到用户手机中,用户以此作为登录、支付、查询环节的密码认证或者公共场所上网凭据。
越来越多的企业(期货、证券、保险、网银、航空、运营商、大型企业)倾向于采用短信动态码,它们只要将在线业务系统与部署在其内网的短信动态码认证系统集成,并无需向其客户分发额外身份认证设备,在提升用户体验的同时也大大节约企业的实施和管理成本,从用户反馈情况看,短信动态码美誉度很高。
目前,手机短信动态码被广泛应用于网站、网络设备登录密码,支付、交易密码,临时密码(如宾馆上网、公共场所无线上网),消费凭据(如团购、订票),用户密码重置/找回等,以达到提高安全性,无需携带额外硬件认证设备,无需改造现有流程,用户易于接受,无人值守管理,节约企业管理成本,7×24小时用户自助服务,同时支持多种应用系统接入以及节省金钱和资源等目的。
安全规定,短信动态码必须具有一定的有效期,因此短信动态码快速的 到达用户是非常重要的。现有的同步机制采用固定的进程数,将短信动态码从动态码生成服务器传送到短信服务器中,以进行动态码的同步。如果进程异常或者业务压力过大,需要人工进行干预,时间耗时较长。
发明内容
本申请提供一种动态码同步进程扩容方法、动态码生成器及计算机可读存储介质,其主要目的在于提供一种能够缓解短信动态码传送的业务压力,并加快短信动态码的传送速率的方法。
为实现上述目的,本申请的动态码同步进程扩容方法,包括:
初始化设定短信动态码同步进程的数量为N个;
统计当前统计周期内短信动态码的平均同步时间T,并计算短信动态码的基准同步时间T
J;
基于所述平均同步时间T以及基准同步时间T
J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求;
根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步进程的数量为N’个。
此外,为实现上述目的,本申请还提供一种动态码生成器,该动态码生成器包括存储器和处理器,所述存储器中存储有可在所述处理器上运行的动态码同步进程扩容程序,所述动态码同步进程扩容程序被所述处理器执行时实现如下步骤:
初始化设定短信动态码同步进程的数量为N个;
统计当前统计周期内短信动态码的平均同步时间T,并计算短信动态码的基准同步时间T
J;
基于所述平均同步时间T以及基准同步时间T
J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求;
根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步进程的数量为N’个。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有动态码同步进程扩容程序,所述动态码同步进程扩容程序可被一个或者多个处理器执行,以实现如上所述的动态码同步进 程扩容方法的步骤。
本申请提出的动态码同步进程扩容方法、动态码生成器及计算机可读存储介质,统计当前统计周期内短信动态码的平均同步时间T,并计算短信动态码的基准同步时间T
J;基于所述平均同步时间T以及基准同步时间T
J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求;根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步进程的数量。本申请提供的动态调整动态码同步进程的方法,能够缓解动态码同步的业务压力,并加快动态码传送的速度。
图1为本申请一实施例提供的动态码同步进程扩容方法的流程示意图;
图2为本申请一实施例提供的动态码生成器的内部结构示意图;
图3为本申请一实施例提供的动态码生成器中动态码同步进程扩容程序的模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种动态码同步进程扩容方法。在该方法中,由客户端,如手机或者电脑等,发送短信动态码的请求给一个动态码生成器,所述动态码生成器收到所述短信动态码的请求后,根据预设的算法生成一组随机的动态码,一般动态码是一串字母或数字组成的字符。所述动态码生成器生成所述动态码以后,会将该动态码同步到一个短信服务器中,由所述短信服务器将所述动态码以短信的方式发送到预设的手机中。由于短信动态码必须具有一定的有效期,如60S,因此,在动态码生成器生成动态码以后需要尽快地将所述动态码同步到短信服务器中。
详细地,参照图1所示,为本申请一实施例提供的动态码同步进程扩容方法的流程示意图。该方法可以由所述动态码生成器执行,该动态码生成器 可以由软件和/或硬件实现。
S10、初始化设定短信动态码同步进程的数量为N个。
所述进程是正在运行的程序的实例。本申请实施例中,所述同步进程用于将所述动态码生成器生成的动态码同步到短信服务器。通常情况下,每一个同步进程运行一次会将一个验证码从所述动态码生成器同步到所述短信服务器中。
本申请较佳实施例中,所述同步进程的数量可以由系统管理员根据经验,参考需同一时间从所述动态码生成器同步到所述短信服务器中的动态码的数量而预先设定。
例如,所述同步进程的数量N可以设定为100等。
S20、统计当前统计周期内短信动态码的平均同步时间T,并计算短信动态码的基准同步时间T
J。
所述当前统计周期为从当前时间开始向前的一个预设时间段,例如当前时间开始的前1分钟、前1个小时、前1天等。
在该统计周期内,从所述动态码生成器同步到所述短信服务器中的n个动态码中,若每个动态码的同步时间,即从所述动态码生成器发出,到达短信服务器的时间分别为X
1、X
2、X
3、……X
n,则所述平均同步时间为:
本申请较佳实施例中,所述T
J的计算方法如下:
T
J=(W
1*T
1+W
2*T
2+W
3*T
3+W
4*T
4)/(W
1+W
2+W
3+W
4)。
其中T
1、T
2、T
3、T
4分别为最近一周、一月、三个月、六个月平均同步时间,W
1、W
2、W
3、W
4为一周、一月、三个月、六个月对应的权重。
优选地,所述W
1、W
2、W
3、W
4为系统管理员根据经验设定,且W
1>W
2>W
3>W
4。
S30、基于所述平均同步时间T以及基准同步时间T
J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求。
本申请其中一个实施例中,所述第一预设条件指令为所述平均同步时间T以及基准同步时间T
J的比值。
优选地,当T-T
J>1时,触发同步进程的扩容请求,按照预设方法,对所述同步进程的数量进行扩容处理。
当T-T
J<-1,则触发同步进程的缩容请求,按照预设方法,对所述同步进程的数量进行缩容处理。
本申请其他实施例中,所述第一预设条件指令为一个预先训练的机器判别模型,根据该机器判别模型的运算,判断是否触发同步进程的扩容或者缩容请求。
优选地,所述机器判别模型包括,但不限于,支持向量机(Support Vector Machine,SVM)模型。
本申请将所述当前统计周期内的平均同步时间T以及基准同步时间T
J作为所述机器判别模型的输入,经过所述机器判别模型计算后,输出请求类别,所述请求类别包括:触发进程扩容请求、触发进程缩容请求、不触发任何请求。
在本申请的优先实施例中,所述机器判别模型的训练过程包括:
1)获取正样本的同步时间数据以及负样本的同步时间数据,其中所述的同步时间数据可以包括任意一统计周期内的平均同步时间T以及对应的基准同步时间T
J,并将所述正样本的同步时间数据标注请求类别,以使正样本的同步时间数据携带请求类别标签。
例如,分别获取500个需要触发同步进程的扩容请求、需要触发同步进程的缩容请求以及不触发任何请求的同步时间数据,并对每个同步时间数据标注类别,可以用“1”作为需要触发同步进程的扩容请求的同步时间数据的标签,以“2”作为不需要触发同步进程的扩容请求的同步时间数据的标签,以“3”作为不触发任何请求的同步时间数据的标签。
2)将所述正样本的同步时间数据以及所述负样本的同步时间数据随机分成第一预设比例的训练集和第二预设比例的验证集,利用所述训练集训练所述机器判别模型,并利用所述验证集验证训练后的所述机器判别模型的准确率。
先将不同请求类别的训练集中的训练样本分发到不同的文件夹里。例如,将触发同步进程的扩容请求的训练样本分发到第一文件夹里、触发同步进程的缩容请求的训练样本分发到第二文件夹里、以及不触发任何请求的训练样本分发到第三文件夹里。然后从不同的文件夹里分别提取第一预设比例(例如,70%)的训练样本作为总的训练样本进行机器判别模型的训练,从不同的 文件夹里分别提取剩余第二预设比例(例如,30%)的训练样本作为总的测试样本对训练完成的所述机器判别模型进行准确性验证。
3)若所述准确率大于或者等于预设准确率阈值时,则结束训练,以训练后的所述机器判别模型作为分类器,以识别当前的请求类别;若所述准确率小于所述预设的准确率阈值时,则增加正样本数量及负样本数量,以重新训练所述机器判别模型,直至所述准确率大于或者等于预设准确率阈值。
S40、根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步进程的数量为N’个。
本申请较佳实施例中,所述预设方法为:当所述请求类别为触发进程扩容请求时,则将同步进程的数量在现有的基础上增加n个;当所述请求类别为触发进程缩容请求时,则将同步进程的数量在现有的基础上减少n个;当所述请求类别为不触发任何请求时,则维持同步进程的现有的数量。
本申请优选实施例中,所述n为2。
S50、时刻监控当前在线的进程数量P,基于当前在线的同步进程数量P与所述动态码同步进程的数量N’,根据第二预设条件指令,决定是否启动备用进程。
每个进程执行任务进行动态码同步之前会向控制系统上报状态,所述控制系统每隔预设时间,如30s,检测上报状态的同步进程的数量,如果30s内某同步进程没有进行状态上报,则认为该同步进程已经离线。
本申请较佳实施例中,所述第二预设条件指令为:若当前在线的进程数量P与所述动态码同步进程的数量N’不相等,则启动备用进程;若当前在线的进程数量P与所述动态码同步进程的数量N’相等,则不启动备用进程。
本申请还提供一种执行动态码同步进程扩容的动态码生成器。参照图2所示,为本申请一实施例提供的动态码生成器的内部结构示意图。
在本实施例中,所述动态码生成器1可以是智能手机、平板电脑、便携计算机等终端设备,可以是PC(Personal Computer,个人电脑),也可以是服务器、服务器群组等。该动态码生成器1至少包括存储器11、处理器12,通信总线13,以及网络接口14。
其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质 包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是动态码生成器1的内部存储单元,例如该动态码生成器1的硬盘。存储器11在另一些实施例中也可以是动态码生成器1的外部存储设备,例如动态码生成器1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括动态码生成器1的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于动态码生成器1的应用软件及各类数据,例如动态码同步进程扩容程序01的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行动态码同步进程扩容程序01等。
通信总线13用于实现这些组件之间的连接通信。
网络接口14可选的可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在该动态码生成器1与其他电子设备之间建立通信连接。
可选地,该动态码生成器1还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在动态码生成器1中处理的信息以及用于显示可视化的用户界面。
图2仅示出了具有组件11-14以及动态码同步进程扩容程序01的动态码生成器1,本领域技术人员可以理解的是,图1示出的结构并不构成对动态码生成器1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
在图2所示的动态码生成器1实施例中,存储器11中存储有动态码同步进程扩容程序01;处理器12执行存储器11中存储的动态码同步进程扩容程序01时实现如下步骤:
步骤一、初始化设定短信动态码同步进程的数量为N个。
所述进程是正在运行的程序的实例。本申请实施例中,所述同步进程用于将所述动态码生成器生成的动态码同步到短信服务器。通常情况下,每一个同步进程运行一次会将一个验证码从所述动态码生成器同步到所述短信服务器中。
本申请较佳实施例中,所述同步进程的数量可以由系统管理员根据经验,参考需同一时间从所述动态码生成器同步到所述短信服务器中的动态码的数量而预先设定。
例如,所述同步进程的数量N可以设定为100等。
步骤二、统计当前统计周期内短信动态码的平均同步时间T,并计算短信动态码的基准同步时间T
J。
所述当前统计周期为从当前时间开始向前的一个预设时间段,例如当前时间开始的前1分钟、前1个小时、前1天等。
在该统计周期内,从所述动态码生成器同步到所述短信服务器中的n个动态码中,若每个动态码的同步时间,即从所述动态码生成器发出,到达短信服务器的时间分别为X
1、X
2、X
3、……X
n,则所述平均同步时间为:
本申请较佳实施例中,所述T
J的计算方法如下:
T
J=(W
1*T
1+W
2*T
2+W
3*T
3+W
4*T
4)/(W
1+W
2+W
3+W
4)。
其中T
1、T
2、T
3、T
4分别为从当前时间开始,往前推的一周、一月、三个月、六个月平均同步时间,W
1、W
2、W
3、W
4为一周、一月、三个月、六个月对应的权重。
优选地,所述W
1、W
2、W
3、W
4为系统管理员根据经验设定,且W
1>W
2>W
3>W
4。
步骤三、基于所述平均同步时间T以及基准同步时间T
J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求。
本申请其中一个实施例中,所述第一预设条件指令为所述平均同步时间T以及基准同步时间T
J的比值。
优选地,当T-T
J>1时,触发同步进程的扩容请求,按照预设方法,对所述同步进程的数量进行扩容处理。
当T-T
J<-1,则触发同步进程的缩容请求,按照预设方法,对所述同步进 程的数量进行缩容处理。
本申请其他实施例中,所述第一预设条件指令为一个预先训练的机器判别模型,根据该机器判别模型的运算,判断是否触发同步进程的扩容或者缩容请求。
优选地,所述机器判别模型包括,但不限于,支持向量机(Support Vector Machine,SVM)模型。
本申请将所述当前统计周期内的平均同步时间T以及基准同步时间T
J作为所述机器判别模型的输入,经过所述机器判别模型计算后,输出请求类别,所述请求类别包括:触发进程扩容请求、触发进程缩容请求、不触发任何请求。
在本申请的优先实施例中,所述机器判别模型的训练过程包括:
1)获取正样本的同步时间数据以及负样本的同步时间数据,其中所述的同步时间数据可以包括任意一统计周期内的平均同步时间T以及对应的基准同步时间T
J,并将所述正样本的同步时间数据标注请求类别,以使正样本的同步时间数据携带请求类别标签。
例如,分别获取500个需要触发同步进程的扩容请求、需要触发同步进程的缩容请求以及不触发任何请求的同步时间数据,并对每个同步时间数据标注类别,可以用“1”作为需要触发同步进程的扩容请求的同步时间数据的标签,以“2”作为不需要触发同步进程的扩容请求的同步时间数据的标签,以“3”作为不触发任何请求的同步时间数据的标签。
2)将所述正样本的同步时间数据以及所述负样本的同步时间数据随机分成第一预设比例的训练集和第二预设比例的验证集,利用所述训练集训练所述机器判别模型,并利用所述验证集验证训练后的所述机器判别模型的准确率。
先将不同请求类别的训练集中的训练样本分发到不同的文件夹里。例如,将触发同步进程的扩容请求的训练样本分发到第一文件夹里、触发同步进程的缩容请求的训练样本分发到第二文件夹里、以及不触发任何请求的训练样本分发到第三文件夹里。然后从不同的文件夹里分别提取第一预设比例(例如,70%)的训练样本作为总的训练样本进行机器判别模型的训练,从不同的文件夹里分别提取剩余第二预设比例(例如,30%)的训练样本作为总的测试 样本对训练完成的所述机器判别模型进行准确性验证。
3)若所述准确率大于或者等于预设准确率阈值时,则结束训练,以训练后的所述机器判别模型作为分类器,以识别当前的请求类别;若所述准确率小于所述预设的准确率阈值时,则增加正样本数量及负样本数量,以重新训练所述机器判别模型,直至所述准确率大于或者等于预设准确率阈值。
步骤四、根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步进程的数量为N’个。
本申请较佳实施例中,所述预设方法为:当所述请求类别为触发进程扩容请求时,则将同步进程的数量在现有的基础上增加n个;当所述请求类别为触发进程缩容请求时,则将同步进程的数量在现有的基础上减少n个;当所述请求类别为不触发任何请求时,则维持同步进程的现有的数量。
本申请优选实施例中,所述n为2。
步骤五、时刻监控当前在线的进程数量P,基于当前在线的同步进程数量P与所述动态码同步进程的数量N’,根据第二预设条件指令,决定是否启动备用进程。
每个进程执行任务进行动态码同步之前会向控制系统上报状态,所述控制系统每隔预设时间,如30s,检测上报状态的同步进程的数量,如果30s内某同步进程没有进行状态上报,则认为该同步进程已经离线。
本申请较佳实施例中,所述第二预设条件指令为:若当前在线的进程数量P与所述动态码同步进程的数量N’不相等,则启动备用进程;若当前在线的进程数量P与所述动态码同步进程的数量N’相等,则不启动备用进程。
本实施例提出的动态码生成器,统计当前统计周期内短信动态码的平均同步时间T,并计算短信动态码的基准同步时间T
J;基于所述平均同步时间T以及基准同步时间T
J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求;根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步进程的数量。本申请提供的动态调整动态码同步进程的方法,能够缓解动态码同步的业务压力,并加快动态码传送的速度。
可选地,在本申请实施例中,所述动态码同步进程扩容程序01还可以被分割为一个或者多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行以完成本申请,本申请所称 的模块是指能够完成特定功能的一系列计算机程序指令段,用于描述动态码同步进程扩容程序在所述动态码生成器中的执行过程。
例如,参照图3所示,为本申请动态码生成器一实施例中的动态码同步进程扩容程序的程序模块示意图,该实施例中,动态码同步进程扩容程序可以被分割为初始化模块10、动态调整模块20及监控模块30,示例性地:
所述初始化模块10用于:初始化设定短信动态码同步进程的数量为N个。
本申请较佳实施例中,所述同步进程的数量可以由系统管理员根据经验,参考需同一时间从所述动态码生成器同步到所述短信服务器中的动态码的数量而预先设定。
例如,所述同步进程的数量N可以设定为100等。
所述动态调整模块20用于:统计当前统计周期内短信动态码的平均同步时间T,计算短信动态码的基准同步时间T
J,并基于所述平均同步时间T以及基准同步时间T
J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求,根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步进程的数量为N’个。
所述当前统计周期为从当前时间开始向前的一个预设时间段,例如当前时间开始的前1分钟、前1个小时、前1天等。
在该统计周期内,从所述动态码生成器同步到所述短信服务器中的n个动态码中,若每个动态码的同步时间,即从所述动态码生成器发出,到达短信服务器的时间分别为X
1、X
2、X
3、……X
n,则所述平均同步时间为:
本申请较佳实施例中,所述T
J的计算方法如下:
T
J=(W
1*T
1+W
2*T
2+W
3*T
3+W
4*T
4)/(W
1+W
2+W
3+W
4)。
其中T
1、T
2、T
3、T
4分别为最近一周、一月、三个月、六个月平均同步时间,W
1、W
2、W
3、W
4为一周、一月、三个月、六个月对应的权重。
优选地,所述W
1、W
2、W
3、W
4为系统管理员根据经验设定,且W
1>W
2>W
3>W
4。
本申请其中一个实施例中,所述第一预设条件指令为所述平均同步时间T以及基准同步时间T
J的比值。
优选地,当T-T
J>1时,触发同步进程的扩容请求,按照预设方法,对所 述同步进程的数量进行扩容处理。
当T-T
J<-1,则触发同步进程的缩容请求,按照预设方法,对所述同步进程的数量进行缩容处理。
本申请其他实施例中,所述第一预设条件指令为一个预先训练的机器判别模型,根据该机器判别模型的运算,判断是否触发同步进程的扩容或者缩容请求。
优选地,所述机器判别模型包括,但不限于,支持向量机(Support Vector Machine,SVM)模型。
本申请较佳实施例中,所述预设方法为:当所述请求类别为触发进程扩容请求时,则将同步进程的数量在现有的基础上增加n个;当所述请求类别为触发进程缩容请求时,则将同步进程的数量在现有的基础上减少n个;当所述请求类别为不触发任何请求时,则维持同步进程的现有的数量。
本申请优选实施例中,所述n为2。
所述监控模块30用于:时刻监控当前在线的进程数量P,基于当前在线的同步进程数量P与所述动态码同步进程的数量N’,根据第二预设条件指令,决定是否启动备用进程。
本申请较佳实施例中,所述第二预设条件指令为:若当前在线的进程数量P与所述动态码同步进程的数量N’不相等,则启动备用进程;若当前在线的进程数量P与所述动态码同步进程的数量N’相等,则不启动备用进程。
上述初始化模块10、动态调整模块20及监控模块30等程序模块被执行时所实现的功能或操作步骤与上述实施例大体相同,在此不再赘述。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有动态码同步进程扩容程序,所述动态码同步进程扩容程序可被一个或多个处理器执行,以实现如下操作:
初始化设定短信动态码同步进程的数量为N个;
统计当前统计周期内短信动态码的平均同步时间T,并计算短信动态码的基准同步时间T
J;
基于所述平均同步时间T以及基准同步时间T
J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求;
根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步 进程的数量为N’个;及
时刻监控当前在线的进程数量P,基于当前在线的同步进程数量P与所述动态码同步进程的数量N’,根据第二预设条件指令,决定是否启动备用进程。
本申请计算机可读存储介质具体实施方式与上述动态码同步进程扩容动态码生成器和方法各实施例基本相同,在此不作累述。
需要说明的是,上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。并且本文中的术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种动态码同步进程扩容方法,其特征在于,所述方法包括:初始化设定短信动态码同步进程的数量为N个;统计当前统计周期内短信动态码的平均同步时间T,并计算短信动态码的基准同步时间T J;基于所述平均同步时间T以及基准同步时间T J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求;及根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步进程的数量为N’个。
- 如权利要求1所述的动态码同步进程扩容方法,其特征在于,所述基准同步时间T J按照如下方法计算:T J=(W 1*T 1+W 2*T 2+W 3*T 3+W 4*T 4)/(W 1+W 2+W 3+W 4);其中T1、T2、T3、T4分别为从当前时间开始,往前推的一周、一月、三个月、六个月平均同步时间,W1、W2、W3、W4为一周、一月、三个月、六个月对应的权重,且W1>W2>W3>W4。
- 如权利要求2所述的动态码同步进程扩容方法,其特征在于,所述第一预设条件指令包括:当T-T J>1时,触发同步进程的扩容请求,按照预设方法,对所述同步进程的数量进行扩容处理;及当T-T J<-1,则触发同步进程的缩容请求,按照预设方法,对所述同步进程的数量进行缩容处理。
- 如权利要求3所述的动态码同步进程扩容方法,其特征在于,所述预设方法包括:当所述请求类别为触发进程扩容请求时,则将同步进程的数量在现有的基础上增加n个;当所述请求类别为触发进程缩容请求时,则将同步进程的数量在现有的基础上减少n个;当所述请求类别为不触发任何请求时,则维持同步进程的现有的数量。
- 如权利要求1所述的动态码同步进程扩容方法,其特征在于,该方法还包括:时刻监控当前在线的进程数量P;若当前在线的进程数量P与所述动态码同步进程的数量N’不相等,则启动备用进程;及若当前在线的进程数量P与所述动态码同步进程的数量N’相等,则不启动备用进程。
- 如权利要求2所述的动态码同步进程扩容方法,其特征在于,该方法还包括:时刻监控当前在线的进程数量P;若当前在线的进程数量P与所述动态码同步进程的数量N’不相等,则启动备用进程;及若当前在线的进程数量P与所述动态码同步进程的数量N’相等,则不启动备用进程。
- 如权利要求3或4所述的动态码同步进程扩容方法,其特征在于,该方法还包括:时刻监控当前在线的进程数量P;若当前在线的进程数量P与所述动态码同步进程的数量N’不相等,则启动备用进程;及若当前在线的进程数量P与所述动态码同步进程的数量N’相等,则不启动备用进程。
- 一种动态码生成器,其特征在于,所述动态码生成器包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的动态码同步进程扩容程序,所述动态码同步进程扩容程序被所述处理器执行时实现如下步骤:初始化设定短信动态码同步进程的数量为N个;统计当前统计周期内短信动态码的平均同步时间T,并计算短信动态码的基准同步时间T J;基于所述平均同步时间T以及基准同步时间T J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求;及根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步 进程的数量为N’个。
- 如权利要求8所述的动态码生成器,其特征在于,所述基准同步时间T J按照如下方法计算:T J=(W 1*T 1+W 2*T 2+W 3*T 3+W 4*T 4)/(W 1+W 2+W 3+W 4);其中T 1、T 2、T 3、T 4分别为从当前时间开始,往前推的一周、一月、三个月、六个月平均同步时间,W 1、W 2、W 3、W 4为一周、一月、三个月、六个月对应的权重,且W 1>W 2>W 3>W 4。
- 如权利要求9所述的动态码生成器,其特征在于,所述第一预设条件指令包括:当T-T J>1时,触发同步进程的扩容请求,按照预设方法,对所述同步进程的数量进行扩容处理;及当T-T J<-1,则触发同步进程的缩容请求,按照预设方法,对所述同步进程的数量进行缩容处理。
- 如权利要求10所述的动态码生成器,其特征在于,所述动态码同步进程扩容程序被所述处理器执行时,还实现如下步骤:当所述请求类别为触发进程扩容请求时,则将同步进程的数量在现有的基础上增加n个;当所述请求类别为触发进程缩容请求时,则将同步进程的数量在现有的基础上减少n个;当所述请求类别为不触发任何请求时,则维持同步进程的现有的数量。
- 如权利要求8所述的动态码生成器,其特征在于,所述动态码同步进程扩容程序被所述处理器执行时,还实现如下步骤:时刻监控当前在线的进程数量P;若当前在线的进程数量P与所述动态码同步进程的数量N’不相等,则启动备用进程;若当前在线的进程数量P与所述动态码同步进程的数量N’相等,则不启动备用进程。
- 如权利要求9所述的动态码生成器,其特征在于,所述动态码同步进程扩容程序被所述处理器执行时,还实现如下步骤:时刻监控当前在线的进程数量P;若当前在线的进程数量P与所述动态码同步进程的数量N’不相等,则启动备用进程;若当前在线的进程数量P与所述动态码同步进程的数量N’相等,则不启动备用进程。
- 如权利要求10或11所述的动态码生成器,其特征在于,所述动态码同步进程扩容程序被所述处理器执行时,还实现如下步骤:时刻监控当前在线的进程数量P;若当前在线的进程数量P与所述动态码同步进程的数量N’不相等,则启动备用进程;若当前在线的进程数量P与所述动态码同步进程的数量N’相等,则不启动备用进程。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有动态码同步进程扩容程序,所述动态码同步进程扩容程序可被一个或者多个处理器执行,以实现如下步骤:初始化设定短信动态码同步进程的数量为N个;统计当前统计周期内短信动态码的平均同步时间T,并计算短信动态码的基准同步时间T J;基于所述平均同步时间T以及基准同步时间T J,根据第一预设条件指令,判断是否触发同步进程的扩容或缩容请求;及根据所述进程扩容或缩容请求,按照预设方法,调整所述信动态码同步进程的数量为N’个。
- 如权利要求15所述的计算机可读存储介质,其特征在于,所述基准同步时间T J按照如下方法计算:T J=(W 1*T 1+W 2*T 2+W 3*T 3+W 4*T 4)/(W 1+W 2+W 3+W 4);其中T 1、T 2、T 3、T 4分别为从当前时间开始,往前推的一周、一月、三个月、六个月平均同步时间,W 1、W 2、W 3、W 4为一周、一月、三个月、六个月对应的权重,且W 1>W 2>W 3>W 4。
- 如权利要求16所述的计算机可读存储介质,其特征在于,所述第一预设条件指令包括:当T-T J>1时,触发同步进程的扩容请求,按照预设方法,对所述同步进 程的数量进行扩容处理;及当T-T J<-1,则触发同步进程的缩容请求,按照预设方法,对所述同步进程的数量进行缩容处理。
- 如权利要求17所述的计算机可读存储介质,其特征在于,所述动态码同步进程扩容程序被所述处理器执行时,还实现如下步骤:当所述请求类别为触发进程扩容请求时,则将同步进程的数量在现有的基础上增加n个;当所述请求类别为触发进程缩容请求时,则将同步进程的数量在现有的基础上减少n个;当所述请求类别为不触发任何请求时,则维持同步进程的现有的数量。
- 如权利要求15所述的计算机可读存储介质,其特征在于,所述动态码同步进程扩容程序被所述处理器执行时,还实现如下步骤:时刻监控当前在线的进程数量P;若当前在线的进程数量P与所述动态码同步进程的数量N’不相等,则启动备用进程;若当前在线的进程数量P与所述动态码同步进程的数量N’相等,则不启动备用进程。
- 如权利要求16-18任一项所述的计算机可读存储介质,其特征在于,所述动态码同步进程扩容程序被所述处理器执行时,还实现如下步骤:时刻监控当前在线的进程数量P;若当前在线的进程数量P与所述动态码同步进程的数量N’不相等,则启动备用进程;若当前在线的进程数量P与所述动态码同步进程的数量N’相等,则不启动备用进程。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811185073.7 | 2018-10-11 | ||
| CN201811185073.7A CN109525552B (zh) | 2018-10-11 | 2018-10-11 | 动态码同步进程扩容方法、动态码生成器及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020073661A1 true WO2020073661A1 (zh) | 2020-04-16 |
Family
ID=65771976
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/088633 Ceased WO2020073661A1 (zh) | 2018-10-11 | 2019-05-27 | 动态码同步进程扩容方法、动态码生成器及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109525552B (zh) |
| WO (1) | WO2020073661A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115474165A (zh) * | 2021-05-24 | 2022-12-13 | 中移动金融科技有限公司 | 短信服务自监控动态调整方法和系统 |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109525552B (zh) * | 2018-10-11 | 2021-08-31 | 平安科技(深圳)有限公司 | 动态码同步进程扩容方法、动态码生成器及存储介质 |
| CN110442436A (zh) * | 2019-07-12 | 2019-11-12 | 平安普惠企业管理有限公司 | 基于容器的进程管理方法及相关装置 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1632834A2 (de) * | 2004-09-01 | 2006-03-08 | Agenda Informationssysteme GmbH | Verfahren zur Steuerung des Zugriffs auf ein Anwendungsprogramm |
| CN106302565A (zh) * | 2015-05-12 | 2017-01-04 | 浙江格林蓝德信息技术有限公司 | 业务服务器的调度方法及系统 |
| CN106933659A (zh) * | 2015-12-30 | 2017-07-07 | 华为技术有限公司 | 管理进程的方法和装置 |
| CN107135227A (zh) * | 2017-05-27 | 2017-09-05 | 深圳来电科技有限公司 | 验证方法及设备 |
| CN108229127A (zh) * | 2016-12-21 | 2018-06-29 | 英业达科技有限公司 | 预先产生验证数据以区分客户端的系统及其方法 |
| CN109525552A (zh) * | 2018-10-11 | 2019-03-26 | 平安科技(深圳)有限公司 | 动态码同步进程扩容方法、动态码生成器及存储介质 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104239758B (zh) * | 2013-06-13 | 2018-04-27 | 阿里巴巴集团控股有限公司 | 一种人机识别方法及相应的人机识别系统 |
| CN106100867A (zh) * | 2016-05-27 | 2016-11-09 | 乐视控股(北京)有限公司 | 分布式服务系统的运行维护方法及装置 |
| CN107995264B (zh) * | 2017-11-20 | 2021-03-30 | 北京知道未来信息技术有限公司 | 一种基于消息队列的cdn服务验证码分发方法和系统 |
| CN108492109B (zh) * | 2018-03-15 | 2021-09-21 | 平安科技(深圳)有限公司 | 电子装置、动态码请求的处理方法及存储介质 |
-
2018
- 2018-10-11 CN CN201811185073.7A patent/CN109525552B/zh active Active
-
2019
- 2019-05-27 WO PCT/CN2019/088633 patent/WO2020073661A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1632834A2 (de) * | 2004-09-01 | 2006-03-08 | Agenda Informationssysteme GmbH | Verfahren zur Steuerung des Zugriffs auf ein Anwendungsprogramm |
| CN106302565A (zh) * | 2015-05-12 | 2017-01-04 | 浙江格林蓝德信息技术有限公司 | 业务服务器的调度方法及系统 |
| CN106933659A (zh) * | 2015-12-30 | 2017-07-07 | 华为技术有限公司 | 管理进程的方法和装置 |
| CN108229127A (zh) * | 2016-12-21 | 2018-06-29 | 英业达科技有限公司 | 预先产生验证数据以区分客户端的系统及其方法 |
| CN107135227A (zh) * | 2017-05-27 | 2017-09-05 | 深圳来电科技有限公司 | 验证方法及设备 |
| CN109525552A (zh) * | 2018-10-11 | 2019-03-26 | 平安科技(深圳)有限公司 | 动态码同步进程扩容方法、动态码生成器及存储介质 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115474165A (zh) * | 2021-05-24 | 2022-12-13 | 中移动金融科技有限公司 | 短信服务自监控动态调整方法和系统 |
| CN115474165B (zh) * | 2021-05-24 | 2024-05-07 | 中移动金融科技有限公司 | 短信服务自监控动态调整方法和系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109525552A (zh) | 2019-03-26 |
| CN109525552B (zh) | 2021-08-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12526276B2 (en) | Token based one-time password security | |
| CN108475249B (zh) | 分布式、分散式数据聚合 | |
| US20150199541A1 (en) | Method and system for secured communication of personal information | |
| WO2019200799A1 (zh) | 短信验证码的推送方法、电子装置及可读存储介质 | |
| WO2019169758A1 (zh) | 数据处理装置、方法及计算机可读存储介质 | |
| US12028461B2 (en) | Contribution signatures for tagging | |
| CN109257321B (zh) | 安全登录方法和装置 | |
| CN113706249B (zh) | 数据推荐方法、装置、电子设备及存储介质 | |
| WO2018205468A1 (zh) | 生物识别交易处理方法、电子装置及存储介质 | |
| CN110351672B (zh) | 信息推送方法、装置及电子设备 | |
| CN114996675A (zh) | 数据查询方法、装置、计算机设备及存储介质 | |
| CN111651749B (zh) | 基于密码找回账号的方法、装置、计算机设备及存储介质 | |
| WO2020073661A1 (zh) | 动态码同步进程扩容方法、动态码生成器及存储介质 | |
| CN107294931B (zh) | 调整限制访问频率的方法和装置 | |
| WO2021051932A1 (zh) | 数据更新方法、装置、计算机设备及存储介质 | |
| CN112084486A (zh) | 用户信息验证方法、装置、电子设备及存储介质 | |
| CN110163314A (zh) | 一种防作弊签到方法、装置、计算机系统及可读存储介质 | |
| WO2019140826A1 (zh) | 电子红包的发放装置、方法及计算机可读存储介质 | |
| US11704392B2 (en) | Fraud estimation system, fraud estimation method and program | |
| US20170169211A1 (en) | One kind of website passwords generating method and apparatus | |
| US10904011B2 (en) | Configuration updates for access-restricted hosts | |
| CN113157717B (zh) | 长数据链路的缓存刷新方法、装置、设备及存储介质 | |
| CN116094835A (zh) | 一种业务数据加密方法、业务数据解密方法、装置及设备 | |
| CN113922967B (zh) | 区块链密钥的管理方法、装置及计算机设备 | |
| CN115756571A (zh) | 代码数据的处理方法、装置、计算机设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19870076 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12/07/2021) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19870076 Country of ref document: EP Kind code of ref document: A1 |