Time data scheduling method, device, electronic device and readable storage medium
By using blockchain technology to calculate the value to be verified and building blockchain storage programs during the time data scheduling process, the problem of low database security in the existing technology is solved, and higher data storage security is achieved.
Patent Information
- Application Number
- CN202011644304.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2040-12-30
AI Technical Summary
The existing time data scheduling scheme lacks judgment on the security of the database during the scheduling process, resulting in low security.
By obtaining the time data storage node set from the first blockchain, calculating the value to be verified, and when the value to be verified is the same as the preset standard value, the time data set is obtained and used as a variable parameter of the blockchain storage program, the blockchain storage program is constructed and run, and the time data set is stored in the second blockchain.
Improves the security of the scheduling process and ensures that data scheduling is only performed when the value to be verified is the same as the preset standard value, further enhancing the security of data storage.
Smart Images

Figure CN112632042B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method, device, electronic device and readable storage medium for time data scheduling. Background Art
[0002] Time data is a type of data that is closely related to time. Since time is constantly changing, the amount of time data associated with time also grows rapidly. Therefore, the scheduling method of migrating time data from one database to another is very important.
[0003] In the existing time data scheduling scheme, the time data in the database is generally directly called, and the time data is scheduled to other places according to the user's purpose. There is a lack of judgment on the security of the database, so there will be low security problems in the scheduling process. Summary of the invention
[0004] The present invention provides a time data scheduling method, device, electronic device and computer-readable storage medium, the main purpose of which is to solve the problem of low security in the scheduling process.
[0005] To achieve the above object, the present invention provides a time data scheduling method, comprising:
[0006] receiving a time data request instruction, obtaining a time data storage node set from the first blockchain according to the time data request instruction, and calculating a value to be verified of the time data storage node set;
[0007] When the value to be verified is the same as the preset standard value, a time data set in the time data storage node set is obtained, and the time data set is used as a variable parameter of a pre-constructed original time data function to obtain a standard time data function;
[0008] A blockchain storage program is constructed according to the standard time data function, the blockchain storage program is run, and the time data set is stored in a second blockchain.
[0009] Optionally, the calculating the value to be verified of the time data storage node set includes:
[0010] Randomly generating a first random number and a second random number in each time data storage node in the time data storage node set;
[0011] Calculate the node isolation value of the time data storage node where the first random number and the second random number are located, and collect the node isolation value of each time data storage node to obtain a node isolation value set;
[0012] Calculate the node contact value of each time data storage node in the time data storage node set according to the first random number to obtain a node contact value set;
[0013] The node isolation value set and the node contact value set are verified and calculated to obtain the value to be verified.
[0014] Optionally, calculating the node connection value of each time data storage node in the time data storage node set includes:
[0015] The node connection value is calculated using the following method:
[0016] L n (V n )=(E n (V n-1 )+RV n )modq n
[0017] Among them, V n-1 Represents the data identification code corresponding to the time data stored in the n-1th time data storage node, V n Indicates the data identification code corresponding to the time data stored in the nth time data storage node, L n (V n ) represents the node connection value when the nth time data is stored in the node, q n represents the first random number of the nth time data storage node, R represents the pre-constructed password value, mod represents the modulus operation, E n (V n-1 ) represents the node isolation value of the nth time data storage node.
[0018] Optionally, constructing a blockchain storage program according to the standard time data function includes:
[0019] Constructing an interface connection program for a blockchain, and using the interface connection program to connect to the second blockchain;
[0020] The standard time data function and the interface connection program are packaged to obtain the blockchain storage program.
[0021] Optionally, the method further comprises:
[0022] Calling and running the test function in the interface connection program;
[0023] If the test function does not call data from the second blockchain, the interface connection program fails to run;
[0024] If the test function calls data from the database, the interface connection program runs successfully.
[0025] Optionally, the method further comprises constructing the original time data function, wherein the constructing comprises:
[0026] Create variable parameters to express data at different times;
[0027] The original time data function is constructed according to the variable parameters and the addresses of the time data storage nodes of the second blockchain.
[0028] In order to solve the above problem, the present invention further proposes a time data scheduling device, the device comprising:
[0029] A verification value calculation module, configured to receive a time data request instruction, obtain a time data storage node set from the first blockchain according to the time data request instruction, and calculate a value to be verified of the time data storage node set;
[0030] A function construction module, used for obtaining a time data set in the time data storage node set when the value to be verified is the same as the preset standard value, and using the time data set as a variable parameter of a pre-constructed original time data function to obtain a standard time data function;
[0031] The storage module is used to construct a blockchain storage program according to the standard time data function, run the blockchain storage program, and store the time data set to a second blockchain.
[0032] Optionally, the verification value calculation module is specifically used to:
[0033] Randomly generating a first random number and a second random number in each time data storage node in the time data storage node set;
[0034] Calculate the node isolation value of the time data storage node where the first random number and the second random number are located, and collect the node isolation value of each time data storage node to obtain a node isolation value set;
[0035] Calculate the node contact value of each time data storage node in the time data storage node set according to the first random number to obtain a node contact value set;
[0036] The node isolation value set and the node contact value set are verified and calculated to obtain the value to be verified.
[0037] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0038] a memory storing at least one instruction; and
[0039] The processor executes the instructions stored in the memory to implement the time data scheduling method described above.
[0040] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the time data scheduling method described above.
[0041] The embodiment of the present invention obtains a time data storage node set from the first blockchain, calculates the value to be verified of the time data storage node set, and determines whether it is the same as a preset standard value. If the value to be verified is the same as the preset standard value, the right to schedule the time data storage node set to the second blockchain is obtained, thereby preliminarily improving the security of the entire scheduling process. In addition, the time data set is used as a parameter variable by using the time data function, and the blockchain storage program where the time data function is located is run at the same time. When the program can be successfully run, the time data set can be stored in the second blockchain, so the security is further improved. Therefore, the present invention can solve the problem of low security in the scheduling process. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of a flow chart of a time data scheduling method provided by an embodiment of the present invention;
[0043] Figure 2 A schematic diagram of a detailed flow chart of calculating a value to be verified in a time data scheduling method provided in an embodiment of the present invention;
[0044] Figure 3 A schematic diagram of a module of a time data scheduling device provided by an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of the internal structure of an electronic device for implementing a time data scheduling method provided by an embodiment of the present invention;
[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0048] The execution subject of the time data scheduling provided in the embodiment of the present application includes but is not limited to at least one of the electronic devices such as the server and the terminal that can be configured to execute the method provided in the embodiment of the present application. In other words, the time data scheduling can be executed by software or hardware installed in the terminal device or the server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0049] The present invention provides a time data scheduling method. Figure 1 , which is a flow chart of a time data scheduling method provided by an embodiment of the present invention.
[0050] In this embodiment, the time data scheduling method includes:
[0051] S1. Receive a time data request instruction, obtain a time data storage node set from a first blockchain according to the time data request instruction, and calculate a value to be verified of the time data storage node set.
[0052] The time data set refers to a data set related to time, such as the time data involved in a securities trading day, including data such as the last day of the week, the current time, the start time of a cycle, the end time of a cycle, and the last day of the month. The time data set involved in a securities trading day is generally large in size. If it is stored in a specific storage system for a long time, it is easy to cause the storage system to crash. Therefore, it is necessary to regularly schedule and migrate the time data set.
[0053] The preferred embodiment of the present invention can use blockchain as a storage system and name it as the first blockchain. Similarly, the second blockchain is also the name of another blockchain system. Blockchain is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. It is essentially a database. The first blockchain includes a storage node responsible for storing time data. If user A needs to migrate the time data of the first blockchain to the pre-built second blockchain, a time data request instruction is sent to perform the migration operation.
[0054] In a preferred embodiment of the present invention, general time data sets are dispersedly stored in multiple time data storage nodes in the blockchain, so the multiple time data storage nodes storing the time data sets are collectively referred to as a time data storage node set.
[0055] In order to improve the security of obtaining a data set from a blockchain, the embodiment of the present invention requires a verification operation. Figure 2 As shown, the calculation of the to-be-verified value of the time data storage node set includes:
[0056] S11. For each time data storage node in the time data storage node set, randomly generate a first random number and a second random number, and the first random number and the second random number are relatively prime;
[0057] S12, calculating the node isolation value of the time data storage node where the first random number and the second random number are located, and collecting the node isolation value of each time data storage node to obtain a node isolation value set;
[0058] S13. Calculate the node contact value of each time data storage node in the time data storage node set according to the first random number to obtain a node contact value set;
[0059] S14. Perform verification calculation on the node isolation value set and the node connection value set to obtain the value to be verified.
[0060] If the first random number q is randomly generated 1 and the second random number p 1 , if the first random number q 1 and the second random number p 1 The time data storage node is the first time data storage node, and the calculation method of its node isolation value is:
[0061] E 1 (V 1 )=V 1 p 1 modq 1
[0062] Among them, E 1 (V 1 ) represents the node isolation value of the first-time data storage node, V 1 Represents data related to the time data stored in the first time data storage node, such as a number, an identification code, etc., and mod represents a modulo operation.
[0063] In addition, when the first time data storage node interacts with the second time data storage node in the time data set, and when the first time data storage node sends data to the second time data storage node, its node contact value L 1 (V 1 )for:
[0064] L 1 (V 1 )=(RV 1 )modq 1
[0065] Where R represents the pre-constructed password value. Similarly, when the second time data storage node sends data to the first time data storage node, its node contact value L 2(V 2 )for:
[0066] L 2 (V 2 )=(E 2 (V 2 )+RV 2 )modq 2
[0067] Among them, E 2 (V 2 ) represents the node isolation value of the data storage node at the second time, q 2 represents the first random number corresponding to the second time data storage node, V 2 represents data related to the time data stored in the second time data storage node, such as a serial number, an identification code, etc., and so on. When calculating the node contact value L of the nth time data storage node n (V n )for:
[0068] L n (V n )=(E n (V n-1 )+RV n )modq n
[0069] Where V n-1 Represents data related to the time data stored in the n-1th time data storage node. When the node isolation value set and the node contact value set are calculated, the value to be verified can be obtained by calculating the total numerical difference between the two. In addition, the standard value is generally stored in the verification node in the blockchain. The first random number q 1 and the second random number p 1 The generation of has a corresponding relationship with the standard value in the verification node, so it is only necessary to determine whether the standard value and the verification are the same.
[0070] S2. Determine whether the value to be verified is the same as the preset standard value. If the value to be verified is not the same as the standard value, return to S1.
[0071] If the value to be verified is the same as the standard value, then S3: using the time data set as a variable parameter of a pre-constructed original time data function to obtain a standard time data function.
[0072] The construction process of the pre-constructed original time data function includes: creating variable parameters expressing different time data, and combining the variable parameters and the addresses of each time data storage node of the second blockchain, such as the IP address, to construct the original time data function.
[0073] For example, the variable parameters of the original time data function include yyyyMM (month calculation), yyyyMMWW (week calculation), yyyyMMdd (day calculation), yyyyMMddHH (hour calculation), and yyyyMMddHHmm (minute calculation). They correspond to the specific time point of the time data. For example, if time data A only has year, month, and week, it corresponds to yyyyMMWW (week calculation); if time data B includes year, week, and day, it corresponds to yyyyMMdd. Similarly, when the time data is the present time, you can use parameter forms such as now+2month, now-2week, now-2day, and now-1hour. If the time data involves a period, you can use parameter forms such as start+2month, start-2week, start|yyyyMMdd, and start+2day.
[0074] The IP address needs to be constructed according to actual needs. For example, if the data of the first blockchain needs to be migrated to the second blockchain, the IP address may preferably be the IP address of the data storage node at each time point of the second blockchain.
[0075] S4. Construct a blockchain storage program according to the standard time data function, run the blockchain storage program, and store the time data set to a second blockchain.
[0076] In detail, a blockchain storage program is constructed according to the standard time data function, including:
[0077] Step A: constructing an interface connection program for a blockchain, and using the interface connection program to connect to the second blockchain;
[0078] Step B: When the connection is successful, test whether the interface connection program runs successfully. If the interface connection program fails to run, return to step A. If the interface connection program runs successfully, package the standard time data function and the interface connection program to obtain the blockchain storage program.
[0079] The main purpose of the blockchain storage program is to connect the data in multiple blockchains in series. For example, if a time data set in the first blockchain is input into the second blockchain, the blockchain storage program needs to be used to connect the time data set in series to the second blockchain. When constructing the blockchain storage program, an interface connection program needs to be constructed to connect the second blockchain, and the interface connection program needs to be tested for validity to prevent abnormalities in the interface connection program.
[0080] There are many methods for testing whether the interface connection program runs successfully. In detail, the method for testing whether the interface connection program runs successfully includes:
[0081] Call and run the test function in the interface connection program. If the test function does not call data from the second blockchain, the interface connection program fails to run. If the test function calls data from the database, the interface connection program runs successfully.
[0082] For example, a test function test is constructed in the interface connection program. The main purpose of the test function test is to read the character data A in the second blockchain. If the test function test reads successfully, the interface connection program runs successfully. If the test function test fails to read, the interface connection program is rebuilt.
[0083] Furthermore, when the blockchain storage program is successfully constructed, the time data set can be stored in the second blockchain through the data collection program. For example, the time data set extracted from the first blockchain as mentioned above can be used to store and schedule to the second blockchain.
[0084] The embodiment of the present invention obtains a time data storage node set from the first blockchain, calculates the value to be verified of the time data storage node set, and determines whether it is the same as a preset standard value. If the value to be verified is the same as the preset standard value, the right to schedule the time data storage node set to the second blockchain is obtained, thereby preliminarily improving the security of the entire scheduling process. In addition, the time data set is used as a parameter variable by using the time data function, and the blockchain storage program where the time data function is located is run at the same time. When the program can be successfully run, the time data set can be stored in the second blockchain, so the security is further improved. Therefore, the present invention can solve the problem of low security in the scheduling process.
[0085] like Figure 3 The figure shows a functional module diagram of the time data scheduling device of the present invention.
[0086] The time data scheduling device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the time data scheduling device 100 may include a verification value calculation module 101, a function construction module 102 and a storage module 103. The module described in the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0087] In this embodiment, the functions of each module / unit are as follows:
[0088] The verification value calculation module 101 is used to receive a time data request instruction, obtain a time data storage node set from the first blockchain according to the time data request instruction, and calculate a value to be verified of the time data storage node set;
[0089] The function construction module 102 is used to obtain the time data set in the time data storage node set when the value to be verified is the same as the preset standard value, and use the time data set as the variable parameter of the pre-constructed original time data function to obtain the standard time data function;
[0090] The storage module 103 is used to construct a blockchain storage program according to the standard time data function, run the blockchain storage program, and store the time data set in the second blockchain.
[0091] In detail, the specific implementation steps of each module of the time data scheduling device are as follows:
[0092] The verification value calculation module 101 is used to receive a time data request instruction, obtain a time data storage node set from the first blockchain according to the time data request instruction, and calculate the value to be verified of the time data storage node set.
[0093] The time data set refers to a data set related to time, such as the time data involved in a securities trading day, including data such as the last day of the week, the current time, the start time of a cycle, the end time of a cycle, and the last day of the month. The time data set involved in a securities trading day is generally large in size. If it is stored in a specific storage system for a long time, it is easy to cause the storage system to crash. Therefore, it is necessary to regularly schedule and migrate the time data set.
[0094] The preferred embodiment of the present invention can use blockchain as a storage system and name it as the first blockchain. Similarly, the second blockchain is also the name of another blockchain system. Blockchain is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. It is essentially a database. The first blockchain includes a storage node responsible for storing time data. If user A needs to migrate the time data of the first blockchain to the pre-built second blockchain, a time data request instruction is sent to perform the migration operation.
[0095] In a preferred embodiment of the present invention, general time data sets are dispersedly stored in multiple time data storage nodes in the blockchain, so the multiple time data storage nodes storing the time data sets are collectively referred to as a time data storage node set.
[0096] In order to improve the security of obtaining a data set from a blockchain, an embodiment of the present invention needs to perform a verification operation. In detail, the verification value calculation module 101 is specifically used to: randomly generate a first random number and a second random number for each time data storage node in the time data storage node set, and the first random number and the second random number are mutually prime; calculate the node isolation value of the time data storage node where the first random number and the second random number are located, and collect the node isolation value of each time data storage node to obtain a node isolation value set; calculate the node contact value of each time data storage node in the time data storage node set according to the first random number, and obtain a node contact value set; perform verification calculations on the node isolation value set and the node contact value set to obtain the value to be verified.
[0097] If the first random number q is randomly generated 1 and the second random number p 1 , if the first random number q 1 and the second random number p 1 The time data storage node is the first time data storage node, and the calculation method of its node isolation value is:
[0098] E 1 (V 1 )=V 1 p 1 modq 1
[0099] Among them, E 1 (V 1 ) represents the node isolation value of the first-time data storage node, V 1 Represents data related to the time data stored in the first time data storage node, such as a number, an identification code, etc., and mod represents a modulo operation.
[0100] In addition, when the first time data storage node interacts with the second time data storage node in the time data set, and when the first time data storage node sends data to the second time data storage node, its node contact value L 1 (V 1 )for:
[0101] L 1 (V 1 )=(RV 1 )modq 1
[0102] Where R represents the pre-constructed password value. Similarly, when the second time data storage node sends data to the first time data storage node, its node contact value L 2 (V 2 )for:
[0103] L 2 (V 2 )=(E 2 (V 2 )+RV 2 )modq 2
[0104] Among them, E 2 (V 2 ) represents the node isolation value of the data storage node at the second time, q 2 represents the first random number corresponding to the second time data storage node, V 2 represents data related to the time data stored in the second time data storage node, such as a serial number, an identification code, etc., and so on. When calculating the node contact value L of the nth time data storage node n (V n )for:
[0105] L n (V n )=(E n (V n-1 )+RV n )modq n
[0106] Where V n-1 Represents data related to the time data stored in the n-1th time data storage node. When the node isolation value set and the node contact value set are calculated, the value to be verified can be obtained by calculating the total numerical difference between the two. In addition, the standard value is generally stored in the verification node in the blockchain. The first random number q 1 and the second random number p 1 The generation of has a corresponding relationship with the standard value in the verification node, so it is only necessary to determine whether the standard value and the verification are the same.
[0107] The function building module 102 is used to determine whether the value to be verified is the same as a preset standard value.
[0108] If the value to be verified is different from the standard value, the verification value calculation module 101 is returned to continue receiving the time data request instruction, and according to the time data request instruction, a time data storage node set is obtained from the first blockchain, and the value to be verified of the time data storage node set is calculated.
[0109] If the value to be verified is the same as the standard value, the function construction module 102 uses the time data set as a variable parameter of a pre-constructed original time data function to obtain a standard time data function.
[0110] The construction process of the pre-constructed original time data function includes: creating variable parameters expressing different time data, and combining the variable parameters and the addresses of each time data storage node of the second blockchain, such as the IP address, to construct the original time data function.
[0111] For example, the variable parameters of the original time data function include yyyyMM (month calculation), yyyyMMWW (week calculation), yyyyMMdd (day calculation), yyyyMMddHH (hour calculation), and yyyyMMddHHmm (minute calculation). They correspond to the specific time point of the time data. For example, if time data A only has year, month, and week, it corresponds to yyyyMMWW (week calculation); if time data B includes year, week, and day, it corresponds to yyyyMMdd. Similarly, when the time data is the present time, you can use parameter forms such as now+2month, now-2week, now-2day, and now-1hour. If the time data involves a period, you can use parameter forms such as start+2month, start-2week, start|yyyyMMdd, and start+2day.
[0112] The IP address needs to be constructed according to actual needs. For example, if the data of the first blockchain needs to be migrated to the second blockchain, the IP address may preferably be the IP address of the data storage node at each time point of the second blockchain.
[0113] The storage module 103 is used to construct a blockchain storage program according to the standard time data function, run the blockchain storage program, and store the time data set to the second blockchain.
[0114] In detail, a blockchain storage program is constructed according to the standard time data function, including:
[0115] Step A: constructing an interface connection program for a blockchain, and using the interface connection program to connect to the second blockchain;
[0116] Step B: When the connection is successful, test whether the interface connection program runs successfully. If the interface connection program fails to run, return to step A. If the interface connection program runs successfully, package the standard time data function and the interface connection program to obtain the blockchain storage program.
[0117] The main purpose of the blockchain storage program is to connect the data in multiple blockchains in series. For example, if a time data set in the first blockchain is input into the second blockchain, the blockchain storage program needs to be used to connect the time data set in series to the second blockchain. When constructing the blockchain storage program, an interface connection program needs to be constructed to connect the second blockchain, and the interface connection program needs to be tested for validity to prevent abnormalities in the interface connection program.
[0118] There are many methods for testing whether the interface connection program runs successfully. In detail, the method for testing whether the interface connection program runs successfully includes:
[0119] Call and run the test function in the interface connection program. If the test function does not call data from the second blockchain, the interface connection program fails to run. If the test function calls data from the database, the interface connection program runs successfully.
[0120] For example, a test function test is constructed in the interface connection program. The main purpose of the test function test is to read the character data A in the second blockchain. If the test function test reads successfully, the interface connection program runs successfully. If the test function test fails to read, the interface connection program is rebuilt.
[0121] Furthermore, when the blockchain storage program is successfully constructed, the time data set can be stored in the second blockchain through the data collection program. For example, the time data set extracted from the first blockchain as mentioned above can be used to store and schedule to the second blockchain.
[0122] like Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing the time data scheduling method of the present invention.
[0123] The electronic device 1 may include a processor 10 , a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as a time data scheduling program 12 .
[0124] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the time data scheduling program, etc., but also be used to temporarily store data that has been output or is to be output.
[0125] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (such as executing time data scheduling programs, etc.) stored in the memory 11, and calling data stored in the memory 11.
[0126] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0127] Figure 4 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 4The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0128] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0129] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0130] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0131] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0132] The time data scheduling program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0133] receiving a time data request instruction, obtaining a time data storage node set from the first blockchain according to the time data request instruction, and calculating a value to be verified of the time data storage node set;
[0134] When the value to be verified is the same as the preset standard value, a time data set in the time data storage node set is obtained, and the time data set is used as a variable parameter of a pre-constructed original time data function to obtain a standard time data function;
[0135] A blockchain storage program is constructed according to the standard time data function, the blockchain storage program is run, and the time data set is stored in a second blockchain.
[0136] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0137] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0138] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0139] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0140] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0141] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0142] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0143] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A time data scheduling method, characterized in that: The method comprises: receiving a time data request instruction, obtaining a time data storage node set from the first blockchain according to the time data request instruction, and calculating a value to be verified of the time data storage node set; When the value to be verified is the same as the preset standard value, a time data set in the time data storage node set is obtained, and the time data set is used as a variable parameter of a pre-constructed original time data function to obtain a standard time data function; Building a blockchain storage program according to the standard time data function, running the blockchain storage program, and storing the time data set in a second blockchain; The step of calculating the value to be verified of the time data storage node set includes: Randomly generating a first random number and a second random number in each time data storage node in the time data storage node set; Calculate the node isolation value of the time data storage node where the first random number and the second random number are located, and collect the node isolation value of each time data storage node to obtain a node isolation value set; Calculate the node contact value of each time data storage node in the time data storage node set according to the first random number to obtain a node contact value set; The node isolation value set and the node contact value set are verified and calculated to obtain the value to be verified.
2. The time data scheduling method according to claim 1, characterized in that: The calculating the node connection value of each time data storage node in the time data storage node set comprises: The node connection value is calculated using the following method: in, Representation and storage in The data identification code corresponding to the time data of each time data storage node, Representation and storage in The data identification code corresponding to the time data of each time data storage node, Indicates The node contact value when the time data is stored in the node, Indicates The first random number of the time data storage node, represents a pre-constructed password value, represents the modulo operation, Indicates The node isolation value of the node is stored in the time data.
3. The time data scheduling method according to claim 1, characterized in that: The method of constructing a blockchain storage program according to the standard time data function includes: Constructing an interface connection program for a blockchain, and using the interface connection program to connect to the second blockchain; The standard time data function and the interface connection program are packaged to obtain the blockchain storage program.
4. The time data scheduling method according to claim 3, characterized in that: The method further includes: Calling and running the test function in the interface connection program; If the test function does not call data from the second blockchain, the interface connection program fails to run; If the test function calls data from the second blockchain, the interface connection program runs successfully.
5. The time data scheduling method according to claim 1, characterized in that: The method further comprises constructing the original time data function, wherein the constructing comprises: Create variable parameters that express data at different times; The original time data function is constructed according to the variable parameters and the addresses of the time data storage nodes of the second blockchain.
6. A time data scheduling device, used to implement the time data scheduling method according to any one of claims 1 to 5, characterized in that: The device comprises: A verification value calculation module, configured to receive a time data request instruction, obtain a time data storage node set from the first blockchain according to the time data request instruction, and calculate a value to be verified of the time data storage node set; A function construction module, used for obtaining a time data set in the time data storage node set when the value to be verified is the same as the preset standard value, and using the time data set as a variable parameter of a pre-constructed original time data function to obtain a standard time data function; The storage module is used to construct a blockchain storage program according to the standard time data function, run the blockchain storage program, and store the time data set to a second blockchain.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the time data scheduling method as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the time data scheduling method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Firefly optimization-based shared bicycle scheduling method, system, device and medium
CN110472773A
Blockchain data authorization access method and device
CN111552935A