CN108132782B - Automatic programming device and electronic equipment - Google Patents
Automatic programming device and electronic equipment Download PDFInfo
- Publication number
- CN108132782B CN108132782B CN201711397640.0A CN201711397640A CN108132782B CN 108132782 B CN108132782 B CN 108132782B CN 201711397640 A CN201711397640 A CN 201711397640A CN 108132782 B CN108132782 B CN 108132782B
- Authority
- CN
- China
- Prior art keywords
- programming
- module
- execution point
- variable
- instruction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention relates to an automatic programming device and electronic equipment, and belongs to the field of automation. The device comprises: the instruction acquisition module is used for acquiring a control instruction of a user; the input module is used for inputting the programming variable corresponding to the control instruction into the preset input box if the color identifier is not the preset color identifier; the programming determining module is used for determining a programming action and an execution point corresponding to a programming variable when the programming variable is detected in the preset input frame; and the execution module is used for executing the programming action based on the execution point to finish the automatic programming. According to the method and the device, the control instruction of the user is obtained, if the color identification is not the preset color identification, the programming variable corresponding to the control instruction is input into the preset input frame, the programming action and the execution point corresponding to the programming variable are determined, the programming action is executed based on the execution point, automatic programming is completed, accuracy of identification of the programming action is guaranteed, meanwhile, manual participation is reduced, and the setting process is simplified.
Description
Technical Field
The present invention relates to the field of automation, and in particular, to an automatic programming device and an electronic apparatus.
Background
With the continuous development of internet technology, terminals represented by tablet computers and smart phones are installed with various software operated by terminal-based operating systems from the time of purchase. In the process of software development, developers need to program software, so that the software can realize various functions on a terminal through the running of codes of the software. In the subsequent use process of software, many pieces of software frequently update the software in order to achieve the purposes of adding new functions, correcting defects or improving safety, and in the process of updating the software, developers need to repeatedly write codes in the software.
At present, in the process of developing and updating software, a developer can use a simulation program to control a mouse and a keyboard to operate, and the simulation program automatically programs in a screen color picking mode, that is, the developer controls a programming action based on a programming table of the simulation program, and then the simulation program identifies the color of each table in the programming table to execute a corresponding programming action.
In the process of implementing the invention, the inventor finds that the related art has at least the following problems:
the programming table of the simulation program comprises a plurality of programming actions which are set by developers, and in order to ensure the accuracy of the identification of the programming actions, the setting format of the programming actions is strict, the manual participation degree is high, and the setting process is complicated.
Disclosure of Invention
In order to solve the problems of strict requirements on the setting format of the programming action, higher manual participation, more complicated setting process and higher difficulty in updating and maintaining software in the prior art, the invention provides an automatic programming device and electronic equipment.
According to a first aspect of embodiments of the present invention, there is provided an automatic programming apparatus, the apparatus comprising:
the instruction acquisition module is used for acquiring a control instruction of a user, wherein the control instruction carries a color identifier for indicating whether to execute a programming variable;
the input module is used for inputting the programming variable corresponding to the control instruction into a preset input box if the color identifier is not a preset color identifier;
the programming determination module is used for determining a programming action and an execution point corresponding to the programming variable when the programming variable is detected in the preset input frame, wherein the execution point comprises a first coordinate variable and a second coordinate variable, and the execution point is used for indicating the position for executing the programming action;
and the execution module is used for executing the programming action based on the execution point to finish automatic programming.
In another embodiment, the apparatus further comprises:
the receiving module is used for receiving initial position coordinates set by a user, and the initial position coordinates are used for indicating the position of the preset input frame on a screen;
and the display module is used for acquiring the preset input frame and displaying the preset input frame at the position indicated by the initial position coordinate in the screen.
In another embodiment, the instruction fetch module includes:
the receiving submodule is used for receiving an instruction table of a user, and the instruction table comprises a corresponding relation between at least one programming variable and at least one color identifier;
and the obtaining sub-module is used for obtaining the control instruction in the instruction table based on the corresponding relation.
In another embodiment, the shortcut key determining module is configured to determine a shortcut key corresponding to the programming action, where the shortcut key is used to trigger the programming action;
and the activation module is used for activating the shortcut key based on the execution point, executing the programming action and finishing automatic programming.
In another embodiment, the instruction obtaining module is further configured to, if the color identifier is a preset color identifier, continue to obtain a control instruction of the user, and execute the step of determining whether to execute the corresponding programming action according to the color identifier carried in the control instruction.
In another embodiment, the program determining module is further configured to determine a next execution point of the programming action after the execution of the programming action based on the execution point is completed;
the execution module is further configured to execute the programming action based on the next execution point.
In another embodiment, the apparatus further comprises:
the system comprises a value acquisition module, a value updating module and a processing module, wherein the value acquisition module is used for acquiring a first value and a second value carried by an execution point updating instruction when the execution point updating instruction is received;
and the updating module is used for updating the first coordinate variable of the execution point to a first numerical value and updating the second coordinate of the execution point to a second numerical value.
According to a second aspect of the embodiments of the present invention, there is provided an electronic device including the above automatic programming apparatus.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects:
by acquiring a control instruction of a user, if the color identifier is not the preset color identifier, inputting a programming variable corresponding to the control instruction into the preset input box, determining a programming action and an execution point corresponding to the programming variable when the programming variable is detected in the preset input box, executing the programming action based on the execution point, completing automatic programming, reducing manual participation and simplifying a setting process while ensuring the accuracy of the identification of the programming action.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart illustrating a method of automatic programming in accordance with an exemplary embodiment;
FIG. 2A is a block diagram illustrating an automated programming apparatus in accordance with one illustrative embodiment;
FIG. 2B is a block diagram illustrating an automated programming apparatus in accordance with one illustrative embodiment;
FIG. 2C is a block diagram illustrating an automated programming apparatus in accordance with an exemplary embodiment;
FIG. 2D is a block diagram illustrating an automated programming apparatus in accordance with an exemplary embodiment;
FIG. 2E is a block diagram illustrating an automated programming apparatus in accordance with an exemplary embodiment;
FIG. 3 is a block diagram illustrating an automated programming apparatus in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
FIG. 1 is a flow chart illustrating a method of automated programming, as shown in FIG. 1, including the following steps, according to an exemplary embodiment.
In step 101, initial position coordinates set by a user are received, a preset input frame is obtained, and the preset input frame is displayed at a position indicated by the initial position coordinates in a screen.
In the embodiment of the present invention, the initial position coordinates are used to indicate the position of the preset input box on the screen. When automatic programming is carried out, programming variables to be programmed need to be input into the input box, and the input box is manually dragged to a specified position by a developer, so that each time the mouse is typed on the input box in the automatic programming process is ensured. Due to the difference between human-to-human operations, the specified position to which the input block diagram is dragged by a developer manually each time has deviation, and the specified positions to which the input block diagram is dragged each time are different, so that the input of the mouse in the input block fails at a certain probability.
The inventor realizes that the precision which cannot be achieved by developers can be achieved when the terminal works, and the error can be controlled within the range of 1 pixel, so that in order to ensure that the specified position to which the input frame is dragged each time is the same, the resolution of the terminal screen can be set first, and the initial position coordinate can be determined according to the resolution of the terminal screen, therefore, during the initialization of each automatic programming, the preset input frame can be automatically dragged to the position indicated by the initial position coordinate in the screen by the terminal, thereby reducing the error of the specified position of the preset input frame during each initialization, and ensuring that the probability of the mouse entering failure in the preset input frame is zero during the automatic programming.
In the actual application process, the terminal may set a default coordinate for the initial position coordinate, and provide a coordinate setting entry for setting the initial position coordinate. And when detecting that the user triggers the coordinate setting inlet, displaying a changeable default coordinate, and when detecting that the user confirms to change the default coordinate, covering the default coordinate by using the initial position coordinate set by the user, so that the preset input box is automatically dragged to the position indicated by the initial position coordinate set by the user in the screen during the initialization of the next automatic programming.
In step 102, receiving an instruction table of a user, acquiring a control instruction in the instruction table based on the corresponding relation, and if a color identifier carried by the control instruction is a preset color identifier, executing the following step 203; if the color identifier carried by the control command is not the preset color identifier, the following step 204 is executed.
In the embodiment of the present invention, the instruction table is used for controlling whether to execute the programming variable corresponding to the control instruction, and the instruction table includes a corresponding relationship between at least one programming variable and at least one color identifier. At present, when controlling whether to execute a programming variable, an instruction table is generally adopted for controlling, a color identifier of each cell in the instruction table is detected, when the color identifier of a cell is a preset color identifier, a control instruction corresponding to the cell is executed, that is, when a first cell is a first preset color identifier, a first instruction is executed; and executing a second instruction when the second cell is the second preset color identifier. For example, when the color identification of the first cell is detected as red, a low alarm processing instruction is executed; when detecting that the color mark of the second cell is orange, executing a high alarm processing instruction; executing a low interlock processing instruction when detecting that the color mark of the third cell is green; and when the color mark of the fourth cell is detected to be purple, executing a high interlocking processing instruction.
The inventor realizes that the color differences among some colors are small and cannot be distinguished by human eyes, which may cause errors when developers edit the instruction form, and lead to wrong identification of the color identifier of the cell during automatic programming. Therefore, in order to improve the accuracy of identifying the color identifier of the cell, a principle of executing the control command if the color identifier of the cell is not the preset color identifier may be adopted, and when it is detected that the color identifier of the cell is not the preset color identifier, the control command corresponding to the cell is executed. For example, if the preset color identifier is white, when it is detected that the color identifier of a certain cell is not white, the control instruction corresponding to the cell is executed.
In the process of practical application, the preset color identifier can be a default color identifier of a program, and can also be set by a developer. The terminal can provide the color setting entry of setting up the color sign of predetermineeing, when detecting that the developer triggers this color setting entry, shows acquiescent color sign, and the developer can use the color sign of terminal acquiescence, also can change acquiescent color sign according to the demand to when the terminal starts automatic programming next time, launch the color sign of predetermineeing that the developer set up newly. The embodiment of the present invention does not specifically limit the manner of setting the preset color identifier.
In step 103, if the color identifier is the preset color identifier, skipping a programming variable corresponding to the control instruction, continuing to acquire the control instruction of the user, and executing the step of judging whether to execute the corresponding programming action according to the color identifier carried by the control instruction.
In the embodiment of the invention, when the color identifier of a certain cell is detected to be the preset color identifier, the control instruction of the user can be continuously obtained without executing the programming variable corresponding to the control instruction of the cell, the next cell is continuously identified, and the step of detecting the color identifier of the cell is repeatedly executed.
In step 104, if the color identifier is not the preset color identifier, the programming variable corresponding to the control command is input to the preset input box.
In the embodiment of the present invention, when it is detected that the color identifier of a certain cell is not the preset color identifier, it indicates that the programming variable corresponding to the control instruction of the cell needs to be executed currently, that is, the programming variable corresponding to the control instruction of the cell is input into the preset input box, so that the programming variable is executed based on the preset input box subsequently.
In step 105, when a programming variable is detected in the preset input frame, a programming action and an execution point corresponding to the programming variable are determined, the programming action is executed based on the execution point, automatic programming is completed, the execution point comprises a first coordinate variable and a second coordinate variable, and the execution point is used for indicating the position for executing the programming action.
In an embodiment of the present invention, an execution point is a basis for execution of a programming action for indicating a position where a button, a variable, a line, a block, or the like is displayed in a screen. The execution point varies for different terminal screens depending on the operating system of the terminal and the resolution of the screen.
The inventor realizes that when the automatic programming is carried out, execution points in a program of the terminal are all fixed, and the fixed execution points are directly used in the programming action, so that the programming action is executed based on the execution points, for example, the coordinates of the execution points used by the programming action are (30, 50). Since the coordinates of the execution point are fixed, when the program of the terminal is upgraded, the number of functions provided by the program may increase, which may cause the execution point of the programming action to change. At present, when an execution point of a programming action is updated, because the coordinate of the execution point is fixed and is directly written in a development statement corresponding to the programming action, the development statement corresponding to each programming action needs to be rewritten, and then the execution point of the programming action needs to be changed. When the execution point of the programming action is changed, the related change amount is large, the execution point of each programming action needs to be changed into a new coordinate, and the development statement of the programming action is rewritten, so that the operation process is complicated, and the accuracy is low.
In order to ensure the accuracy of changing the execution point, in the embodiment of the present invention, the execution point of the programming action is set as a variable, that is, the execution point is composed based on the first coordinate variable and the second coordinate variable, and the execution point in the development statement corresponding to the programming action is not set as a fixed point any more, so that when the execution point is set, the first coordinate variable and the second coordinate variable of the execution point in the development statement are directly assigned. When the execution point is set, the terminal can provide an execution point setting entry, when the execution point setting entry is triggered by a user, a first input frame of a first coordinate variable and a second input frame of a second coordinate variable are displayed, numerical values input in the first input frame and the second input frame by the user are obtained, and when automatic programming is carried out, positions indicated by the first coordinate variable and the second coordinate variable in a screen are used as the execution points, and setting of the execution points is completed. For example, an execution point may be set to be (X, Y), where X is a first coordinate variable and Y is a second coordinate variable, and assuming that the value input by the user corresponding to X is 30 and the value input by the user corresponding to Y is 50, when the programming action is executed, the point with coordinates of (30,50) in the screen may be used as the execution point, and the development statement corresponding to the programming action does not need to be written again.
Because different programming actions may conflict when executed at the same time, in order to ensure that the programming actions can be executed normally, different calling software is usually set for the different programming actions, for example, for a template copying action, calling software 1 is adopted for calling; for the range conversion action, calling software 2 is adopted for calling; for the alarm processing action, calling software 3 is adopted for calling. Furthermore, when a certain programming action needs to be executed, starting calling software corresponding to the programming action; and when the execution of a certain programming action is finished, closing the calling software corresponding to the programming action. The inventor realizes that the process of starting and closing calling software is relatively complicated, the program of the terminal needs to be started and closed simultaneously when the automatic programming is ensured to run stably, and a large amount of workload is consumed, so that shortcut keys for triggering programming actions can be set for different programming actions, and when a certain programming action is determined to be required to be executed, the shortcut key corresponding to the programming action is activated to realize the execution of the programming action. When the programming action is executed, the shortcut key corresponding to the programming action can be determined first, and the shortcut key is activated based on the execution point so as to execute the programming action and complete the automatic programming. It should be noted that, in the process of practical application, the programming action may also be directly executed, and a shortcut key does not need to be set for the programming action.
In the process of practical application, because the program of the terminal needs to be continuously upgraded, further more functions can be realized, and when the program of the terminal is upgraded, because the execution point set by the user exists at present, the first coordinate variable and the second coordinate variable of the current execution point need to be changed, so that the programming action is executed based on the new execution point when the next automatic programming is performed. Wherein, the modification of the execution point can be realized through the following steps one and two.
Step one, when an execution point updating instruction is received, a first numerical value and a second numerical value carried by the execution point updating instruction are obtained.
In the embodiment of the present invention, the first value is a value of a new first coordinate variable set by a user, and the second value is a value of a new second coordinate variable set by the user. And when detecting that the user triggers the execution point setting entrance, displaying the values of the current first coordinate variable and the second coordinate variable, and displaying the first input box, the second input box and the confirmation button. And when the first numerical value and the second numerical value input by the user are detected and the confirmation button is triggered by the user, determining that an execution point updating instruction is received, so that the execution point is updated based on a new value.
And step two, updating the first coordinate variable of the execution point to a first numerical value, and changing the second coordinate of the execution point to a second numerical value.
In the embodiment of the invention, when the execution point updating instruction of the user is confirmed to be received, the first numerical value and the second numerical value are obtained, the values of the current first coordinate variable and the second coordinate variable are covered based on the second numerical value and the second numerical value, and a new execution point is obtained, so that the programming action is executed based on the new execution point when the next automatic programming is carried out.
In step 106, after the execution of the programming action based on the execution point is completed, a next execution point of the programming action is determined, and the programming action is executed based on the next execution point.
The inventor realizes that a large amount of repeated work such as data conversion, alarm processing and the like exists in the automatic programming process, namely, a large amount of programming actions are the same, and only execution points are different, for example, the execution point of the programming action in the first row is the head of the first row, and the programming action is action a; the execution point of the programming action of the second row is the first bit of the second row, and the programming action is also a, so in order to simplify the process of automatic programming, a plurality of execution points can be set for different programming actions, when the programming action is completed based on the current execution point, the next execution point of the programming action is determined, and the programming action is executed based on the next execution point.
According to the method provided by the embodiment of the invention, the control instruction of the user is obtained, if the color identification is not the preset color identification, the programming variable corresponding to the control instruction is input into the preset input frame, the programming action and the execution point corresponding to the programming variable are determined when the programming variable is detected in the preset input frame, the programming action is executed based on the execution point, the automatic programming is completed, the accuracy of the identification of the programming action is ensured, the manual participation degree is reduced, and the setting process is simplified.
FIG. 2A is a block diagram illustrating an automated programming apparatus according to one exemplary embodiment. Referring to fig. 2A, the apparatus includes an instruction acquisition module 201, an input module 202, a program determination module 203, and an execution module 204.
The instruction obtaining module 201 is configured to obtain a control instruction of a user, where the control instruction carries a color identifier for indicating whether to execute a programming variable;
the input module 202 is configured to input a programming variable corresponding to the control instruction to a preset input box if the color identifier is not the preset color identifier;
the programming determining module 203 is configured to determine a programming action and an execution point corresponding to a programming variable when the programming variable is detected in a preset input frame, where the execution point includes a first coordinate variable and a second coordinate variable, and the execution point is used to indicate a position where the programming action is executed;
the execution module 204 is configured to execute a programming action based on the execution point to complete the automatic programming.
According to the device provided by the embodiment of the invention, the control instruction of the user is obtained, if the color identification is not the preset color identification, the programming variable corresponding to the control instruction is input into the preset input frame, the programming action and the execution point corresponding to the programming variable are determined when the programming variable is detected in the preset input frame, the programming action is executed based on the execution point, the automatic programming is completed, the accuracy of the identification of the programming action is ensured, the manual participation degree is reduced, and the setting process is simplified.
In another embodiment, referring to fig. 2B, the apparatus further comprises a receiving module 205 and a display module 206.
The receiving module 205 is configured to receive an initial position coordinate set by a user, where the initial position coordinate is used to indicate a position of a preset input box on a screen;
the display module 206 is configured to obtain the preset input frame, and display the preset input frame at a position indicated by the initial position coordinate in the screen.
In another embodiment, referring to fig. 2C, the instruction fetch module 201 includes a receive submodule 2011 and a fetch submodule 2012.
The receiving sub-module 2011 is configured to receive an instruction form of a user, where the instruction form includes a correspondence between at least one programming variable and at least one color identifier;
the obtaining sub-module 2012 is configured to obtain the control command from the command table based on the corresponding relationship.
In another embodiment, referring to fig. 2D, the apparatus further comprises a shortcut determination module 207 and an activation module 208.
The shortcut key determining module 207 is configured to determine a shortcut key corresponding to the programming action, where the shortcut key is used to trigger the programming action;
the activation module 208 is configured to activate a shortcut key based on the execution point, execute a programming action, and complete automatic programming.
In another embodiment, the instruction obtaining module 201 is further configured to, if the color identifier is a preset color identifier, continue to obtain the control instruction of the user, and execute the step of determining whether to execute the corresponding programming action according to the color identifier carried in the control instruction.
In another embodiment, the program determining module 203 is further configured to determine a next execution point of the programming action after the execution of the programming action based on the execution point is completed;
the execution module 204 is further configured to execute a programming action based on the next execution point.
In another embodiment, referring to fig. 2E, the apparatus further comprises a value obtaining module 209 and an updating module 210.
The value obtaining module 209 is configured to obtain a first value and a second value carried by an execution point update instruction when the execution point update instruction is received;
the updating module 210 is configured to update the first coordinate variable of the execution point to a first numerical value, and update the second coordinate of the execution point to a second numerical value.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 3 is a block diagram illustrating an automated programming apparatus 300 in accordance with an exemplary embodiment. For example, the apparatus 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 3, the apparatus 300 may include one or more of the following components: processing component 302, memory 304, power component 306, multimedia component 308, audio component 310, interface to I/O (Input/Output) 312, sensor component 314, and communication component 316.
The processing component 302 generally controls overall operation of the device 300, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 302 may include one or more processors 320 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 302 can include one or more modules that facilitate interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate interaction between the multimedia component 308 and the processing component 302.
The memory 304 is configured to store various types of data to support operations at the apparatus 300. Examples of such data include instructions for any application or method operating on device 300, contact data, phonebook data, messages, pictures, videos, and so forth. The Memory 304 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as an SRAM (Static random access Memory), an EEPROM (Electrically-Erasable Programmable Read-Only Memory), an EPROM (Erasable Programmable Read-Only Memory), a PROM (Programmable Read-Only Memory), a ROM (Read-Only Memory), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
The power supply component 306 provides power to the various components of the device 300. The power components 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 300.
The multimedia component 308 includes a screen that provides an output interface between the device 300 and a user. In some embodiments, the screen may include an LCD (Liquid Crystal Display) and a TP (touch panel). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 308 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 300 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 310 is configured to output and/or input audio signals. For example, the audio component 310 includes a MIC (Microphone) configured to receive external audio signals when the device 300 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 304 or transmitted via the communication component 316. In some embodiments, audio component 310 also includes a speaker for outputting audio signals.
The I/O interface 312 provides an interface between the processing component 302 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 314 includes one or more sensors for providing various aspects of status assessment for the device 300. For example, sensor assembly 314 may detect an open/closed state of device 300, the relative positioning of components, such as a display and keypad of apparatus 300, the change in position of apparatus 300 or a component of apparatus 300, the presence or absence of user contact with apparatus 300, the orientation or acceleration/deceleration of apparatus 300, and the change in temperature of apparatus 300. Sensor assembly 314 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. Sensor assembly 314 may also include a light sensor, such as a CMOS (Complementary Metal Oxide Semiconductor) or CCD (Charge-coupled Device) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 314 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 316 is configured to facilitate wired or wireless communication between the apparatus 300 and other devices. The device 300 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the Communication component 316 further includes an NFC (near field Communication) module to facilitate short-range Communication. For example, the NFC module may be implemented based on an RFID (Radio Frequency Identification) technology, an IrDA (infrared-data association) technology, an UWB (ultra wideband) technology, a BT (Bluetooth) technology, and other technologies.
In an exemplary embodiment, the apparatus 300 may be implemented by one or more ASICs (Application Specific Integrated circuits), DSPs (Digital signal processors), DSPDs (Digital signal processing devices), PLDs (Programmable Logic devices), FPGAs (Field Programmable gate arrays), controllers, microcontrollers, microprocessors or other electronic components for performing the above-described automatic programming method.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 304 comprising instructions, executable by the processor 320 of the apparatus 300 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a RAM (random access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of an automated programming apparatus, enable the automated programming apparatus to perform the automated programming method described above.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (8)
1. An automated programming apparatus, the apparatus comprising:
the instruction acquisition module is used for acquiring a control instruction of a user, wherein the control instruction carries a color identifier for indicating whether to execute a programming variable, and the color identifier is the color of a cell corresponding to the control instruction;
the input module is used for inputting the programming variable corresponding to the control instruction into a preset input box if the color identifier is not a preset color identifier;
the programming determination module is used for determining a programming action and an execution point corresponding to the programming variable when the programming variable is detected in the preset input frame, wherein the execution point comprises a first coordinate variable and a second coordinate variable, the first coordinate variable is an abscissa, the second coordinate variable is an ordinate, and the execution point is used for indicating the position of executing the programming action;
and the execution module is used for executing the programming action based on the execution point to finish automatic programming.
2. The apparatus of claim 1, further comprising:
the receiving module is used for receiving initial position coordinates set by a user, and the initial position coordinates are used for indicating the position of the preset input frame on a screen;
and the display module is used for acquiring the preset input frame and displaying the preset input frame at the position indicated by the initial position coordinate in the screen.
3. The apparatus of claim 1, wherein the instruction fetch module comprises:
the receiving submodule is used for receiving an instruction table of a user, and the instruction table comprises a corresponding relation between at least one programming variable and at least one color identifier;
and the obtaining sub-module is used for obtaining the control instruction in the instruction table based on the corresponding relation.
4. The apparatus of claim 1, further comprising:
the shortcut key determining module is used for determining a shortcut key corresponding to the programming action, and the shortcut key is used for triggering the programming action;
and the activation module is used for activating the shortcut key based on the execution point, executing the programming action and finishing automatic programming.
5. The device according to claim 1, wherein the instruction obtaining module is further configured to continue obtaining the control instruction of the user if the color identifier is a preset color identifier, and execute the step of determining whether to execute the corresponding programming action according to the color identifier carried in the control instruction.
6. The apparatus of claim 1, wherein the program determining module is further configured to determine a next execution point of the programming action after the programming action is executed based on the execution point;
the execution module is further configured to execute the programming action based on the next execution point.
7. The apparatus of claim 1, further comprising:
the system comprises a value acquisition module, a value updating module and a processing module, wherein the value acquisition module is used for acquiring a first value and a second value carried by an execution point updating instruction when the execution point updating instruction is received;
and the updating module is used for updating the first coordinate variable of the execution point to a first numerical value and updating the second coordinate variable of the execution point to a second numerical value.
8. An electronic device characterized by comprising the automatic programming apparatus according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711397640.0A CN108132782B (en) | 2017-12-21 | 2017-12-21 | Automatic programming device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711397640.0A CN108132782B (en) | 2017-12-21 | 2017-12-21 | Automatic programming device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108132782A CN108132782A (en) | 2018-06-08 |
CN108132782B true CN108132782B (en) | 2020-11-27 |
Family
ID=62391306
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711397640.0A Active CN108132782B (en) | 2017-12-21 | 2017-12-21 | Automatic programming device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108132782B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108873781B (en) * | 2018-07-09 | 2020-07-07 | 厦门驿创数字科技有限公司 | Use method of full-automatic digitization equipment and full-automatic digitization equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014154039A (en) * | 2013-02-12 | 2014-08-25 | Fuji Electric Co Ltd | Sequence monitoring automatic programming device and automatic programming method |
CN104656543A (en) * | 2015-03-17 | 2015-05-27 | 浪潮集团有限公司 | PLC gradient diagram matrix editing display method |
CN104808611A (en) * | 2015-02-26 | 2015-07-29 | 沈阳东北电力调节技术有限公司 | Industrial control system programming method |
CN107066252A (en) * | 2016-02-10 | 2017-08-18 | 通用电气公司 | Graphical interfaces for the configuration of industrial automation system |
-
2017
- 2017-12-21 CN CN201711397640.0A patent/CN108132782B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014154039A (en) * | 2013-02-12 | 2014-08-25 | Fuji Electric Co Ltd | Sequence monitoring automatic programming device and automatic programming method |
CN104808611A (en) * | 2015-02-26 | 2015-07-29 | 沈阳东北电力调节技术有限公司 | Industrial control system programming method |
CN104656543A (en) * | 2015-03-17 | 2015-05-27 | 浪潮集团有限公司 | PLC gradient diagram matrix editing display method |
CN107066252A (en) * | 2016-02-10 | 2017-08-18 | 通用电气公司 | Graphical interfaces for the configuration of industrial automation system |
Non-Patent Citations (1)
Title |
---|
压缩机PLC系统AI快速自动编程;李晓臣 等;《信息技术与应用》;20150215(第4期);第20-21页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108132782A (en) | 2018-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3418885B1 (en) | Method and device for calling software development kit | |
US10055204B2 (en) | Generating communication firmware and a program plug-in based on product information and a program template | |
EP3188414A1 (en) | Method and apparatus for controlling smart device | |
CN105260117B (en) | Application program control method and device | |
CN110231901B (en) | Application interface display method and device | |
EP3032412A1 (en) | Method and device for upgrading firmware | |
EP2991275A1 (en) | Making router management application compatible with router firmware | |
EP3322227B1 (en) | Methods and apparatuses for controlling wireless connection, computer program and recording medium | |
EP3142337A1 (en) | Method and apparatus for installing application and smart device using them | |
CN110782510A (en) | Sticker generation method and device | |
CN108132782B (en) | Automatic programming device and electronic equipment | |
EP3255575B1 (en) | Application triggering method and device | |
CN108563487B (en) | User interface updating method and device | |
CN114047885B (en) | Method, device, equipment and medium for writing multi-type data | |
CN115951944A (en) | Shortcut key setting method and device, electronic equipment and storage medium | |
CN114661606A (en) | Program debugging method and device, electronic equipment and storage medium | |
EP3176740A1 (en) | Information processing method and apparatus, computer program and recording medium | |
CN106533841A (en) | Method, apparatus and system for testing protocol consistency of user identification module cards | |
CN108427568B (en) | User interface updating method and device | |
CN112631695A (en) | Data verification method and device, electronic equipment and storage medium | |
CN106709285B (en) | Display method and device of application lock interface | |
CN113590382B (en) | NFC function processing method, NFC function processing device and storage medium | |
CN105160527A (en) | Mobile payment method and device | |
CN105635818B (en) | Start method and device | |
CN108710307B (en) | Control method and device of intelligent equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |